From 7019cd90485cdc50760a439f8e957c2e7d65c5ce Mon Sep 17 00:00:00 2001 From: dehanj Date: Tue, 14 Nov 2023 09:33:02 +0100 Subject: [PATCH] remove whitespaces and tabs --- .../mta1-usb-v1/ch552_fw/include/debug.c | 24 +++++++++---------- .../mta1-usb-v1/ch552_fw/include/debug.h | 4 ++-- hw/boards/mta1-usb-v1/ch552_fw/main.c | 12 +++++----- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/hw/boards/mta1-usb-v1/ch552_fw/include/debug.c b/hw/boards/mta1-usb-v1/ch552_fw/include/debug.c index 7d16178..de91a0c 100644 --- a/hw/boards/mta1-usb-v1/ch552_fw/include/debug.c +++ b/hw/boards/mta1-usb-v1/ch552_fw/include/debug.c @@ -7,7 +7,7 @@ CH554 main frequency modification, delay function definition                      Serial port 0 and serial port 1 initialization                      Serial port 0 and serial port 1 transceiver subfunctions -                     Watchdog initialization +                     Watchdog initialization *******************************************************************************/ #include @@ -20,8 +20,8 @@ * Description : CH554 clock selection and configuration function, Fsys 6MHz is used by default, FREQ_SYS can be passed                  CLOCK_CFG configuration, the formula is as follows:                  Fsys = (Fosc * 4 / (CLOCK_CFG & MASK_SYS_CK_SEL); the specific clock needs to be configured by yourself -*******************************************************************************/ -void CfgFsys( ) +*******************************************************************************/ +void CfgFsys( ) { SAFE_MOD = 0x55; SAFE_MOD = 0xAA; @@ -31,19 +31,19 @@ void CfgFsys( ) #if FREQ_SYS == 32000000 CLOCK_CFG = CLOCK_CFG & ~ MASK_SYS_CK_SEL | 0x07; // 32MHz #elif FREQ_SYS == 24000000 - CLOCK_CFG = CLOCK_CFG & ~ MASK_SYS_CK_SEL | 0x06; // 24MHz + CLOCK_CFG = CLOCK_CFG & ~ MASK_SYS_CK_SEL | 0x06; // 24MHz #elif FREQ_SYS == 16000000 - CLOCK_CFG = CLOCK_CFG & ~ MASK_SYS_CK_SEL | 0x05; // 16MHz + CLOCK_CFG = CLOCK_CFG & ~ MASK_SYS_CK_SEL | 0x05; // 16MHz #elif FREQ_SYS == 12000000 CLOCK_CFG = CLOCK_CFG & ~ MASK_SYS_CK_SEL | 0x04; // 12MHz #elif FREQ_SYS == 6000000 - CLOCK_CFG = CLOCK_CFG & ~ MASK_SYS_CK_SEL | 0x03; // 6MHz + CLOCK_CFG = CLOCK_CFG & ~ MASK_SYS_CK_SEL | 0x03; // 6MHz #elif FREQ_SYS == 3000000 - CLOCK_CFG = CLOCK_CFG & ~ MASK_SYS_CK_SEL | 0x02; // 3MHz + CLOCK_CFG = CLOCK_CFG & ~ MASK_SYS_CK_SEL | 0x02; // 3MHz #elif FREQ_SYS == 750000 - CLOCK_CFG = CLOCK_CFG & ~ MASK_SYS_CK_SEL | 0x01; // 750KHz + CLOCK_CFG = CLOCK_CFG & ~ MASK_SYS_CK_SEL | 0x01; // 750KHz #elif FREQ_SYS == 187500 - CLOCK_CFG = CLOCK_CFG & ~ MASK_SYS_CK_SEL | 0x00; // 187.5MHz + CLOCK_CFG = CLOCK_CFG & ~ MASK_SYS_CK_SEL | 0x00; // 187.5MHz #else #warning FREQ_SYS invalid or not set #endif @@ -59,7 +59,7 @@ void CfgFsys( ) * Input : UNIT16 n * Output : None * Return : None -*******************************************************************************/ +*******************************************************************************/ void mDelayuS( uint16_t n ) // Delay in uS { #ifdef FREQ_SYS @@ -129,7 +129,7 @@ void mDelaymS( uint16_t n ) // #endif -- n; } -} +} #if SDCC < 370 void putchar(char c) @@ -200,4 +200,4 @@ void gpio_unset(uint8_t pin) { break; } -} \ No newline at end of file +} diff --git a/hw/boards/mta1-usb-v1/ch552_fw/include/debug.h b/hw/boards/mta1-usb-v1/ch552_fw/include/debug.h index eb0291a..3729bbd 100644 --- a/hw/boards/mta1-usb-v1/ch552_fw/include/debug.h +++ b/hw/boards/mta1-usb-v1/ch552_fw/include/debug.h @@ -102,7 +102,7 @@ inline void UART1Setup() U1SM0 = 0; //UART1选择8位数据位 U1SMOD = 1; //快速模式 U1REN = 1; //使能接收 - // should correct for rounding in SBAUD1 calculation + // should correct for rounding in SBAUD1 calculation SBAUD1 = 256 - FREQ_SYS/16/UART1_BAUD; } @@ -181,4 +181,4 @@ inline void CH554WDTFeed(uint8_t tim) // Set pin p1.4 and p1.5 to GPIO output mode. void gpio_init(); void gpio_set(uint8_t pin); -void gpio_unset(uint8_t pin); \ No newline at end of file +void gpio_unset(uint8_t pin); diff --git a/hw/boards/mta1-usb-v1/ch552_fw/main.c b/hw/boards/mta1-usb-v1/ch552_fw/main.c index f13ddaf..8fbfef6 100644 --- a/hw/boards/mta1-usb-v1/ch552_fw/main.c +++ b/hw/boards/mta1-usb-v1/ch552_fw/main.c @@ -645,15 +645,15 @@ main() UpPoint2_Busy = 1; // Should according to the USB-spec check if - // length == 64, if so we should send a - // zero-length USB packet. This is very - // unlikley to happen. + // length == 64, if so we should send a + // zero-length USB packet. This is very + // unlikley to happen. } } } - // Should have a timeout if the transfer for some reason - // fails to reset UpPoint2_Busy. But does not seem to - // happen. + // Should have a timeout if the transfer for some reason + // fails to reset UpPoint2_Busy. But does not seem to + // happen. } } }