15extern const char Ascii[];
44 SYS->IPRSTC2 &= (~SYS_IPRSTC2_SPI_RST_Msk);
48 SPI->DIVIDER = (((12000000 / 2000000) + 1) >> 1) - 1;
72static void SetPACA(uint8_t PA, uint8_t CA)
91static void ShowChar(uint8_t x, uint8_t y, uint8_t ascii_word)
95 k = (ascii_word - 32) * 16;
97 for (i = 0; i < 8; i++)
99 SetPACA((x*2), (129 - (y*8) - i));
104 for (i = 0; i < 8; i++)
106 SetPACA((x*2) + 1, (129 - (y*8) - i));
150 while (*str !=
'\0');
164 for (i = 0; i < 132 *8; i++)
Mini51 series peripheral access layer header file. This file contains all the peripheral register's d...
#define SPI_CNTRL_TX_NEG_Msk
#define SPI_SSR_AUTOSS_Msk
#define SPI_CNTRL_CLKP_Msk
#define SPI_CNTRL_TX_BIT_LEN_Pos
#define SYS_IPRSTC2_SPI_RST_Msk
#define SPI_CNTRL_GO_BUSY_Msk
#define CLK_APBCLK_SPI_EN_Msk
void GPIO_SetMode(GPIO_T *gpio, uint32_t u32PinMask, uint32_t u32Mode)
Set GPIO operation mode.
#define P5
Pointer to GPIO port 5 register structure.
#define CLK
Pointer to CLK register structure.
#define SPI
Pointer to SPI register structure.
#define SYS
Pointer to SYS register structure.
#define SYS_MFP_P07_SPICLK
#define SYS_MFP_P04_SPISS
static void ShowChar(uint8_t x, uint8_t y, uint8_t ascii_word)
Show a char on LCD.
void LCD_ClearScreen(void)
Clear screen to background color.
static __INLINE void SpiWrite(uint32_t u32Data)
Macro for SPI write method.
void LCD_EnableBackLight(void)
Enable back-light of LCD.
void LCD_Print(uint8_t line, char *str)
Show a string on specific line.
static void SetPACA(uint8_t PA, uint8_t CA)
Configure start address of LCD.
void LCD_Init(void)
Use SPI interface to configure LCD module.
void LCD_DisableBackLight(void)
Disable back-light of LCD.