#include "time.h"
#include "main.h"
#include "stm32f10x_it.h"
_calendar_obj calendar;
static void RTC_NVIC_Config(void)
{
NVIC_InitTypeDef NVIC_InitStructure;
NVIC_InitStructure.NVIC_IRQChannel = RTC_IRQChannel;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
}
/****************************************************************/
void delay_ms(u16 ms)
{
TIM_TimeBaseInitTypeDef TIM_TimeBaseInitStruct;
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6 , ENABLE);
TIM_TimeBaseInitStruct.TIM_Prescaler= 35999;
TIM_TimeBaseInitStruct.TIM_Period=ms*2;
TIM_TimeBaseInit(TIM6, &TIM_TimeBaseInitStruct);
TIM_SelectOnePulseMode(TIM6, TIM_OPMode_Single);
TIM_ClearFlag(TIM6, TIM_IT_Update);
TIM_Cmd(TIM6, ENABLE);
while(TIM_GetFlagStatus(TIM6, TIM_IT_Update)==RESET);
TIM_ClearFlag(TIM6, TIM_IT_Update);
}
//----------------------------------------------
u32 HEX_BCD(u32 NUM)
{
if(NUM> 9) NUM = NUM + 6;
if(NUM>25) NUM = NUM + 6;
if(NUM>41) NUM = NUM + 6;
if(NUM>57) NUM = NUM + 6;
if(NUM>73) NUM = NUM + 6;
if(NUM>89) NUM = 0;
return NUM;
}
//----------------------
void TimeApp(void)
{
short min=0,hour=0,shimin=0;
short day=0,dayshi=0,month=0,week=0;
hour
= calendar.hour;
min = calendar.min%10;
shimin = calendar.min/10;
month
= calendar.w_month;
week
= calendar.week;
day
= calendar.w_date%10;
dayshi = calendar.w_date/10;
OLED_ShowCN32(20,5,26,8, (uint8_t *)Month);
//
OLED_ShowCN32(76,2,82,6, (uint8_t *)F6x32);
//
MIN(min);
HOUR(hour);
//
SHIMIN(shimin);
if(dayshi==0)
{
GE_DAY(day);
}
else
{
DAY(day);
DAYSHI(dayshi);
}
MONTH(month);
WEEK(week);
OLED_Charge();
}
/***********************************************************/
/**********************************************/
void RTC_IRQHandler(void)
{
if (RTC_GetITStatus(RTC_IT_SEC) != RESET)//
{
RTC_Get();//¸üÐÂʱ¼ä
}
if(RTC_GetITStatus(RTC_IT_ALR)!= RESET)//
{
RTC_ClearITPendingBit(RTC_IT_ALR);
//
RTC_Get();
}
RTC_ClearITPendingBit(RTC_IT_SEC|RTC_IT_OW);
//
RTC_WaitForLastTask();
}
u8 Is_Leap_Year(u16 year)
{
if(year%4==0) //±ØÐëÄܱ»4Õû³ý
{
if(year%100==0)
{
if(year%400==0)return 1;//Èç¹ûÒÔ00½áβ,»¹ÒªÄܱ»400Õû³ý
else return 0;
}else return 1;
}else return 0;
}
u8 const table_week[12]={0,3,3,6,1,4,6,2,5,0,3,5}; //ÔÂÐÞÕýÊý¾Ý±í
//ƽÄêµÄÔ·ÝÈÕÆÚ±í
const u8 mon_table[12]={31,28,31,30,31,30,31,31,30,31,30,31};
u8 RTC_Set(u16 syear,u8 smon,u8 sday,u8 hour,u8 min,u8 sec)
{
u16 t;
u32 seccount=0;
if(syear<1970||syear>2099)return 1;
for(t=1970;t
//°ÑËùÓÐÄê·ÝµÄÃëÖÓÏà¼Ó
{
if(Is_Leap_Year(t))seccount+=31622400;//ÈòÄêµÄÃëÖÓÊý
else seccount+=31536000;
//ƽÄêµÄÃëÖÓÊý
}
smon-=1;
for(t=0;t //°ÑÇ°ÃæÔ·ݵÄÃëÖÓÊýÏà¼Ó
{
seccount+=(u32)mon_table[t]*86400;//Ô·ÝÃëÖÓÊýÏà¼Ó
if(Is_Leap_Year(syear)&&t==1)seccount+=86400;//ÈòÄê2Ô·ÝÔö¼ÓÒ»ÌìµÄÃëÖÓÊý
}
seccount+=(u32)(sday-1)*86400;//°ÑÇ°ÃæÈÕÆÚµÄÃëÖÓÊýÏà¼Ó
seccount+=(u32)hour*3600;//СʱÃëÖÓÊý
seccount+=(u32)min*60;
//·ÖÖÓÃëÖÓÊý
seccount+=sec;//×îºóµÄÃëÖÓ¼ÓÉÏÈ¥
RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR | RCC_APB1Periph_BKP, ENABLE);
//ʹÄÜPWRºÍBKPÍâÉèʱÖÓ
PWR_BackupAccessCmd(ENABLE);
//ʹÄÜRTCºÍºó±¸¼Ä´æÆ÷·ÃÎÊ
RTC_SetCounter(seccount);
//ÉèÖÃRTC¼ÆÊýÆ÷µÄÖµ
RTC_WaitForLastTask();
//µÈ´ý×î½üÒ»´Î¶ÔRTC¼Ä´æÆ÷µÄд²Ù×÷Íê³É
return 0;
}
u8 RTC_Get(void)
{
static u16 daycnt=0;
u32 timecount=0;
u32 temp=0;
u16 temp1=0;
timecount=RTC_GetCounter();
temp=timecount/86400; //µÃµ½ÌìÊý(ÃëÖÓÊý¶ÔÓ¦µÄ)
if(daycnt!=temp)//³¬¹ýÒ»ÌìÁË
{
daycnt=temp;
temp1=1970;
//´Ó1970Ä꿪ʼ
while(temp>=365)
{
if(Is_Leap_Year(temp1))//ÊÇÈòÄê
{
if(temp>=366)temp-=366;//ÈòÄêµÄÃëÖÓÊý
else {temp1++;break;}
}
else temp-=365;
//ƽÄê
temp1++;
}
calendar.w_year=temp1;//µÃµ½Äê·Ý
temp1=0;
while(temp>=28)//³¬¹ýÁËÒ»¸öÔÂ
{
if(Is_Leap_Year(calendar.w_year)&&temp1==1)//µ±ÄêÊDz»ÊÇÈòÄê/2Ô·Ý
{
if(temp>=29)temp-=29;//ÈòÄêµÄÃëÖÓÊý
else break;
}
else
{
if(temp>=mon_table[temp1])temp-=mon_table[temp1];//ƽÄê
else
break;
}
temp1++;
}
calendar.w_month=temp1+1;
//µÃµ½Ô·Ý
calendar.w_date=temp+1;
//µÃµ½ÈÕÆÚ
}
temp=timecount%86400;
//µÃµ½ÃëÖÓÊý
calendar.hour=temp/3600;
//Сʱ
calendar.min=(temp%3600)/60;
//·ÖÖÓ
calendar.sec=(temp%3600)%60;
//ÃëÖÓ
calendar.week=RTC_Get_Week(calendar.w_year,calendar.w_month,calendar.w_date);//»ñÈ¡ÐÇÆÚ
return 0;
}
//»ñµÃÏÖÔÚÊÇÐÇÆÚ¼¸
//¹¦ÄÜÃèÊö:ÊäÈ빫ÀúÈÕÆڵõ½ÐÇÆÚ(Ö»ÔÊÐí1901-2099Äê)
//ÊäÈë²ÎÊý£º¹«ÀúÄêÔÂÈÕ
//·µ»ØÖµ£ºÐÇÆÚºÅ
u8 RTC_Get_Week(u16 year,u8 month,u8 day)
{
u16 temp2;
u8 yearH,yearL;
yearH=year/100;
yearL=year%100;
// Èç¹ûΪ21ÊÀ¼Í,Äê·ÝÊý¼Ó100
if (yearH>19)yearL+=100;
// Ëù¹ýÈòÄêÊýÖ»Ëã1900ÄêÖ®ºóµÄ
temp2=yearL+yearL/4;
temp2=temp2%7;
temp2=temp2+day+table_week[month-1];
if (yearL%4==0&&month<3)temp2--;
return(temp2%7);
}
/*************************************************************/
/**************************
RTC
**************************/
u8 RTC_Init(void)
{
//¼ì²éÊDz»ÊǵÚÒ»´ÎÅäÖÃʱÖÓ
u8 temp=0;
RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR | RCC_APB1Periph_BKP, ENABLE);
//ʹÄÜPWRºÍBKPÍâÉèʱÖÓ
PWR_BackupAccessCmd(ENABLE);
//ʹÄܺ󱸼ĴæÆ÷·ÃÎÊ
if (BKP_ReadBackupRegister(BKP_DR1) != 0xAA00)
//´ÓÖ¸¶¨µÄºó±¸¼Ä´æÆ÷ÖжÁ³öÊý¾Ý:¶Á³öÁËÓëдÈëµÄÖ¸¶¨Êý¾Ý²»Ïàºõ
{
BKP_DeInit();
//¸´Î»±¸·ÝÇøÓò
RCC_LSICmd(ENABLE);
//ÉèÖÃÍⲿµÍËÙ¾§Õñ(LSE),ʹÓÃÍâÉèµÍËÙ¾§Õñ
while (RCC_GetFlagStatus(RCC_FLAG_LSIRDY) == RESET&&temp<250)
//¼ì²éÖ¸¶¨µÄRCC±ê־λÉèÖÃÓë·ñ,µÈ´ýµÍËÙ¾§Õñ¾ÍÐ÷
{
temp++;
//delay_ms(10);
}
LED2_ON;
if(temp>=250)return 1;//³õʼ»¯Ê±ÖÓʧ°Ü,¾§ÕñÓÐÎÊÌâ
RCC_RTCCLKConfig(RCC_RTCCLKSource_LSI);
//ÉèÖÃRTCʱÖÓ(RTCCLK),Ñ¡ÔñLSE×÷ΪRTCʱÖÓ
RCC_RTCCLKCmd(ENABLE);
//ʹÄÜRTCʱÖÓ
RTC_WaitForLastTask();
//µÈ´ý×î½üÒ»´Î¶ÔRTC¼Ä´æÆ÷µÄд²Ù×÷Íê³É
RTC_WaitForSynchro();
//µÈ´ýRTC¼Ä´æÆ÷ͬ²½
RTC_ITConfig(RTC_IT_SEC, ENABLE);
//ʹÄÜRTCÃëÖжÏ
RTC_WaitForLastTask();
//µÈ´ý×î½üÒ»´Î¶ÔRTC¼Ä´æÆ÷µÄд²Ù×÷Íê³É
RTC_EnterConfigMode();
// ÔÊÐíÅäÖÃ
RTC_SetPrescaler(40000);
//ÉèÖÃRTCÔ¤·ÖƵµÄÖµ
//RTC_SetPrescaler(32767); //ÉèÖÃRTCÔ¤·ÖƵµÄÖµ
RTC_WaitForLastTask();
//µÈ´ý×î½üÒ»´Î¶ÔRTC¼Ä´æÆ÷µÄд²Ù×÷Íê³É
RTC_ITConfig(RTC_IT_ALR , DISABLE);
RTC_Set(2017,12,8,17,48,55); //ÉèÖÃʱ¼ä
RTC_WaitForLastTask();
RTC_ExitConfigMode(); //Í˳öÅäÖÃģʽ
BKP_WriteBackupRegister(BKP_DR1, 0xAA00);
//ÏòÖ¸¶¨µÄºó±¸¼Ä´æÆ÷ÖÐдÈëÓû§³ÌÐòÊý¾Ý
}
else//ϵͳ¼ÌÐø¼Æʱ
{
RCC_LSICmd(ENABLE);
RTC_WaitForSynchro();
//µÈ´ý×î½üÒ»´Î¶ÔRTC¼Ä´æÆ÷µÄд²Ù×÷Íê³É
RTC_ITConfig(RTC_IT_SEC, ENABLE);
//ʹÄÜRTCÃëÖжÏ
RTC_WaitForLastTask();
//µÈ´ý×î½üÒ»´Î¶ÔRTC¼Ä´æÆ÷µÄд²Ù×÷Íê³É
}
RTC_NVIC_Config();//RCTÖжϷÖ×éÉèÖÃ
RTC_Get();//¸üÐÂʱ¼ä
return 0; //ok
}
/**********************************************************/
/********************
ÖÜ
************************/
void WEEK(uint8_t week)
{
switch(week)
{
case 1:
OLED_ShowCN32(2,0,42,3, (uint8_t *)Mon);
break;
case 2:
OLED_ShowCN32(2,0,42,3, (uint8_t *)Tues);
break;
case 3:
OLED_ShowCN32(2,0,42,3, (uint8_t *)Wednes);
break;
case 4:
OLED_ShowCN32(2,0,42,3, (uint8_t *)Thurs);
break;
case 5:
OLED_ShowCN32(2,0,42,3, (uint8_t *)Fri);
break;
case 6:
OLED_ShowCN32(2,0,42,3, (uint8_t *)Statur);
break;
case 7:
OLED_ShowCN32(2,0,42,3, (uint8_t *)Sun);
week = 1;
break;
default:
break;
}
}
/**************
ÈÕÆÚ
***************/
void GE_DAY(uint8_t day)
{
switch(day)
{
case 1:
OLED_ShowCN32(27,5,37,8, (uint8_t *)F10x24_1);
break;
case 2:
OLED_ShowCN32(27,5,37,8, (uint8_t *)F10x24_2);
break;
case 3:
OLED_ShowCN32(27,5,37,8, (uint8_t *)F10x24_3);
break;
case 4:
OLED_ShowCN32(27,5,37,8, (uint8_t *)F10x24_4);
break;
case 5:
OLED_ShowCN32(27,5,37,8, (uint8_t *)F10x24_5);
break;
case 6:
OLED_ShowCN32(27,5,37,8, (uint8_t *)F10x24_6);
break;
case 7:
OLED_ShowCN32(27,5,37,8, (uint8_t *)F10x24_7);
break;
case 8:
OLED_ShowCN32(27,5,37,8, (uint8_t *)F10x24_8);
break;
case 9:
OLED_ShowCN32(27,5,37,8, (uint8_t *)F10x24_9);
day = 0;
break;
default:
day = 0;
break;
}
}
void DAY(uint8_t day)
{
switch(day)
{
case 0:
OLED_ShowCN32(36,5,46,8, (uint8_t *)F10x24_0);
break;
case 1:
OLED_ShowCN32(36,5,46,8, (uint8_t *)F10x24_1);
break;
case 2:
OLED_ShowCN32(36,5,46,8, (uint8_t *)F10x24_2);
break;
case 3:
OLED_ShowCN32(36,5,46,8, (uint8_t *)F10x24_3);
break;
case 4:
OLED_ShowCN32(36,5,46,8, (uint8_t *)F10x24_4);
break;
case 5:
OLED_ShowCN32(36,5,46,8, (uint8_t *)F10x24_5);
break;
case 6:
OLED_ShowCN32(36,5,46,8, (uint8_t *)F10x24_6);
break;
case 7:
OLED_ShowCN32(36,5,46,8, (uint8_t *)F10x24_7);
break;
case 8:
OLED_ShowCN32(35,5,45,8, (uint8_t *)F10x24_8);
break;
case 9:
OLED_ShowCN32(35,5,45,8, (uint8_t *)F10x24_9);
day = 0;
break;
default:
day = 0;
break;
}
}
void DAYSHI(uint8_t dayshi)
{
switch(dayshi)
{
case 0:
OLED_ShowCN32(27,5,37,8, (uint8_t *)F10x24_kong);
break;
case 1:
OLED_ShowCN32(27,5,37,8, (uint8_t *)F10x24_1);
break;
case 2:
OLED_ShowCN32(27,5,37,8, (uint8_t *)F10x24_2);
break;
case 3:
OLED_ShowCN32(27,5,37,8, (uint8_t *)F10x24_3);
dayshi = 0;
break;
default:
dayshi = 0;
break;
}
}
void MONTH(uint8_t month)
{
switch(month)
{
case 1:
OLED_ShowCN32(0,5,10,8, (uint8_t *)F10x24_kong);
OLED_ShowCN32(10,5,20,8, (uint8_t *)F10x24_1);
break;
case 2:
OLED_ShowCN32(0,5,10,8, (uint8_t *)F10x24_kong);
OLED_ShowCN32(10,5,20,8, (uint8_t *)F10x24_2);
break;
case 3:
OLED_ShowCN32(0,5,10,8, (uint8_t *)F10x24_kong);
OLED_ShowCN32(10,5,20,8, (uint8_t *)F10x24_3);
month = 0;
break;
case 4:
OLED_ShowCN32(0,5,10,8, (uint8_t *)F10x24_kong);
OLED_ShowCN32(10,5,20,8, (uint8_t *)F10x24_4);
month = 0;
break;
case 5:
OLED_ShowCN32(0,5,10,8, (uint8_t *)F10x24_kong);
OLED_ShowCN32(10,5,20,8, (uint8_t *)F10x24_5);
month = 0;
break;
case 6:
OLED_ShowCN32(0,5,10,8, (uint8_t *)F10x24_kong);
OLED_ShowCN32(10,5,20,8, (uint8_t *)F10x24_6);
month = 0;
break;
case 7:
OLED_ShowCN32(0,5,10,8, (uint8_t *)F10x24_kong);
OLED_ShowCN32(10,5,20,8, (uint8_t *)F10x24_7);
month = 0;
break;
case 8:
OLED_ShowCN32(0,5,10,8, (uint8_t *)F10x24_kong);
OLED_ShowCN32(10,5,20,8, (uint8_t *)F10x24_8);
month = 0;
break;
case 9:
OLED_ShowCN32(0,5,10,8, (uint8_t *)F10x24_kong);
OLED_ShowCN32(10,5,20,8, (uint8_t *)F10x24_9);
month = 0;
break;
case 10:
OLED_ShowCN32( 0,5,10,8, (uint8_t *)F10x24_1);
OLED_ShowCN32(10,5,20,8, (uint8_t *)F10x24_0);
break;
case 11:
OLED_ShowCN32( 0,5,10,8, (uint8_t *)F10x24_1);
OLED_ShowCN32(10,5,20,8, (uint8_t *)F10x24_1);
break;
case 12:
OLED_ShowCN32( 0,5,10,8, (uint8_t *)F10x24_1);
OLED_ShowCN32(10,5,20,8, (uint8_t *)F10x24_2);
month = 1;
break;
default:
month = 1;
break;
}
}
/*************************
ʱ
**************************/
void HOUR(uint8_t hour)
{
switch(hour)
{
case 0:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_0);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_0);
break;
case 1:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_kong);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_1);
break;
case 2:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_kong);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_2);
break;
case 3:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_kong);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_3);
break;
case 4:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_kong);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_4);
break;
case 5:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_kong);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_5);
break;
case 6:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_kong);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_6);
break;
case 7:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_kong);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_7);
break;
case 8:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_kong);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_8);
break;
case 9:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_kong);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_9);
break;
case 10:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_1);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_0);
break;
case 11:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_1);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_1);
break;
case 12:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_1);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_2);
break;
case 13:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_1);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_3);
break;
case 14:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_1);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_4);
break;
case 15:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_1);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_5);
break;
case 16:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_1);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_6);
break;
case 17:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_1);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_7);
break;
case 18:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_1);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_8);
break;
case 19:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_1);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_9);
break;
case 20:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_2);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_0);
break;
case 21:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_2);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_1);
break;
case 22:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_2);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_2);
break;
case 23:
OLED_ShowCN32(52,2,64,6, (uint8_t *)F12x32_2);
OLED_ShowCN32(64,2,76,6, (uint8_t *)F12x32_3);
hour = 0;
break;
default:
hour = 0;
break;
}
}
void MIN(uint8_t min)
{
switch(min)
{
case 0:
OLED_ShowCN32(94,2,106,6, (uint8_t *)F12x32_0);
break;
case 1:
OLED_ShowCN32(94,2,106,6, (uint8_t *)F12x32_1);
break;
case 2:
OLED_ShowCN32(94,2,106,6, (uint8_t *)F12x32_2);
break;
case 3:
OLED_ShowCN32(94,2,106,6, (uint8_t *)F12x32_3);
break;
case 4:
OLED_ShowCN32(94,2,106,6, (uint8_t *)F12x32_4);
break;
case 5:
OLED_ShowCN32(94,2,106,6, (uint8_t *)F12x32_5);
break;
case 6:
OLED_ShowCN32(94,2,106,6, (uint8_t *)F12x32_6);
break;
case 7:
OLED_ShowCN32(94,2,106,6, (uint8_t *)F12x32_7);
break;
case 8:
OLED_ShowCN32(94,2,106,6, (uint8_t *)F12x32_8);
break;
case 9:
OLED_ShowCN32(94,2,106,6, (uint8_t *)F12x32_9);
min = 0;
break;
default:
break;
}
}
void SHIMIN(uint8_t shimin)
{
switch(shimin)
{
case 0:
OLED_ShowCN32(82,2,94,6, (uint8_t *)F12x32_0);
break;
case 1:
OLED_ShowCN32(82,2,94,6, (uint8_t *)F12x32_1);
break;
case 2:
OLED_ShowCN32(82,2,94,6, (uint8_t *)F12x32_2);
break;
case 3:
OLED_ShowCN32(82,2,94,6, (uint8_t *)F12x32_3);
break;
case 4:
OLED_ShowCN32(82,2,94,6, (uint8_t *)F12x32_4);
break;
case 5:
OLED_ShowCN32(82,2,94,6, (uint8_t *)F12x32_5);
shimin = 0;
break;
default:
break;
}
}