/**
******************************************************************************
* File Name : main.c
* Description : Main program body
******************************************************************************
*/
#include <string.h>
#include "board.h"
#include "hal_key.h"
#include "tim-board.h"
#include "timer_handles.h"
void Init() {
BoardInitMcu();
BoardInitPeriph();
keys_init();//按键初始化
setTimer2Callback(Time2Handler);
Tim2McuInit(1);//定时器初始化,设置定时中断1ms中断一次
}
unsigned char bmp1[] = {
0xFF,0xFF,0x03,0xF3,0xFB,0xFB,0xFB,0xFB,0xF3,0x03,0xFF,0xFF,0x00,0x00,0x1C,0x1C,
0x80,0x9C,0x9C,0x80,0x80,0x80,0x70,0x78,0xFC,0xFC,0x84,0x8C,0x1F,0x8F,0x87,0x1B,
0x1B,0x63,0x63,0x83,0x03,0x03,0x7C,0x7C,0x70,0x78,0xF0,0x7C,0x7C,0x00,0x00,0x80,
0x1F,0x1F,0x00,0x00,0xFF,0xFF,0x03,0xF3,0xFB,0xFB,0xFB,0xFB,0xF3,0x03,0xFF,0xFF,
0x0F,0x0F,0xCC,0xCC,0xCD,0xCD,0xCD,0x0D,0x0C,0xCC,0xCF,0xCF,0x00,0x00,0x0C,0x08,
0xF1,0xB9,0x3D,0x03,0x03,0xFD,0xE2,0xC2,0xFF,0xFF,0x31,0x30,0x0C,0xC3,0xC3,0x3C,
0x3C,0xF0,0xF0,0xCF,0xC0,0xC0,0x3C,0xBC,0xF0,0xF0,0x0F,0x02,0x02,0x3C,0x38,0xF1,
0x38,0x3C,0x00,0x00,0x0F,0x0F,0x0C,0x0C,0x0D,0x0D,0x0D,0xCD,0xCC,0xCC,0x0F,0x0F,
0xD8,0x98,0x18,0x67,0xE7,0xE0,0xE0,0x98,0xD8,0xC6,0x26,0x66,0x00,0x00,0xC6,0xC6,
0x21,0xF9,0xF9,0x18,0x18,0xE0,0x7E,0x3F,0x20,0x20,0x38,0x38,0x99,0xF9,0xF9,0x01,
0x01,0xE1,0xE3,0xE7,0x01,0x01,0xDF,0x9F,0x07,0x87,0xD8,0xFF,0xFF,0xF9,0xF9,0xF8,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00,0x00,0x4F,0x4F,
0x4F,0xBC,0xBC,0x8C,0x8C,0x30,0xC8,0xCC,0x83,0x83,0xFF,0xFF,0xC0,0x80,0x80,0x3F,
0x3F,0x83,0x83,0xB3,0x4F,0x4F,0x30,0x31,0xCF,0x8D,0xBC,0x32,0x33,0xB0,0x90,0x0C,
0xFE,0xFF,0x83,0x83,0xB3,0x93,0x83,0xFF,0xFF,0xFF,0xFF,0x0F,0x0F,0xF3,0xBD,0xBC,
0xFF,0xFF,0xC0,0xCF,0xDF,0xDF,0xDF,0xDF,0xCF,0xC0,0xFF,0xFF,0x00,0x00,0x3E,0x3E,
0x38,0xDF,0xDF,0xE1,0xE1,0xC0,0xCF,0xDF,0x39,0x39,0xE1,0xF1,0x3F,0xC1,0xC1,0xC0,
0xC0,0x31,0x21,0x01,0x0E,0x1E,0xE0,0xE0,0x1F,0x1F,0x1F,0xE0,0xE0,0x01,0x01,0x00,
0x01,0x01,0xE1,0xE1,0xFF,0xFF,0xC7,0xFF,0xFF,0xFF,0xFF,0xF8,0xDC,0xDF,0xC1,0xC1,/*"C:\Users\Newland\Pictures\download.bmp",0*/};
/**
* Main application entry point.
*/
int main( void )
{
Init();
OLED_Init();
OLED_DrawBMP(32,0,64,64,bmp1);
while( 1 )
{
}
}