我去,连URL链接都发不了。。
那只能贴代码了
- int main(void)
- /*lint -restore Enable MISRA rule (6.3) checking. */
- {
- uint8_t sourceBuff[26] ={'hello'}; // sourceBuff is populated with desired data
- uint8_t readBuffer[10] = {0}; // readBuffer is populated with LPSCI_DRV_ReceiveData function
- uint32_t byteCount = sizeof(sourceBuff);
- uint32_t rxRemainingSize = sizeof(readBuffer);
- // for each use there, set timeout as "1"
- // lpsciState is the run-time state. Pass in memory for this
- // declared previously in the initialization chapter
- /* Write your local variable definition here */
- /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
- PE_low_level_init();
- /*** End of Processor Expert internal initialization. ***/
- /*** Don't write any code pass this line, or it will be deleted during code generation. ***/
- /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/
- #ifdef PEX_RTOS_START
- PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
- #endif
- /*** End of RTOS startup code. ***/
- /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
- LPSCI_DRV_SendDataBlocking(&lpsciCom1_State, sourceBuff, byteCount, 1); // function won’t return until transmit is complete
- for(;;){
- LPSCI_DRV_ReceiveDataBlocking(&lpsciCom1_State, readBuffer, 1, 1); //function won’t return until it receives all data
- }
- /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
- } /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
|