stm32: lowputc: nxstyle fixes
arch/arm/src/stm32/stm32_lowputc.c: * nxstyle fixes, mostly for long lines and comment misalignments.
This commit is contained in:
parent
387d33c535
commit
5fe9085913
@ -413,9 +413,11 @@ void arm_lowputc(char ch)
|
||||
#ifdef HAVE_CONSOLE
|
||||
/* Wait until the TX data register is empty */
|
||||
|
||||
while ((getreg32(STM32_CONSOLE_BASE + STM32_USART_SR_OFFSET) & USART_SR_TC) == 0);
|
||||
while ((getreg32(STM32_CONSOLE_BASE + STM32_USART_SR_OFFSET) &
|
||||
USART_SR_TC) == 0);
|
||||
#ifdef STM32_CONSOLE_RS485_DIR
|
||||
stm32_gpiowrite(STM32_CONSOLE_RS485_DIR, STM32_CONSOLE_RS485_DIR_POLARITY);
|
||||
stm32_gpiowrite(STM32_CONSOLE_RS485_DIR,
|
||||
STM32_CONSOLE_RS485_DIR_POLARITY);
|
||||
#endif
|
||||
|
||||
/* Then send the character */
|
||||
@ -423,8 +425,10 @@ void arm_lowputc(char ch)
|
||||
putreg32((uint32_t)ch, STM32_CONSOLE_BASE + STM32_USART_TDR_OFFSET);
|
||||
|
||||
#ifdef STM32_CONSOLE_RS485_DIR
|
||||
while ((getreg32(STM32_CONSOLE_BASE + STM32_USART_SR_OFFSET) & USART_SR_TC) == 0);
|
||||
stm32_gpiowrite(STM32_CONSOLE_RS485_DIR, !STM32_CONSOLE_RS485_DIR_POLARITY);
|
||||
while ((getreg32(STM32_CONSOLE_BASE + STM32_USART_SR_OFFSET) &
|
||||
USART_SR_TC) == 0);
|
||||
stm32_gpiowrite(STM32_CONSOLE_RS485_DIR,
|
||||
!STM32_CONSOLE_RS485_DIR_POLARITY);
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_CONSOLE */
|
||||
@ -497,8 +501,8 @@ void stm32_lowsetup(void)
|
||||
/* Assume default pin mapping:
|
||||
*
|
||||
* Alternate USART3_REMAP[1:0] USART3_REMAP[1:0] USART3_REMAP[1:0]
|
||||
* Function = “00” (no remap) = “01” (partial remap) = “11” (full remap)
|
||||
* ---------_ ------------------ ---------------------- --------------------
|
||||
* Function = 00 (no remap) = 01 (partial remap) = 11 (full remap)
|
||||
* ---------_ ------------------ ---------------------- -----------------
|
||||
* USART3_TX PB10 PC10 PD8
|
||||
* USART3_RX PB11 PC11 PD9
|
||||
* USART3_CK PB12 PC12 PD10
|
||||
@ -529,7 +533,8 @@ void stm32_lowsetup(void)
|
||||
|
||||
#ifdef STM32_CONSOLE_RS485_DIR
|
||||
stm32_configgpio(STM32_CONSOLE_RS485_DIR);
|
||||
stm32_gpiowrite(STM32_CONSOLE_RS485_DIR, !STM32_CONSOLE_RS485_DIR_POLARITY);
|
||||
stm32_gpiowrite(STM32_CONSOLE_RS485_DIR,
|
||||
!STM32_CONSOLE_RS485_DIR_POLARITY);
|
||||
#endif
|
||||
|
||||
/* Enable and configure the selected console device */
|
||||
@ -601,7 +606,8 @@ void stm32_lowsetup(void)
|
||||
|
||||
#ifdef STM32_CONSOLE_RS485_DIR
|
||||
stm32_configgpio(STM32_CONSOLE_RS485_DIR);
|
||||
stm32_gpiowrite(STM32_CONSOLE_RS485_DIR, !STM32_CONSOLE_RS485_DIR_POLARITY);
|
||||
stm32_gpiowrite(STM32_CONSOLE_RS485_DIR,
|
||||
!STM32_CONSOLE_RS485_DIR_POLARITY);
|
||||
#endif
|
||||
|
||||
/* Enable and configure the selected console device */
|
||||
|
Loading…
Reference in New Issue
Block a user