stm32HAL library portion of the respective serial transmission and reception function analysis

Some time ago in the area of ​​HAL library serial port project it takes a long time (in fact, I was to study hal library for serial execution stm32 internal functions and callback functions for rewriting the efficiency and semaphores)


HAL_StatusTypeDef HAL_UART_Transmit (UART_HandleTypeDef * huart, uint8_t * pData, uint16_t Size, uint32_t Timeout); // send data, an overflow Timeout blocking transmission time
HAL_StatusTypeDef HAL_UART_Receive (UART_HandleTypeDef * huart, uint8_t * pData, uint16_t Size, uint32_t Timeout); // receiving data receiving Timeout blocking an overflow time
HAL_StatusTypeDef HAL_UART_Transmit_IT (UART_HandleTypeDef * huart, uint8_t * pData, uint16_t Size); // send an interrupt
HAL_StatusTypeDef HAL_UART_Receive_IT (UART_HandleTypeDef * huart, uint8_t * pData, uint16_t Size); // receive interrupt
HAL_StatusTypeDef HAL_UART_Transmit_DMA (UART_HandleTypeDef * huart, uint8_t * pData, uint16_t Size); // send serial DMA
HAL_StatusTypeDef HAL_UART_Receive_DMA (UART_HandleTypeDef * huart, uint8_t * pData, uint16_t Size); // receiving serial DMA
HAL_StatusTypeDef HAL_UART_DMAPause (UART_HandleTypeDef * huart); // pause serial DMA
HAL_StatusTypeDef HAL_UART_DMAResume (UART_HandleTypeDef * huart); // serial DMA recovery
HAL_StatusTypeDef HAL_UART_DMAStop (UART_HandleTypeDef * huart); // serial DMA stop

According to the official callback own written on it

Guess you like

Origin www.cnblogs.com/pacexdong/p/12142622.html