Modules | Functions

Modules

 Module_Info
 
 LED_state
 
 User_LED_Channel
 
 SCHED_PRIORITY
 

Functions

IOTHINX_ERR ioThinx_Misc_GetModuleInfo (uint8_t slot, struct MODULE_INFO *p_module_info)
 
IOTHINX_ERR ioThinx_Misc_GetModuleCount (uint32_t *p_module_count)
 
IOTHINX_ERR ioThinx_Misc_GetRotarySwitchState (uint32_t slot, uint8_t *p_state)
 
IOTHINX_ERR ioThinx_Misc_SetUserLedState (uint32_t slot, uint8_t channel, uint8_t state)
 
IOTHINX_ERR ioThinx_Misc_GetPushButtonState (uint32_t slot, uint8_t *p_state)
 
IOTHINX_ERR ioThinx_Misc_GetLocateState (uint32_t slot, uint8_t *p_state)
 
IOTHINX_ERR ioThinx_Misc_SetLocateState (uint32_t slot, uint8_t state)
 
IOTHINX_ERR ioThinx_Misc_SetScheduler (int pid, SCHED_PRIORITY priority)
 

Detailed Description

Sample Code:
misc.c

Function Documentation

IOTHINX_ERR ioThinx_Misc_GetModuleInfo ( uint8_t  slot,
struct MODULE_INFO p_module_info 
)
Parameters
[in]slotSlot number of the module.
[out]p_module_infoA pointer that stores the module information of the slot.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.
IOTHINX_ERR ioThinx_Misc_GetModuleCount ( uint32_t *  p_module_count)
Parameters
[out]p_module_countA pointer that stores the connected MR module count of the device.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.
IOTHINX_ERR ioThinx_Misc_GetRotarySwitchState ( uint32_t  slot,
uint8_t *  p_state 
)
Parameters
[in]slotSlot number of the module.
[out]p_stateA pointer that stores the rotary switch state of the slot.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.
IOTHINX_ERR ioThinx_Misc_SetUserLedState ( uint32_t  slot,
uint8_t  channel,
uint8_t  state 
)
Parameters
[in]slotSlot number of the module.
[in]channelSpecifies the user led channel.
[in]stateStores the led state.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.
IOTHINX_ERR ioThinx_Misc_GetPushButtonState ( uint32_t  slot,
uint8_t *  p_state 
)
Parameters
[in]slotSlot number of the module.
[out]p_stateA pointer that stores the push button state of the slot.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.
IOTHINX_ERR ioThinx_Misc_GetLocateState ( uint32_t  slot,
uint8_t *  p_state 
)
Parameters
[in]slotSlot number of the module.
[out]p_stateA pointer that stores the locate state of the slot.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.
IOTHINX_ERR ioThinx_Misc_SetLocateState ( uint32_t  slot,
uint8_t  state 
)
Parameters
[in]slotSlot number of the module.
[in]stateStores the locate state of the slot.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.
IOTHINX_ERR ioThinx_Misc_SetScheduler ( int  pid,
SCHED_PRIORITY  priority 
)
Parameters
[in]pidProcess ID of the specified process. If pid equals zero, the scheduling policy and parameters of the calling process will be set.
[in]prioritySpecifies the scheduling priority for the process.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.
Note
Using sched_setscheduler() system call to set both the scheduling policy and parameters more flexible.