Skip to content

Commit

Permalink
add spi lcd log
Browse files Browse the repository at this point in the history
  • Loading branch information
YuzukiTsuru committed Dec 15, 2023
1 parent d8ecd6a commit fce2a8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/spi_lcd/lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ void LCD_ShowChar(uint16_t x, uint16_t y, uint8_t num, uint16_t fc, uint16_t bc,
返回值: 无
******************************************************************************/
void LCD_ShowString(uint16_t x, uint16_t y, const uint8_t *p, uint16_t fc, uint16_t bc, uint8_t sizey, uint8_t mode) {
printk(LOG_LEVEL_INFO, "LCD: Show String: \"%s\"\n", p);
while (*p != '\0') {
LCD_ShowChar(x, y, *p, fc, bc, sizey, mode);
x += sizey / 2;
Expand Down Expand Up @@ -242,6 +243,7 @@ u32 mypow(uint8_t m, uint8_t n) {
返回值: 无
******************************************************************************/
void LCD_ShowIntNum(uint16_t x, uint16_t y, uint16_t num, uint8_t len, uint16_t fc, uint16_t bc, uint8_t sizey) {
printk(LOG_LEVEL_INFO, "LCD: Show Number: \"%d\"\n", num);
uint8_t t, temp;
uint8_t enshow = 0;
uint8_t sizex = sizey / 2;
Expand Down
2 changes: 1 addition & 1 deletion app/spi_lcd/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ sunxi_serial_t uart_dbg = {
sunxi_spi_t sunxi_spi0 = {
.base = 0x04025000,
.id = 0,
.clk_rate = 75 * 1000 * 1000,
.clk_rate = 120 * 1000 * 1000,
.gpio_cs = {GPIO_PIN(PORTC, 1), GPIO_PERIPH_MUX4},
.gpio_sck = {GPIO_PIN(PORTC, 0), GPIO_PERIPH_MUX4},
.gpio_mosi = {GPIO_PIN(PORTC, 2), GPIO_PERIPH_MUX4},
Expand Down

0 comments on commit fce2a8b

Please sign in to comment.