Functions
Relay

Functions

IOTHINX_ERR ioThinx_Relay_GetValues (uint32_t slot, uint32_t *p_values)
 
IOTHINX_ERR ioThinx_Relay_SetValues (uint32_t slot, uint32_t values)
 
IOTHINX_ERR ioThinx_Relay_GetTotalCounts (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_Relay_GetCurrentCounts (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_Relay_ResetCurrentCounts (uint32_t slot, uint32_t resets)
 

Detailed Description

Sample Code:
relay.c

Function Documentation

◆ ioThinx_Relay_GetValues()

IOTHINX_ERR ioThinx_Relay_GetValues ( uint32_t  slot,
uint32_t *  p_values 
)
Parameters
[in]slotSlot number of the I/O module.
[out]p_valuesA pointer that stores Relay values of the contiguous channels; each bit holds one channel's value. The bit 0 represents relay status of the channel 0 and so on.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

◆ ioThinx_Relay_SetValues()

IOTHINX_ERR ioThinx_Relay_SetValues ( uint32_t  slot,
uint32_t  values 
)
Parameters
[in]slotSlot number of the I/O module.
[in]valuesRelay values of the contiguous channels; each bit holds one channel's value. The bit 0 represents relay status of the channel 0 and so on.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

◆ ioThinx_Relay_GetTotalCounts()

IOTHINX_ERR ioThinx_Relay_GetTotalCounts ( uint32_t  slot,
uint8_t  start,
uint8_t  count,
uint32_t  buf[] 
)
Parameters
[in]slotSlot number of the I/O module.
[in]startSpecifies the start channel.
[in]countThe number of channels to be get.
[out]bufAn array that stores the relay total count for the contiguous channels. buf[0] represents the value of the start channel.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

◆ ioThinx_Relay_GetCurrentCounts()

IOTHINX_ERR ioThinx_Relay_GetCurrentCounts ( uint32_t  slot,
uint8_t  start,
uint8_t  count,
uint32_t  buf[] 
)
Parameters
[in]slotSlot number of the I/O module.
[in]startSpecifies the start channel.
[in]countThe number of channels to be get.
[out]bufAn array that stores the relay current count for the contiguous channels. buf[0] represents the value of the start channel.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

◆ ioThinx_Relay_ResetCurrentCounts()

IOTHINX_ERR ioThinx_Relay_ResetCurrentCounts ( uint32_t  slot,
uint32_t  resets 
)
Parameters
[in]slotSlot number of the I/O module.
[in]resetsStores the current count reset flags of the contiguous channels (0: ignore, 1: reset); each bit holds one channel's flag. The bit 0 represents value of the channel 0 and so on.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.