Modules | Functions

Modules

 DO_MODE
 

Functions

IOTHINX_ERR ioThinx_DO_GetValues (uint32_t slot, uint32_t *p_values)
 
IOTHINX_ERR ioThinx_DO_SetValues (uint32_t slot, uint32_t values)
 
IOTHINX_ERR ioThinx_DO_GetPwmCounts (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_DO_SetPwmCounts (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_DO_GetPwmStarts (uint32_t slot, uint32_t *p_starts)
 
IOTHINX_ERR ioThinx_DO_SetPwmStarts (uint32_t slot, uint32_t starts)
 
IOTHINX_ERR ioThinx_DO_SetPwmStops (uint32_t slot, uint32_t stops)
 
IOTHINX_ERR ioThinx_DO_GetPwmConfigures (uint32_t slot, uint8_t start, uint8_t count, uint16_t frequencies[], uint16_t duty_cycles[])
 
IOTHINX_ERR ioThinx_DO_SetPwmConfigures (uint32_t slot, uint8_t start, uint8_t count, uint16_t frequencies[], uint16_t duty_cycles[])
 
IOTHINX_ERR ioThinx_DO_Config_GetModes (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_DO_Config_SetModes (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_DO_Config_GetPwmCounts (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_DO_Config_SetPwmCounts (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_DO_Config_GetPwmConfigures (uint32_t slot, uint8_t start, uint8_t count, uint16_t frequencies[], uint16_t duty_cycles[])
 
IOTHINX_ERR ioThinx_DO_Config_SetPwmConfigures (uint32_t slot, uint8_t start, uint8_t count, uint16_t frequencies[], uint16_t duty_cycles[])
 

Detailed Description

Sample Code:
do.c
pwm.c

Function Documentation

◆ ioThinx_DO_GetValues()

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

◆ ioThinx_DO_SetValues()

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

◆ ioThinx_DO_GetPwmCounts()

IOTHINX_ERR ioThinx_DO_GetPwmCounts ( 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 PWM counter values 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_DO_SetPwmCounts()

IOTHINX_ERR ioThinx_DO_SetPwmCounts ( 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 set.
[in]bufAn array that stores the PWM counter values 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_DO_GetPwmStarts()

IOTHINX_ERR ioThinx_DO_GetPwmStarts ( uint32_t  slot,
uint32_t *  p_starts 
)
Parameters
[in]slotSlot number of the I/O module.
[out]p_startsA pointer that stores PWM start flags of the contiguous channels (0: stop, 1: start); 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.

◆ ioThinx_DO_SetPwmStarts()

IOTHINX_ERR ioThinx_DO_SetPwmStarts ( uint32_t  slot,
uint32_t  starts 
)
Parameters
[in]slotSlot number of the I/O module.
[in]startsStores PWM start flags of the contiguous channels (0: ignore, 1: start); 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.

◆ ioThinx_DO_SetPwmStops()

IOTHINX_ERR ioThinx_DO_SetPwmStops ( uint32_t  slot,
uint32_t  stops 
)
Parameters
[in]slotSlot number of the I/O module.
[in]stopsStores PWM stop flags of the contiguous channels (0: ignore, 1: start); 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.

◆ ioThinx_DO_GetPwmConfigures()

IOTHINX_ERR ioThinx_DO_GetPwmConfigures ( uint32_t  slot,
uint8_t  start,
uint8_t  count,
uint16_t  frequencies[],
uint16_t  duty_cycles[] 
)
Parameters
[in]slotSlot number of the I/O module.
[in]startSpecifies the start channel.
[in]countThe number of channels to be set.
[out]frequenciesAn array that stores the PWM frequency (Hz) for the corresponding channels. Range = 1Hz ~ MAX supported freqency. frequencies[0] represents the value of the start channel.
[out]duty_cyclesAn array that stores the PWM ON duty cycle (%) for the corresponding channels. Range = 0, 1, ..., 100 (%). duty_cycles[0] represents the value of the start channel.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

◆ ioThinx_DO_SetPwmConfigures()

IOTHINX_ERR ioThinx_DO_SetPwmConfigures ( uint32_t  slot,
uint8_t  start,
uint8_t  count,
uint16_t  frequencies[],
uint16_t  duty_cycles[] 
)
Parameters
[in]slotSlot number of the I/O module.
[in]startSpecifies the start channel.
[in]countThe number of channels to be set.
[in]frequenciesAn array that stores the PWM frequency (Hz) for the corresponding channels. Range = 1Hz ~ MAX supported freqency. frequencies[0] represents the value of the start channel.
[in]duty_cyclesAn array that stores the PWM ON duty cycle (%) for the corresponding channels. Range = 0, 1, ..., 100 (%). duty_cycles[0] represents the value of the start channel.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

◆ ioThinx_DO_Config_GetModes()

IOTHINX_ERR ioThinx_DO_Config_GetModes ( uint32_t  slot,
uint8_t  start,
uint8_t  count,
uint8_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 DO modes of 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_DO_Config_SetModes()

IOTHINX_ERR ioThinx_DO_Config_SetModes ( uint32_t  slot,
uint8_t  start,
uint8_t  count,
uint8_t  buf[] 
)
Parameters
[in]slotSlot number of the I/O module.
[in]startSpecifies the start channel.
[in]countThe number of channels to be get.
[in]bufAn array that stores DO modes of 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_DO_Config_GetPwmCounts()

IOTHINX_ERR ioThinx_DO_Config_GetPwmCounts ( 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 PWM counter values 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_DO_Config_SetPwmCounts()

IOTHINX_ERR ioThinx_DO_Config_SetPwmCounts ( 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 set.
[in]bufAn array that stores the counter values 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_DO_Config_GetPwmConfigures()

IOTHINX_ERR ioThinx_DO_Config_GetPwmConfigures ( uint32_t  slot,
uint8_t  start,
uint8_t  count,
uint16_t  frequencies[],
uint16_t  duty_cycles[] 
)
Parameters
[in]slotSlot number of the I/O module.
[in]startSpecifies the start channel.
[in]countThe number of channels to be set.
[out]frequenciesAn array that stores the PWM frequency (Hz) for the corresponding channels. Range = 1Hz ~ MAX supported freqency. frequencies[0] represents the value of the start channel.
[out]duty_cyclesAn array that stores the PWM ON duty cycle (%) for the corresponding channels. Range = 0, 1, ..., 100 (%). duty_cycles[0] represents the value of the start channel.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.

◆ ioThinx_DO_Config_SetPwmConfigures()

IOTHINX_ERR ioThinx_DO_Config_SetPwmConfigures ( uint32_t  slot,
uint8_t  start,
uint8_t  count,
uint16_t  frequencies[],
uint16_t  duty_cycles[] 
)
Parameters
[in]slotSlot number of the I/O module.
[in]startSpecifies the start channel.
[in]countThe number of channels to be set.
[in]frequenciesAn array that stores the PWM frequency (Hz) for the corresponding channels. Range = 1Hz ~ MAX supported freqency. frequencies[0] represents the value of the start channel.
[in]duty_cyclesAn array that stores the PWM ON duty cycle (%) for the corresponding channels. Range = 0, 1, ..., 100 (%). duty_cycles[0] represents the value of the start channel.
Returns
IOTHINX_ERR_OK if everything is ok. Otherwise, refer to the IOTHINX_ERR.