|
HFCC-01 Low-Level Software (LLSW) Rel_6802_HFCC-01-RP-CSAR-CB
|
Go to the source code of this file.
Data Structures | |
| struct | DOutPbitStatus |
| Discrete Output Power-On Built-In Test (PBIT) Diagnostic Status Structure. More... | |
| struct | DOutCbit1ChSGSubStatus |
| Discrete Output Bank 1 Supply-Ground (SG) Sub-Channel CBIT Diagnostic Status Structure. More... | |
| struct | DOutCbit1ChSGStatus |
| Discrete Output Bank 1 Supply-Ground (SG) Channel CBIT Status Structure. More... | |
| struct | DOutCbit1ChStatus |
| Discrete Output Bank 1 Channel CBIT Diagnostic Bitfield Structure. More... | |
| struct | DOutCbit2ChStatus |
| Discrete Output Bank 2 Channel CBIT Diagnostic Bitfield Structure. More... | |
| struct | DOutCbit2ChSGSubStatus |
| Discrete Output Bank 2 Supply-Ground (SG) Sub-Channel CBIT Diagnostic Status Structure. More... | |
| struct | DOutCbit2ChSGStatus |
| Discrete Output Bank 2 Supply-Ground (SG) Channel CBIT Status Structure. More... | |
| struct | DOutCbit1Status |
| Discrete Output Bank 1 Complete CBIT Diagnostic Status Structure. More... | |
| struct | DOutCbit2Status |
| Discrete Output Bank 2 Complete CBIT Diagnostic Status Structure. More... | |
| struct | DOutCbitStatus |
| Discrete Output Composite Dual-Bank CBIT Diagnostic Status Structure. More... | |
| struct | DOutBankCfg |
| Discrete Output Hardware Bank Overvoltage and Underload Configuration Structure. More... | |
| struct | DOutDevHandler |
| Discrete Output Peripheral Hardware Device Handler Structure. More... | |
Macros | |
| #define | DOUT_MFB_MAX (2U) |
| #define | DOUT_DEV_MAX (11U) |
Enumerations | |
| enum | DOutBITState { DOUT_BIT_PASS = 0U , DOUT_BIT_FAIL = 1U } |
| Discrete Output Built-In Test (BIT) Pass/Fail Evaluation State. More... | |
Functions | |
| DriverStatus | discreteOut_reset (const DOutDevHandler dOutDevHdl) |
| discreteOut_reset. | |
| DriverStatus | discreteOut_getPbit (const DOutDevHandler dOutDevHdl, DOutPbitStatus *pbitStatus, const UInt8 devNum) |
| discreteOut_getPbit. | |
| DriverStatus | discreteOut_getCbit (const DOutDevHandler dOutDevHdl, DOutCbitStatus *cbitStatus, const UInt8 devNum) |
| discreteOut_getCbit. | |
| DriverStatus | discreteOut_getTemp (const DOutDevHandler dOutDevHdl, Float32 *temp) |
| discreteOut_getTemp. | |
| DriverStatus | discreteOut_devicesConfig (const DOutDevHandler dOutDevHdl, const DOutBankCfg bankConfig) |
| discreteOut_devicesConfig. | |
| DriverStatus | discreteOut_writeChState (const DOutDevHandler dOutDevHdl, const UInt8 channelNum, const Bool dOutLogic) |
| discreteOut_writeChState. | |
Discrete Output device driver header file
| #define DOUT_DEV_MAX (11U) |
| #define DOUT_MFB_MAX (2U) |
| enum DOutBITState |
| DriverStatus discreteOut_devicesConfig | ( | const DOutDevHandler | dOutDevHdl, |
| const DOutBankCfg | bankConfig ) |
discreteOut_devicesConfig.
discreteOut set device configuration.
| [in] | dOutDevHdl | The discrete output device handler. |
| [in] | bankConfig | The bank configuration value. |
| DRV_SUCCESS | : Success. |
| DRV_WRITE_FAILED | : Failed to write to the device or module. |
| DRV_READ_FAILED | : Failed to read from the device or module. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_DISCRETEOUT_DISCRETEOUT_DEVICESCONFIG_01 | HLR_DOUT_39816 | WHEN invoked, the discreteOut_devicesConfig() function SHALL read the current bank configuration register MMAP_DOUT_BANK_CFG_DEV using readDiscreteOutReg(). | discreteOut.c:discreteOut_devicesConfig() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_DEVICESCONFIG_02 | HLR_DOUT_39816 | WHEN the register read operation fails (status not equal to DRV_SUCCESS), the discreteOut_devicesConfig() function SHALL abort processing and return that failure status. | discreteOut.c:discreteOut_devicesConfig() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_DEVICESCONFIG_03 | HLR_DOUT_39816 | WHEN bank configuration overvoltage is enabled (bankConfig.overVoltage is TRUE), the discreteOut_devicesConfig() function SHALL set bit 0 in the configuration word. | discreteOut.c:discreteOut_devicesConfig() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_DEVICESCONFIG_04 | HLR_DOUT_39816 | WHEN bank configuration overvoltage is disabled (bankConfig.overVoltage is FALSE), the discreteOut_devicesConfig() function SHALL clear bit 0 in the configuration word. | discreteOut.c:discreteOut_devicesConfig() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_DEVICESCONFIG_05 | HLR_DOUT_39816 | WHEN bank configuration underload is enabled (bankConfig.underLoad is TRUE), the discreteOut_devicesConfig() function SHALL set bit 1 in the configuration word. | discreteOut.c:discreteOut_devicesConfig() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_DEVICESCONFIG_06 | HLR_DOUT_39816 | WHEN bank configuration underload is disabled (bankConfig.underLoad is FALSE), the discreteOut_devicesConfig() function SHALL clear bit 1 in the configuration word. | discreteOut.c:discreteOut_devicesConfig() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_DEVICESCONFIG_07 | HLR_DOUT_39816 | WHEN bank configuration bits are updated, the discreteOut_devicesConfig() function SHALL write the configured word to register MMAP_DOUT_BANK_CFG_DEV using writeDiscreteOutReg(). | discreteOut.c:discreteOut_devicesConfig() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_DEVICESCONFIG_08 | HLR_DOUT_39816 | WHEN all operational processing completes successfully, the discreteOut_devicesConfig() function SHALL return DRV_SUCCESS. | discreteOut.c:discreteOut_devicesConfig() | Test | Closed |
| DriverStatus discreteOut_getCbit | ( | const DOutDevHandler | dOutDevHdl, |
| DOutCbitStatus * | cbitStatus, | ||
| const UInt8 | devNum ) |
discreteOut_getCbit.
discreteOut get CBIT status.
| [in] | dOutDevHdl | The discrete output device handler. |
| [out] | cbitStatus | The pointer of CBIT status value. |
| [in] | devNum | The discrete output 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_DISCRETEOUT_DISCRETEOUT_GETCBIT_01 | HLR_DOUT_23590 | WHEN the pointer cbitStatus is NULL (invalid), the discreteOut_getCbit() function SHALL abort processing and return DRV_INVALID_PARAM. | discreteOut.c:discreteOut_getCbit() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_GETCBIT_02 | HLR_DOUT_23590 | WHEN devNum is between 0 and 7, the discreteOut_getCbit() function SHALL select device bank index 0. | discreteOut.c:discreteOut_getCbit() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_GETCBIT_03 | HLR_DOUT_23590 | WHEN devNum is between 8 and 10, the discreteOut_getCbit() function SHALL select device bank index 1. | discreteOut.c:discreteOut_getCbit() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_GETCBIT_04 | HLR_DOUT_23590 | WHEN the device bank index is resolved, the discreteOut_getCbit() function SHALL read the CBIT status register MMAP_DOUT_CBIT_STATUS using readDiscreteOutReg(). | discreteOut.c:discreteOut_getCbit() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_GETCBIT_05 | HLR_DOUT_23590 | WHEN the CBIT status register is read successfully, the discreteOut_getCbit() function SHALL unpack hardware telemetry bits for power good, over/under temperature, overvoltage lockout, and underload shutdown for the specified device into cbitStatus. | discreteOut.c:discreteOut_getCbit() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_GETCBIT_06 | HLR_DOUT_23590 | WHEN all operational processing completes successfully, the discreteOut_getCbit() function SHALL return DRV_SUCCESS. | discreteOut.c:discreteOut_getCbit() | Test | Closed |
| DriverStatus discreteOut_getPbit | ( | const DOutDevHandler | dOutDevHdl, |
| DOutPbitStatus * | pbitStatus, | ||
| const UInt8 | devNum ) |
discreteOut_getPbit.
discreteOut get PBIT status.
| [in] | dOutDevHdl | The discrete output device handler. |
| [out] | pbitStatus | The pointer of PBIT status value. |
| [in] | devNum | The discrete output 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_DISCRETEOUT_DISCRETEOUT_GETPBIT_01 | HLR_DOUT_321 | WHEN the pointer pbitStatus is NULL (invalid), the discreteOut_getPbit() function SHALL abort processing and return DRV_INVALID_PARAM. | discreteOut.c:discreteOut_getPbit() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_GETPBIT_02 | HLR_DOUT_321 | WHEN devNum is between 0 and 7, the discreteOut_getPbit() function SHALL select device bank index 0. | discreteOut.c:discreteOut_getPbit() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_GETPBIT_03 | HLR_DOUT_321 | WHEN devNum is between 8 and 10, the discreteOut_getPbit() function SHALL select device bank index 1. | discreteOut.c:discreteOut_getPbit() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_GETPBIT_04 | HLR_DOUT_321 | WHEN the device bank index is resolved, the discreteOut_getPbit() function SHALL read the PBIT status register MMAP_DOUT_PBIT_STATUS using readDiscreteOutReg(). | discreteOut.c:discreteOut_getPbit() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_GETPBIT_05 | HLR_DOUT_321 | WHEN the PBIT status register is read successfully, the discreteOut_getPbit() function SHALL unpack hardware telemetry bits for power good, over/under temperature, and built-in test pattern results into pbitStatus. | discreteOut.c:discreteOut_getPbit() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_GETPBIT_06 | HLR_DOUT_321 | WHEN all operational processing completes successfully, the discreteOut_getPbit() function SHALL return DRV_SUCCESS. | discreteOut.c:discreteOut_getPbit() | Test | Closed |
| DriverStatus discreteOut_getTemp | ( | const DOutDevHandler | dOutDevHdl, |
| Float32 * | temp ) |
discreteOut_getTemp.
discreteOut get temperature value in degree celsius (C).
| [in] | dOutDevHdl | The discrete output 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_DISCRETEOUT_DISCRETEOUT_GETTEMP_01 | HLR_DOUT_30818 | WHEN the pointer temp is NULL (invalid), the discreteOut_getTemp() function SHALL abort processing and return DRV_INVALID_PARAM. | discreteOut.c:discreteOut_getTemp() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_GETTEMP_02 | HLR_DOUT_30818 | WHEN a driver operation reports a failure status other than DRV_SUCCESS, the discreteOut_getTemp() function SHALL abort processing and return that driver failure status. | discreteOut.c:discreteOut_getTemp() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_GETTEMP_03 | HLR_DOUT_30818 | WHEN preconditions are satisfied, the discreteOut_getTemp() function SHALL read the Discrete Output Temperature Register (TEMP_RAW) at physical offset 0x0060 (MMAP_DOUT_TEMP_RAW) using readDiscreteOutReg(). | discreteOut.c:discreteOut_getTemp() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_GETTEMP_04 | HLR_DOUT_30818 | WHEN all operational processing completes successfully, the discreteOut_getTemp() function SHALL return DRV_SUCCESS. | discreteOut.c:discreteOut_getTemp() | Test | Closed |
| DriverStatus discreteOut_reset | ( | const DOutDevHandler | dOutDevHdl | ) |
discreteOut_reset.
Reset the discrete output module. The reset operation is performed by setting the reset bit of the discrete output module to 1 and then setting it back to 0.
| [in] | dOutDevHdl | The discrete output device handler. |
| DRV_SUCCESS | : Success. |
| DRV_WRITE_FAILED | : Failed to write to the device or module. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_DISCRETEOUT_DISCRETEOUT_RESET_01 | HLR_DOUT_30817 | WHEN a driver operation reports a failure status other than DRV_SUCCESS, the discreteOut_reset() function SHALL abort processing and return that driver failure status. | discreteOut.c:discreteOut_reset() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_RESET_02 | HLR_DOUT_30817 | WHEN preconditions are satisfied, the discreteOut_reset() function SHALL write the device block members memory offset (DOUT_RESET_MODULE) at physical offset 0x0028 (MMAP_DOUT_RESET_MODULE) using writeDiscreteOutReg(). | discreteOut.c:discreteOut_reset() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_RESET_03 | HLR_DOUT_30817 | WHEN the reset register is asserted, the discreteOut_reset() function SHALL wait for a minimum hardware reset pulse width delay of 100 microseconds before deasserting. | discreteOut.c:discreteOut_reset() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_RESET_04 | HLR_DOUT_30817 | WHEN all operational processing completes successfully, the discreteOut_reset() function SHALL return DRV_SUCCESS. | discreteOut.c:discreteOut_reset() | Test | Closed |
| DriverStatus discreteOut_writeChState | ( | const DOutDevHandler | dOutDevHdl, |
| const UInt8 | channelNum, | ||
| const Bool | dOutLogic ) |
discreteOut_writeChState.
Write the discrete output state.
| [in] | dOutDevHdl | The discrete output device handler. |
| [in] | channelNum | The channel number. |
| [in] | dOutLogic | The logic state to set. |
| DRV_SUCCESS | : Success. |
| DRV_WRITE_FAILED | : Failed to write to the device or module. |
| DRV_READ_FAILED | : Failed to read from the device or module. |
| DRV_INVALID_CHANNEL | : The channel number is invalid. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_DISCRETEOUT_DISCRETEOUT_WRITECHSTATE_01 | HLR_DOUT_234 | WHEN channel number channelNum exceeds DOUT_CHANNEL_MAX, the discreteOut_writeChState() function SHALL abort processing and return DRV_INVALID_CHANNEL. | discreteOut.c:discreteOut_writeChState() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_WRITECHSTATE_02 | HLR_DOUT_234 | WHEN channel validation passes, the discreteOut_writeChState() function SHALL read the current channel state register MMAP_DOUT_BANK_CH_STATE using readDiscreteOutReg(). | discreteOut.c:discreteOut_writeChState() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_WRITECHSTATE_03 | HLR_DOUT_234 | WHEN dOutLogic is TRUE, the discreteOut_writeChState() function SHALL set bit channelNum in the channel state register value. | discreteOut.c:discreteOut_writeChState() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_WRITECHSTATE_04 | HLR_DOUT_234 | WHEN dOutLogic is FALSE, the discreteOut_writeChState() function SHALL clear bit channelNum in the channel state register value. | discreteOut.c:discreteOut_writeChState() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_WRITECHSTATE_05 | HLR_DOUT_234 | WHEN the channel bit is updated, the discreteOut_writeChState() function SHALL write the modified register value to MMAP_DOUT_BANK_CH_STATE using writeDiscreteOutReg(). | discreteOut.c:discreteOut_writeChState() | Test | Closed |
| LLR_DISCRETEOUT_DISCRETEOUT_WRITECHSTATE_06 | HLR_DOUT_234 | WHEN all operational processing completes successfully, the discreteOut_writeChState() function SHALL return DRV_SUCCESS. | discreteOut.c:discreteOut_writeChState() | Test | Closed |