Hi there, I am using KSDK1.2.0 with KDS 3.0.0 with FRDM-KL25Z board. I am trying to understand the purpose of the UART receive callback function when setting the parameters of UART in processor expert. In the callback function generated, there are 2 input parameters: uint32_t instance and void *uartState. How do i make use of these to obtain the received character in the UART?
Solved! Go to Solution.
Hello Eugene,
you can get it for example by this way:
void uartCom1_RxCallback(uint32_t instance, void * uartState)
{
/* Write your code here ... */
uint8_t buffer[5]={0};
UART_DRV_ReceiveData(instance,buffer,1);
}
where instance is UART number.
I hope this helps.
Best Regards,
Iva
Hello Eugene,
you can get it for example by this way:
void uartCom1_RxCallback(uint32_t instance, void * uartState)
{
/* Write your code here ... */
uint8_t buffer[5]={0};
UART_DRV_ReceiveData(instance,buffer,1);
}
where instance is UART number.
I hope this helps.
Best Regards,
Iva
Hi Eva,
Thanks, that helps!
Regards
Eugene