Hallo, ich habe mal eine Frage. Bin totaler Anfänger beim Thema STM32
und C.
Ich habe einen UART Empfangsbuffer und das ganze läuft über DMA. Ich
schalte jetzt eine LED an, wenn der Buffer halb voll ist und wieder aus,
wenn der voll ist.
1 | void HAL_UART_RxHalfCpltCallback(UART_HandleTypeDef *huart)
|
2 | {
|
3 | HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, 1);
|
4 | }
|
5 |
|
6 | void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
|
7 | {
|
8 | HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, 0);
|
9 | }
|
Angenommen ich habe nun mehrere UART/DMA im Einsatz. Sagen wir UART1 und
UART2. Wie unterscheide ich denn dann?
Holger