Part Number: TMS570LS1224
Other Parts Discussed in Thread: HALCOGEN,
Tool/software: Code Composer Studio
Hi,
In the example code of the UART communication in TMS570LS12x . Can you explain what user code 4 actually does( the red highlighted part)? And why is the send function executing before the Receive function?
I have attached the whole code .
/* USER CODE BEGIN (0) */
#include"sci.h"
/* USER CODE END */
/* Include Files */
#include "sys_common.h"
/* USER CODE BEGIN (1) */
static unsigned char command;
/* USER CODE END */
/** @fn void main(void)
* @brief Application main function
* @note This function is empty by default.
*
/* USER CODE BEGIN (2) */
/* USER CODE END */
int main(void)
{
/* USER CODE BEGIN (3) */
_enable_IRQ();
sciInit();
sciSend(scilinREG, 21, (unsigned char *)"Please press a key!\r\n");
sciReceive(scilinREG, 1, (unsigned char *)&command);
while(1);
/* USER CODE END */
}
/* USER CODE BEGIN (4) */
void sciNotification(sciBASE_t *sci,unsigned flags)
{
sciSend(scilinREG,1,(unsigned char *)&command);
sciReceive(scilinREG,1,(unsigned char *)&command);
}
void esmGroup1Notification(int bit)
{
return;
}
void esmGroup2Notification(int bit)
{
return;
}