APCIE-3660 API  1719
Digital I/O functions

Functions

int i_APCIE3660_Read4DigitalInputs (uint8_t boardId, uint8_t *portValues)
 
int i_APCIE3660_Read1DigitalInput (uint8_t boardId, uint8_t input, uint8_t *inputValue)
 
int i_APCIE3660_SetDigitalOutputMemoryOn (uint8_t boardId)
 
int i_APCIE3660_SetDigitalOutputMemoryOff (uint8_t boardId)
 
int i_APCIE3660_Set4DigitalOutputsOn (uint8_t boardId, uint8_t mask)
 
int i_APCIE3660_Set4DigitalOutputsOff (uint8_t boardId, uint8_t mask)
 
int i_APCIE3660_Set1DigitalOutputOn (uint8_t boardId, uint8_t outputChannel)
 
int i_APCIE3660_Set1DigitalOutputOff (uint8_t boardId, uint8_t outputChannel)
 

Detailed Description

Function Documentation

◆ i_APCIE3660_Read4DigitalInputs()

int i_APCIE3660_Read4DigitalInputs ( uint8_t  boardId,
uint8_t *  portValues 
)

Read 4 digital inputs of the board

Parameters
[in]boardIdTarget board index
[out]portValuesStatus of the digital inputs
Return values
0No error
-1The boardId is wrong
-14An error occurred while calling the IOCTL function

◆ i_APCIE3660_Read1DigitalInput()

int i_APCIE3660_Read1DigitalInput ( uint8_t  boardId,
uint8_t  input,
uint8_t *  inputValue 
)

Read 1 digital input of the board

Parameters
[in]boardIdTarget board index
[in]inputDigital input (0 to 7)
[out]inputValueStatus of the digital input
Return values
0No error
-1The boardId is wrong
-2The input is wrong
-14An error occurred while calling the IOCTL function

◆ i_APCIE3660_SetDigitalOutputMemoryOn()

int i_APCIE3660_SetDigitalOutputMemoryOn ( uint8_t  boardId)

Enables the digital output memory When digital output memory is enabled, the active channels stay active until a SetDigitalOutputOff function is called. When digital output memory is disabled, the active channels are reset at each call of a SetDigitalOutputOn function. SetXDigitalOutputOff functions return an error.

Parameters
[in]boardIdTarget board index
Return values
0No error
-1The boardId is wrong
-14An error occurred while calling the IOCTL function

◆ i_APCIE3660_SetDigitalOutputMemoryOff()

int i_APCIE3660_SetDigitalOutputMemoryOff ( uint8_t  boardId)

Disables the digital output memory When digital output memory is enabled, the active channels stay active until a SetDigitalOutputOff function is called. When digital output memory is disabled, the active channels are reset at each call of a SetDigitalOutputOn function. SetXDigitalOutputOff functions return an error.

Parameters
[in]boardIdTarget board index
Return values
0No error
-1The boardId is wrong
-14An error occurred while calling the IOCTL function

◆ i_APCIE3660_Set4DigitalOutputsOn()

int i_APCIE3660_Set4DigitalOutputsOn ( uint8_t  boardId,
uint8_t  mask 
)

Permits to set digital outputs of the board

Parameters
[in]boardIdTarget board index
[in]maskDigital output port to set (0 to 15)
Return values
0No error
-1The boardId is wrong
-2The mask value is wrong
-14An error occurred while calling the IOCTL function

◆ i_APCIE3660_Set4DigitalOutputsOff()

int i_APCIE3660_Set4DigitalOutputsOff ( uint8_t  boardId,
uint8_t  mask 
)

Permits to reset digital Outputs of the board

Parameters
[in]boardIdTarget board index
[in]maskDigital output port to reset (0 to 15)
Return values
0No error
-1The boardId is wrong
-2The mask value is wrong
-3Digital output memory not set - Cannot set outputs to 0
-14An error occurred while calling the IOCTL function

◆ i_APCIE3660_Set1DigitalOutputOn()

int i_APCIE3660_Set1DigitalOutputOn ( uint8_t  boardId,
uint8_t  outputChannel 
)

Sets 1 digital output to HIGH

Parameters
[in]boardIdTarget board index
[in]outputChannelDigital output to set (0 to 3)
Return values
0No error
-1The boardId is wrong
-2The outputChannel is wrong
-14An error occurred while calling the IOCTL function

◆ i_APCIE3660_Set1DigitalOutputOff()

int i_APCIE3660_Set1DigitalOutputOff ( uint8_t  boardId,
uint8_t  outputChannel 
)

Sets 1 digital output to LOW

Parameters
[in]boardIdTarget board index
[in]outputChannelDigital output to reset (0 to 3)
Return values
0No error
-1The boardId is wrong
-2The outputChannel is wrong
-3Digital output memory not set - Cannot set outputs to 0
-14An error occurred while calling the IOCTL function