From 7174f91919feb2d00ae9035d7765e813f193b2b2 Mon Sep 17 00:00:00 2001 From: Aditya Naik Date: Thu, 13 Feb 2020 16:47:42 -0500 Subject: STM32 example formatting --- examples/stm32/main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/stm32/main.c b/examples/stm32/main.c index ebf90b6..7fbcfd7 100644 --- a/examples/stm32/main.c +++ b/examples/stm32/main.c @@ -29,21 +29,24 @@ * the UART functions match perfectly and can be directly mapped to the Modbus * library functions */ -MB_StatusTypeDef (*MB_UART_Tx)(void*, uint16_t*, uint8_t*, uint8_t*) = &HAL_UART_Transmit; -MB_StatusTypeDef (*MB_UART_Rx)(void*, uint16_t*, uint8_t*, uint8_t*) = &HAL_UART_Receive; +MB_StatusTypeDef (*MB_UART_Tx)(void*, uint16_t*, uint8_t*, uint8_t*) = + &HAL_UART_Transmit; +MB_StatusTypeDef (*MB_UART_Rx)(void*, uint16_t*, uint8_t*, uint8_t*) = + &HAL_UART_Receive; int main() { /* Single modbus device node */ modbus_slave_device modbus_dev_single; - /* Multiple modbus device nodes.. after all, what is the point of using Modbus in a single point-to-point connection? */ + /* Multiple modbus device nodes.. after all, what is the point of using + * Modbus in a single point-to-point connection? */ /* Not illustrated beyond the definition, but should be clear enough */ modbus_slave_device modbus_dev_multiple[10]; /* Set the slave ID to 1 */ modbus_dev_single.slave_id = 1; /* Attach the UART device on the STM32 to this node */ - /* Note that the initialization of UART1 device is not included in this example */ + /* Note that initialization of UART1 is not included in this example */ modbus_dev_single.modbus_uart = &huart1; /* Continuously read the 30001 input register */ uint16_t register = 30001; -- cgit v1.2.3