初始化提交

This commit is contained in:
王立帮
2024-07-20 22:09:06 +08:00
commit c247dd07a6
6876 changed files with 2743096 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
void LCD5110::_convert_float(char *buf, double num, int width, byte prec)
{
char format[10];
sprintf(format, "%%%i.%if", width, prec);
sprintf(buf, format, num);
}

View File

@@ -0,0 +1,13 @@
// *** Hardwarespecific defines ***
#define cbi(reg, bitmask) (*(reg + 1)) = bitmask
#define sbi(reg, bitmask) (*(reg + 2)) = bitmask
#define pulseClock digitalWrite(SCK_Pin, LOW); digitalWrite(SCK_Pin, HIGH)
#define resetLCD sbi(P_DC, B_DC); sbi(P_MOSI, B_MOSI); sbi(P_SCK, B_SCK); sbi(P_CS, B_CS); cbi(P_RST, B_RST); delay(10); sbi(P_RST, B_RST)
#define fontbyte(x) cfont.font[x]
#define bitmapbyte(x) bitmap[x]
#define PROGMEM
#define regtype volatile uint32_t
#define regsize volatile uint16_t
#define bitmapdatatype unsigned char*