AnsweredAssumed Answered

The usage of UART callback function install

Question asked by Const Yu Employee on Jul 23, 2015
Latest reply on Jul 31, 2015 by xiangjun.rong

I am running the uart_blocking_example in C:\Freescale\KSDK_1.2.0\examples\frdmk22f\driver_examples\uart\uart_blocking\iar,  it can runs well, after adding the UART_DRV_InstallTxCallback function like below code, it blocked the UART output. so i wonder the usage of UART callback function, is there any example?

 

    // Initialize the uart module with base address and config structure

    UART_DRV_Init(BOARD_DEBUG_UART_INSTANCE, &uartState, &uartConfig);

   UART_DRV_InstallTxCallback(uint32_t instance,  (uart_tx_callback_t) callback, NULL,  NULL);

    // Inform to start blocking example

    byteCountBuff = sizeof(buffStart);

    UART_DRV_SendDataBlocking(BOARD_DEBUG_UART_INSTANCE, buffStart, byteCountBuff, 1000u);

Outcomes