ElecDesigner
Member level 5
Im using a STM32 with Cube IDE.
Im using the HAL UART libaries and using the function HAL_UART_Receive_IT which has decleration:
HAL_StatusTypeDef HAL_UART_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
I am calling this fuction using:
HAL_UART_Receive_IT(&huart2, (uint8_t *)inData, 1);
I only want to get one character at a time, but have found that I always have to define inData as an array i.e.
uint8_t inData[1];
to get it to work. How do I make is work with a single uint8_t
Im using the HAL UART libaries and using the function HAL_UART_Receive_IT which has decleration:
HAL_StatusTypeDef HAL_UART_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
I am calling this fuction using:
HAL_UART_Receive_IT(&huart2, (uint8_t *)inData, 1);
I only want to get one character at a time, but have found that I always have to define inData as an array i.e.
uint8_t inData[1];
to get it to work. How do I make is work with a single uint8_t