#include "stm32f10x.h" #define Orient_Book 0xE8 #define Orient_Land 0x88 //#define Orient_Book 0x28 //#define Orient_Land 0x48 //#define Frame5_X 238 //#define Frame5_Y 0 //#define Frame5_L 82 //#define Frame5_H 24 //Commands #define ILI9341_RESET 0x01 #define ILI9341_SLEEP_OUT 0x11 #define ILI9341_GAMMA 0x26 #define ILI9341_DISPLAY_OFF 0x28 #define ILI9341_DISPLAY_ON 0x29 #define ILI9341_COLUMN_ADDR 0x2A #define ILI9341_PAGE_ADDR 0x2B #define ILI9341_GRAM 0x2C #define ILI9341_MAC 0x36 #define ILI9341_PIXEL_FORMAT 0x3A #define ILI9341_WDB 0x51 #define ILI9341_WCD 0x53 #define ILI9341_RGB_INTERFACE 0xB0 #define ILI9341_FRC 0xB1 #define ILI9341_BPC 0xB5 #define ILI9341_DFC 0xB6 #define ILI9341_POWER1 0xC0 #define ILI9341_POWER2 0xC1 #define ILI9341_VCOM1 0xC5 #define ILI9341_VCOM2 0xC7 #define ILI9341_POWERA 0xCB #define ILI9341_POWERB 0xCF #define ILI9341_PGAMMA 0xE0 #define ILI9341_NGAMMA 0xE1 #define ILI9341_DTCA 0xE8 #define ILI9341_DTCB 0xEA #define ILI9341_POWER_SEQ 0xED #define ILI9341_3GAMMA_EN 0xF2 #define ILI9341_INTERFACE 0xF6 #define ILI9341_PRC 0xF7 #define WHITE 0xFFFF #define BLACK 0x0000 #define BLUE 0x001F #define BRED 0XF81F #define GRED 0XFFE0 #define GBLUE 0X07FF #define RED 0xF800 #define MAGENTA 0xF81F #define GREEN 0x07E0 #define CYAN 0x7FFF #define YELLOW 0xFFE0 #define BROWN 0XBC40 #define BRRED 0XFC07 #define GRAY 0X8430 #define DGRAY 0X2104 // 00100 001000 00100 #define DARKBLUE 0X01CF #define LIGHTBLUE 0X7D7C #define GRAYBLUE 0X5458 #define LIGHTGREEN 0X841F #define LGRAY 0XC618 #define LGRAYBLUE 0XA651 #define LBBLUE 0X2B12 #define GRID 0x01E7 #define LGRID 0X430C // 01000 011000 01100 #define BACKGROUND_32 0x2104 void LCDinit(void); void LCDclr(uint16_t X, uint8_t Y, uint16_t L, uint8_t H, uint16_t color); void Frame(unsigned short X, unsigned short Y, unsigned short L, unsigned short H, unsigned short color, unsigned short background); void DrawPicture16x1(uint16_t X, uint16_t Y, uint8_t Pic); void DrawSim24x20(uint16_t X, uint16_t Y, uint16_t color, uint8_t digit); void LCD_Frame(unsigned short X, unsigned short Y, unsigned short L, unsigned short H, unsigned short color); //void DrawDigit(uint16_t X, uint16_t Y, uint16_t color, uint8_t digit); void DrawSim(uint16_t X, uint16_t Y, uint16_t color, uint8_t digit); //void DrawSim16x12(uint16_t X, uint16_t Y, uint16_t color, uint8_t digit); void DrawString(const char* s, unsigned short int x, unsigned short int y, unsigned short int color, unsigned short int background); void DrawSim16(uint8_t digit, uint16_t X, uint16_t Y, uint16_t color, uint16_t background); void Point(uint16_t X, uint16_t Y, uint16_t color); void SendDAT(uint8_t byteToSend); void SendCMD(uint8_t byteToSend); void DrawBat(uint8_t bat); void SendBMP(void);