»
(008) CubeIDE Implementation of USB Peripherals*
(018) C99 pointer*
(019) C99 With only value assignment*
(022) POSIX pthread multi-threads mutex*
(023) POSIX pthread multi-threads programming*
(027) C99 time and wait*
(028) High-precision calculation with GMP*
(029) Web Service Lib*
(030) International Components for Unicode (ICU)*
(031) Performance of C is higher than C++, because...*
(034) STM32 UART Continually Sending Data
HAL库函数:
发送buffer函数:
HAL_UART_Transmit_IT(&huartX, sending_buffer_address, content_size);
buffer内容全部发送完成时调用的中断:
void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart) {
// 完成发送数据后的回调函数
if (huart->Instance == huartX.Instance) {
//sending_buffer中的content_size字节数据已发送完成
}
}
//其中,DMA的优势:DMA的逐个字节拷贝到发送数据寄存器TDR以及发送数据寄存器TDR中的数据的发送过程,不需要用户程序管理。