Mercurial > public > ostc4
diff Small_CPU/Src/baseCPU2.c @ 704:f1b40364b0af
Added protocol functions for UART DiveO2 sensor:
The code has been modified to support the handling of several protocols (including baud rate changes). The data is requested by polling and passed via DMA into a ringbuffer which is then parsed by a cyclic function call in the main loop. At the moment only the O2 values are forwarded but because the sensor send several types of data within a signle message already more is extracted but yet discarded.
author | Ideenmodellierer |
---|---|
date | Fri, 28 Oct 2022 20:49:21 +0200 |
parents | 49b164022335 |
children | 1fbcca5bdf5d |
line wrap: on
line diff
--- a/Small_CPU/Src/baseCPU2.c Fri Oct 28 20:32:24 2022 +0200 +++ b/Small_CPU/Src/baseCPU2.c Fri Oct 28 20:49:21 2022 +0200 @@ -422,7 +422,7 @@ SPI_synchronize_with_Master(); MX_DMA_Init(); MX_SPI1_Init(); - MX_USART1_UART_Init(); + externalInterface_SwitchUART(externalInterface_GetUARTProtocol()); SPI_Start_single_TxRx_with_Master(); /* be prepared for the first data exchange */ Scheduler_Request_sync_with_SPI(SPI_SYNC_METHOD_HARD); EXTI_Test_Button_Init();