From 9490f8818dec7888becbd13fd0117870a7a940d0 Mon Sep 17 00:00:00 2001 From: Chef003 Date: Thu, 20 Apr 2023 11:08:58 +0800 Subject: [PATCH] [HUST CSE][bsp] fix printf parameter in loongson (#7321) --- bsp/loongson/ls1cdev/libraries/ls1c_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsp/loongson/ls1cdev/libraries/ls1c_spi.c b/bsp/loongson/ls1cdev/libraries/ls1c_spi.c index 6ad39d964c..c5199e42c2 100644 --- a/bsp/loongson/ls1cdev/libraries/ls1c_spi.c +++ b/bsp/loongson/ls1cdev/libraries/ls1c_spi.c @@ -53,7 +53,7 @@ void *ls1c_spi_get_base(unsigned char SPIx) void ls1c_spi_print_all_regs_info(void *spi_base) { printf("[%s] SPCR=0x%x, SPSR=0x%x, SPER=0x%x, SFC_PARAM=0x%x, SFC_SOFTCS=0x%x, SFC_TIMING=0x%x\r\n", - __FUNCTION__, + __FUNCTION__, reg_read_8(spi_base + LS1C_SPI_SPCR_OFFSET), reg_read_8(spi_base + LS1C_SPI_SPSR_OFFSET), reg_read_8(spi_base + LS1C_SPI_SPER_OFFSET), @@ -245,7 +245,7 @@ void ls1c_spi_clear(void *spi_base) val = reg_read_8(spi_base + LS1C_SPI_SPSR_OFFSET); if (LS1C_SPI_SPSR_WCOL_MASK & val) { - printf("[%s] clear register SPSR's wcol!\r\n"); // 手册和linux源码中不一样,加个打印看看 + printf("[%s] clear register SPSR's wcol!\r\n", __FUNCTION__); // 手册和linux源码中不一样,加个打印看看 reg_write_8(val & ~LS1C_SPI_SPSR_WCOL_MASK, spi_base + LS1C_SPI_SPSR_OFFSET); // 写0,linux源码中是写0 // reg_write_8(val | LS1C_SPI_SPSR_WCOL_MASK, spi_base + LS1C_SPI_SPSR_OFFSET); // 写1,按照1c手册,应该写1 }