2015-05-06 05:06 PM
Hi Guys,
How can I use HAL_USART_Transmit ? I've initialized USART1... And I want to transmit a test message on the task :void StartTask02(void const * argument)
{
/* USER CODE BEGIN StartTask02 */
/* Infinite loop */
for(;;)
{
HAL_GPIO_TogglePin(GPIOE, GPIO_PIN_5 );
HAL_Delay(200);
HAL_GPIO_TogglePin(GPIOE, GPIO_PIN_6 );
HAL_USART1_Transmit(''I want to send message here, anyone can help ?..............'');
//HAL_Delay(3500);
osDelay(1);
}
/* USER CODE END StartTask02 */
}
HAL_USART_Transmit
Function Name HAL_StatusTypeDef HAL_USART_Transmit
(USART_HandleTypeDef * husart, uint8_t * pTxData, uint16_t
Size, uint32_t Timeout)
Function Description Simplex Send an amount of data in blocking mode.
Parameters husart: Pointer to a USART_HandleTypeDef structure that
contains the configuration information for the specified
USART module.
pTxData: Pointer to data buffer
2015-05-07 04:00 AM
Hello,
try thisHAL_UART_Transmit(&huart1, ''Hello world!/r/n'', 16, 1000);
George