- Main
- Tutorials
- Library
- Samples

Modules | Functions
Misc
Library

## Modules
| Module_Info
| LED_state
| User_LED_Channel

## Functions
IOTHINX_ERR | ioThinx_Misc_GetModuleInfo (uint8_t slot, struct MODULE_INFO *p_module_info)
IOTHINX_ERR | ioThinx_Misc_GetModuleInfoML (uint8_t slot, struct MODULE_INFO *p_module_info)
IOTHINX_ERR | ioThinx_Misc_GetModuleCount (uint32_t *p_module_count)
IOTHINX_ERR | ioThinx_Misc_GetModuleCountML (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)

## Detailed Description

Sample Code:
misc.c

## Function Documentation

IOTHINX_ERR ioThinx_Misc_GetModuleInfo | ( | uint8_t | slot,
|  | struct MODULE_INFO * | p_module_info
| ) |  |

Parameters

  [in] | slot | Slot number of the module.
  [out] | p_module_info | A 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_GetModuleInfoML | ( | uint8_t | slot,
|  | struct MODULE_INFO * | p_module_info
| ) |  |

Parameters

  [in] | slot | Slot number of the module.
  [out] | p_module_info | A pointer that stores the module information of the slot.

Returns
  IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

Note
  Using this API to get ML module's information.

IOTHINX_ERR ioThinx_Misc_GetModuleCount | ( | uint32_t * | p_module_count | ) |

Parameters

  [out] | p_module_count | A 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_GetModuleCountML | ( | uint32_t * | p_module_count | ) |

Parameters

  [out] | p_module_count | A pointer that stores the connected ML 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] | slot | Slot number of the module.
  [out] | p_state | A 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] | slot | Slot number of the module.
  [in] | channel | Specifies the user led channel.
  [in] | state | Stores 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] | slot | Slot number of the module.
  [out] | p_state | A 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] | slot | Slot number of the module.
  [out] | p_state | A 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] | slot | Slot number of the module.
  [in] | state | Stores the locate state of the slot.

Returns
  IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.