|
ASX Version4.37.03
|
These functions implement GPIO operations. More...
Functions | |
| ASX32_API ASX_ERROR | ASX_GPIO_GetProperties (ASX_HANDLE hGPIO, int *pnNumberOfInputBits, int *pnNumberOfOutputBits) |
| Get the properties of the GPIO control. | |
| ASX32_API ASX_ERROR | ASX_GPIO_InputGet (ASX_HANDLE hGPIO, int *pnInputBits, const int nNumberOfBits) |
| Read the state of the GPIO opto inputs. | |
| ASX32_API ASX_ERROR | ASX_GPIO_OutputSet (ASX_HANDLE hGPIO, int *pnOutputBits, const int nNumberOfBits) |
| Write to the GPIO relay outputs. | |
| ASX32_API ASX_ERROR | ASX_GPIO_OutputGet (ASX_HANDLE hGPIO, int *pnOutputBits, const int nNumberOfBits) |
| Read the current GPIO relay output settings. | |
These functions implement GPIO operations.
By GPIO we here mean the control of relays and the reading of optos.
| ASX32_API ASX_ERROR ASX_GPIO_GetProperties | ( | ASX_HANDLE | hGPIO, |
| int * | pnNumberOfInputBits, | ||
| int * | pnNumberOfOutputBits | ||
| ) |
Get the properties of the GPIO control.
GPIO controls have a number of input and output bits and this function tells the application how many there are of each.
| hGPIO | A handle to an ASX GPIO control object. |
| pnNumberOfInputBits | The number of input bits. |
| pnNumberOfOutputBits | The number of output bits. |
| ASX32_API ASX_ERROR ASX_GPIO_InputGet | ( | ASX_HANDLE | hGPIO, |
| int * | pnInputBits, | ||
| const int | nNumberOfBits | ||
| ) |
Read the state of the GPIO opto inputs.
This functions reads all the GPIO inputs and returns the current readings in an array of bits.
| hGPIO | A handle to an ASX GPIO control object. |
| pnInputBits | An array of dimension nNumberOfBits items elements returns the bit readings. pnBits[0] is the reading of opto 0 and pnBits[1] is the reading of opto 1. All pnBits elements will be set to either 1 or 0. |
| nNumberOfBits | The number of bits which should be set to the dimension of pnBits. |
| ASX32_API ASX_ERROR ASX_GPIO_OutputGet | ( | ASX_HANDLE | hGPIO, |
| int * | pnOutputBits, | ||
| const int | nNumberOfBits | ||
| ) |
Read the current GPIO relay output settings.
This functions reads all the GPIO outputs.
| hGPIO | A handle to an ASX GPIO control object. |
| pnOutputBits | An array of dimension nNumberOfBits elements that is used to return the relay settings. |
| nNumberOfBits | The number of bits which must be set to the dimension of pnBits. |
| ASX32_API ASX_ERROR ASX_GPIO_OutputSet | ( | ASX_HANDLE | hGPIO, |
| int * | pnOutputBits, | ||
| const int | nNumberOfBits | ||
| ) |
Write to the GPIO relay outputs.
This functions writes to all the GPIO outputs, setting the outputs to the values of pnBits.
| hGPIO | A handle to an ASX GPIO control object. |
| pnOutputBits | An array of dimension nNumberOfBits elements that is used to set the relays. All elements should be set to a value of either 1 or 0. |
| nNumberOfBits | The number of bits which must be set to the dimension of pnBits. |
1.7.3