This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640的SCS模拟串口能够与其他芯片的串口进行数据通信么

Other Parts Discussed in Thread: CC2640

CC2640本身自带只有1个串口,但由于要和两个芯片进行通信,所以在考虑用SCS模拟的串口。看了官方的uart_emulator例程,是将接收到的数据直接用一个函数打印出来了。具体代码如下:

void main(void) {

// Enable power domains
PRCMPowerDomainOn(PRCM_DOMAIN_PERIPH);
while (PRCMPowerDomainStatus(PRCM_DOMAIN_PERIPH) != PRCM_DOMAIN_POWER_ON);

// Enable peripheral clocks
PRCMPeripheralRunEnable(PRCM_PERIPH_GPIO);
PRCMLoadSet();
while (!PRCMLoadGet());

// Prevent AUX from powering down
scifOsalEnableAuxDomainAccess();

// Initialize and start the Sensor Controller
scifInit(&scifDriverSetup);

// Start the UART emulator
scifExecuteTasksOnceNbl(BV(SCIF_UART_EMULATOR_TASK_ID));

// Enable baud rate generation
scifUartSetBaudRate(57600);

// Enable RX
scifUartSetRxTimeout(20);
scifUartSetRxEnableReqIdleCount(1);
scifUartRxEnable(1);

// Enable events
scifUartSetEventMask(0xF);

// Main loop
while (1) {

// Loop back any received characters
while (scifUartGetRxFifoCount()) {
scifUartTxPutChar((char) scifUartRxGetChar());
}
}

} // main

我想知道的是,这个模拟串口能否和一般的串口一样,进行数据的接收解析再发送。由于这里的函数都是官方提供的,我不清楚官方是否有提供相关的函数。