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.

RTOS/TI-RTOS-MCU: just check the ti-rtos user manual and cann't find out more info for Semaphore_Params_init ??! I am a Newbie on TI-RTOS ,

Part Number: TI-RTOS-MCU

Tool/software: TI-RTOS

Hello, i like to learn to use the TI-RTOS for CC1310;  so Semaphore_Params_init Semaphore_construct ... how they work,,, any manual or others DOC ?

Semaphore_Params_init(&paramsUnion.sp); paramsUnion.sp.mode = Semaphore_Mode_BINARY; Semaphore_construct(&pObj->state.semSync, 0, &paramsUnion.sp); Clock_Params_init(&paramsUnion.cp); paramsUnion.cp.arg = (UArg)pObj; Clock_construct(&pObj->state.clkInactivity, (Clock_FuncPtr)clkInactivityFxn, 0, &paramsUnion.cp);.
  • Hi WH,

    You can refer to the BIOS API guide under <your TIRTOS installation directory>/products/<BIOS version>/docs/Bios_APIs.html. The Semaphore module's information is listed under ti->sysbios->knl->Semaphore. Semaphore_Params_init is used to initialize a params structure that would be used to create or construct the Semaphore instance. The thought is to use it to set all the fields of the structure to default values, and then the developer can simply tweak the fields he/she is interested in changing - the 'mode' field in your case. This structure is passed to Semaphore_construct with initializes a new semaphore instance object using those parameters.

    BIOS modules typically follow the same pattern to create instances at runtime.

    Best regards,
    Vincent