diff Small_CPU/Src/uartProtocol_Sentinel.c @ 932:effadaa3a1f7 Evo_2_23

Cleanup Gnss UART implementation: The first draft of the internal UART implementation was just a copy of the external UART handling. To avoid duplicated code and maintainance issue both UARTs (external/internal 6/1) share the same functions. To enable this a control structure has to be used as function input which defines the none shared resources like DMA control and rx/tx buffers
author Ideenmodellierer
date Sat, 07 Dec 2024 21:28:08 +0100
parents 3e499569baf3
children 785772303f9c
line wrap: on
line diff
--- a/Small_CPU/Src/uartProtocol_Sentinel.c	Tue Dec 03 20:32:51 2024 +0100
+++ b/Small_CPU/Src/uartProtocol_Sentinel.c	Sat Dec 07 21:28:08 2024 +0100
@@ -29,6 +29,8 @@
 static uint8_t SentinelConnected = 0;						/* Binary indicator if a sensor is connected or not */
 static receiveStateSentinel_t rxState = SENTRX_Ready;
 
+extern sUartComCtrl Uart1Ctrl;
+
 void ConvertByteToHexString(uint8_t byte, char* str)
 {
 	uint8_t worker = 0;
@@ -60,7 +62,7 @@
 	if(localComState == UART_SENTINEL_INIT)
 	{
 		SentinelConnected = 0;
-		UART_StartDMA_Receiption();
+		UART_StartDMA_Receiption(&Uart1Ctrl);
 		localComState = UART_SENTINEL_IDLE;
 	}
 	externalInterface_SetSensorState(activeSensor + EXT_INTERFACE_MUX_OFFSET,localComState);