新大陆lora二维码
- 图片
-
- 代码
图片
格式BMP,软件设置如下
以C51格式输出
代码
#include <string.h>
#include "board.h"
#include "hal_key.h"
#include "tim-board.h"
#include "timer_handles.h"
uint16_t tenMSecClick=0; // 10毫秒计时器
uint16_t Move = 1;
uint16_t Key4Flag = 0;
static const char bitmap4oled1[]={
0xFF,0xFF,0x03,0x03,0xF3,0xF3,0xF3,0xF3,0xF3,0xF3,0x03,0xFF,0xFF,0x00,0x00,0xCC,
0xCC,0x33,0x33,0x80,0xCC,0xCC,0xCF,0x83,0x03,0x00,0xFF,0xFF,0xFF,0x03,0xF3,0xF3,
0xF3,0xF3,0xF3,0xF3,0x03,0xFF,0xFF,0xFF,0xBF,0xBF,0xB8,0xB8,0xBB,0xBB,0xBB,0xBB,
0xBB,0xBB,0x38,0xBF,0xBF,0x80,0x80,0xBE,0xBE,0x8E,0xAE,0x7F,0xFF,0x63,0xFF,0xFF,
0xFF,0x80,0xBF,0x3F,0xBF,0xB8,0x3B,0x3B,0xBB,0xBB,0x3B,0xBB,0xB8,0xBF,0x3F,0x3F,
0xE3,0xE1,0x7F,0x7F,0x81,0x81,0x81,0xE3,0xE3,0xE1,0xE0,0xF9,0x99,0xF7,0xE7,0x63,
0x71,0x81,0x9B,0x1E,0x9E,0x98,0x9F,0x07,0x9F,0x99,0x99,0x00,0x67,0x67,0xF8,0xF8,
0x83,0xFF,0x7E,0x7E,0x07,0x67,0x76,0x66,0xFD,0xFD,0x1C,0x1C,0xDD,0xDD,0xDD,0xDD,
0xDD,0xDD,0x1D,0xFD,0xFD,0x01,0x01,0xDF,0xDF,0xFD,0xFD,0xFF,0xFF,0x77,0xFF,0xFF,
0xFF,0x77,0x7F,0x7F,0xFF,0xFF,0xF1,0xF1,0xDD,0xDD,0x7F,0xFF,0xC7,0xF7,0x77,0x37,
0xFF,0xFF,0xC0,0xE0,0xEF,0xEF,0xEF,0xEF,0xEF,0xEF,0xE0,0xFF,0xFF,0x00,0x00,0xFF,
0xFF,0xF3,0xFB,0xEF,0xEF,0xEC,0xEF,0x03,0xEF,0xEC,0x4C,0x00,0x00,0x00,0x30,0x30,
0x3C,0x3C,0xFC,0xFC,0xE0,0xE0,0x00,0x00,
};
void Init() {
// 开发板平台初始化
BoardInitMcu();
BoardInitPeriph();
OLED_Clear();
OLED_Init();
keys_init();//按键初始化
setTimer2Callback(Time2Handler);
Tim2McuInit(1);//定时器初始化,设置定时中断1ms中断一次
}
void KeyDownHandler(void) {
}
void handlerPre10Ms(void) {
for (int delay = 0; delay < 30; delay++) {
HAL_Delay(10);
}
}
int main( void )
{
Init();
while( 1 )
{
if(isKey2Pressed())
{
resetKey2();
OLED_DrawBMP(32,0,40,40,(unsigned char*)bitmap4oled1);
}
}
}