|
HFCC-01 Low-Level Software (LLSW) Rel_6802_HFCC-01-RP-CSAR-CB
|
Go to the source code of this file.
Data Structures | |
| struct | DInPbitStatus |
| Discrete Input Power-On Built-In Test (PBIT) Diagnostic Status Structure. More... | |
| struct | DInCbitStatus |
| Discrete Input Continuous Built-In Test (CBIT) Diagnostic Status Structure. More... | |
| struct | DInDevState |
| Discrete Input Channel Boolean State Array Structure. More... | |
| struct | DInDevHandler |
| Discrete Input Peripheral Hardware Device Handler Structure. More... | |
Macros | |
| #define | DIN_MFB_MAX (2U) |
| #define | DIN_DEV_MAX (3U) |
| #define | DIN_CH_MAX (44U) |
| #define | DIN_DEV_CH_MAX (32U) |
| #define | DIN_BANK_MASK (0x03U) |
| #define | DIN_BANK_SHIFT (6U) |
| #define | DIN_BANK_OFFSET_0 (0U) |
| #define | DIN_BANK_OFFSET_1 (8U) |
| #define | DIN_BANK_OFFSET_2 (16U) |
| #define | DIN_BANK_OFFSET_3 (24U) |
| #define | DIN_TEMP_MASK (0xFFFFU) |
Functions | |
| DriverStatus | discreteIn_getPbit (const DInDevHandler dInDevHdl, DInPbitStatus *pbitStatus, const UInt8 devNum) |
| discreteIn_getPbit. | |
| DriverStatus | discreteIn_getCbit (const DInDevHandler dInDevHdl, DInCbitStatus *cbitStatus, const UInt8 devNum) |
| discreteIn_getCbit. | |
| DriverStatus | discreteIn_getTemp (const DInDevHandler dInDevHdl, Float32 *temp) |
| discreteIn_getTemp. | |
| DriverStatus | discreteIn_getChSense (const DInDevHandler dInDevHdl, DInDevState *pDevState) |
| discreteIn_getChSense. | |
Discrete Input device driver header file
| #define DIN_BANK_MASK (0x03U) |
| #define DIN_BANK_OFFSET_0 (0U) |
| #define DIN_BANK_OFFSET_1 (8U) |
| #define DIN_BANK_OFFSET_2 (16U) |
| #define DIN_BANK_OFFSET_3 (24U) |
| #define DIN_BANK_SHIFT (6U) |
| #define DIN_CH_MAX (44U) |
| #define DIN_DEV_CH_MAX (32U) |
| #define DIN_DEV_MAX (3U) |
| #define DIN_MFB_MAX (2U) |
| #define DIN_TEMP_MASK (0xFFFFU) |
| enum DInBitChannel |
Discrete Input Built-In Test (BIT) Hardware Channel Allocation Indices.
| enum DInBITState |
| enum DInDevBank |
Discrete Input Hardware Channel Register Bank Selection (Bank 0 to Bank 3).
| DriverStatus discreteIn_getCbit | ( | const DInDevHandler | dInDevHdl, |
| DInCbitStatus * | cbitStatus, | ||
| const UInt8 | devNum ) |
discreteIn_getCbit.
discreteIn get CBIT status.
| [in] | dInDevHdl | The discrete input device handler. |
| [out] | cbitStatus | The pointer of CBIT status value. |
| [in] | devNum | The discrete input device number. |
| DRV_SUCCESS | : Success. |
| DRV_READ_FAILED | : Failed to read from the device or module. |
| DRV_INVALID_PARAM | : The provided address pointer is invalid. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_DISCRETEIN_DISCRETEIN_GETCBIT_01 | HLR_DIN_23588 | WHEN the pointer cbitStatus is NULL (invalid), the discreteIn_getCbit() function SHALL abort processing and return DRV_INVALID_PARAM. | discreteIn.c:discreteIn_getCbit() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETCBIT_02 | HLR_DIN_23588 | WHEN devNum is equal to 0 or 1, the discreteIn_getCbit() function SHALL map the hardware access to device instance 0. | discreteIn.c:discreteIn_getCbit() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETCBIT_03 | HLR_DIN_23588 | WHEN devNum is equal to 2, the discreteIn_getCbit() function SHALL map the hardware access to device instance 1. | discreteIn.c:discreteIn_getCbit() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETCBIT_04 | HLR_DIN_23588 | WHEN the device instance is resolved, the discreteIn_getCbit() function SHALL read the CBIT status register MMAP_DIN_CBIT_STATUS using readDiscreteInReg(). | discreteIn.c:discreteIn_getCbit() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETCBIT_05 | HLR_DIN_23588 | WHEN the CBIT status register is read successfully, the discreteIn_getCbit() function SHALL unpack hardware status bits for power good, over/under temperature, and channel parity into struct cbitStatus. | discreteIn.c:discreteIn_getCbit() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETCBIT_06 | HLR_DIN_23588 | WHEN all operational processing completes successfully, the discreteIn_getCbit() function SHALL return DRV_SUCCESS. | discreteIn.c:discreteIn_getCbit() | Test | Closed |
| DriverStatus discreteIn_getChSense | ( | const DInDevHandler | dInDevHdl, |
| DInDevState * | pDevState ) |
discreteIn_getChSense.
discreteIn get channel sense logic value.
| [in] | dInDevHdl | The discrete input device handler. |
| [out] | pDevState | The state of the channel. |
| DRV_SUCCESS | : Success. |
| DRV_READ_FAILED | : Failed to read from the device or module. |
| DRV_INVALID_PARAM | : The provided address pointer is invalid. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_DISCRETEIN_DISCRETEIN_GETCHSENSE_01 | HLR_DIN_23258 | WHEN the pointer pDevState is NULL (invalid), the discreteIn_getChSense() function SHALL abort processing and return DRV_INVALID_PARAM. | discreteIn.c:discreteIn_getChSense() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETCHSENSE_02 | HLR_DIN_23258 | WHEN a driver operation reports a failure status other than DRV_SUCCESS, the discreteIn_getChSense() function SHALL abort processing and return that driver failure status. | discreteIn.c:discreteIn_getChSense() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETCHSENSE_03 | HLR_DIN_23258 | WHEN preconditions are satisfied, the discreteIn_getChSense() function SHALL read the Discrete Input Channel Sense Register (READ_INPUT) at physical offset 0x0078 (MMAP_DIN_READ_INPUT) using readDiscreteInReg(). | discreteIn.c:discreteIn_getChSense() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETCHSENSE_04 | HLR_DIN_23258 | WHEN preconditions are satisfied, the discreteIn_getChSense() function SHALL invoke bitwise routine READ_BIT() to extract target channel status bit from register payload. | discreteIn.c:discreteIn_getChSense() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETCHSENSE_05 | HLR_DIN_23258 | WHEN all operational processing completes successfully, the discreteIn_getChSense() function SHALL return DRV_SUCCESS. | discreteIn.c:discreteIn_getChSense() | Test | Closed |
| DriverStatus discreteIn_getPbit | ( | const DInDevHandler | dInDevHdl, |
| DInPbitStatus * | pbitStatus, | ||
| const UInt8 | devNum ) |
discreteIn_getPbit.
discreteIn get PBIT status.
| [in] | dInDevHdl | The discrete input device handler. |
| [in] | devNum | The discrete input device number. |
| [out] | pbitStatus | The pointer of PBIT status value. |
| DRV_SUCCESS | : Success. |
| DRV_READ_FAILED | : Failed to read from the device or module. |
| DRV_INVALID_PARAM | : The provided address pointer is invalid. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_DISCRETEIN_DISCRETEIN_GETPBIT_01 | HLR_DIN_319 | WHEN the pointer pbitStatus is NULL (invalid), the discreteIn_getPbit() function SHALL abort processing and return DRV_INVALID_PARAM. | discreteIn.c:discreteIn_getPbit() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETPBIT_02 | HLR_DIN_319 | WHEN devNum is equal to 0 or 1, the discreteIn_getPbit() function SHALL map the hardware access to device instance 0. | discreteIn.c:discreteIn_getPbit() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETPBIT_03 | HLR_DIN_319 | WHEN devNum is equal to 2, the discreteIn_getPbit() function SHALL map the hardware access to device instance 1. | discreteIn.c:discreteIn_getPbit() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETPBIT_04 | HLR_DIN_319 | WHEN the device instance is resolved, the discreteIn_getPbit() function SHALL read the PBIT status register MMAP_DIN_PBIT_STATUS using readDiscreteInReg(). | discreteIn.c:discreteIn_getPbit() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETPBIT_05 | HLR_DIN_319 | WHEN the PBIT status register is read successfully, the discreteIn_getPbit() function SHALL unpack hardware status bits for power good, over/under temperature, and logic verification into struct pbitStatus. | discreteIn.c:discreteIn_getPbit() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETPBIT_06 | HLR_DIN_319 | WHEN all operational processing completes successfully, the discreteIn_getPbit() function SHALL return DRV_SUCCESS. | discreteIn.c:discreteIn_getPbit() | Test | Closed |
| DriverStatus discreteIn_getTemp | ( | const DInDevHandler | dInDevHdl, |
| Float32 * | temp ) |
discreteIn_getTemp.
discreteIn get temperature value in degree Celsius (C).
| [in] | dInDevHdl | The discrete input device handler. |
| [out] | temp | The pointer of temperature value in degree Celsius (C). |
| DRV_SUCCESS | : Success. |
| DRV_READ_FAILED | : Failed to read from the device or module. |
| DRV_INVALID_PARAM | : The provided address pointer is invalid. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_DISCRETEIN_DISCRETEIN_GETTEMP_01 | HLR_DIN_30815 | WHEN the pointer temp is NULL (invalid), the discreteIn_getTemp() function SHALL abort processing and return DRV_INVALID_PARAM. | discreteIn.c:discreteIn_getTemp() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETTEMP_02 | HLR_DIN_30815 | WHEN a driver operation reports a failure status other than DRV_SUCCESS, the discreteIn_getTemp() function SHALL abort processing and return that driver failure status. | discreteIn.c:discreteIn_getTemp() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETTEMP_03 | HLR_DIN_30815 | WHEN preconditions are satisfied, the discreteIn_getTemp() function SHALL read the Raw Temperature Sensor Register (TEMP_RAW) at physical offset 0x0068 (MMAP_DIN_TEMP_RAW) using readDiscreteInReg(). | discreteIn.c:discreteIn_getTemp() | Test | Closed |
| LLR_DISCRETEIN_DISCRETEIN_GETTEMP_04 | HLR_DIN_30815 | WHEN all operational processing completes successfully, the discreteIn_getTemp() function SHALL return DRV_SUCCESS. | discreteIn.c:discreteIn_getTemp() | Test | Closed |