In the "rfWsnNode_CC1310_LAUNCHXL_tirtos_ccs" project there are a number of uses of callbacks and semaphores using handles for ADC, LED, timers and so forth. This is my first RTOS and multicore project, and I'd like to understand how the callbacks should be used. I do plan on keeping the TI-RTOS for my project, but for doing my own custom code, I need to know what to watch for, and how NOT to step on the other tasks, and to wake up the CM3 only when necessary.
extern PIN_Handle ledPinHandle; /***** Prototypes *****/ static void nodeRadioTaskFunction(UArg arg0, UArg arg1); static void returnRadioOperationStatus(enum NodeRadioOperationStatus status); static void sendDmPacket(struct DualModeSensorPacket sensorPacket, uint8_t maxNumberOfRetries, uint32_t ackTimeoutMs); static void resendPacket(void); static void rxDoneCallback(EasyLink_RxPacket * rxPacket, EasyLink_Status status); #ifdef FEATURE_BLE_ADV static void bleAdv_eventProxyCB(void); static void bleAdv_updateTlmCB(uint16_t *pVbatt, uint16_t *pTemp, uint32_t *pTime100MiliSec); static void bleAdv_updateMsButtonCB(uint8_t *pButton); #endif /***** Function definitions *****/ #ifndef USE_DMM void NodeRadioTask_init(void) { #else Task_Handle* NodeRadioTask_init(void) { #endif /* !USE_DMM */ /* Create semaphore used for exclusive radio access */ Semaphore_Params semParam; Semaphore_Params_init(&semParam); Semaphore_construct(&radioAccessSem, 1, &semParam); radioAccessSemHandle = Semaphore_handle(&radioAccessSem); /* Create semaphore used for callers to wait for result */ Semaphore_construct(&radioResultSem, 0, &semParam); radioResultSemHandle = Semaphore_handle(&radioResultSem);
Thank you so much...