доложил файлы для работы с дисплеем
This commit is contained in:
parent
9a7c7c5829
commit
cfe4861db9
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
Projects/epwm_test_biss_c_cpu2/epwm_test_biss_c_cpu2.out
Normal file
BIN
Projects/epwm_test_biss_c_cpu2/epwm_test_biss_c_cpu2.out
Normal file
Binary file not shown.
273
Projects/epwm_test_biss_c_cpu2/src/buttons.c
Normal file
273
Projects/epwm_test_biss_c_cpu2/src/buttons.c
Normal file
@ -0,0 +1,273 @@
|
||||
/*
|
||||
* buttons.c
|
||||
*
|
||||
* Created on: 15 <EFBFBD><EFBFBD><EFBFBD>. 2024 <EFBFBD>.
|
||||
* Author: sedov
|
||||
*/
|
||||
|
||||
|
||||
#include "buttons.h"
|
||||
#include "f28x_project.h"
|
||||
#include "i2c_init.h"
|
||||
#include "vector.h"
|
||||
#include "pwm_init.h"
|
||||
#include "i2c_oled.h"
|
||||
#define MAX_SCREENS 5;
|
||||
//button 0 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1-<2D><><EFBFBD><EFBFBD><EFBFBD> 2-<2D><><EFBFBD><EFBFBD> 3-<2D><><EFBFBD><EFBFBD> 4- <20><><EFBFBD><EFBFBD>
|
||||
uint16_t Button_Sost = 0;
|
||||
volatile uint16_t buttonClik=0, ScreenSost=0, button=0 ;
|
||||
extern uint16_t I2C_TXdata[];
|
||||
extern uint16_t I2C_RXdata[];
|
||||
|
||||
typedef enum {
|
||||
MENU_START,
|
||||
MENU_STOP,
|
||||
MENU_TIME,
|
||||
MENU_TEMP,
|
||||
MENU_BRIGHT_FUTURE,
|
||||
MENU_DIAKONT,
|
||||
MENU_ITEMS_COUNT // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
} MenuItem;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
MenuItem currentMenuItem = MENU_START;
|
||||
|
||||
__interrupt void buttonclik_isr(void)
|
||||
{
|
||||
PieCtrlRegs.PIEACK.all = PIEACK_GROUP12;
|
||||
if(buttonClik==0)
|
||||
buttonClik++;
|
||||
}
|
||||
int buttonsRead(){
|
||||
int err1,err2;
|
||||
err1=I2CWrite(0x25, 0, 0, false, &Button_Sost); // <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
err2=I2CRead(0x25, 1, true, &Button_Sost); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
if(err1 != 0 || err2 != 0){
|
||||
return 1;
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void buttonsInit(void) {
|
||||
uint16_t Conf0 = 0xFE;
|
||||
uint16_t Conf1 = 0xFF;
|
||||
|
||||
I2CWrite(0x25, 6, 1, true, &Conf1); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
||||
I2CWrite(0x25, 7, 1, true, &Conf1);
|
||||
|
||||
I2CWrite(0x25, 0, 0, false, &Button_Sost); // <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
I2CRead(0x25, 1, true, &Button_Sost); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> XINT3
|
||||
EALLOW;
|
||||
PieVectTable.XINT3_INT = &buttonclik_isr;
|
||||
IER |= M_INT12;
|
||||
PieCtrlRegs.PIEIER12.bit.INTx1 = 1;
|
||||
PieCtrlRegs.PIEACK.all = PIEACK_GROUP12;
|
||||
EDIS;
|
||||
|
||||
XintRegs.XINT3CR.bit.POLARITY = 0;
|
||||
XintRegs.XINT3CR.bit.ENABLE = 1;
|
||||
}
|
||||
|
||||
int buttonsDisp(){
|
||||
if(buttonClik!=0){
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if(buttonsRead()){
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
return 1;
|
||||
}
|
||||
Button_Sost=Button_Sost&0xF;
|
||||
switch(Button_Sost){
|
||||
case 0xD:
|
||||
if(button < 0XFF)
|
||||
button+=0XFF;//<2F><><EFBFBD><EFBFBD>
|
||||
break;
|
||||
case 0xB:
|
||||
if(button >= 0XFF)
|
||||
button-=0XFF;//<2F><><EFBFBD><EFBFBD>
|
||||
break;
|
||||
case 0xE:
|
||||
if(button < 0XFF){
|
||||
button++;//<2F><><EFBFBD><EFBFBD>
|
||||
if(button>MENU_ITEMS_COUNT-1){
|
||||
button=0;
|
||||
}}
|
||||
break;
|
||||
case 0x7:
|
||||
if(button < 0XFF)
|
||||
button--;//<2F><><EFBFBD><EFBFBD>
|
||||
if(button==0xFFFF){
|
||||
button=MENU_ITEMS_COUNT-1;
|
||||
}
|
||||
break;
|
||||
// default:
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
}
|
||||
SSD1306_Fill(SSD1306_COLOR_BLACK);
|
||||
Button_Sost=0;
|
||||
buttonClik--;
|
||||
currentMenuItem=button;
|
||||
}
|
||||
}
|
||||
int ScreenDisp(){
|
||||
static uint16_t oldbutton=0xFFF;
|
||||
if(button<=0xFF)
|
||||
MenuBilder();
|
||||
if(oldbutton!=button)
|
||||
SSD1306_UpdateScreen();
|
||||
oldbutton=button;
|
||||
MenuDisp();
|
||||
}
|
||||
void MenuDisp(){
|
||||
switch(button){
|
||||
case 0+0xFF:
|
||||
SSD1306_GotoXY(10, 32);
|
||||
SSD1306_Puts("ERROR 404: PAGE ", &Font_7x10, SSD1306_COLOR_WHITE);
|
||||
SSD1306_GotoXY(20, 50);
|
||||
SSD1306_Puts(" NOT FOUND", &Font_7x10, SSD1306_COLOR_WHITE);
|
||||
SSD1306_UpdateScreen();
|
||||
break;
|
||||
case 1+0xFF:
|
||||
SSD1306_GotoXY(10, 32);
|
||||
SSD1306_Puts("SYS STOP", &Font_11x18, SSD1306_COLOR_WHITE);
|
||||
SSD1306_UpdateScreen();
|
||||
break;
|
||||
case 2+0xFF:
|
||||
SSD1306_GotoXY(5, 32);
|
||||
displayUptime();
|
||||
break;
|
||||
case 3+0xFF:
|
||||
SSD1306_GotoXY(10, 32);
|
||||
displayTemp();
|
||||
break;
|
||||
case 4+0xFF:
|
||||
SSD1306_GotoXY(0, 0);
|
||||
const uint8_t logo [] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xf0, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x1f, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xf0, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x0f, 0xff, 0x07, 0x81, 0xf0, 0x07, 0xc0, 0x0e, 0x07, 0x83, 0xff, 0xc0, 0xf0, 0x1e, 0x3f, 0xff,
|
||||
0x0f, 0x0f, 0x07, 0x83, 0xf0, 0x07, 0xe0, 0x0e, 0x0f, 0x07, 0xc1, 0xf0, 0xf0, 0x1e, 0x01, 0xe0,
|
||||
0x1e, 0x0f, 0x07, 0x87, 0xf0, 0x0e, 0x70, 0x0e, 0x1c, 0x0f, 0x00, 0x78, 0xf0, 0x1e, 0x01, 0xe0,
|
||||
0x1e, 0x0f, 0x07, 0x9e, 0xf0, 0x1c, 0x38, 0x0f, 0xf8, 0x0e, 0x00, 0x78, 0xff, 0xfe, 0x01, 0xe0,
|
||||
0x1c, 0x0f, 0x07, 0xbc, 0xf0, 0x3c, 0x3c, 0x0f, 0xfc, 0x0e, 0x00, 0x78, 0xff, 0xfe, 0x01, 0xe0,
|
||||
0x1c, 0x0f, 0x07, 0xf0, 0xf0, 0x7f, 0xfe, 0x0e, 0x1e, 0x0f, 0x00, 0xf8, 0xf0, 0x1e, 0x01, 0xe0,
|
||||
0x7c, 0x0f, 0x07, 0xe0, 0xf0, 0xf0, 0x0e, 0x0e, 0x0f, 0x07, 0xc3, 0xe0, 0xf0, 0x1e, 0x01, 0xe0,
|
||||
0xff, 0xff, 0xc7, 0xc0, 0xf0, 0xe0, 0x07, 0x0e, 0x07, 0x81, 0xff, 0xc0, 0xf0, 0x1e, 0x01, 0xe0,
|
||||
0xf0, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xe0, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
ssd1306_DrawBitmap(0, 0, logo, 128, 52, SSD1306_COLOR_WHITE);
|
||||
SSD1306_UpdateScreen();
|
||||
break;
|
||||
default:
|
||||
|
||||
}
|
||||
}
|
||||
void MenuBilder(void) {
|
||||
uint16_t i,yPos;
|
||||
char tempStr[5];
|
||||
uint16_t topItem = currentMenuItem; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (topItem > 2) {
|
||||
topItem = currentMenuItem - 2;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
SSD1306_Fill(SSD1306_COLOR_BLACK);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
SSD1306_DrawFilledRectangle(0, 0, 128, 10, SSD1306_COLOR_WHITE);
|
||||
SSD1306_GotoXY(30, 1);
|
||||
SSD1306_Puts("START MENU", &Font_7x10, SSD1306_COLOR_BLACK);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
for ( i = 0; i < 4 && (topItem + i) < MENU_ITEMS_COUNT; i++) {
|
||||
yPos = 13 + i*13; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (topItem + i == currentMenuItem) {
|
||||
SSD1306_DrawFilledRectangle(0, yPos, 128, 13, SSD1306_COLOR_WHITE);
|
||||
} else {
|
||||
SSD1306_DrawRectangle(0, yPos, 128, 13, SSD1306_COLOR_WHITE);
|
||||
}
|
||||
if(yPos==52){
|
||||
yPos-=2;
|
||||
}
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
SSD1306_GotoXY(5, yPos + 3);
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> sprintf <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
uint8_t num = topItem + i + 1;
|
||||
tempStr[0] = '0' + (num / 10); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
tempStr[1] = '0' + (num % 10); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
tempStr[2] = '\0'; // <20><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (topItem + i == currentMenuItem) {
|
||||
SSD1306_Puts(tempStr, &Font_7x10, SSD1306_COLOR_BLACK);
|
||||
}else
|
||||
SSD1306_Puts(tempStr, &Font_7x10, SSD1306_COLOR_WHITE);
|
||||
SSD1306_GotoXY(20, yPos + 3); // <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
switch (topItem + i) {
|
||||
case MENU_START:
|
||||
SSD1306_Puts(" START", &Font_7x10, topItem + i == currentMenuItem ? SSD1306_COLOR_BLACK : SSD1306_COLOR_WHITE);
|
||||
break;
|
||||
case MENU_STOP:
|
||||
SSD1306_Puts(" STOP", &Font_7x10, topItem + i == currentMenuItem ? SSD1306_COLOR_BLACK : SSD1306_COLOR_WHITE);
|
||||
break;
|
||||
case MENU_TIME:
|
||||
SSD1306_Puts(" TIME", &Font_7x10, topItem + i == currentMenuItem ? SSD1306_COLOR_BLACK : SSD1306_COLOR_WHITE);
|
||||
break;
|
||||
case MENU_TEMP:
|
||||
SSD1306_Puts(" TEMP", &Font_7x10, topItem + i == currentMenuItem ? SSD1306_COLOR_BLACK : SSD1306_COLOR_WHITE);
|
||||
break;
|
||||
case MENU_BRIGHT_FUTURE:
|
||||
SSD1306_Puts(" BRIGHT_FUTURE", &Font_7x10, topItem + i == currentMenuItem ? SSD1306_COLOR_BLACK : SSD1306_COLOR_WHITE);
|
||||
break;
|
||||
case MENU_DIAKONT:
|
||||
SSD1306_Puts(" DIAKONT", &Font_7x10, topItem + i == currentMenuItem ? SSD1306_COLOR_BLACK : SSD1306_COLOR_WHITE);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
7
Projects/epwm_test_biss_c_cpu2/src/buttons.h
Normal file
7
Projects/epwm_test_biss_c_cpu2/src/buttons.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef SRC_BUTTONS_H_
|
||||
#define SRC_BUTTONS_H_
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* SRC_BUTTONS_H_ */
|
||||
349
Projects/epwm_test_biss_c_cpu2/src/fonts.c
Normal file
349
Projects/epwm_test_biss_c_cpu2/src/fonts.c
Normal file
@ -0,0 +1,349 @@
|
||||
/**
|
||||
* original author: Tilen Majerle<tilen@majerle.eu>
|
||||
* modification for STM32f10x: Alexander Lutsai<s.lyra@ya.ru>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Copyright (C) Alexander Lutsai, 2016
|
||||
Copyright (C) Tilen Majerle, 2015
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
#include "fonts.h"
|
||||
#include "stdint.h"
|
||||
|
||||
//#pragma DATA_SECTION(Font11x18,"Filter14_RegsFile");
|
||||
|
||||
const uint16_t Font7x10 [] = {
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // sp
|
||||
0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x0000, 0x1000, 0x0000, 0x0000, // !
|
||||
0x2800, 0x2800, 0x2800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // "
|
||||
0x2400, 0x2400, 0x7C00, 0x2400, 0x4800, 0x7C00, 0x4800, 0x4800, 0x0000, 0x0000, // #
|
||||
0x3800, 0x5400, 0x5000, 0x3800, 0x1400, 0x5400, 0x5400, 0x3800, 0x1000, 0x0000, // $
|
||||
0x2000, 0x5400, 0x5800, 0x3000, 0x2800, 0x5400, 0x1400, 0x0800, 0x0000, 0x0000, // %
|
||||
0x1000, 0x2800, 0x2800, 0x1000, 0x3400, 0x4800, 0x4800, 0x3400, 0x0000, 0x0000, // &
|
||||
0x1000, 0x1000, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // '
|
||||
0x0800, 0x1000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x1000, 0x0800, // (
|
||||
0x2000, 0x1000, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x1000, 0x2000, // )
|
||||
0x1000, 0x3800, 0x1000, 0x2800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // *
|
||||
0x0000, 0x0000, 0x1000, 0x1000, 0x7C00, 0x1000, 0x1000, 0x0000, 0x0000, 0x0000, // +
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1000, 0x1000, 0x1000, // ,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3800, 0x0000, 0x0000, 0x0000, 0x0000, // -
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1000, 0x0000, 0x0000, // .
|
||||
0x0800, 0x0800, 0x1000, 0x1000, 0x1000, 0x1000, 0x2000, 0x2000, 0x0000, 0x0000, // /
|
||||
0x3800, 0x4400, 0x4400, 0x5400, 0x4400, 0x4400, 0x4400, 0x3800, 0x0000, 0x0000, // 0
|
||||
0x1000, 0x3000, 0x5000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x0000, 0x0000, // 1
|
||||
0x3800, 0x4400, 0x4400, 0x0400, 0x0800, 0x1000, 0x2000, 0x7C00, 0x0000, 0x0000, // 2
|
||||
0x3800, 0x4400, 0x0400, 0x1800, 0x0400, 0x0400, 0x4400, 0x3800, 0x0000, 0x0000, // 3
|
||||
0x0800, 0x1800, 0x2800, 0x2800, 0x4800, 0x7C00, 0x0800, 0x0800, 0x0000, 0x0000, // 4
|
||||
0x7C00, 0x4000, 0x4000, 0x7800, 0x0400, 0x0400, 0x4400, 0x3800, 0x0000, 0x0000, // 5
|
||||
0x3800, 0x4400, 0x4000, 0x7800, 0x4400, 0x4400, 0x4400, 0x3800, 0x0000, 0x0000, // 6
|
||||
0x7C00, 0x0400, 0x0800, 0x1000, 0x1000, 0x2000, 0x2000, 0x2000, 0x0000, 0x0000, // 7
|
||||
0x3800, 0x4400, 0x4400, 0x3800, 0x4400, 0x4400, 0x4400, 0x3800, 0x0000, 0x0000, // 8
|
||||
0x3800, 0x4400, 0x4400, 0x4400, 0x3C00, 0x0400, 0x4400, 0x3800, 0x0000, 0x0000, // 9
|
||||
0x0000, 0x0000, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1000, 0x0000, 0x0000, // :
|
||||
0x0000, 0x0000, 0x0000, 0x1000, 0x0000, 0x0000, 0x0000, 0x1000, 0x1000, 0x1000, // ;
|
||||
0x0000, 0x0000, 0x0C00, 0x3000, 0x4000, 0x3000, 0x0C00, 0x0000, 0x0000, 0x0000, // <
|
||||
0x0000, 0x0000, 0x0000, 0x7C00, 0x0000, 0x7C00, 0x0000, 0x0000, 0x0000, 0x0000, // =
|
||||
0x0000, 0x0000, 0x6000, 0x1800, 0x0400, 0x1800, 0x6000, 0x0000, 0x0000, 0x0000, // >
|
||||
0x3800, 0x4400, 0x0400, 0x0800, 0x1000, 0x1000, 0x0000, 0x1000, 0x0000, 0x0000, // ?
|
||||
0x3800, 0x4400, 0x4C00, 0x5400, 0x5C00, 0x4000, 0x4000, 0x3800, 0x0000, 0x0000, // @
|
||||
0x1000, 0x2800, 0x2800, 0x2800, 0x2800, 0x7C00, 0x4400, 0x4400, 0x0000, 0x0000, // A
|
||||
0x7800, 0x4400, 0x4400, 0x7800, 0x4400, 0x4400, 0x4400, 0x7800, 0x0000, 0x0000, // B
|
||||
0x3800, 0x4400, 0x4000, 0x4000, 0x4000, 0x4000, 0x4400, 0x3800, 0x0000, 0x0000, // C
|
||||
0x7000, 0x4800, 0x4400, 0x4400, 0x4400, 0x4400, 0x4800, 0x7000, 0x0000, 0x0000, // D
|
||||
0x7C00, 0x4000, 0x4000, 0x7C00, 0x4000, 0x4000, 0x4000, 0x7C00, 0x0000, 0x0000, // E
|
||||
0x7C00, 0x4000, 0x4000, 0x7800, 0x4000, 0x4000, 0x4000, 0x4000, 0x0000, 0x0000, // F
|
||||
0x3800, 0x4400, 0x4000, 0x4000, 0x5C00, 0x4400, 0x4400, 0x3800, 0x0000, 0x0000, // G
|
||||
0x4400, 0x4400, 0x4400, 0x7C00, 0x4400, 0x4400, 0x4400, 0x4400, 0x0000, 0x0000, // H
|
||||
0x3800, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x3800, 0x0000, 0x0000, // I
|
||||
0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x4400, 0x3800, 0x0000, 0x0000, // J
|
||||
0x4400, 0x4800, 0x5000, 0x6000, 0x5000, 0x4800, 0x4800, 0x4400, 0x0000, 0x0000, // K
|
||||
0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x7C00, 0x0000, 0x0000, // L
|
||||
0x4400, 0x6C00, 0x6C00, 0x5400, 0x4400, 0x4400, 0x4400, 0x4400, 0x0000, 0x0000, // M
|
||||
0x4400, 0x6400, 0x6400, 0x5400, 0x5400, 0x4C00, 0x4C00, 0x4400, 0x0000, 0x0000, // N
|
||||
0x3800, 0x4400, 0x4400, 0x4400, 0x4400, 0x4400, 0x4400, 0x3800, 0x0000, 0x0000, // O
|
||||
0x7800, 0x4400, 0x4400, 0x4400, 0x7800, 0x4000, 0x4000, 0x4000, 0x0000, 0x0000, // P
|
||||
0x3800, 0x4400, 0x4400, 0x4400, 0x4400, 0x4400, 0x5400, 0x3800, 0x0400, 0x0000, // Q
|
||||
0x7800, 0x4400, 0x4400, 0x4400, 0x7800, 0x4800, 0x4800, 0x4400, 0x0000, 0x0000, // R
|
||||
0x3800, 0x4400, 0x4000, 0x3000, 0x0800, 0x0400, 0x4400, 0x3800, 0x0000, 0x0000, // S
|
||||
0x7C00, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x0000, 0x0000, // T
|
||||
0x4400, 0x4400, 0x4400, 0x4400, 0x4400, 0x4400, 0x4400, 0x3800, 0x0000, 0x0000, // U
|
||||
0x4400, 0x4400, 0x4400, 0x2800, 0x2800, 0x2800, 0x1000, 0x1000, 0x0000, 0x0000, // V
|
||||
0x4400, 0x4400, 0x5400, 0x5400, 0x5400, 0x6C00, 0x2800, 0x2800, 0x0000, 0x0000, // W
|
||||
0x4400, 0x2800, 0x2800, 0x1000, 0x1000, 0x2800, 0x2800, 0x4400, 0x0000, 0x0000, // X
|
||||
0x4400, 0x4400, 0x2800, 0x2800, 0x1000, 0x1000, 0x1000, 0x1000, 0x0000, 0x0000, // Y
|
||||
0x7C00, 0x0400, 0x0800, 0x1000, 0x1000, 0x2000, 0x4000, 0x7C00, 0x0000, 0x0000, // Z
|
||||
0x1800, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1800, // [
|
||||
0x2000, 0x2000, 0x1000, 0x1000, 0x1000, 0x1000, 0x0800, 0x0800, 0x0000, 0x0000, //
|
||||
0x3000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x3000, // ]
|
||||
0x1000, 0x2800, 0x2800, 0x4400, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // ^
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFE00, // _
|
||||
0x2000, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // `
|
||||
0x0000, 0x0000, 0x3800, 0x4400, 0x3C00, 0x4400, 0x4C00, 0x3400, 0x0000, 0x0000, // a
|
||||
0x4000, 0x4000, 0x5800, 0x6400, 0x4400, 0x4400, 0x6400, 0x5800, 0x0000, 0x0000, // b
|
||||
0x0000, 0x0000, 0x3800, 0x4400, 0x4000, 0x4000, 0x4400, 0x3800, 0x0000, 0x0000, // c
|
||||
0x0400, 0x0400, 0x3400, 0x4C00, 0x4400, 0x4400, 0x4C00, 0x3400, 0x0000, 0x0000, // d
|
||||
0x0000, 0x0000, 0x3800, 0x4400, 0x7C00, 0x4000, 0x4400, 0x3800, 0x0000, 0x0000, // e
|
||||
0x0C00, 0x1000, 0x7C00, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x0000, 0x0000, // f
|
||||
0x0000, 0x0000, 0x3400, 0x4C00, 0x4400, 0x4400, 0x4C00, 0x3400, 0x0400, 0x7800, // g
|
||||
0x4000, 0x4000, 0x5800, 0x6400, 0x4400, 0x4400, 0x4400, 0x4400, 0x0000, 0x0000, // h
|
||||
0x1000, 0x0000, 0x7000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x0000, 0x0000, // i
|
||||
0x1000, 0x0000, 0x7000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0xE000, // j
|
||||
0x4000, 0x4000, 0x4800, 0x5000, 0x6000, 0x5000, 0x4800, 0x4400, 0x0000, 0x0000, // k
|
||||
0x7000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x0000, 0x0000, // l
|
||||
0x0000, 0x0000, 0x7800, 0x5400, 0x5400, 0x5400, 0x5400, 0x5400, 0x0000, 0x0000, // m
|
||||
0x0000, 0x0000, 0x5800, 0x6400, 0x4400, 0x4400, 0x4400, 0x4400, 0x0000, 0x0000, // n
|
||||
0x0000, 0x0000, 0x3800, 0x4400, 0x4400, 0x4400, 0x4400, 0x3800, 0x0000, 0x0000, // o
|
||||
0x0000, 0x0000, 0x5800, 0x6400, 0x4400, 0x4400, 0x6400, 0x5800, 0x4000, 0x4000, // p
|
||||
0x0000, 0x0000, 0x3400, 0x4C00, 0x4400, 0x4400, 0x4C00, 0x3400, 0x0400, 0x0400, // q
|
||||
0x0000, 0x0000, 0x5800, 0x6400, 0x4000, 0x4000, 0x4000, 0x4000, 0x0000, 0x0000, // r
|
||||
0x0000, 0x0000, 0x3800, 0x4400, 0x3000, 0x0800, 0x4400, 0x3800, 0x0000, 0x0000, // s
|
||||
0x2000, 0x2000, 0x7800, 0x2000, 0x2000, 0x2000, 0x2000, 0x1800, 0x0000, 0x0000, // t
|
||||
0x0000, 0x0000, 0x4400, 0x4400, 0x4400, 0x4400, 0x4C00, 0x3400, 0x0000, 0x0000, // u
|
||||
0x0000, 0x0000, 0x4400, 0x4400, 0x2800, 0x2800, 0x2800, 0x1000, 0x0000, 0x0000, // v
|
||||
0x0000, 0x0000, 0x5400, 0x5400, 0x5400, 0x6C00, 0x2800, 0x2800, 0x0000, 0x0000, // w
|
||||
0x0000, 0x0000, 0x4400, 0x2800, 0x1000, 0x1000, 0x2800, 0x4400, 0x0000, 0x0000, // x
|
||||
0x0000, 0x0000, 0x4400, 0x4400, 0x2800, 0x2800, 0x1000, 0x1000, 0x1000, 0x6000, // y
|
||||
0x0000, 0x0000, 0x7C00, 0x0800, 0x1000, 0x2000, 0x4000, 0x7C00, 0x0000, 0x0000, // z
|
||||
0x1800, 0x1000, 0x1000, 0x1000, 0x2000, 0x2000, 0x1000, 0x1000, 0x1000, 0x1800, // {
|
||||
0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, // |
|
||||
0x3000, 0x1000, 0x1000, 0x1000, 0x0800, 0x0800, 0x1000, 0x1000, 0x1000, 0x3000, // }
|
||||
0x0000, 0x0000, 0x0000, 0x7400, 0x4C00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // ~
|
||||
};
|
||||
|
||||
const uint16_t Font11x18 [] = {
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // sp
|
||||
0x0000, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0000, 0x0C00, 0x0C00, 0x0000, 0x0000, 0x0000, // !
|
||||
0x0000, 0x1B00, 0x1B00, 0x1B00, 0x1B00, 0x1B00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // "
|
||||
0x0000, 0x1980, 0x1980, 0x1980, 0x1980, 0x7FC0, 0x7FC0, 0x1980, 0x3300, 0x7FC0, 0x7FC0, 0x3300, 0x3300, 0x3300, 0x3300, 0x0000, 0x0000, 0x0000, // #
|
||||
0x0000, 0x1E00, 0x3F00, 0x7580, 0x6580, 0x7400, 0x3C00, 0x1E00, 0x0700, 0x0580, 0x6580, 0x6580, 0x7580, 0x3F00, 0x1E00, 0x0400, 0x0400, 0x0000, // $
|
||||
0x0000, 0x7000, 0xD800, 0xD840, 0xD8C0, 0xD980, 0x7300, 0x0600, 0x0C00, 0x1B80, 0x36C0, 0x66C0, 0x46C0, 0x06C0, 0x0380, 0x0000, 0x0000, 0x0000, // %
|
||||
0x0000, 0x1E00, 0x3F00, 0x3300, 0x3300, 0x3300, 0x1E00, 0x0C00, 0x3CC0, 0x66C0, 0x6380, 0x6180, 0x6380, 0x3EC0, 0x1C80, 0x0000, 0x0000, 0x0000, // &
|
||||
0x0000, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // '
|
||||
0x0080, 0x0100, 0x0300, 0x0600, 0x0600, 0x0400, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0400, 0x0600, 0x0600, 0x0300, 0x0100, 0x0080, // (
|
||||
0x2000, 0x1000, 0x1800, 0x0C00, 0x0C00, 0x0400, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0400, 0x0C00, 0x0C00, 0x1800, 0x1000, 0x2000, // )
|
||||
0x0000, 0x0C00, 0x2D00, 0x3F00, 0x1E00, 0x3300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // *
|
||||
0x0000, 0x0000, 0x0000, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0xFFC0, 0xFFC0, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // +
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0C00, 0x0C00, 0x0400, 0x0400, 0x0800, // ,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1E00, 0x1E00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // -
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0C00, 0x0C00, 0x0000, 0x0000, 0x0000, // .
|
||||
0x0000, 0x0300, 0x0300, 0x0300, 0x0600, 0x0600, 0x0600, 0x0600, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x1800, 0x1800, 0x1800, 0x0000, 0x0000, 0x0000, // /
|
||||
0x0000, 0x1E00, 0x3F00, 0x3300, 0x6180, 0x6180, 0x6180, 0x6D80, 0x6D80, 0x6180, 0x6180, 0x6180, 0x3300, 0x3F00, 0x1E00, 0x0000, 0x0000, 0x0000, // 0
|
||||
0x0000, 0x0600, 0x0E00, 0x1E00, 0x3600, 0x2600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, // 1
|
||||
0x0000, 0x1E00, 0x3F00, 0x7380, 0x6180, 0x6180, 0x0180, 0x0300, 0x0600, 0x0C00, 0x1800, 0x3000, 0x6000, 0x7F80, 0x7F80, 0x0000, 0x0000, 0x0000, // 2
|
||||
0x0000, 0x1C00, 0x3E00, 0x6300, 0x6300, 0x0300, 0x0E00, 0x0E00, 0x0300, 0x0180, 0x0180, 0x6180, 0x7380, 0x3F00, 0x1E00, 0x0000, 0x0000, 0x0000, // 3
|
||||
0x0000, 0x0600, 0x0E00, 0x0E00, 0x1E00, 0x1E00, 0x1600, 0x3600, 0x3600, 0x6600, 0x7F80, 0x7F80, 0x0600, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, // 4
|
||||
0x0000, 0x7F00, 0x7F00, 0x6000, 0x6000, 0x6000, 0x6E00, 0x7F00, 0x6380, 0x0180, 0x0180, 0x6180, 0x7380, 0x3F00, 0x1E00, 0x0000, 0x0000, 0x0000, // 5
|
||||
0x0000, 0x1E00, 0x3F00, 0x3380, 0x6180, 0x6000, 0x6E00, 0x7F00, 0x7380, 0x6180, 0x6180, 0x6180, 0x3380, 0x3F00, 0x1E00, 0x0000, 0x0000, 0x0000, // 6
|
||||
0x0000, 0x7F80, 0x7F80, 0x0180, 0x0300, 0x0300, 0x0600, 0x0600, 0x0C00, 0x0C00, 0x0C00, 0x0800, 0x1800, 0x1800, 0x1800, 0x0000, 0x0000, 0x0000, // 7
|
||||
0x0000, 0x1E00, 0x3F00, 0x6380, 0x6180, 0x6180, 0x2100, 0x1E00, 0x3F00, 0x6180, 0x6180, 0x6180, 0x6180, 0x3F00, 0x1E00, 0x0000, 0x0000, 0x0000, // 8
|
||||
0x0000, 0x1E00, 0x3F00, 0x7300, 0x6180, 0x6180, 0x6180, 0x7380, 0x3F80, 0x1D80, 0x0180, 0x6180, 0x7300, 0x3F00, 0x1E00, 0x0000, 0x0000, 0x0000, // 9
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0C00, 0x0C00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0C00, 0x0C00, 0x0000, 0x0000, 0x0000, // :
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0C00, 0x0C00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0C00, 0x0C00, 0x0400, 0x0400, 0x0800, // ;
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0080, 0x0380, 0x0E00, 0x3800, 0x6000, 0x3800, 0x0E00, 0x0380, 0x0080, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // <
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7F80, 0x7F80, 0x0000, 0x0000, 0x7F80, 0x7F80, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // =
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x4000, 0x7000, 0x1C00, 0x0700, 0x0180, 0x0700, 0x1C00, 0x7000, 0x4000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // >
|
||||
0x0000, 0x1F00, 0x3F80, 0x71C0, 0x60C0, 0x00C0, 0x01C0, 0x0380, 0x0700, 0x0E00, 0x0C00, 0x0C00, 0x0000, 0x0C00, 0x0C00, 0x0000, 0x0000, 0x0000, // ?
|
||||
0x0000, 0x1E00, 0x3F00, 0x3180, 0x7180, 0x6380, 0x6F80, 0x6D80, 0x6D80, 0x6F80, 0x6780, 0x6000, 0x3200, 0x3E00, 0x1C00, 0x0000, 0x0000, 0x0000, // @
|
||||
0x0000, 0x0E00, 0x0E00, 0x1B00, 0x1B00, 0x1B00, 0x1B00, 0x3180, 0x3180, 0x3F80, 0x3F80, 0x3180, 0x60C0, 0x60C0, 0x60C0, 0x0000, 0x0000, 0x0000, // A
|
||||
0x0000, 0x7C00, 0x7E00, 0x6300, 0x6300, 0x6300, 0x6300, 0x7E00, 0x7E00, 0x6300, 0x6180, 0x6180, 0x6380, 0x7F00, 0x7E00, 0x0000, 0x0000, 0x0000, // B
|
||||
0x0000, 0x1E00, 0x3F00, 0x3180, 0x6180, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6180, 0x3180, 0x3F00, 0x1E00, 0x0000, 0x0000, 0x0000, // C
|
||||
0x0000, 0x7C00, 0x7F00, 0x6300, 0x6380, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6300, 0x6300, 0x7E00, 0x7C00, 0x0000, 0x0000, 0x0000, // D
|
||||
0x0000, 0x7F80, 0x7F80, 0x6000, 0x6000, 0x6000, 0x6000, 0x7F00, 0x7F00, 0x6000, 0x6000, 0x6000, 0x6000, 0x7F80, 0x7F80, 0x0000, 0x0000, 0x0000, // E
|
||||
0x0000, 0x7F80, 0x7F80, 0x6000, 0x6000, 0x6000, 0x6000, 0x7F00, 0x7F00, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x0000, 0x0000, 0x0000, // F
|
||||
0x0000, 0x1E00, 0x3F00, 0x3180, 0x6180, 0x6000, 0x6000, 0x6000, 0x6380, 0x6380, 0x6180, 0x6180, 0x3180, 0x3F80, 0x1E00, 0x0000, 0x0000, 0x0000, // G
|
||||
0x0000, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x7F80, 0x7F80, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x0000, 0x0000, 0x0000, // H
|
||||
0x0000, 0x3F00, 0x3F00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x3F00, 0x3F00, 0x0000, 0x0000, 0x0000, // I
|
||||
0x0000, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x6180, 0x6180, 0x7380, 0x3F00, 0x1E00, 0x0000, 0x0000, 0x0000, // J
|
||||
0x0000, 0x60C0, 0x6180, 0x6300, 0x6600, 0x6600, 0x6C00, 0x7800, 0x7C00, 0x6600, 0x6600, 0x6300, 0x6180, 0x6180, 0x60C0, 0x0000, 0x0000, 0x0000, // K
|
||||
0x0000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x7F80, 0x7F80, 0x0000, 0x0000, 0x0000, // L
|
||||
0x0000, 0x71C0, 0x71C0, 0x7BC0, 0x7AC0, 0x6AC0, 0x6AC0, 0x6EC0, 0x64C0, 0x60C0, 0x60C0, 0x60C0, 0x60C0, 0x60C0, 0x60C0, 0x0000, 0x0000, 0x0000, // M
|
||||
0x0000, 0x7180, 0x7180, 0x7980, 0x7980, 0x7980, 0x6D80, 0x6D80, 0x6D80, 0x6580, 0x6780, 0x6780, 0x6780, 0x6380, 0x6380, 0x0000, 0x0000, 0x0000, // N
|
||||
0x0000, 0x1E00, 0x3F00, 0x3300, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x3300, 0x3F00, 0x1E00, 0x0000, 0x0000, 0x0000, // O
|
||||
0x0000, 0x7E00, 0x7F00, 0x6380, 0x6180, 0x6180, 0x6180, 0x6380, 0x7F00, 0x7E00, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x0000, 0x0000, 0x0000, // P
|
||||
0x0000, 0x1E00, 0x3F00, 0x3300, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6580, 0x6780, 0x3300, 0x3F80, 0x1E40, 0x0000, 0x0000, 0x0000, // Q
|
||||
0x0000, 0x7E00, 0x7F00, 0x6380, 0x6180, 0x6180, 0x6380, 0x7F00, 0x7E00, 0x6600, 0x6300, 0x6300, 0x6180, 0x6180, 0x60C0, 0x0000, 0x0000, 0x0000, // R
|
||||
0x0000, 0x0E00, 0x1F00, 0x3180, 0x3180, 0x3000, 0x3800, 0x1E00, 0x0700, 0x0380, 0x6180, 0x6180, 0x3180, 0x3F00, 0x1E00, 0x0000, 0x0000, 0x0000, // S
|
||||
0x0000, 0xFFC0, 0xFFC0, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0000, 0x0000, 0x0000, // T
|
||||
0x0000, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x7380, 0x3F00, 0x1E00, 0x0000, 0x0000, 0x0000, // U
|
||||
0x0000, 0x60C0, 0x60C0, 0x60C0, 0x3180, 0x3180, 0x3180, 0x1B00, 0x1B00, 0x1B00, 0x1B00, 0x0E00, 0x0E00, 0x0E00, 0x0400, 0x0000, 0x0000, 0x0000, // V
|
||||
0x0000, 0xC0C0, 0xC0C0, 0xC0C0, 0xC0C0, 0xC0C0, 0xCCC0, 0x4C80, 0x4C80, 0x5E80, 0x5280, 0x5280, 0x7380, 0x6180, 0x6180, 0x0000, 0x0000, 0x0000, // W
|
||||
0x0000, 0xC0C0, 0x6080, 0x6180, 0x3300, 0x3B00, 0x1E00, 0x0C00, 0x0C00, 0x1E00, 0x1F00, 0x3B00, 0x7180, 0x6180, 0xC0C0, 0x0000, 0x0000, 0x0000, // X
|
||||
0x0000, 0xC0C0, 0x6180, 0x6180, 0x3300, 0x3300, 0x1E00, 0x1E00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0000, 0x0000, 0x0000, // Y
|
||||
0x0000, 0x3F80, 0x3F80, 0x0180, 0x0300, 0x0300, 0x0600, 0x0C00, 0x0C00, 0x1800, 0x1800, 0x3000, 0x6000, 0x7F80, 0x7F80, 0x0000, 0x0000, 0x0000, // Z
|
||||
0x0F00, 0x0F00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0F00, 0x0F00, // [
|
||||
0x0000, 0x1800, 0x1800, 0x1800, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0600, 0x0600, 0x0600, 0x0600, 0x0300, 0x0300, 0x0300, 0x0000, 0x0000, 0x0000, //
|
||||
0x1E00, 0x1E00, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x1E00, 0x1E00, // ]
|
||||
0x0000, 0x0C00, 0x0C00, 0x1E00, 0x1200, 0x3300, 0x3300, 0x6180, 0x6180, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // ^
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFFE0, 0x0000, // _
|
||||
0x0000, 0x3800, 0x1800, 0x0C00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // `
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1F00, 0x3F80, 0x6180, 0x0180, 0x1F80, 0x3F80, 0x6180, 0x6380, 0x7F80, 0x38C0, 0x0000, 0x0000, 0x0000, // a
|
||||
0x0000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6E00, 0x7F00, 0x7380, 0x6180, 0x6180, 0x6180, 0x6180, 0x7380, 0x7F00, 0x6E00, 0x0000, 0x0000, 0x0000, // b
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1E00, 0x3F00, 0x7380, 0x6180, 0x6000, 0x6000, 0x6180, 0x7380, 0x3F00, 0x1E00, 0x0000, 0x0000, 0x0000, // c
|
||||
0x0000, 0x0180, 0x0180, 0x0180, 0x0180, 0x1D80, 0x3F80, 0x7380, 0x6180, 0x6180, 0x6180, 0x6180, 0x7380, 0x3F80, 0x1D80, 0x0000, 0x0000, 0x0000, // d
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1E00, 0x3F00, 0x7300, 0x6180, 0x7F80, 0x7F80, 0x6000, 0x7180, 0x3F00, 0x1E00, 0x0000, 0x0000, 0x0000, // e
|
||||
0x0000, 0x07C0, 0x0FC0, 0x0C00, 0x0C00, 0x7F80, 0x7F80, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0000, 0x0000, 0x0000, // f
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x1D80, 0x3F80, 0x7380, 0x6180, 0x6180, 0x6180, 0x6180, 0x7380, 0x3F80, 0x1D80, 0x0180, 0x6380, 0x7F00, 0x3E00, // g
|
||||
0x0000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6F00, 0x7F80, 0x7180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x0000, 0x0000, 0x0000, // h
|
||||
0x0000, 0x0600, 0x0600, 0x0000, 0x0000, 0x3E00, 0x3E00, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, // i
|
||||
0x0600, 0x0600, 0x0000, 0x0000, 0x3E00, 0x3E00, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x4600, 0x7E00, 0x3C00, // j
|
||||
0x0000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6180, 0x6300, 0x6600, 0x6C00, 0x7C00, 0x7600, 0x6300, 0x6300, 0x6180, 0x60C0, 0x0000, 0x0000, 0x0000, // k
|
||||
0x0000, 0x3E00, 0x3E00, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, // l
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xDD80, 0xFFC0, 0xCEC0, 0xCCC0, 0xCCC0, 0xCCC0, 0xCCC0, 0xCCC0, 0xCCC0, 0xCCC0, 0x0000, 0x0000, 0x0000, // m
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6F00, 0x7F80, 0x7180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x0000, 0x0000, 0x0000, // n
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1E00, 0x3F00, 0x7380, 0x6180, 0x6180, 0x6180, 0x6180, 0x7380, 0x3F00, 0x1E00, 0x0000, 0x0000, 0x0000, // o
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x6E00, 0x7F00, 0x7380, 0x6180, 0x6180, 0x6180, 0x6180, 0x7380, 0x7F00, 0x6E00, 0x6000, 0x6000, 0x6000, 0x6000, // p
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x1D80, 0x3F80, 0x7380, 0x6180, 0x6180, 0x6180, 0x6180, 0x7380, 0x3F80, 0x1D80, 0x0180, 0x0180, 0x0180, 0x0180, // q
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6700, 0x3F80, 0x3900, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x0000, 0x0000, 0x0000, // r
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1E00, 0x3F80, 0x6180, 0x6000, 0x7F00, 0x3F80, 0x0180, 0x6180, 0x7F00, 0x1E00, 0x0000, 0x0000, 0x0000, // s
|
||||
0x0000, 0x0000, 0x0800, 0x1800, 0x1800, 0x7F00, 0x7F00, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1F80, 0x0F80, 0x0000, 0x0000, 0x0000, // t
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6180, 0x6380, 0x7F80, 0x3D80, 0x0000, 0x0000, 0x0000, // u
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x60C0, 0x3180, 0x3180, 0x3180, 0x1B00, 0x1B00, 0x1B00, 0x0E00, 0x0E00, 0x0600, 0x0000, 0x0000, 0x0000, // v
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xDD80, 0xDD80, 0xDD80, 0x5500, 0x5500, 0x5500, 0x7700, 0x7700, 0x2200, 0x2200, 0x0000, 0x0000, 0x0000, // w
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6180, 0x3300, 0x3300, 0x1E00, 0x0C00, 0x0C00, 0x1E00, 0x3300, 0x3300, 0x6180, 0x0000, 0x0000, 0x0000, // x
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x6180, 0x6180, 0x3180, 0x3300, 0x3300, 0x1B00, 0x1B00, 0x1B00, 0x0E00, 0x0E00, 0x0E00, 0x1C00, 0x7C00, 0x7000, // y
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7FC0, 0x7FC0, 0x0180, 0x0300, 0x0600, 0x0C00, 0x1800, 0x3000, 0x7FC0, 0x7FC0, 0x0000, 0x0000, 0x0000, // z
|
||||
0x0380, 0x0780, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0E00, 0x1C00, 0x1C00, 0x0E00, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0780, 0x0380, // {
|
||||
0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, // |
|
||||
0x3800, 0x3C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0E00, 0x0700, 0x0700, 0x0E00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x0C00, 0x3C00, 0x3800, // }
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3880, 0x7F80, 0x4700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // ~
|
||||
};
|
||||
|
||||
/*
|
||||
const uint16_t Font16x26 [] = {
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [ ]
|
||||
0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03C0,0x03C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x0000,0x0000,0x0000,0x03E0,0x03E0,0x03E0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [!]
|
||||
0x1E3C,0x1E3C,0x1E3C,0x1E3C,0x1E3C,0x1E3C,0x1E3C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = ["]
|
||||
0x01CE,0x03CE,0x03DE,0x039E,0x039C,0x079C,0x3FFF,0x7FFF,0x0738,0x0F38,0x0F78,0x0F78,0x0E78,0xFFFF,0xFFFF,0x1EF0,0x1CF0,0x1CE0,0x3CE0,0x3DE0,0x39E0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [#]
|
||||
0x03FC,0x0FFE,0x1FEE,0x1EE0,0x1EE0,0x1EE0,0x1EE0,0x1FE0,0x0FE0,0x07E0,0x03F0,0x01FC,0x01FE,0x01FE,0x01FE,0x01FE,0x01FE,0x01FE,0x3DFE,0x3FFC,0x0FF0,0x01E0,0x01E0,0x0000,0x0000,0x0000, // Ascii = [$]
|
||||
0x3E03,0xF707,0xE78F,0xE78E,0xE39E,0xE3BC,0xE7B8,0xE7F8,0xF7F0,0x3FE0,0x01C0,0x03FF,0x07FF,0x07F3,0x0FF3,0x1EF3,0x3CF3,0x38F3,0x78F3,0xF07F,0xE03F,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [%]
|
||||
0x07E0,0x0FF8,0x0F78,0x1F78,0x1F78,0x1F78,0x0F78,0x0FF0,0x0FE0,0x1F80,0x7FC3,0xFBC3,0xF3E7,0xF1F7,0xF0F7,0xF0FF,0xF07F,0xF83E,0x7C7F,0x3FFF,0x1FEF,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [&]
|
||||
0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03C0,0x01C0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [']
|
||||
0x003F,0x007C,0x01F0,0x01E0,0x03C0,0x07C0,0x0780,0x0780,0x0F80,0x0F00,0x0F00,0x0F00,0x0F00,0x0F00,0x0F00,0x0F80,0x0780,0x0780,0x07C0,0x03C0,0x01E0,0x01F0,0x007C,0x003F,0x000F,0x0000, // Ascii = [(]
|
||||
0x7E00,0x1F00,0x07C0,0x03C0,0x01E0,0x01F0,0x00F0,0x00F0,0x00F8,0x0078,0x0078,0x0078,0x0078,0x0078,0x0078,0x00F8,0x00F0,0x00F0,0x01F0,0x01E0,0x03C0,0x07C0,0x1F00,0x7E00,0x7800,0x0000, // Ascii = [)]
|
||||
0x03E0,0x03C0,0x01C0,0x39CE,0x3FFF,0x3F7F,0x0320,0x0370,0x07F8,0x0F78,0x1F3C,0x0638,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [*]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0xFFFF,0xFFFF,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [+]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x03E0,0x03E0,0x03E0,0x03E0,0x01E0,0x01E0,0x01E0,0x01C0,0x0380, // Ascii = [,]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3FFE,0x3FFE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [-]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x03E0,0x03E0,0x03E0,0x03E0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [.]
|
||||
0x000F,0x000F,0x001E,0x001E,0x003C,0x003C,0x0078,0x0078,0x00F0,0x00F0,0x01E0,0x01E0,0x03C0,0x03C0,0x0780,0x0780,0x0F00,0x0F00,0x1E00,0x1E00,0x3C00,0x3C00,0x7800,0x7800,0xF000,0x0000, // Ascii = [/]
|
||||
0x07F0,0x0FF8,0x1F7C,0x3E3E,0x3C1E,0x7C1F,0x7C1F,0x780F,0x780F,0x780F,0x780F,0x780F,0x780F,0x780F,0x7C1F,0x7C1F,0x3C1E,0x3E3E,0x1F7C,0x0FF8,0x07F0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [0]
|
||||
0x00F0,0x07F0,0x3FF0,0x3FF0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x3FFF,0x3FFF,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [1]
|
||||
0x0FE0,0x3FF8,0x3C7C,0x003C,0x003E,0x003E,0x003E,0x003C,0x003C,0x007C,0x00F8,0x01F0,0x03E0,0x07C0,0x0780,0x0F00,0x1E00,0x3E00,0x3C00,0x3FFE,0x3FFE,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [2]
|
||||
0x0FF0,0x1FF8,0x1C7C,0x003E,0x003E,0x003E,0x003C,0x003C,0x00F8,0x0FF0,0x0FF8,0x007C,0x003E,0x001E,0x001E,0x001E,0x001E,0x003E,0x1C7C,0x1FF8,0x1FE0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [3]
|
||||
0x0078,0x00F8,0x00F8,0x01F8,0x03F8,0x07F8,0x07F8,0x0F78,0x1E78,0x1E78,0x3C78,0x7878,0x7878,0xFFFF,0xFFFF,0x0078,0x0078,0x0078,0x0078,0x0078,0x0078,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [4]
|
||||
0x1FFC,0x1FFC,0x1FFC,0x1E00,0x1E00,0x1E00,0x1E00,0x1E00,0x1FE0,0x1FF8,0x00FC,0x007C,0x003E,0x003E,0x001E,0x003E,0x003E,0x003C,0x1C7C,0x1FF8,0x1FE0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [5]
|
||||
0x01FC,0x07FE,0x0F8E,0x1F00,0x1E00,0x3E00,0x3C00,0x3C00,0x3DF8,0x3FFC,0x7F3E,0x7E1F,0x3C0F,0x3C0F,0x3C0F,0x3C0F,0x3E0F,0x1E1F,0x1F3E,0x0FFC,0x03F0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [6]
|
||||
0x3FFF,0x3FFF,0x3FFF,0x000F,0x001E,0x001E,0x003C,0x0038,0x0078,0x00F0,0x00F0,0x01E0,0x01E0,0x03C0,0x03C0,0x0780,0x0F80,0x0F80,0x0F00,0x1F00,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [7]
|
||||
0x07F8,0x0FFC,0x1F3E,0x1E1E,0x3E1E,0x3E1E,0x1E1E,0x1F3C,0x0FF8,0x07F0,0x0FF8,0x1EFC,0x3E3E,0x3C1F,0x7C1F,0x7C0F,0x7C0F,0x3C1F,0x3F3E,0x1FFC,0x07F0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [8]
|
||||
0x07F0,0x0FF8,0x1E7C,0x3C3E,0x3C1E,0x7C1F,0x7C1F,0x7C1F,0x7C1F,0x3C1F,0x3E3F,0x1FFF,0x07EF,0x001F,0x001E,0x001E,0x003E,0x003C,0x38F8,0x3FF0,0x1FE0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [9]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x03E0,0x03E0,0x03E0,0x03E0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x03E0,0x03E0,0x03E0,0x03E0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [:]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x03E0,0x03E0,0x03E0,0x03E0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x03E0,0x03E0,0x03E0,0x03E0,0x01E0,0x01E0,0x01E0,0x03C0,0x0380, // Ascii = [;]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0003,0x000F,0x003F,0x00FC,0x03F0,0x0FC0,0x3F00,0xFE00,0x3F00,0x0FC0,0x03F0,0x00FC,0x003F,0x000F,0x0003,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [<]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xFFFF,0xFFFF,0x0000,0x0000,0x0000,0xFFFF,0xFFFF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [=]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xE000,0xF800,0x7E00,0x1F80,0x07E0,0x01F8,0x007E,0x001F,0x007E,0x01F8,0x07E0,0x1F80,0x7E00,0xF800,0xE000,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [>]
|
||||
0x1FF0,0x3FFC,0x383E,0x381F,0x381F,0x001E,0x001E,0x003C,0x0078,0x00F0,0x01E0,0x03C0,0x03C0,0x07C0,0x07C0,0x0000,0x0000,0x0000,0x07C0,0x07C0,0x07C0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [?]
|
||||
0x03F8,0x0FFE,0x1F1E,0x3E0F,0x3C7F,0x78FF,0x79EF,0x73C7,0xF3C7,0xF38F,0xF38F,0xF38F,0xF39F,0xF39F,0x73FF,0x7BFF,0x79F7,0x3C00,0x1F1C,0x0FFC,0x03F8,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [@]
|
||||
0x0000,0x0000,0x0000,0x03E0,0x03E0,0x07F0,0x07F0,0x07F0,0x0F78,0x0F78,0x0E7C,0x1E3C,0x1E3C,0x3C3E,0x3FFE,0x3FFF,0x781F,0x780F,0xF00F,0xF007,0xF007,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [A]
|
||||
0x0000,0x0000,0x0000,0x3FF8,0x3FFC,0x3C3E,0x3C1E,0x3C1E,0x3C1E,0x3C3E,0x3C7C,0x3FF0,0x3FF8,0x3C7E,0x3C1F,0x3C1F,0x3C0F,0x3C0F,0x3C1F,0x3FFE,0x3FF8,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [B]
|
||||
0x0000,0x0000,0x0000,0x01FF,0x07FF,0x1F87,0x3E00,0x3C00,0x7C00,0x7800,0x7800,0x7800,0x7800,0x7800,0x7C00,0x7C00,0x3E00,0x3F00,0x1F83,0x07FF,0x01FF,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [C]
|
||||
0x0000,0x0000,0x0000,0x7FF0,0x7FFC,0x787E,0x781F,0x781F,0x780F,0x780F,0x780F,0x780F,0x780F,0x780F,0x780F,0x780F,0x781F,0x781E,0x787E,0x7FF8,0x7FE0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [D]
|
||||
0x0000,0x0000,0x0000,0x3FFF,0x3FFF,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3FFE,0x3FFE,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3FFF,0x3FFF,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [E]
|
||||
0x0000,0x0000,0x0000,0x1FFF,0x1FFF,0x1E00,0x1E00,0x1E00,0x1E00,0x1E00,0x1E00,0x1FFF,0x1FFF,0x1E00,0x1E00,0x1E00,0x1E00,0x1E00,0x1E00,0x1E00,0x1E00,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [F]
|
||||
0x0000,0x0000,0x0000,0x03FE,0x0FFF,0x1F87,0x3E00,0x7C00,0x7C00,0x7800,0xF800,0xF800,0xF87F,0xF87F,0x780F,0x7C0F,0x7C0F,0x3E0F,0x1F8F,0x0FFF,0x03FE,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [G]
|
||||
0x0000,0x0000,0x0000,0x7C1F,0x7C1F,0x7C1F,0x7C1F,0x7C1F,0x7C1F,0x7C1F,0x7C1F,0x7FFF,0x7FFF,0x7C1F,0x7C1F,0x7C1F,0x7C1F,0x7C1F,0x7C1F,0x7C1F,0x7C1F,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [H]
|
||||
0x0000,0x0000,0x0000,0x3FFF,0x3FFF,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x3FFF,0x3FFF,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [I]
|
||||
0x0000,0x0000,0x0000,0x1FFC,0x1FFC,0x007C,0x007C,0x007C,0x007C,0x007C,0x007C,0x007C,0x007C,0x007C,0x007C,0x007C,0x0078,0x0078,0x38F8,0x3FF0,0x3FC0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [J]
|
||||
0x0000,0x0000,0x0000,0x3C1F,0x3C1E,0x3C3C,0x3C78,0x3CF0,0x3DE0,0x3FE0,0x3FC0,0x3F80,0x3FC0,0x3FE0,0x3DF0,0x3CF0,0x3C78,0x3C7C,0x3C3E,0x3C1F,0x3C0F,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [K]
|
||||
0x0000,0x0000,0x0000,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3FFF,0x3FFF,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [L]
|
||||
0x0000,0x0000,0x0000,0xF81F,0xFC1F,0xFC1F,0xFE3F,0xFE3F,0xFE3F,0xFF7F,0xFF77,0xFF77,0xF7F7,0xF7E7,0xF3E7,0xF3E7,0xF3C7,0xF007,0xF007,0xF007,0xF007,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [M]
|
||||
0x0000,0x0000,0x0000,0x7C0F,0x7C0F,0x7E0F,0x7F0F,0x7F0F,0x7F8F,0x7F8F,0x7FCF,0x7BEF,0x79EF,0x79FF,0x78FF,0x78FF,0x787F,0x783F,0x783F,0x781F,0x781F,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [N]
|
||||
0x0000,0x0000,0x0000,0x07F0,0x1FFC,0x3E3E,0x7C1F,0x780F,0x780F,0xF80F,0xF80F,0xF80F,0xF80F,0xF80F,0xF80F,0x780F,0x780F,0x7C1F,0x3E3E,0x1FFC,0x07F0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [O]
|
||||
0x0000,0x0000,0x0000,0x3FFC,0x3FFF,0x3E1F,0x3E0F,0x3E0F,0x3E0F,0x3E0F,0x3E1F,0x3E3F,0x3FFC,0x3FF0,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x3E00,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [P]
|
||||
0x0000,0x0000,0x0000,0x07F0,0x1FFC,0x3E3E,0x7C1F,0x780F,0x780F,0xF80F,0xF80F,0xF80F,0xF80F,0xF80F,0xF80F,0x780F,0x780F,0x7C1F,0x3E3E,0x1FFC,0x07F8,0x007C,0x003F,0x000F,0x0003,0x0000, // Ascii = [Q]
|
||||
0x0000,0x0000,0x0000,0x3FF0,0x3FFC,0x3C7E,0x3C3E,0x3C1E,0x3C1E,0x3C3E,0x3C3C,0x3CFC,0x3FF0,0x3FE0,0x3DF0,0x3CF8,0x3C7C,0x3C3E,0x3C1E,0x3C1F,0x3C0F,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [R]
|
||||
0x0000,0x0000,0x0000,0x07FC,0x1FFE,0x3E0E,0x3C00,0x3C00,0x3C00,0x3E00,0x1FC0,0x0FF8,0x03FE,0x007F,0x001F,0x000F,0x000F,0x201F,0x3C3E,0x3FFC,0x1FF0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [S]
|
||||
0x0000,0x0000,0x0000,0xFFFF,0xFFFF,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [T]
|
||||
0x0000,0x0000,0x0000,0x7C0F,0x7C0F,0x7C0F,0x7C0F,0x7C0F,0x7C0F,0x7C0F,0x7C0F,0x7C0F,0x7C0F,0x7C0F,0x7C0F,0x7C0F,0x3C1E,0x3C1E,0x3E3E,0x1FFC,0x07F0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [U]
|
||||
0x0000,0x0000,0x0000,0xF007,0xF007,0xF807,0x780F,0x7C0F,0x3C1E,0x3C1E,0x3E1E,0x1E3C,0x1F3C,0x1F78,0x0F78,0x0FF8,0x07F0,0x07F0,0x07F0,0x03E0,0x03E0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [V]
|
||||
0x0000,0x0000,0x0000,0xE003,0xF003,0xF003,0xF007,0xF3E7,0xF3E7,0xF3E7,0x73E7,0x7BF7,0x7FF7,0x7FFF,0x7F7F,0x7F7F,0x7F7E,0x3F7E,0x3E3E,0x3E3E,0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [W]
|
||||
0x0000,0x0000,0x0000,0xF807,0x7C0F,0x3E1E,0x3E3E,0x1F3C,0x0FF8,0x07F0,0x07E0,0x03E0,0x03E0,0x07F0,0x0FF8,0x0F7C,0x1E7C,0x3C3E,0x781F,0x780F,0xF00F,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [X]
|
||||
0x0000,0x0000,0x0000,0xF807,0x7807,0x7C0F,0x3C1E,0x3E1E,0x1F3C,0x0F78,0x0FF8,0x07F0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x03E0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [Y]
|
||||
0x0000,0x0000,0x0000,0x7FFF,0x7FFF,0x000F,0x001F,0x003E,0x007C,0x00F8,0x00F0,0x01E0,0x03E0,0x07C0,0x0F80,0x0F00,0x1E00,0x3E00,0x7C00,0x7FFF,0x7FFF,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [Z]
|
||||
0x07FF,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x07FF,0x07FF,0x0000, // Ascii = [[]
|
||||
0x7800,0x7800,0x3C00,0x3C00,0x1E00,0x1E00,0x0F00,0x0F00,0x0780,0x0780,0x03C0,0x03C0,0x01E0,0x01E0,0x00F0,0x00F0,0x0078,0x0078,0x003C,0x003C,0x001E,0x001E,0x000F,0x000F,0x0007,0x0000, // Ascii = [\]
|
||||
0x7FF0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x00F0,0x7FF0,0x7FF0,0x0000, // Ascii = []]
|
||||
0x00C0,0x01C0,0x01C0,0x03E0,0x03E0,0x07F0,0x07F0,0x0778,0x0F78,0x0F38,0x1E3C,0x1E3C,0x3C1E,0x3C1E,0x380F,0x780F,0x7807,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [^]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xFFFF,0xFFFF,0x0000,0x0000,0x0000, // Ascii = [_]
|
||||
0x00F0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [`]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0FF8,0x3FFC,0x3C7C,0x003E,0x003E,0x003E,0x07FE,0x1FFE,0x3E3E,0x7C3E,0x783E,0x7C3E,0x7C7E,0x3FFF,0x1FCF,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [a]
|
||||
0x3C00,0x3C00,0x3C00,0x3C00,0x3C00,0x3C00,0x3DF8,0x3FFE,0x3F3E,0x3E1F,0x3C0F,0x3C0F,0x3C0F,0x3C0F,0x3C0F,0x3C0F,0x3C1F,0x3C1E,0x3F3E,0x3FFC,0x3BF0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [b]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x03FE,0x0FFF,0x1F87,0x3E00,0x3E00,0x3C00,0x7C00,0x7C00,0x7C00,0x3C00,0x3E00,0x3E00,0x1F87,0x0FFF,0x03FE,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [c]
|
||||
0x001F,0x001F,0x001F,0x001F,0x001F,0x001F,0x07FF,0x1FFF,0x3E3F,0x3C1F,0x7C1F,0x7C1F,0x7C1F,0x781F,0x781F,0x7C1F,0x7C1F,0x3C3F,0x3E7F,0x1FFF,0x0FDF,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [d]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x03F8,0x0FFC,0x1F3E,0x3E1E,0x3C1F,0x7C1F,0x7FFF,0x7FFF,0x7C00,0x7C00,0x3C00,0x3E00,0x1F07,0x0FFF,0x03FE,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [e]
|
||||
0x01FF,0x03E1,0x03C0,0x07C0,0x07C0,0x07C0,0x7FFF,0x7FFF,0x07C0,0x07C0,0x07C0,0x07C0,0x07C0,0x07C0,0x07C0,0x07C0,0x07C0,0x07C0,0x07C0,0x07C0,0x07C0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [f]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x07EF,0x1FFF,0x3E7F,0x3C1F,0x7C1F,0x7C1F,0x781F,0x781F,0x781F,0x7C1F,0x7C1F,0x3C3F,0x3E7F,0x1FFF,0x0FDF,0x001E,0x001E,0x001E,0x387C,0x3FF8, // Ascii = [g]
|
||||
0x3C00,0x3C00,0x3C00,0x3C00,0x3C00,0x3C00,0x3DFC,0x3FFE,0x3F9E,0x3F1F,0x3E1F,0x3C1F,0x3C1F,0x3C1F,0x3C1F,0x3C1F,0x3C1F,0x3C1F,0x3C1F,0x3C1F,0x3C1F,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [h]
|
||||
0x01F0,0x01F0,0x0000,0x0000,0x0000,0x0000,0x7FE0,0x7FE0,0x01E0,0x01E0,0x01E0,0x01E0,0x01E0,0x01E0,0x01E0,0x01E0,0x01E0,0x01E0,0x01E0,0x01E0,0x01E0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [i]
|
||||
0x00F8,0x00F8,0x0000,0x0000,0x0000,0x0000,0x3FF8,0x3FF8,0x00F8,0x00F8,0x00F8,0x00F8,0x00F8,0x00F8,0x00F8,0x00F8,0x00F8,0x00F8,0x00F8,0x00F8,0x00F8,0x00F8,0x00F8,0x00F0,0x71F0,0x7FE0, // Ascii = [j]
|
||||
0x3C00,0x3C00,0x3C00,0x3C00,0x3C00,0x3C00,0x3C1F,0x3C3E,0x3C7C,0x3CF8,0x3DF0,0x3DE0,0x3FC0,0x3FC0,0x3FE0,0x3DF0,0x3CF8,0x3C7C,0x3C3E,0x3C1F,0x3C1F,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [k]
|
||||
0x7FF0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x01F0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [l]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xF79E,0xFFFF,0xFFFF,0xFFFF,0xFBE7,0xF9E7,0xF1C7,0xF1C7,0xF1C7,0xF1C7,0xF1C7,0xF1C7,0xF1C7,0xF1C7,0xF1C7,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [m]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3DFC,0x3FFE,0x3F9E,0x3F1F,0x3E1F,0x3C1F,0x3C1F,0x3C1F,0x3C1F,0x3C1F,0x3C1F,0x3C1F,0x3C1F,0x3C1F,0x3C1F,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [n]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x07F0,0x1FFC,0x3E3E,0x3C1F,0x7C1F,0x780F,0x780F,0x780F,0x780F,0x780F,0x7C1F,0x3C1F,0x3E3E,0x1FFC,0x07F0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [o]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3DF8,0x3FFE,0x3F3E,0x3E1F,0x3C0F,0x3C0F,0x3C0F,0x3C0F,0x3C0F,0x3C0F,0x3C1F,0x3E1E,0x3F3E,0x3FFC,0x3FF8,0x3C00,0x3C00,0x3C00,0x3C00,0x3C00, // Ascii = [p]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x07EE,0x1FFE,0x3E7E,0x3C1E,0x7C1E,0x781E,0x781E,0x781E,0x781E,0x781E,0x7C1E,0x7C3E,0x3E7E,0x1FFE,0x0FDE,0x001E,0x001E,0x001E,0x001E,0x001E, // Ascii = [q]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1F7F,0x1FFF,0x1FE7,0x1FC7,0x1F87,0x1F00,0x1F00,0x1F00,0x1F00,0x1F00,0x1F00,0x1F00,0x1F00,0x1F00,0x1F00,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [r]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x07FC,0x1FFE,0x1E0E,0x3E00,0x3E00,0x3F00,0x1FE0,0x07FC,0x00FE,0x003E,0x001E,0x001E,0x3C3E,0x3FFC,0x1FF0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [s]
|
||||
0x0000,0x0000,0x0000,0x0780,0x0780,0x0780,0x7FFF,0x7FFF,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x0780,0x07C0,0x03FF,0x01FF,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [t]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3C1E,0x3C1E,0x3C1E,0x3C1E,0x3C1E,0x3C1E,0x3C1E,0x3C1E,0x3C1E,0x3C1E,0x3C3E,0x3C7E,0x3EFE,0x1FFE,0x0FDE,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [u]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xF007,0x780F,0x780F,0x3C1E,0x3C1E,0x3E1E,0x1E3C,0x1E3C,0x0F78,0x0F78,0x0FF0,0x07F0,0x07F0,0x03E0,0x03E0,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [v]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xF003,0xF1E3,0xF3E3,0xF3E7,0xF3F7,0xF3F7,0x7FF7,0x7F77,0x7F7F,0x7F7F,0x7F7F,0x3E3E,0x3E3E,0x3E3E,0x3E3E,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [w]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x7C0F,0x3E1E,0x3E3C,0x1F3C,0x0FF8,0x07F0,0x07F0,0x03E0,0x07F0,0x07F8,0x0FF8,0x1E7C,0x3E3E,0x3C1F,0x781F,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [x]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xF807,0x780F,0x7C0F,0x3C1E,0x3C1E,0x1E3C,0x1E3C,0x1F3C,0x0F78,0x0FF8,0x07F0,0x07F0,0x03E0,0x03E0,0x03C0,0x03C0,0x03C0,0x0780,0x0F80,0x7F00, // Ascii = [y]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3FFF,0x3FFF,0x001F,0x003E,0x007C,0x00F8,0x01F0,0x03E0,0x07C0,0x0F80,0x1F00,0x1E00,0x3C00,0x7FFF,0x7FFF,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [z]
|
||||
0x01FE,0x03E0,0x03C0,0x03C0,0x03C0,0x03C0,0x01E0,0x01E0,0x01E0,0x01C0,0x03C0,0x3F80,0x3F80,0x03C0,0x01C0,0x01E0,0x01E0,0x01E0,0x03C0,0x03C0,0x03C0,0x03C0,0x03E0,0x01FE,0x007E,0x0000, // Ascii = [{]
|
||||
0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x01C0,0x0000, // Ascii = [|]
|
||||
0x3FC0,0x03E0,0x01E0,0x01E0,0x01E0,0x01E0,0x01C0,0x03C0,0x03C0,0x01C0,0x01E0,0x00FE,0x00FE,0x01E0,0x01C0,0x03C0,0x03C0,0x01C0,0x01E0,0x01E0,0x01E0,0x01E0,0x03E0,0x3FC0,0x3F00,0x0000, // Ascii = [}]
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3F07,0x7FC7,0x73E7,0xF1FF,0xF07E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // Ascii = [~]
|
||||
};*/
|
||||
|
||||
|
||||
FontDef_t Font_7x10 = {
|
||||
7,
|
||||
10,
|
||||
Font7x10
|
||||
};
|
||||
|
||||
FontDef_t Font_11x18 = {
|
||||
11,
|
||||
18,
|
||||
Font11x18
|
||||
};
|
||||
/*
|
||||
FontDef_t Font_16x26 = {
|
||||
16,
|
||||
26,
|
||||
Font16x26
|
||||
};*/
|
||||
|
||||
char* FONTS_GetStringSize(char* str, FONTS_SIZE_t* SizeStruct, FontDef_t* Font) {
|
||||
/* Fill settings */
|
||||
SizeStruct->Height = Font->FontHeight;
|
||||
SizeStruct->Length = Font->FontWidth * strlen(str);
|
||||
|
||||
/* Return pointer */
|
||||
return str;
|
||||
}
|
||||
131
Projects/epwm_test_biss_c_cpu2/src/fonts.h
Normal file
131
Projects/epwm_test_biss_c_cpu2/src/fonts.h
Normal file
@ -0,0 +1,131 @@
|
||||
/**
|
||||
* original author: Tilen Majerle<tilen@majerle.eu>
|
||||
* modification for STM32f10x: Alexander Lutsai<s.lyra@ya.ru>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Copyright (C) Alexander Lutsai, 2016
|
||||
Copyright (C) Tilen Majerle, 2015
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef FONTS_H
|
||||
#define FONTS_H 120
|
||||
typedef unsigned char uint8_t;
|
||||
/* C++ detection */
|
||||
#ifdef __cplusplus
|
||||
extern C {
|
||||
#endif
|
||||
|
||||
/**
|
||||
*
|
||||
* Default fonts library. It is used in all LCD based libraries.
|
||||
*
|
||||
* \par Supported fonts
|
||||
*
|
||||
* Currently, these fonts are supported:
|
||||
* - 7 x 10 pixels
|
||||
* - 11 x 18 pixels
|
||||
* - 16 x 26 pixels
|
||||
|
||||
*/
|
||||
#include "string.h"
|
||||
#include "stdint.h"
|
||||
/**
|
||||
* @defgroup LIB_Typedefs
|
||||
* @brief Library Typedefs
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Font structure used on my LCD libraries
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t FontWidth; /*!< Font width in pixels */
|
||||
uint8_t FontHeight; /*!< Font height in pixels */
|
||||
const uint16_t *data; /*!< Pointer to data font data array */
|
||||
} FontDef_t;
|
||||
|
||||
/**
|
||||
* @brief String length and height
|
||||
*/
|
||||
typedef struct {
|
||||
uint16_t Length; /*!< String length in units of pixels */
|
||||
uint16_t Height; /*!< String height in units of pixels */
|
||||
} FONTS_SIZE_t;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup FONTS_FontVariables
|
||||
* @brief Library font variables
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief 7 x 10 pixels font size structure
|
||||
*/
|
||||
extern FontDef_t Font_7x10;
|
||||
|
||||
/**
|
||||
* @brief 11 x 18 pixels font size structure
|
||||
*/
|
||||
extern FontDef_t Font_11x18;
|
||||
|
||||
/**
|
||||
* @brief 16 x 26 pixels font size structure
|
||||
*/
|
||||
extern FontDef_t Font_16x26;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup FONTS_Functions
|
||||
* @brief Library functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Calculates string length and height in units of pixels depending on string and font used
|
||||
* @param *str: String to be checked for length and height
|
||||
* @param *SizeStruct: Pointer to empty @ref FONTS_SIZE_t structure where informations will be saved
|
||||
* @param *Font: Pointer to @ref FontDef_t font used for calculations
|
||||
* @retval Pointer to string used for length and height
|
||||
*/
|
||||
char* FONTS_GetStringSize(char* str, FONTS_SIZE_t* SizeStruct, FontDef_t* Font);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* C++ detection */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
767
Projects/epwm_test_biss_c_cpu2/src/i2c_oled.c
Normal file
767
Projects/epwm_test_biss_c_cpu2/src/i2c_oled.c
Normal file
@ -0,0 +1,767 @@
|
||||
#include "i2c_oled.h"
|
||||
#include "init_perif.h"
|
||||
|
||||
extern unsigned long uptimeSeconds;
|
||||
#pragma DATA_SECTION(SSD1306_Buffer,"Filter6_RegsFile");
|
||||
#pragma DATA_SECTION(I2C_TXdata,"Filter6_RegsFile");
|
||||
//////////////////////////////////////////////////////////
|
||||
/* Absolute value */
|
||||
#define ABS(x) ((x) > 0 ? (x) : -(x))
|
||||
|
||||
/* SSD1306 data buffer */
|
||||
static uint8_t SSD1306_Buffer[SSD1306_WIDTH * SSD1306_HEIGHT / 8];
|
||||
|
||||
uint16_t I2C_TXdata[128];
|
||||
|
||||
/* Private SSD1306 structure */
|
||||
typedef struct {
|
||||
uint16_t CurrentX;
|
||||
uint16_t CurrentY;
|
||||
uint8_t Inverted;
|
||||
uint8_t Initialized;
|
||||
} SSD1306_t;
|
||||
|
||||
/* Private variable */
|
||||
static SSD1306_t SSD1306;
|
||||
|
||||
uint8_t SSD1306_Init(void) {
|
||||
|
||||
/* A little delay */
|
||||
uint32_t p = 2500;
|
||||
while(p>0)
|
||||
p--;
|
||||
|
||||
/* Init LCD */
|
||||
SSD1306_WRITECOMMAND(0xAE); //display off
|
||||
|
||||
SSD1306_WRITECOMMAND(0xB0); //Set Page Address
|
||||
SSD1306_WRITECOMMAND(0x40); //---set high column address
|
||||
SSD1306_WRITECOMMAND(0x00); //---set low column address
|
||||
|
||||
SSD1306_WRITECOMMAND(0xA4); //---set high column address
|
||||
|
||||
SSD1306_WRITECOMMAND(0xD5); //--set start line address
|
||||
SSD1306_WRITECOMMAND(0x50); //--set contrast control register
|
||||
|
||||
SSD1306_WRITECOMMAND(0xA8);
|
||||
SSD1306_WRITECOMMAND(0x3F); //--set segment re-map 0 to 127
|
||||
|
||||
SSD1306_WRITECOMMAND(0xD3); //--set normal display
|
||||
SSD1306_WRITECOMMAND(0x00); //--set multiplex ratio(1 to 64)
|
||||
|
||||
SSD1306_WRITECOMMAND(0x40); //
|
||||
|
||||
SSD1306_WRITECOMMAND(0xAD); //0xa4,Output follows RAM content;0xa5,Output ignores RAM content
|
||||
SSD1306_WRITECOMMAND(0x8A); //-set display offset
|
||||
|
||||
SSD1306_WRITECOMMAND(0xA0); //-not offset
|
||||
|
||||
SSD1306_WRITECOMMAND(0xC8); //--set display clock divide ratio/oscillator frequency
|
||||
|
||||
SSD1306_WRITECOMMAND(0xDA); //--set divide ratio
|
||||
SSD1306_WRITECOMMAND(0x12); //--set pre-charge period
|
||||
|
||||
SSD1306_WRITECOMMAND(0x81); //
|
||||
SSD1306_WRITECOMMAND(0xFF); //--set com pins hardware configuration
|
||||
|
||||
SSD1306_WRITECOMMAND(0xD9);
|
||||
SSD1306_WRITECOMMAND(0x11); //--set vcomh
|
||||
|
||||
SSD1306_WRITECOMMAND(0xDB); //0x20,0.77xVcc
|
||||
SSD1306_WRITECOMMAND(0x35); //--set DC-DC enable
|
||||
|
||||
SSD1306_WRITECOMMAND(0xA6); //
|
||||
|
||||
SSD1306_WRITECOMMAND(0xAF); //--turn on SSD1306 panel
|
||||
|
||||
/* Clear screen */
|
||||
SSD1306_Fill(SSD1306_COLOR_BLACK);
|
||||
/* Update screen */
|
||||
SSD1306_UpdateScreen();
|
||||
SSD1306_WRITECOMMAND(0xA1); //-not offset
|
||||
/* Set default values */
|
||||
SSD1306.CurrentX = 0;
|
||||
SSD1306.CurrentY = 0;
|
||||
|
||||
/* Initialized OK */
|
||||
SSD1306.Initialized = 1;
|
||||
|
||||
/* Return OK */
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
#define SSD1306_COLUMNADDR 0x21
|
||||
#define SSD1306_PAGEADDR 0xB0
|
||||
|
||||
|
||||
void SSD1306_setPosition(uint8_t column, uint8_t page) {
|
||||
if (column > SSD1306_WIDTH - 1) {
|
||||
column = 0; // Îãðàíè÷åíèå ñòîëáöà
|
||||
}
|
||||
if (page > 7) {
|
||||
page = 0; // Îãðàíè÷åíèå ñòðàíèöû
|
||||
}
|
||||
|
||||
SSD1306_WRITECOMMAND(0x20+column); // Íà÷àëüíûé àäðåñ ñòîëáöà
|
||||
SSD1306_WRITECOMMAND(SSD1306_PAGEADDR+page); // Íà÷àëüíûé àäðåñ ñòðàíèöû
|
||||
// SSD1306_WRITECOMMAND(7); // Êîíå÷íûé àäðåñ ñòðàíèöû
|
||||
}
|
||||
|
||||
|
||||
void SSD1306_UpdateScreen(void) {
|
||||
|
||||
uint8_t page;
|
||||
uint8_t column;
|
||||
int i;
|
||||
for (page = 0; page < 8; page++) {
|
||||
SSD1306_WRITECOMMAND(0x10);
|
||||
SSD1306_WRITECOMMAND(0x00);
|
||||
for (column = 0; column < SSD1306_WIDTH; column++) { //
|
||||
SSD1306_setPosition(column, page); // Íà÷àëî ñòîëáöà - 0, ñòðàíèöà - m
|
||||
// Çàïèñü äàííûõ â áóôåð äèñïëåÿ
|
||||
I2C_TXdata[0] = 0x40; // Áàéò óïðàâëåíèÿ: äàííûå
|
||||
for ( i = 0; i < SSD1306_WIDTH; i++) {
|
||||
I2C_TXdata[i + 1] = SSD1306_Buffer[SSD1306_WIDTH*page + i];
|
||||
}
|
||||
column+=128;
|
||||
I2CWriteOLED(I2C_SLAVE_ADDRESS, 129, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SSD1306_UpdateScreenÀFAST(void) {
|
||||
|
||||
uint8_t page;
|
||||
uint8_t column;
|
||||
uint8_t data_bytes = SSD1306_WIDTH / 8;
|
||||
int i;
|
||||
for (page = 0; page < 1; page++) {
|
||||
SSD1306_WRITECOMMAND(0x10);
|
||||
SSD1306_WRITECOMMAND(0x00);
|
||||
for (column = 0; column < SSD1306_WIDTH-60; column++) { //
|
||||
SSD1306_setPosition(column+60, page); // Íà÷àëî ñòîëáöà - 0, ñòðàíèöà - m
|
||||
|
||||
// Çàïèñü äàííûõ â áóôåð äèñïëåÿ
|
||||
I2C_TXdata[0] = 0x40; // Áàéò óïðàâëåíèÿ: äàííûå
|
||||
// Çàïîëíèòü áóôåð I2C äàííûìè èç áóôåðà äèñïëåÿ
|
||||
I2C_TXdata[0] = 0x40; // Êîìàíäà çàïèñè äàííûõ
|
||||
I2C_TXdata[1] = SSD1306_Buffer[SSD1306_WIDTH*page + column];
|
||||
I2CWriteOLED(I2C_SLAVE_ADDRESS, 2, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
void SSD1306_ToggleInvert(void) {
|
||||
uint16_t i;
|
||||
|
||||
/* Toggle invert */
|
||||
SSD1306.Inverted = !SSD1306.Inverted;
|
||||
|
||||
/* Do memory toggle */
|
||||
for (i = 0; i < sizeof(SSD1306_Buffer); i++) {
|
||||
SSD1306_Buffer[i] = ~SSD1306_Buffer[i];
|
||||
}
|
||||
}
|
||||
|
||||
void SSD1306_Fill(SSD1306_COLOR_t color) {
|
||||
/* Set memory */
|
||||
memset(SSD1306_Buffer, (color == SSD1306_COLOR_BLACK) ? 0x00 : 0xFF, sizeof(SSD1306_Buffer));
|
||||
}
|
||||
void SSD1306_DrawPixel(uint16_t x, uint16_t y, SSD1306_COLOR_t color) {
|
||||
if (x >= SSD1306_WIDTH || y >= SSD1306_HEIGHT) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (SSD1306.Inverted) {
|
||||
color = (SSD1306_COLOR_t)!color;
|
||||
}
|
||||
|
||||
// Ïðàâèëüíî âû÷èñëÿåì èíäåêñ áàéòà â áóôåðå
|
||||
uint16_t byteIndex = x + (y / 8) * SSD1306_WIDTH;
|
||||
// Ïðàâèëüíî âû÷èñëÿåì èíäåêñ áèòà â áàéò
|
||||
uint8_t bitIndex = y % 8;
|
||||
|
||||
if (color == SSD1306_COLOR_WHITE) {
|
||||
SSD1306_Buffer[byteIndex] |= (1 << bitIndex);
|
||||
} else {
|
||||
SSD1306_Buffer[byteIndex] &= ~(1 << bitIndex);
|
||||
}
|
||||
}
|
||||
|
||||
/* Draw a bitmap */
|
||||
void ssd1306_DrawBitmap(uint8_t x, uint8_t y, const unsigned char* bitmap, uint8_t w, uint8_t h, SSD1306_COLOR_t color) {
|
||||
int16_t byteWidth = (w + 7) / 8; // Bitmap scanline pad = whole byte
|
||||
uint8_t byte = 0;
|
||||
uint8_t i,j;
|
||||
if (x >= SSD1306_WIDTH || y >= SSD1306_HEIGHT) {
|
||||
return;
|
||||
}
|
||||
|
||||
for ( j = 0; j < h; j++, y++) {
|
||||
for ( i = 0; i < w; i++) {
|
||||
if (i & 7) {
|
||||
byte <<= 1;
|
||||
} else {
|
||||
byte = (*(const unsigned char *)(&bitmap[j * byteWidth + i / 8]));
|
||||
}
|
||||
|
||||
if (byte & 0x80) {
|
||||
SSD1306_DrawPixel(x + i, y, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void SSD1306_GotoXY(uint16_t x, uint16_t y) {
|
||||
/* Set write pointers */
|
||||
SSD1306.CurrentX = x;
|
||||
SSD1306.CurrentY = y;
|
||||
}
|
||||
|
||||
char SSD1306_Putc(char ch, FontDef_t* Font, SSD1306_COLOR_t color) {
|
||||
uint32_t i, b, j;
|
||||
|
||||
/* Check available space in LCD */
|
||||
if (
|
||||
SSD1306_WIDTH <= (SSD1306.CurrentX + Font->FontWidth) ||
|
||||
SSD1306_HEIGHT <= (SSD1306.CurrentY + Font->FontHeight)
|
||||
) {
|
||||
/* Error */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Go through font */
|
||||
for (i = 0; i < Font->FontHeight; i++) {
|
||||
b = Font->data[(ch - 32) * Font->FontHeight + i];
|
||||
for (j = 0; j < Font->FontWidth; j++) {
|
||||
if ((b << j) & 0x8000) {
|
||||
SSD1306_DrawPixel(SSD1306.CurrentX + j, (SSD1306.CurrentY + i), (SSD1306_COLOR_t) color);
|
||||
} else {
|
||||
SSD1306_DrawPixel(SSD1306.CurrentX + j, (SSD1306.CurrentY + i), (SSD1306_COLOR_t)!color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Increase pointer */
|
||||
SSD1306.CurrentX += Font->FontWidth;
|
||||
|
||||
/* Return character written */
|
||||
return ch;
|
||||
}
|
||||
void reverseString(char *str) {
|
||||
if (str == NULL) { // Ïðîâåðêà íà NULL óêàçàòåëü
|
||||
return;
|
||||
}
|
||||
|
||||
char *end = str; // Óêàçàòåëü íà êîíåö ñòðîêè
|
||||
while (*end) {
|
||||
end++;
|
||||
}
|
||||
end--; // Ïåðåìåùàåì óêàçàòåëü íà ïîñëåäíèé ñèìâîë ñòðîêè
|
||||
|
||||
char temp;
|
||||
while (str < end) {
|
||||
temp = *str; // Ìåíÿåì ìåñòàìè ñèìâîëû
|
||||
*str = *end;
|
||||
*end = temp;
|
||||
|
||||
str++;
|
||||
end--;
|
||||
}
|
||||
}
|
||||
char SSD1306_Puts(char* str, FontDef_t* Font, SSD1306_COLOR_t color) {
|
||||
/* Write characters */
|
||||
// reverseString(str);
|
||||
while (*str) {
|
||||
/* Write character by character */
|
||||
if (SSD1306_Putc(*str, Font, color) != *str) {
|
||||
/* Return error */
|
||||
return *str;
|
||||
}
|
||||
|
||||
/* Increase string pointer */
|
||||
str++;
|
||||
}
|
||||
|
||||
/* Everything OK, zero should be returned */
|
||||
return *str;
|
||||
}
|
||||
|
||||
|
||||
void SSD1306_DrawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, SSD1306_COLOR_t c) {
|
||||
int16_t dx, dy, sx, sy, err, e2, i, tmp;
|
||||
|
||||
/* Check for overflow */
|
||||
if (x0 >= SSD1306_WIDTH) {
|
||||
x0 = SSD1306_WIDTH - 1;
|
||||
}
|
||||
if (x1 >= SSD1306_WIDTH) {
|
||||
x1 = SSD1306_WIDTH - 1;
|
||||
}
|
||||
if (y0 >= SSD1306_HEIGHT) {
|
||||
y0 = SSD1306_HEIGHT - 1;
|
||||
}
|
||||
if (y1 >= SSD1306_HEIGHT) {
|
||||
y1 = SSD1306_HEIGHT - 1;
|
||||
}
|
||||
|
||||
dx = (x0 < x1) ? (x1 - x0) : (x0 - x1);
|
||||
dy = (y0 < y1) ? (y1 - y0) : (y0 - y1);
|
||||
sx = (x0 < x1) ? 1 : -1;
|
||||
sy = (y0 < y1) ? 1 : -1;
|
||||
err = ((dx > dy) ? dx : -dy) / 2;
|
||||
|
||||
if (dx == 0) {
|
||||
if (y1 < y0) {
|
||||
tmp = y1;
|
||||
y1 = y0;
|
||||
y0 = tmp;
|
||||
}
|
||||
|
||||
if (x1 < x0) {
|
||||
tmp = x1;
|
||||
x1 = x0;
|
||||
x0 = tmp;
|
||||
}
|
||||
|
||||
/* Vertical line */
|
||||
for (i = y0; i <= y1; i++) {
|
||||
SSD1306_DrawPixel(x0, i, c);
|
||||
}
|
||||
|
||||
/* Return from function */
|
||||
return;
|
||||
}
|
||||
|
||||
if (dy == 0) {
|
||||
if (y1 < y0) {
|
||||
tmp = y1;
|
||||
y1 = y0;
|
||||
y0 = tmp;
|
||||
}
|
||||
|
||||
if (x1 < x0) {
|
||||
tmp = x1;
|
||||
x1 = x0;
|
||||
x0 = tmp;
|
||||
}
|
||||
|
||||
/* Horizontal line */
|
||||
for (i = x0; i <= x1; i++) {
|
||||
SSD1306_DrawPixel(i, y0, c);
|
||||
}
|
||||
|
||||
/* Return from function */
|
||||
return;
|
||||
}
|
||||
|
||||
while (1) {
|
||||
SSD1306_DrawPixel(x0, y0, c);
|
||||
if (x0 == x1 && y0 == y1) {
|
||||
break;
|
||||
}
|
||||
e2 = err;
|
||||
if (e2 > -dx) {
|
||||
err -= dy;
|
||||
x0 += sx;
|
||||
}
|
||||
if (e2 < dy) {
|
||||
err += dx;
|
||||
y0 += sy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SSD1306_DrawRectangle(uint16_t x, uint16_t y, uint16_t w, uint16_t h, SSD1306_COLOR_t c) {
|
||||
/* Check input parameters */
|
||||
if (
|
||||
x >= SSD1306_WIDTH ||
|
||||
y >= SSD1306_HEIGHT
|
||||
) {
|
||||
/* Return error */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check width and height */
|
||||
if ((x + w) >= SSD1306_WIDTH) {
|
||||
w = SSD1306_WIDTH - x;
|
||||
}
|
||||
if ((y + h) >= SSD1306_HEIGHT) {
|
||||
h = SSD1306_HEIGHT - y;
|
||||
}
|
||||
|
||||
/* Draw 4 lines */
|
||||
SSD1306_DrawLine(x, y, x + w, y, c); /* Top line */
|
||||
SSD1306_DrawLine(x, y + h, x + w, y + h, c); /* Bottom line */
|
||||
SSD1306_DrawLine(x, y, x, y + h, c); /* Left line */
|
||||
SSD1306_DrawLine(x + w, y, x + w, y + h, c); /* Right line */
|
||||
}
|
||||
|
||||
void SSD1306_DrawFilledRectangle(uint16_t x, uint16_t y, uint16_t w, uint16_t h, SSD1306_COLOR_t c) {
|
||||
uint8_t i;
|
||||
|
||||
/* Check input parameters */
|
||||
if (
|
||||
x >= SSD1306_WIDTH ||
|
||||
y >= SSD1306_HEIGHT
|
||||
) {
|
||||
/* Return error */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check width and height */
|
||||
if ((x + w) >= SSD1306_WIDTH) {
|
||||
w = SSD1306_WIDTH - x;
|
||||
}
|
||||
if ((y + h) >= SSD1306_HEIGHT) {
|
||||
h = SSD1306_HEIGHT - y;
|
||||
}
|
||||
|
||||
/* Draw lines */
|
||||
for (i = 0; i <= h; i++) {
|
||||
/* Draw lines */
|
||||
SSD1306_DrawLine(x, y + i, x + w, y + i, c);
|
||||
}
|
||||
}
|
||||
|
||||
void SSD1306_DrawTriangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t x3, uint16_t y3, SSD1306_COLOR_t color) {
|
||||
/* Draw lines */
|
||||
SSD1306_DrawLine(x1, y1, x2, y2, color);
|
||||
SSD1306_DrawLine(x2, y2, x3, y3, color);
|
||||
SSD1306_DrawLine(x3, y3, x1, y1, color);
|
||||
}
|
||||
|
||||
|
||||
void SSD1306_DrawFilledTriangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t x3, uint16_t y3, SSD1306_COLOR_t color) {
|
||||
int16_t deltax = 0, deltay = 0, x = 0, y = 0, xinc1 = 0, xinc2 = 0,
|
||||
yinc1 = 0, yinc2 = 0, den = 0, num = 0, numadd = 0, numpixels = 0,
|
||||
curpixel = 0;
|
||||
|
||||
deltax = ABS(x2 - x1);
|
||||
deltay = ABS(y2 - y1);
|
||||
x = x1;
|
||||
y = y1;
|
||||
|
||||
if (x2 >= x1) {
|
||||
xinc1 = 1;
|
||||
xinc2 = 1;
|
||||
} else {
|
||||
xinc1 = -1;
|
||||
xinc2 = -1;
|
||||
}
|
||||
|
||||
if (y2 >= y1) {
|
||||
yinc1 = 1;
|
||||
yinc2 = 1;
|
||||
} else {
|
||||
yinc1 = -1;
|
||||
yinc2 = -1;
|
||||
}
|
||||
|
||||
if (deltax >= deltay){
|
||||
xinc1 = 0;
|
||||
yinc2 = 0;
|
||||
den = deltax;
|
||||
num = deltax / 2;
|
||||
numadd = deltay;
|
||||
numpixels = deltax;
|
||||
} else {
|
||||
xinc2 = 0;
|
||||
yinc1 = 0;
|
||||
den = deltay;
|
||||
num = deltay / 2;
|
||||
numadd = deltax;
|
||||
numpixels = deltay;
|
||||
}
|
||||
|
||||
for (curpixel = 0; curpixel <= numpixels; curpixel++) {
|
||||
SSD1306_DrawLine(x, y, x3, y3, color);
|
||||
|
||||
num += numadd;
|
||||
if (num >= den) {
|
||||
num -= den;
|
||||
x += xinc1;
|
||||
y += yinc1;
|
||||
}
|
||||
x += xinc2;
|
||||
y += yinc2;
|
||||
}
|
||||
}
|
||||
|
||||
void SSD1306_DrawCircle(int16_t x0, int16_t y0, int16_t r, SSD1306_COLOR_t c) {
|
||||
int16_t f = 1 - r;
|
||||
int16_t ddF_x = 1;
|
||||
int16_t ddF_y = -2 * r;
|
||||
int16_t x = 0;
|
||||
int16_t y = r;
|
||||
|
||||
SSD1306_DrawPixel(x0, y0 + r, c);
|
||||
SSD1306_DrawPixel(x0, y0 - r, c);
|
||||
SSD1306_DrawPixel(x0 + r, y0, c);
|
||||
SSD1306_DrawPixel(x0 - r, y0, c);
|
||||
|
||||
while (x < y) {
|
||||
if (f >= 0) {
|
||||
y--;
|
||||
ddF_y += 2;
|
||||
f += ddF_y;
|
||||
}
|
||||
x++;
|
||||
ddF_x += 2;
|
||||
f += ddF_x;
|
||||
|
||||
SSD1306_DrawPixel(x0 + x, y0 + y, c);
|
||||
SSD1306_DrawPixel(x0 - x, y0 + y, c);
|
||||
SSD1306_DrawPixel(x0 + x, y0 - y, c);
|
||||
SSD1306_DrawPixel(x0 - x, y0 - y, c);
|
||||
|
||||
SSD1306_DrawPixel(x0 + y, y0 + x, c);
|
||||
SSD1306_DrawPixel(x0 - y, y0 + x, c);
|
||||
SSD1306_DrawPixel(x0 + y, y0 - x, c);
|
||||
SSD1306_DrawPixel(x0 - y, y0 - x, c);
|
||||
}
|
||||
}
|
||||
|
||||
void SSD1306_DrawFilledCircle(int16_t x0, int16_t y0, int16_t r, SSD1306_COLOR_t c) {
|
||||
int16_t f = 1 - r;
|
||||
int16_t ddF_x = 1;
|
||||
int16_t ddF_y = -2 * r;
|
||||
int16_t x = 0;
|
||||
int16_t y = r;
|
||||
|
||||
SSD1306_DrawPixel(x0, y0 + r, c);
|
||||
SSD1306_DrawPixel(x0, y0 - r, c);
|
||||
SSD1306_DrawPixel(x0 + r, y0, c);
|
||||
SSD1306_DrawPixel(x0 - r, y0, c);
|
||||
SSD1306_DrawLine(x0 - r, y0, x0 + r, y0, c);
|
||||
|
||||
while (x < y) {
|
||||
if (f >= 0) {
|
||||
y--;
|
||||
ddF_y += 2;
|
||||
f += ddF_y;
|
||||
}
|
||||
x++;
|
||||
ddF_x += 2;
|
||||
f += ddF_x;
|
||||
|
||||
SSD1306_DrawLine(x0 - x, y0 + y, x0 + x, y0 + y, c);
|
||||
SSD1306_DrawLine(x0 + x, y0 - y, x0 - x, y0 - y, c);
|
||||
|
||||
SSD1306_DrawLine(x0 + y, y0 + x, x0 - y, y0 + x, c);
|
||||
SSD1306_DrawLine(x0 + y, y0 - x, x0 - y, y0 - x, c);
|
||||
}
|
||||
}
|
||||
|
||||
void SSD1306_ON(void) {
|
||||
SSD1306_WRITECOMMAND(0x8D);
|
||||
SSD1306_WRITECOMMAND(0x14);
|
||||
SSD1306_WRITECOMMAND(0xAF);
|
||||
}
|
||||
void SSD1306_OFF(void) {
|
||||
SSD1306_WRITECOMMAND(0x8D);
|
||||
SSD1306_WRITECOMMAND(0x10);
|
||||
SSD1306_WRITECOMMAND(0xAE);
|
||||
}
|
||||
|
||||
//
|
||||
// Function to configure I2CA as Master Transmitter.
|
||||
//
|
||||
void I2CMaster_Init(uint16_t I2C_OwnAddress, uint16_t I2CSlave_Address)
|
||||
{
|
||||
EALLOW;
|
||||
//
|
||||
// Must put I2C into reset before configuring it
|
||||
//
|
||||
I2caRegs.I2CMDR.all &= ~(0x20U);
|
||||
|
||||
//
|
||||
// I2C configuration. Use a 400kHz I2CCLK with a 50% duty cycle.
|
||||
//
|
||||
//I2C_initMaster(base, DEVICE_SYSCLK_FREQ, 400000, I2C_DUTYCYCLE_50);
|
||||
I2caRegs.I2CPSC.all = 0xB; // Prescaler - need 7-12 Mhz on module clk
|
||||
I2caRegs.I2CCLKL = 0x7; // NOTE: must be non zero
|
||||
I2caRegs.I2CCLKH = 0x8; // NOTE: must be non zero
|
||||
|
||||
|
||||
//
|
||||
// Configure Master as a Transmitter
|
||||
//
|
||||
I2caRegs.I2CMDR.bit.MST = 0x1;
|
||||
I2caRegs.I2CMDR.bit.TRX = 0x1;
|
||||
|
||||
//
|
||||
// Set data count
|
||||
//
|
||||
I2caRegs.I2CCNT = I2C_NUMBYTES;
|
||||
|
||||
//
|
||||
// Set the bit count to 8 bits per data byte
|
||||
//
|
||||
I2caRegs.I2CMDR.bit.BC = 0x0U;
|
||||
|
||||
//
|
||||
// Configure slave and own address
|
||||
//
|
||||
I2caRegs.I2COAR.all = I2C_OwnAddress; // Own address
|
||||
I2caRegs.I2CSAR.all = I2CSlave_Address; // Slave address
|
||||
|
||||
//
|
||||
// Set emulation mode to FREE
|
||||
//
|
||||
I2caRegs.I2CMDR.bit.FREE = 0x1;
|
||||
|
||||
//
|
||||
//Clear all status
|
||||
//
|
||||
I2caRegs.I2CSTR.all = 0xFFFF;
|
||||
|
||||
//
|
||||
// Enable I2C Interrupts- RRDY
|
||||
//
|
||||
I2caRegs.I2CIER.all = 0x08;
|
||||
|
||||
//
|
||||
// Take I2C out of reset
|
||||
//
|
||||
I2caRegs.I2CMDR.all |= 0x0020;
|
||||
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Function to send data over I2C.
|
||||
//
|
||||
void I2CWriteOLED(uint16_t slaveAddr, uint16_t byteCount, bool sendStopCondition) {
|
||||
int i ;
|
||||
I2caRegs.I2CSAR.all = slaveAddr;
|
||||
I2caRegs.I2CMDR.bit.MST = 0x1;
|
||||
I2caRegs.I2CMDR.bit.TRX = 0x1;
|
||||
I2caRegs.I2CCNT = byteCount;
|
||||
I2caRegs.I2CMDR.bit.STT = 0x1;
|
||||
|
||||
for ( i = 0; i < byteCount; i++) {
|
||||
I2caRegs.I2CDXR.all = I2C_TXdata[i];
|
||||
while (I2caRegs.I2CSTR.bit.BYTESENT != 0x1);
|
||||
I2caRegs.I2CSTR.bit.BYTESENT = 0x1;
|
||||
}
|
||||
|
||||
if (sendStopCondition) {
|
||||
I2caRegs.I2CMDR.bit.STP = 0x1;
|
||||
while (I2caRegs.I2CMDR.bit.STP != 0x0);
|
||||
I2caRegs.I2CSTR.bit.BYTESENT = 0x1;
|
||||
}
|
||||
}
|
||||
|
||||
//uint16_t PWM_Vent1;
|
||||
char* ulongToStr(unsigned long num, char* buffer) {
|
||||
unsigned long startnum=num;
|
||||
if (num == 0) {
|
||||
*buffer++ = '0';
|
||||
*buffer++ = '0'; // Äîáàâëÿåì íóëü-òåðìèíàòîð
|
||||
return buffer;
|
||||
}
|
||||
|
||||
char temp[10]; // Áóôåð äëÿ âðåìåííîãî õðàíåíèÿ öèôð
|
||||
int i = 0;
|
||||
|
||||
while (num > 0) {
|
||||
temp[i++] = (num % 10) + '0';
|
||||
num /= 10;
|
||||
}
|
||||
if(startnum<=9){
|
||||
*buffer++ = '0';
|
||||
}
|
||||
// Êîïèðóåì öèôðû â îáðàòíîì ïîðÿäêå â îñíîâíîé áóôåð
|
||||
while (i > 0) {
|
||||
*buffer++ = temp[--i];
|
||||
}
|
||||
|
||||
*buffer = '\0'; // Äîáàâëÿåì íóëü-òåðìèíàòîð
|
||||
return buffer;
|
||||
}
|
||||
// Ôóíêöèÿ äëÿ îòîáðàæåíèÿ âðåìåíè ñ ìîìåíòà çàïóñêà
|
||||
// Âîçâðàùàåò true, åñëè âðåìÿ áûëî îáíîâëåíî, èíà÷å false
|
||||
bool displayUptime(void) {
|
||||
static unsigned long lastDisplayedTime = 0; // Ïîñëåäíåå îòîáðàæ¸ííîå âðåìÿ
|
||||
|
||||
// Ïðîâåðÿåì, íóæíî ëè îáíîâëÿòü äèñïëåé
|
||||
if (uptimeSeconds == lastDisplayedTime) {
|
||||
return false; // Âðåìÿ íå èçìåíèëîñü
|
||||
}
|
||||
|
||||
// Âðåìÿ èçìåíèëîñü, îáíîâëÿåì äèñïëåé
|
||||
unsigned long hours = uptimeSeconds / 3600;
|
||||
unsigned int minutes = (uptimeSeconds % 3600) / 60;
|
||||
unsigned int seconds = uptimeSeconds % 60;
|
||||
|
||||
// Ôîðìèðóåì ñòðîêó âðåìåíè
|
||||
char timeStr[16] = "UP ";
|
||||
char *ptr = timeStr + 3;
|
||||
ptr = ulongToStr(hours, ptr);
|
||||
*ptr++ = ':';
|
||||
ptr = ulongToStr(minutes, ptr);
|
||||
*ptr++ = ':';
|
||||
ptr = ulongToStr(seconds, ptr);
|
||||
if(hours<99){
|
||||
SSD1306_Puts(timeStr, &Font_11x18, SSD1306_COLOR_WHITE);}else{
|
||||
SSD1306_Puts(timeStr, &Font_7x10, SSD1306_COLOR_WHITE);
|
||||
}
|
||||
|
||||
// Çàïîìèíàåì ïîñëåäíåå îòîáðàæ¸ííîå âðåìÿ
|
||||
lastDisplayedTime = uptimeSeconds;
|
||||
SSD1306_UpdateScreen();
|
||||
return true; // Âðåìÿ áûëî îáíîâëåíî
|
||||
}
|
||||
void displayTemp(void) {
|
||||
static int OldeqepTemperature = 0;
|
||||
uint16_t temp, eqepTemperature = geteqepTemperature();
|
||||
temp= eqepTemperature;
|
||||
char temp_str[11];
|
||||
//int seconds = 30; // Ïðèìåð çíà÷åíèÿ ñåêóíä
|
||||
|
||||
// Çàïîëíÿåì ïåðâûå 6 ñèìâîëîâ âðó÷íóþ
|
||||
temp_str[0] = 'T';
|
||||
temp_str[1] = 'E';
|
||||
temp_str[2] = 'M';
|
||||
temp_str[3] = 'P';
|
||||
temp_str[4] = ':';
|
||||
temp_str[5] = ' ';
|
||||
temp_str[6] = ' ';
|
||||
temp_str[7] = ' ';
|
||||
temp_str[8] = ' ';
|
||||
temp_str[9] = ' ';
|
||||
temp_str[10] = ' ';
|
||||
|
||||
// Çàïîëíÿåì ïîñëåäíèå 2 ñèìâîëà ñåêóíäàìè ÷åðåç öèêë for
|
||||
// Ïðåîáðàçóåì ñîòíè
|
||||
// Ôëàã äëÿ îòñëåæèâàíèÿ âûâîäà öèôð
|
||||
int i=5;
|
||||
bool startedOutput = false;
|
||||
// Ïðåîáðàçîâàíèå ñîòåí
|
||||
if (temp >= 100 || startedOutput) {
|
||||
temp_str[i] = (temp / 100) + '0';
|
||||
i++;
|
||||
startedOutput = true;
|
||||
}
|
||||
temp %= 100;
|
||||
// Ïðåîáðàçîâàíèå äåñÿòêîâ
|
||||
if (temp >= 10 || startedOutput) {
|
||||
temp_str[i] = (temp / 10) + '0';
|
||||
startedOutput = true;
|
||||
i++;
|
||||
}
|
||||
temp_str[i] = temp%10 + '0';
|
||||
i++;
|
||||
|
||||
// Îòîáðàæàåì òåìïåðàòóðó
|
||||
SSD1306_Puts(temp_str, &Font_11x18, SSD1306_COLOR_WHITE);
|
||||
|
||||
OldeqepTemperature = eqepTemperature;
|
||||
SSD1306_UpdateScreen();
|
||||
}
|
||||
|
||||
|
||||
|
||||
46
Projects/epwm_test_biss_c_cpu2/src/i2c_oled.h
Normal file
46
Projects/epwm_test_biss_c_cpu2/src/i2c_oled.h
Normal file
@ -0,0 +1,46 @@
|
||||
#include "fonts.h"
|
||||
#include "f28x_project.h"
|
||||
//
|
||||
// Defines
|
||||
//
|
||||
typedef unsigned char uint8_t;
|
||||
#define I2C_SLAVE_ADDRESS 0x3C
|
||||
|
||||
#define MAX_BUFFER_SIZE 0x10
|
||||
#define I2C_NUMBYTES 0x2U
|
||||
|
||||
//
|
||||
// I2C GPIO pins
|
||||
//
|
||||
#define GPIO_PIN_SDAA 0 // GPIO number for I2C SDAA
|
||||
#define GPIO_PIN_SCLA 1 // GPIO number for I2C SCLA
|
||||
|
||||
|
||||
// Ìàêðîñ äëÿ îòïðàâêè êîìàíäû íà OLED-äèñïëåé
|
||||
#define SSD1306_WRITECOMMAND(cmd) \
|
||||
do { \
|
||||
I2C_TXdata[0] = 0x00; \
|
||||
I2C_TXdata[1] = cmd; \
|
||||
I2CWriteOLED(I2C_SLAVE_ADDRESS, 2, true); \
|
||||
} while (0)
|
||||
|
||||
|
||||
/* SSD1306 settings */
|
||||
/* SSD1306 width in pixels */
|
||||
#ifndef SSD1306_WIDTH
|
||||
#define SSD1306_WIDTH 128
|
||||
#endif
|
||||
/* SSD1306 LCD height in pixels */
|
||||
#ifndef SSD1306_HEIGHT
|
||||
#define SSD1306_HEIGHT 64
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief SSD1306 color enumeration
|
||||
*/
|
||||
typedef enum {
|
||||
SSD1306_COLOR_BLACK = 0x00, /*!< Black color, no pixel */
|
||||
SSD1306_COLOR_WHITE = 0x01 /*!< Pixel is set. Color depends on LCD */
|
||||
} SSD1306_COLOR_t;
|
||||
|
||||
|
||||
9
Projects/epwm_test_biss_c_cpu2/targetConfigs/readme.txt
Normal file
9
Projects/epwm_test_biss_c_cpu2/targetConfigs/readme.txt
Normal file
@ -0,0 +1,9 @@
|
||||
The 'targetConfigs' folder contains target-configuration (.ccxml) files, automatically generated based
|
||||
on the device and connection settings specified in your project on the Properties > General page.
|
||||
|
||||
Please note that in automatic target-configuration management, changes to the project's device and/or
|
||||
connection settings will either modify an existing or generate a new target-configuration file. Thus,
|
||||
if you manually edit these auto-generated files, you may need to re-apply your changes. Alternatively,
|
||||
you may create your own target-configuration file for this project and manage it manually. You can
|
||||
always switch back to automatic target-configuration management by checking the "Manage the project's
|
||||
target-configuration automatically" checkbox on the project's Properties > General page.
|
||||
Loading…
Reference in New Issue
Block a user