Data Structures | |
union | _IOR5E |
Defines | |
#define | IOR5E_ADC_CHANNELS 5 |
#define | IOR5E_I1 PORTA_RA0 |
#define | IOR5E_I2 PORTA_RA1 |
#define | IOR5E_I3 PORTA_RA2 |
#define | IOR5E_I4 PORTA_RA3 |
#define | IOR5E_I5 PORTA_RA5 |
#define | IOR5E_I6 PORTA_RA4 |
#define | IOR5E_IO1_DIR TRISA_RA0 |
#define | IOR5E_IO2_DIR TRISA_RA1 |
#define | IOR5E_IO3_DIR TRISA_RA2 |
#define | IOR5E_IO4_DIR TRISA_RA3 |
#define | IOR5E_IO5_DIR TRISA_RA5 |
#define | IOR5E_IO6_DIR TRISA_RA4 |
#define | IOR5E_O1 LATA0 |
#define | IOR5E_O2 LATA1 |
#define | IOR5E_O3 LATA2 |
#define | IOR5E_O4 LATA3 |
#define | IOR5E_O5 LATA5 |
#define | IOR5E_O6 LATA4 |
#define | IOR5E_OPTO_INPUTS 4 |
#define | IOR5E_RELAYS 5 |
#define | ior5eSetRly1(value) ior5eSetRly(0, value) |
#define | ior5eSetRly2(value) ior5eSetRly(1, value) |
#define | ior5eSetRly3(value) ior5eSetRly(2, value) |
#define | ior5eSetRly4(value) ior5eSetRly(3, value) |
#define | ior5eSetRly5(value) ior5eSetRly(4, value) |
Functions | |
BYTE | ior5eAddEvents (void) |
WORD | ior5eGetAdc (BYTE chan) |
BYTE | ior5eGetIO (void) |
BYTE | ior5eGetOpto (void) |
BYTE | ior5eGetRly (void) |
void | ior5eInit (void) |
void | ior5eService (void) |
void | ior5eSetIO (BYTE ch, BOOL bVal) |
void | ior5eSetRly (BYTE rly, BOOL bVal) |
Variables | |
WORD | ior5eAdcValues [IOR5E_ADC_CHANNELS] |
union _IOR5E | ior5eLatchData |
union _IOR5E | ior5eLatchDataOld |
//********************************************************************* //-------------- IOR5E Configuration -------------------- //********************************************************************* //Define ... //#define IOR5E_....
#define IOR5E_ADC_CHANNELS 5 |
#define IOR5E_I1 PORTA_RA0 |
#define IOR5E_I2 PORTA_RA1 |
#define IOR5E_I3 PORTA_RA2 |
#define IOR5E_I4 PORTA_RA3 |
#define IOR5E_I5 PORTA_RA5 |
#define IOR5E_I6 PORTA_RA4 |
#define IOR5E_IO1_DIR TRISA_RA0 |
#define IOR5E_IO2_DIR TRISA_RA1 |
#define IOR5E_IO3_DIR TRISA_RA2 |
#define IOR5E_IO4_DIR TRISA_RA3 |
#define IOR5E_IO5_DIR TRISA_RA5 |
#define IOR5E_IO6_DIR TRISA_RA4 |
#define IOR5E_O1 LATA0 |
#define IOR5E_O2 LATA1 |
#define IOR5E_O3 LATA2 |
#define IOR5E_O4 LATA3 |
#define IOR5E_O5 LATA5 |
#define IOR5E_O6 LATA4 |
#define IOR5E_OPTO_INPUTS 4 |
#define IOR5E_RELAYS 5 |
#define ior5eSetRly1 | ( | value | ) | ior5eSetRly(0, value) |
Set or clear relay1.
value | When 0, relay 1 is switched of. When 1, relay 1 is switched on |
#define ior5eSetRly2 | ( | value | ) | ior5eSetRly(1, value) |
Set or clear relay2.
value | When 0, relay 2 is switched of. When 1, relay 2 is switched on |
#define ior5eSetRly3 | ( | value | ) | ior5eSetRly(2, value) |
Set or clear relay3.
value | When 0, relay 3 is switched of. When 1, relay 3 is switched on |
#define ior5eSetRly4 | ( | value | ) | ior5eSetRly(3, value) |
Set or clear relay4.
value | When 0, relay 4 is switched of. When 1, relay 4 is switched on |
#define ior5eSetRly5 | ( | value | ) | ior5eSetRly(4, value) |
Set or clear relay5.
value | When 0, relay 5 is switched of. When 1, relay 5 is switched on |
BYTE ior5eAddEvents | ( | void | ) |
Check if any events occured, and add them to all active event ports.
Gets the requested 16 bit filtered ADC channel.
chan | The channel to get, a value from 1 to 5 for channels 1 to 5 of IOR5E |
BYTE ior5eGetIO | ( | void | ) |
Gets the current state of all 6 IOs
BYTE ior5eGetOpto | ( | void | ) |
Get all 4 opto coupler inputs values
BYTE ior5eGetRly | ( | void | ) |
Gets the current state of all 5 relays
void ior5eInit | ( | void | ) |
Initialize the IOR5E module
void ior5eService | ( | void | ) |
Service this module
Set or clear given IO port. Is only done if this IO port is current set as an ouput
ch | Offset of IO to perform action on. A value from 0-n. IO1 will be 0, IO2 will be 1, .... | |
bVal | When 0, relay is switched of. When 1, relay is switched on |
Set or clear given relay
rly | Offset of relay to perform action on. A value from 0-n. Relay 1 will be 0, relay 2 will be 1, .... | |
bVal | When 0, relay is switched of. When 1, relay is switched on |
WORD ior5eAdcValues[IOR5E_ADC_CHANNELS] |
Global Array containing converted ADC values. This array can be accessed from anywhere to obtain the current value of the ADC inputs. For example, to get the current value of AN2 ADC, use ior5eAdcValues[2]
union _IOR5E ior5eLatchData |
union _IOR5E ior5eLatchDataOld |