17#ifndef INCLUDED_DISCRETE_IN_H
18#define INCLUDED_DISCRETE_IN_H
20#include "commonDataTypes.h"
23#define DIN_MFB_MAX (2U)
24#define DIN_DEV_MAX (3U)
25#define DIN_CH_MAX (44U)
27#define DIN_DEV_CH_MAX (32U)
28#define DIN_BANK_MASK (0x03U)
29#define DIN_BANK_SHIFT (6U)
30#define DIN_BANK_OFFSET_0 (0U)
31#define DIN_BANK_OFFSET_1 (8U)
32#define DIN_BANK_OFFSET_2 (16U)
33#define DIN_BANK_OFFSET_3 (24U)
34#define DIN_TEMP_MASK (0xFFFFU)
DriverStatus discreteIn_getCbit(const DInDevHandler dInDevHdl, DInCbitStatus *cbitStatus, const UInt8 devNum)
discreteIn_getCbit.
Definition discreteIn.c:75
#define DIN_MFB_MAX
Definition discreteIn.h:23
DInBITState
Discrete Input Built-In Test (BIT) Pass/Fail Evaluation State.
Definition discreteIn.h:53
@ DIN_BIT_FAIL
DIN BIT for ERROR condition is 1.
Definition discreteIn.h:55
@ DIN_BIT_PASS
DIN BIT for NO ERROR condition is 0.
Definition discreteIn.h:54
DInDevBank
Discrete Input Hardware Channel Register Bank Selection (Bank 0 to Bank 3).
Definition discreteIn.h:41
@ BANK2
The channel bank for the CH16 to CH24.
Definition discreteIn.h:44
@ BANK3
The channel bank for the CH25 to CH26.
Definition discreteIn.h:45
@ BANK1
The channel bank for the CH7 to CH15.
Definition discreteIn.h:43
@ BANK0
The channel bank for the CH1 to CH6.
Definition discreteIn.h:42
DriverStatus discreteIn_getTemp(const DInDevHandler dInDevHdl, Float32 *temp)
discreteIn_getTemp.
Definition discreteIn.c:130
DriverStatus discreteIn_getPbit(const DInDevHandler dInDevHdl, DInPbitStatus *pbitStatus, const UInt8 devNum)
discreteIn_getPbit.
Definition discreteIn.c:27
DriverStatus discreteIn_getChSense(const DInDevHandler dInDevHdl, DInDevState *pDevState)
discreteIn_getChSense.
Definition discreteIn.c:151
DInBitChannel
Discrete Input Built-In Test (BIT) Hardware Channel Allocation Indices.
Definition discreteIn.h:63
@ DIN_BIT_OG_CH32
Discrete Input BIT channel 32 (Open/Ground type).
Definition discreteIn.h:107
@ DIN_BIT_OG_CH31
Discrete Input BIT channel 31 (Open/Ground type).
Definition discreteIn.h:106
@ DIN_BIT_GO_CH34_2
Discrete Input BIT channel 34 (Ground/Open stage 2).
Definition discreteIn.h:90
@ DIN_BIT_OG_CH19
Discrete Input BIT channel 19 (Open/Ground type).
Definition discreteIn.h:94
@ DIN_BIT_SO_CH1
Discrete Input BIT channel 1 (Supply/Open type).
Definition discreteIn.h:64
@ DIN_BIT_SO_CH11
Discrete Input BIT channel 11 (Supply/Open type).
Definition discreteIn.h:74
@ DIN_BIT_GO_CH36_2
Discrete Input BIT channel 36 (Ground/Open stage 2).
Definition discreteIn.h:88
@ DIN_BIT_OG_CH22
Discrete Input BIT channel 22 (Open/Ground type).
Definition discreteIn.h:97
@ DIN_BIT_GO_CH33_2
Discrete Input BIT channel 33 (Ground/Open stage 2).
Definition discreteIn.h:91
@ DIN_BIT_SG_CH35_1
Discrete Input BIT channel 35 (Supply/Ground stage 1).
Definition discreteIn.h:82
@ DIN_BIT_SG_CH34_1
Discrete Input BIT channel 34 (Supply/Ground stage 1).
Definition discreteIn.h:81
@ DIN_BIT_OG_CH17
Discrete Input BIT channel 17 (Open/Ground type).
Definition discreteIn.h:92
@ DIN_BIT_OG_CH30
Discrete Input BIT channel 30 (Open/Ground type).
Definition discreteIn.h:105
@ DIN_BIT_SO_CH13
Discrete Input BIT channel 13 (Supply/Open type).
Definition discreteIn.h:76
@ DIN_BIT_SO_CH7
Discrete Input BIT channel 7 (Supply/Open type).
Definition discreteIn.h:70
@ DIN_BIT_GO_CH37_2
Discrete Input BIT channel 37 (Ground/Open stage 2).
Definition discreteIn.h:87
@ DIN_BIT_SO_CH15
Discrete Input BIT channel 15 (Supply/Open type).
Definition discreteIn.h:78
@ DIN_BIT_SG_CH36_1
Discrete Input BIT channel 36 (Supply/Ground stage 1).
Definition discreteIn.h:83
@ DIN_BIT_SO_CH14
Discrete Input BIT channel 14 (Supply/Open type).
Definition discreteIn.h:77
@ DIN_BIT_OG_CH21
Discrete Input BIT channel 21 (Open/Ground type).
Definition discreteIn.h:96
@ DIN_BIT_SO_CH9
Discrete Input BIT channel 9 (Supply/Open type).
Definition discreteIn.h:72
@ DIN_BIT_SO_CH3
Discrete Input BIT channel 3 (Supply/Open type).
Definition discreteIn.h:66
@ DIN_BIT_OG_CH29
Discrete Input BIT channel 29 (Open/Ground type).
Definition discreteIn.h:104
@ DIN_BIT_OG_CH26
Discrete Input BIT channel 26 (Open/Ground type).
Definition discreteIn.h:101
@ DIN_BIT_SO_CH2
Discrete Input BIT channel 2 (Supply/Open type).
Definition discreteIn.h:65
@ DIN_BIT_SG_CH33_1
Discrete Input BIT channel 33 (Supply/Ground stage 1).
Definition discreteIn.h:80
@ DIN_BIT_OG_CH28
Discrete Input BIT channel 28 (Open/Ground type).
Definition discreteIn.h:103
@ DIN_BIT_OG_CH18
Discrete Input BIT channel 18 (Open/Ground type).
Definition discreteIn.h:93
@ DIN_BIT_SG_CH37_1
Discrete Input BIT channel 37 (Supply/Ground stage 1).
Definition discreteIn.h:84
@ DIN_BIT_SO_CH6
Discrete Input BIT channel 6 (Supply/Open type).
Definition discreteIn.h:69
@ DIN_BIT_GO_CH35_2
Discrete Input BIT channel 35 (Ground/Open stage 2).
Definition discreteIn.h:89
@ DIN_BIT_SO_CH12
Discrete Input BIT channel 12 (Supply/Open type).
Definition discreteIn.h:75
@ DIN_BIT_SO_CH4
Discrete Input BIT channel 4 (Supply/Open type).
Definition discreteIn.h:67
@ DIN_BIT_SO_CH5
Discrete Input BIT channel 5 (Supply/Open type).
Definition discreteIn.h:68
@ DIN_BIT_OG_CH24
Discrete Input BIT channel 24 (Open/Ground type).
Definition discreteIn.h:99
@ DIN_BIT_OG_CH20
Discrete Input BIT channel 20 (Open/Ground type).
Definition discreteIn.h:95
@ DIN_BIT_SO_CH10
Discrete Input BIT channel 10 (Supply/Open type).
Definition discreteIn.h:73
@ DIN_BIT_OG_CH25
Discrete Input BIT channel 25 (Open/Ground type).
Definition discreteIn.h:100
@ DIN_BIT_GO_CH38_2
Discrete Input BIT channel 38 (Ground/Open stage 2).
Definition discreteIn.h:86
@ DIN_BIT_OG_CH23
Discrete Input BIT channel 23 (Open/Ground type).
Definition discreteIn.h:98
@ DIN_BIT_OG_CH27
Discrete Input BIT channel 27 (Open/Ground type).
Definition discreteIn.h:102
@ DIN_BIT_SO_CH16
Discrete Input BIT channel 16 (Supply/Open type).
Definition discreteIn.h:79
@ DIN_BIT_SG_CH38_1
Discrete Input BIT channel 38 (Supply/Ground stage 1).
Definition discreteIn.h:85
@ DIN_BIT_SO_CH8
Discrete Input BIT channel 8 (Supply/Open type).
Definition discreteIn.h:71
#define DIN_DEV_MAX
Definition discreteIn.h:24
#define DIN_CH_MAX
Definition discreteIn.h:25
DriverStatus
Low-Level Device Driver Execution Status and Return Error Codes.
Definition driverStatus.h:24
Discrete Input Continuous Built-In Test (CBIT) Diagnostic Status Structure.
Definition discreteIn.h:126
DInBITState f3v3[(3U)]
Discrete input CBIT for 3.3V fault.
Definition discreteIn.h:132
DInBITState cbitIcCommErr[(3U)]
Discrete input CBIT for communication error.
Definition discreteIn.h:129
DInBITState cbitNotDone[(2U)]
Discrete input CBIT that is not done.
Definition discreteIn.h:127
DInBITState cbitUt[(2U)]
Discrete input CBIT for under temperature.
Definition discreteIn.h:130
DInBITState chCbitStat[(44U)]
Discrete input CBIT for channel bit status.
Definition discreteIn.h:136
DInBITState cbitPwr3v3Fault[(2U)]
Discrete input CBIT for 3.3V power fault.
Definition discreteIn.h:128
DInBITState fVwetBit[(3U)]
Discrete input CBIT for VWet bit.
Definition discreteIn.h:135
DInBITState f3v3Bit[(3U)]
Discrete input CBIT for 3.3V bit.
Definition discreteIn.h:134
DInBITState fVwet[(3U)]
Discrete input CBIT for VWet.
Definition discreteIn.h:133
DInBITState cbitOt[(2U)]
Discrete input CBIT for over temperature.
Definition discreteIn.h:131
Discrete Input Peripheral Hardware Device Handler Structure.
Definition discreteIn.h:151
UInt32 baseAddress
The base address for the DIN device handler.
Definition discreteIn.h:152
Discrete Input Channel Boolean State Array Structure.
Definition discreteIn.h:143
Bool chState[(44U)]
The channel status.
Definition discreteIn.h:144
Discrete Input Power-On Built-In Test (PBIT) Diagnostic Status Structure.
Definition discreteIn.h:115
DInBITState pbitNotDone[(2U)]
Discrete input PBIT that is not done.
Definition discreteIn.h:116
DInBITState chPbitStat[(44U)]
Discrete input PBIT for channel bit status.
Definition discreteIn.h:119
DInBITState pbitIcCommErr[(3U)]
Discrete input PBIT for communication error.
Definition discreteIn.h:118
DInBITState pbitPwr3v3fault[(2U)]
Discrete input PBIT for 3.3V power fault.
Definition discreteIn.h:117