HFCC-01 Low-Level Software (LLSW) Rel_6802_HFCC-01-RP-CSAR-CB
Loading...
Searching...
No Matches
analogIn.h File Reference
#include "commonDataTypes.h"
#include "driverStatus.h"
Include dependency graph for analogIn.h:
analogIn.h Node1 analogIn.h Node2 commonDataTypes.h Node1->Node2 Node3 driverStatus.h Node1->Node3
This graph shows which files directly or indirectly include this file:
analogIn.h Node1 analogIn.h Node2 analogIn.c Node1->Node2 Node3 modAnalogIn.c Node1->Node3 Node4 modHsb.c Node1->Node4

Go to the source code of this file.

Data Structures

struct  PbitStat
 Analog Input Power-On Built-In Test (PBIT) General Status Flags Structure. More...
struct  PbitOverVoltage
 Analog Input Power-On Built-In Test (PBIT) Over-Voltage Fault Status Structure. More...
struct  PbitIvr
 Analog Input Power-On Built-In Test (PBIT) Input Voltage Range (IVR) Fault Status Structure. More...
struct  AnalogInPbitStatus
 Analog Input Power-On Built-In Test (PBIT) Composite Diagnostic Status Structure. More...
struct  CbitStat
 Analog Input Continuous Built-In Test (CBIT) General Status Flags Structure. More...
struct  CbitOverVoltage
 Analog Input Continuous Built-In Test (CBIT) Over-Voltage Fault Status Structure. More...
struct  CbitIvr
 Analog Input Continuous Built-In Test (CBIT) Input Voltage Range (IVR) Fault Status Structure. More...
struct  AnalogInCbitStatus
 Analog Input Continuous Built-In Test (CBIT) Composite Diagnostic Status Structure. More...
struct  AnalogInDevHandler
 Analog Input (ADC) Peripheral Hardware Device Handler Structure. More...

Enumerations

enum  AInBITState { AIN_BIT_PASS = 0U , AIN_BIT_FAIL = 1U }
 Analog Input Built-In Test (BIT) Pass/Fail Evaluation State. More...

Functions

DriverStatus analogIn_getPbit (const AnalogInDevHandler analogInDevHdl, AnalogInPbitStatus *pbitStatus)
 analogIn_getPbit.
DriverStatus analogIn_getCbit (const AnalogInDevHandler analogInDevHdl, AnalogInCbitStatus *cbitStatus)
 analogIn_getCbit.
DriverStatus analogIn_getTemp (const AnalogInDevHandler analogInDevHdl, Float32 *temp5v, Float32 *temp10v)
 analogIn_getTemp.
DriverStatus analogIn_enableDisableCh (const AnalogInDevHandler analogInDevHdl, const UInt8 chNum, const Bool flag)
 analogIn_enableDisableCh.
DriverStatus analogIn_getInputRange (const AnalogInDevHandler analogInDevHdl, const UInt8 bank, UInt32 *range)
 analogIn_getInputRange.
DriverStatus analogIn_getAdcReading (const AnalogInDevHandler analogInDevHdl, const UInt8 chNum, Float32 *adcValue)
 analogIn_getAdcReading.
DriverStatus analogIn_getChannelStatus (const AnalogInDevHandler analogInDevHdl, const UInt8 chNum, Bool *status)
 analogIn_getChannelStatus.

Detailed Description

Enumeration Type Documentation

◆ AInBITState

Analog Input Built-In Test (BIT) Pass/Fail Evaluation State.

Enumerator
AIN_BIT_PASS 

Analog Input BIT for NO ERROR condition is 0.

AIN_BIT_FAIL 

Analog Input BIT for ERROR condition is 1.

Analog Input BIT for ERROR condition is 1.

Function Documentation

◆ analogIn_enableDisableCh()

DriverStatus analogIn_enableDisableCh ( const AnalogInDevHandler analogInDevHdl,
const UInt8 chNum,
const Bool flag )

analogIn_enableDisableCh.

Parameters
[in]analogInDevHdlThe device handler.
[in]chNumThe device channel number.
[out]flagThe flag to enable or disable channel.
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
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.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: analogIn_enableDisableCh

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_ANALOGIN_ANALOGIN_ENABLEDISABLECH_01 HLR_AIN_30827 WHEN invoked, the analogIn_enableDisableCh() function SHALL read the current ADC channel enable status from register MMAP_ADC_CH_STATE using readAnInReg(). analogIn.c:analogIn_enableDisableCh() Test Closed
LLR_ANALOGIN_ANALOGIN_ENABLEDISABLECH_02 HLR_AIN_30827 WHEN the register read operation fails (status not equal to DRV_SUCCESS), the analogIn_enableDisableCh() function SHALL abort processing and return that failure status. analogIn.c:analogIn_enableDisableCh() Test Closed
LLR_ANALOGIN_ANALOGIN_ENABLEDISABLECH_03 HLR_AIN_30827 WHEN flag is TRUE, the analogIn_enableDisableCh() function SHALL enable channel chNum by setting bit chNum in the ADC channel state register value. analogIn.c:analogIn_enableDisableCh() Test Closed
LLR_ANALOGIN_ANALOGIN_ENABLEDISABLECH_04 HLR_AIN_30827 WHEN flag is FALSE, the analogIn_enableDisableCh() function SHALL disable channel chNum by clearing bit chNum in the ADC channel state register value. analogIn.c:analogIn_enableDisableCh() Test Closed
LLR_ANALOGIN_ANALOGIN_ENABLEDISABLECH_05 HLR_AIN_30827 WHEN the ADC channel enable bitmask is updated, the analogIn_enableDisableCh() function SHALL write the new mask to register MMAP_ADC_CH_ENABLE using writeAnInReg(). analogIn.c:analogIn_enableDisableCh() Test Closed
LLR_ANALOGIN_ANALOGIN_ENABLEDISABLECH_06 HLR_AIN_30827 WHEN all operational processing completes successfully, the analogIn_enableDisableCh() function SHALL return DRV_SUCCESS. analogIn.c:analogIn_enableDisableCh() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller analogIn_enableDisableCh() [Low-Level Device Drivers] Target readAnInReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   analogInDevHdl (Flag) l_t1->l_b1   chNum (Flag) l_t2->l_b2   flag (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller analogIn_enableDisableCh() [Low-Level Device Drivers] Target readAnInReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   analogInDevHdl (Payload) l_t1->l_b1   chNum (Payload) l_t2->l_b2   flag (Payload) r_b0->r_t0   stateTelemetry (Internal State)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_analogIn_enableDisableCh start Entry: analogIn_enableDisableCh() guard_1 LLR_01: Guard Check Is a driver operation reports a failure status other than DRV_SUCCESS? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `retStatus` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is `flag` is equal to `TRUE`? guard_1->guard_2 err_exit_2 LLR_02 Error Exit execute conditional operational branch guard_2->err_exit_2 YES (TRUE) act_3 LLR_03: Action Step read the memory map offset list (ADC_CH_STATE) at physical offset `0x0100` (`MMAP_ADC_CH_STATE`) using `readAnInReg()` guard_2->act_3 NO (FALSE) act_4 LLR_04: Action Step write the memory map offset list (ADC_CH_ENABLE) at physical offset `0x000C` (`MMAP_ADC_CH_ENABLE`) using `writeAnInReg()` act_3->act_4 success_exit LLR_05: Final Exit return `DRV_SUCCESS` act_4->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_analogIn_enableDisableCh in_store Input Data Sources & Parameters • analogInDevHdl (const AnalogInDevHandler) • chNum (const UInt8) • flag (const Bool) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: retStatus in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: flag proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Payload Transformation • Process payload via readAnInReg() proc_2->proc_3 Data Payload (readAnInReg) proc_4 LLR_04: Data Payload Transformation • Process payload via writeAnInReg() proc_3->proc_4 Data Payload (writeAnInReg) proc_5 LLR_05: Status Output Packaging • Format Return Payload: DriverStatus proc_4->proc_5 Final Output Data out_sink Output Data Sinks & Status Return • Status Payload (DriverStatus) proc_5->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
analogIn_enableDisableCh Node1 analogIn_enableDisableCh Node1->Node1 Node2 readAnInReg Node1->Node2 Node6 writeAnInReg Node1->Node6 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5 Node6->Node6 Node7 interDrv_Write32 Node6->Node7 Node7->Node4 Node7->Node7 Node8 memoryMap_Write32 Node7->Node8 Node8->Node8
Here is the caller graph for this function:
analogIn_enableDisableCh Node1 analogIn_enableDisableCh Node1->Node1 Node2 modAnalogIn_disableRead Node1->Node2 Node7 modAnalogIn_enableRead Node1->Node7 Node2->Node2 Node3 modAnalogIn_initReset Node2->Node3 Node3->Node3 Node4 modConfig_init Node3->Node4 Node5 modConfig_reset Node3->Node5 Node4->Node4 Node5->Node5 Node6 modConfig_close Node5->Node6 Node6->Node6 Node7->Node7

◆ analogIn_getAdcReading()

DriverStatus analogIn_getAdcReading ( const AnalogInDevHandler analogInDevHdl,
const UInt8 chNum,
Float32 * adcValue )

analogIn_getAdcReading.

Parameters
[in]analogInDevHdlThe analog input device handler.
[in]chNumThe device channel number.
[out]adcValueThe adc reading value.
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Success.
DRV_READ_FAILED: Failed to read from the device or module.
DRV_INVALID_PARAM: The provided address pointer is invalid.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: analogIn_getAdcReading

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_ANALOGIN_ANALOGIN_GETADCREADING_01 HLR_AIN_21627 WHEN the pointer adcValue is NULL (invalid), the analogIn_getAdcReading() function SHALL abort processing and return DRV_INVALID_PARAM. analogIn.c:analogIn_getAdcReading() Test Closed
LLR_ANALOGIN_ANALOGIN_GETADCREADING_02 HLR_AIN_21627 WHEN a driver operation reports a failure status other than DRV_SUCCESS, the analogIn_getAdcReading() function SHALL abort processing and return that driver failure status. analogIn.c:analogIn_getAdcReading() Test Closed
LLR_ANALOGIN_ANALOGIN_GETADCREADING_03 HLR_AIN_21627 WHEN preconditions are satisfied, the analogIn_getAdcReading() function SHALL read the memory map offset list (ADC_RD_BASE_ADDR) at physical offset (0x0200 + (chNum * MMAP_ADC_CH_OFFSET_GAP)) (MMAP_ADC_RD_BASE_ADDR) using readAnInReg(). analogIn.c:analogIn_getAdcReading() Test Closed
LLR_ANALOGIN_ANALOGIN_GETADCREADING_04 HLR_AIN_21627 WHEN all operational processing completes successfully, the analogIn_getAdcReading() function SHALL return DRV_SUCCESS. analogIn.c:analogIn_getAdcReading() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller analogIn_getAdcReading() [Low-Level Device Drivers] Target readAnInReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   analogInDevHdl (Flag) l_t1->l_b1   chNum (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller analogIn_getAdcReading() [Low-Level Device Drivers] Target readAnInReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   analogInDevHdl (Payload) l_t1->l_b1   chNum (Payload) r_b0->r_t0   *adcValue (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_analogIn_getAdcReading start Entry: analogIn_getAdcReading() guard_1 LLR_01: Guard Check Is the pointer `adcValue` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is a driver operation reports a failure status other than DRV_SUCCESS? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `retStatus` guard_2->err_exit_2 YES (TRUE) act_3 LLR_03: Action Step read the memory map offset list (ADC_RD_BASE_ADDR) at physical offset `(0x0200 + (chNum * MMAP_ADC_CH_OFFSET_GAP))` (`MMAP_ADC_RD_BASE_ADDR`) using `readAnInReg()` guard_2->act_3 NO (FALSE) success_exit LLR_04: Final Exit return `DRV_SUCCESS` act_3->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_analogIn_getAdcReading in_store Input Data Sources & Parameters • analogInDevHdl (const AnalogInDevHandler) • chNum (const UInt8) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: adcValue in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: retStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Payload Transformation • Process payload via readAnInReg() proc_2->proc_3 Data Payload (readAnInReg) proc_4 LLR_04: Status Output Packaging • Format Return Payload: DriverStatus proc_3->proc_4 Final Output Data out_sink Output Data Sinks & Status Return • adcValue (Float32) proc_4->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
analogIn_getAdcReading Node1 analogIn_getAdcReading Node1->Node1 Node2 readAnInReg Node1->Node2 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5
Here is the caller graph for this function:
analogIn_getAdcReading Node1 analogIn_getAdcReading Node1->Node1 Node2 modAnalogIn_read Node1->Node2 Node2->Node2

◆ analogIn_getCbit()

DriverStatus analogIn_getCbit ( const AnalogInDevHandler analogInDevHdl,
AnalogInCbitStatus * cbitStatus )

analogIn_getCbit.

analogIn get CBIT status.

Parameters
[in]analogInDevHdlThe analog input device handler.
[out]cbitStatusThe pointer of CBIT status value.
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Success.
DRV_READ_FAILED: Failed to read from the device or module.
DRV_INVALID_PARAM: The provided address pointer is invalid.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: analogIn_getCbit

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_ANALOGIN_ANALOGIN_GETCBIT_01 HLR_AIN_23596 WHEN the pointer cbitStatus is NULL (invalid), the analogIn_getCbit() function SHALL abort processing and return DRV_INVALID_PARAM. analogIn.c:analogIn_getCbit() Test Closed
LLR_ANALOGIN_ANALOGIN_GETCBIT_02 HLR_AIN_23596 WHEN a driver operation reports a failure status other than DRV_SUCCESS, the analogIn_getCbit() function SHALL abort processing and return that driver failure status. analogIn.c:analogIn_getCbit() Test Closed
LLR_ANALOGIN_ANALOGIN_GETCBIT_03 HLR_AIN_23596 WHEN preconditions are satisfied, the analogIn_getCbit() function SHALL read the memory map offset list (ADC_CBIT_GEN_STATUS) at physical offset 0x0110 (MMAP_ADC_CBIT_GEN_STATUS) using readAnInReg(). analogIn.c:analogIn_getCbit() Test Closed
LLR_ANALOGIN_ANALOGIN_GETCBIT_04 HLR_AIN_23596 WHEN preconditions are satisfied, the analogIn_getCbit() function SHALL invoke bitwise routine READ_BIT() to extract target channel status bit from register payload. analogIn.c:analogIn_getCbit() Test Closed
LLR_ANALOGIN_ANALOGIN_GETCBIT_05 HLR_AIN_23596 WHEN all operational processing completes successfully, the analogIn_getCbit() function SHALL return DRV_SUCCESS. analogIn.c:analogIn_getCbit() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller analogIn_getCbit() [Low-Level Device Drivers] Target readAnInReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   analogInDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller analogIn_getCbit() [Low-Level Device Drivers] Target readAnInReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   analogInDevHdl (Payload) r_b0->r_t0   *cbitStatus (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_analogIn_getCbit start Entry: analogIn_getCbit() guard_1 LLR_01: Guard Check Is the pointer `cbitStatus` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is a driver operation reports a failure status other than DRV_SUCCESS? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `retStatus` guard_2->err_exit_2 YES (TRUE) act_3 LLR_03: Action Step read the memory map offset list (ADC_CBIT_GEN_STATUS) at physical offset `0x0110` (`MMAP_ADC_CBIT_GEN_STATUS`) using `readAnInReg()` guard_2->act_3 NO (FALSE) act_4 LLR_04: Action Step invoke bitwise routine `READ_BIT()` to extract target channel status bit from register payload act_3->act_4 success_exit LLR_05: Final Exit return `DRV_SUCCESS` act_4->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_analogIn_getCbit in_store Input Data Sources & Parameters • analogInDevHdl (const AnalogInDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: cbitStatus in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: retStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Payload Transformation • Process payload via readAnInReg() proc_2->proc_3 Data Payload (readAnInReg) proc_4 LLR_04: Data Payload Transformation • Process payload via READ_BIT() proc_3->proc_4 Data Payload (READ_BIT) proc_5 LLR_05: Status Output Packaging • Format Return Payload: DriverStatus proc_4->proc_5 Final Output Data out_sink Output Data Sinks & Status Return • cbitStatus (AnalogInCbitStatus) proc_5->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
analogIn_getCbit Node1 analogIn_getCbit Node1->Node1 Node2 readAnInReg Node1->Node2 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5
Here is the caller graph for this function:
analogIn_getCbit Node1 analogIn_getCbit Node1->Node1 Node2 modHsb_getAnalogInCbit Node1->Node2 Node2->Node2

◆ analogIn_getChannelStatus()

DriverStatus analogIn_getChannelStatus ( const AnalogInDevHandler analogInDevHdl,
const UInt8 chNum,
Bool * status )

analogIn_getChannelStatus.

Parameters
[in]analogInDevHdlThe analog input device handler.
[in]chNumThe device channel number.
[out]statusThe status of the channel.
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Success.
DRV_READ_FAILED: Failed to read from the device or module.
DRV_INVALID_PARAM: The provided address pointer is invalid.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: analogIn_getChannelStatus

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_ANALOGIN_ANALOGIN_GETCHANNELSTATUS_01 HLR_AIN_30827 WHEN the pointer status is NULL (invalid), the analogIn_getChannelStatus() function SHALL abort processing and return DRV_INVALID_PARAM. analogIn.c:analogIn_getChannelStatus() Test Closed
LLR_ANALOGIN_ANALOGIN_GETCHANNELSTATUS_02 HLR_AIN_30827 WHEN the pointer status is valid, the analogIn_getChannelStatus() function SHALL read the ADC channel state register MMAP_ADC_CH_STATE using readAnInReg(). analogIn.c:analogIn_getChannelStatus() Test Closed
LLR_ANALOGIN_ANALOGIN_GETCHANNELSTATUS_03 HLR_AIN_30827 WHEN the register read operation fails (status not equal to DRV_SUCCESS), the analogIn_getChannelStatus() function SHALL abort processing and return that failure status. analogIn.c:analogIn_getChannelStatus() Test Closed
LLR_ANALOGIN_ANALOGIN_GETCHANNELSTATUS_04 HLR_AIN_30827 WHEN bit chNum in register MMAP_ADC_CH_STATE is equal to AIN_CH_ENABLE_STATE, the analogIn_getChannelStatus() function SHALL set *status to TRUE (enabled). analogIn.c:analogIn_getChannelStatus() Test Closed
LLR_ANALOGIN_ANALOGIN_GETCHANNELSTATUS_05 HLR_AIN_30827 WHEN bit chNum in register MMAP_ADC_CH_STATE is not equal to AIN_CH_ENABLE_STATE, the analogIn_getChannelStatus() function SHALL set *status to FALSE (disabled). analogIn.c:analogIn_getChannelStatus() Test Closed
LLR_ANALOGIN_ANALOGIN_GETCHANNELSTATUS_06 HLR_AIN_30827 WHEN all operational processing completes successfully, the analogIn_getChannelStatus() function SHALL return DRV_SUCCESS. analogIn.c:analogIn_getChannelStatus() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller analogIn_getChannelStatus() [Low-Level Device Drivers] Target readAnInReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   analogInDevHdl (Flag) l_t1->l_b1   chNum (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller analogIn_getChannelStatus() [Low-Level Device Drivers] Target readAnInReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   analogInDevHdl (Payload) l_t1->l_b1   chNum (Payload) r_b0->r_t0   *status (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_analogIn_getChannelStatus start Entry: analogIn_getChannelStatus() guard_1 LLR_01: Guard Check Is the pointer `status` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is a driver operation reports a failure status other than DRV_SUCCESS? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `retStatus` guard_2->err_exit_2 YES (TRUE) guard_3 LLR_03: Guard Check Is `AIN_CH_ENABLE_STATE` is equal to `READ_BIT`(regValue, chNum)? guard_2->guard_3 err_exit_3 LLR_03 Error Exit execute conditional operational branch guard_3->err_exit_3 YES (TRUE) act_4 LLR_04: Action Step read the memory map offset list (ADC_CH_STATE) at physical offset `0x0100` (`MMAP_ADC_CH_STATE`) using `readAnInReg()` guard_3->act_4 NO (FALSE) success_exit LLR_05: Final Exit return `DRV_SUCCESS` act_4->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_analogIn_getChannelStatus in_store Input Data Sources & Parameters • analogInDevHdl (const AnalogInDevHandler) • chNum (const UInt8) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: status in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: retStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Validation Check • Evaluate Parameter / State: AIN_CH_ENABLE_STATE proc_2->proc_3 Validated Input Data proc_4 LLR_04: Data Payload Transformation • Process payload via readAnInReg() proc_3->proc_4 Data Payload (readAnInReg) proc_5 LLR_05: Status Output Packaging • Format Return Payload: DriverStatus proc_4->proc_5 Final Output Data out_sink Output Data Sinks & Status Return • status (Bool) proc_5->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
analogIn_getChannelStatus Node1 analogIn_getChannelStatus Node1->Node1 Node2 readAnInReg Node1->Node2 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5
Here is the caller graph for this function:
analogIn_getChannelStatus Node1 analogIn_getChannelStatus Node1->Node1 Node2 modAnalogIn_disableRead Node1->Node2 Node7 modAnalogIn_enableRead Node1->Node7 Node8 modAnalogIn_read Node1->Node8 Node2->Node2 Node3 modAnalogIn_initReset Node2->Node3 Node3->Node3 Node4 modConfig_init Node3->Node4 Node5 modConfig_reset Node3->Node5 Node4->Node4 Node5->Node5 Node6 modConfig_close Node5->Node6 Node6->Node6 Node7->Node7 Node8->Node8

◆ analogIn_getInputRange()

DriverStatus analogIn_getInputRange ( const AnalogInDevHandler analogInDevHdl,
const UInt8 bank,
UInt32 * range )

analogIn_getInputRange.

Parameters
[in]analogInDevHdlThe analog input device handler.
[in]bankThe device bank.
[out]rangeThe range data value.
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Success.
DRV_READ_FAILED: Failed to read from the device or module.
DRV_INVALID_PARAM: The provided address pointer is invalid.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: analogIn_getInputRange

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_ANALOGIN_ANALOGIN_GETINPUTRANGE_01 HLR_AIN_21627 WHEN the pointer range is NULL (invalid), the analogIn_getInputRange() function SHALL abort processing and return DRV_INVALID_PARAM. analogIn.c:analogIn_getInputRange() Test Closed
LLR_ANALOGIN_ANALOGIN_GETINPUTRANGE_02 HLR_AIN_21627 WHEN a driver operation reports a failure status other than DRV_SUCCESS, the analogIn_getInputRange() function SHALL abort processing and return that driver failure status. analogIn.c:analogIn_getInputRange() Test Closed
LLR_ANALOGIN_ANALOGIN_GETINPUTRANGE_03 HLR_AIN_21627 WHEN preconditions are satisfied, the analogIn_getInputRange() function SHALL read the memory map offset list (ADC_IN_RG_BANK_BASE) at physical offset (0x0000 + (bank * MMAP_ADC_CH_OFFSET_GAP)) (MMAP_ADC_IN_RG_BANK_BASE) using readAnInReg(). analogIn.c:analogIn_getInputRange() Test Closed
LLR_ANALOGIN_ANALOGIN_GETINPUTRANGE_04 HLR_AIN_21627 WHEN all operational processing completes successfully, the analogIn_getInputRange() function SHALL return DRV_SUCCESS. analogIn.c:analogIn_getInputRange() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller analogIn_getInputRange() [Low-Level Device Drivers] Target readAnInReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   analogInDevHdl (Flag) l_t1->l_b1   bank (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller analogIn_getInputRange() [Low-Level Device Drivers] Target readAnInReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   analogInDevHdl (Payload) l_t1->l_b1   bank (Payload) r_b0->r_t0   *range (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_analogIn_getInputRange start Entry: analogIn_getInputRange() guard_1 LLR_01: Guard Check Is the pointer `range` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is a driver operation reports a failure status other than DRV_SUCCESS? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `retStatus` guard_2->err_exit_2 YES (TRUE) act_3 LLR_03: Action Step read the memory map offset list (ADC_IN_RG_BANK_BASE) at physical offset `(0x0000 + (bank * MMAP_ADC_CH_OFFSET_GAP))` (`MMAP_ADC_IN_RG_BANK_BASE`) using `readAnInReg()` guard_2->act_3 NO (FALSE) success_exit LLR_04: Final Exit return `DRV_SUCCESS` act_3->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_analogIn_getInputRange in_store Input Data Sources & Parameters • analogInDevHdl (const AnalogInDevHandler) • bank (const UInt8) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: range in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: retStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Payload Transformation • Process payload via readAnInReg() proc_2->proc_3 Data Payload (readAnInReg) proc_4 LLR_04: Status Output Packaging • Format Return Payload: DriverStatus proc_3->proc_4 Final Output Data out_sink Output Data Sinks & Status Return • range (UInt32) proc_4->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
analogIn_getInputRange Node1 analogIn_getInputRange Node1->Node1 Node2 readAnInReg Node1->Node2 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5
Here is the caller graph for this function:
analogIn_getInputRange Node1 analogIn_getInputRange Node1->Node1 Node2 modAnalogIn_initReset Node1->Node2 Node2->Node2 Node3 modConfig_init Node2->Node3 Node4 modConfig_reset Node2->Node4 Node3->Node3 Node4->Node4 Node5 modConfig_close Node4->Node5 Node5->Node5

◆ analogIn_getPbit()

DriverStatus analogIn_getPbit ( const AnalogInDevHandler analogInDevHdl,
AnalogInPbitStatus * pbitStatus )

analogIn_getPbit.

analogIn get PBIT status.

Parameters
[in]analogInDevHdlThe analog input device handler.
[out]pbitStatusThe pointer of PBIT status value.
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Success.
DRV_READ_FAILED: Failed to read from the device or module.
DRV_INVALID_PARAM: The provided address pointer is invalid.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: analogIn_getPbit

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_ANALOGIN_ANALOGIN_GETPBIT_01 HLR_AIN_322 WHEN the pointer pbitStatus is NULL (invalid), the analogIn_getPbit() function SHALL abort processing and return DRV_INVALID_PARAM. analogIn.c:analogIn_getPbit() Test Closed
LLR_ANALOGIN_ANALOGIN_GETPBIT_02 HLR_AIN_322 WHEN a driver operation reports a failure status other than DRV_SUCCESS, the analogIn_getPbit() function SHALL abort processing and return that driver failure status. analogIn.c:analogIn_getPbit() Test Closed
LLR_ANALOGIN_ANALOGIN_GETPBIT_03 HLR_AIN_322 WHEN preconditions are satisfied, the analogIn_getPbit() function SHALL read the memory map offset list (ADC_PBIT_GEN_STATUS) at physical offset 0x0104 (MMAP_ADC_PBIT_GEN_STATUS) using readAnInReg(). analogIn.c:analogIn_getPbit() Test Closed
LLR_ANALOGIN_ANALOGIN_GETPBIT_04 HLR_AIN_322 WHEN preconditions are satisfied, the analogIn_getPbit() function SHALL invoke bitwise routine READ_BIT() to extract target channel status bit from register payload. analogIn.c:analogIn_getPbit() Test Closed
LLR_ANALOGIN_ANALOGIN_GETPBIT_05 HLR_AIN_322 WHEN all operational processing completes successfully, the analogIn_getPbit() function SHALL return DRV_SUCCESS. analogIn.c:analogIn_getPbit() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller analogIn_getPbit() [Low-Level Device Drivers] Target readAnInReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   analogInDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller analogIn_getPbit() [Low-Level Device Drivers] Target readAnInReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   analogInDevHdl (Payload) r_b0->r_t0   *pbitStatus (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_analogIn_getPbit start Entry: analogIn_getPbit() guard_1 LLR_01: Guard Check Is the pointer `pbitStatus` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is a driver operation reports a failure status other than DRV_SUCCESS? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `retStatus` guard_2->err_exit_2 YES (TRUE) act_3 LLR_03: Action Step read the memory map offset list (ADC_PBIT_GEN_STATUS) at physical offset `0x0104` (`MMAP_ADC_PBIT_GEN_STATUS`) using `readAnInReg()` guard_2->act_3 NO (FALSE) act_4 LLR_04: Action Step invoke bitwise routine `READ_BIT()` to extract target channel status bit from register payload act_3->act_4 success_exit LLR_05: Final Exit return `DRV_SUCCESS` act_4->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_analogIn_getPbit in_store Input Data Sources & Parameters • analogInDevHdl (const AnalogInDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: pbitStatus in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: retStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Payload Transformation • Process payload via readAnInReg() proc_2->proc_3 Data Payload (readAnInReg) proc_4 LLR_04: Data Payload Transformation • Process payload via READ_BIT() proc_3->proc_4 Data Payload (READ_BIT) proc_5 LLR_05: Status Output Packaging • Format Return Payload: DriverStatus proc_4->proc_5 Final Output Data out_sink Output Data Sinks & Status Return • pbitStatus (AnalogInPbitStatus) proc_5->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
analogIn_getPbit Node1 analogIn_getPbit Node1->Node1 Node2 readAnInReg Node1->Node2 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5
Here is the caller graph for this function:
analogIn_getPbit Node1 analogIn_getPbit Node1->Node1 Node2 modHsb_getAnalogInPbit Node1->Node2 Node2->Node2

◆ analogIn_getTemp()

DriverStatus analogIn_getTemp ( const AnalogInDevHandler analogInDevHdl,
Float32 * temp5v,
Float32 * temp10v )

analogIn_getTemp.

analogIn get temperature value in degree celsius (C).

Parameters
[in]analogInDevHdlThe analog input device handler.
[out]temp5vThe pointer of 5v bank temperature value in degree celsius (C).
[out]temp10vThe pointer of 10v bank temperature value in degree celsius (C).
Returns
DriverStatus - Driver status return code, If no error occurs during the operation of the function, it returns DRV_SUCCESS. Otherwise related error message is returned.
Return values
DRV_SUCCESS: Success.
DRV_READ_FAILED: Failed to read from the device or module.
DRV_INVALID_PARAM: The provided address pointer is invalid.

Low-Level Software Requirements (LLR)

Low-Level Requirement Specification: analogIn_getTemp

Requirement ID Parent HLR ID Detailed Low-Level Requirement Statement (EARS Format) Software Unit Reference Verification Method Status
LLR_ANALOGIN_ANALOGIN_GETTEMP_01 HLR_AIN_31357 WHEN the pointer temp5v is NULL (invalid) or the pointer temp10v is NULL (invalid), the analogIn_getTemp() function SHALL abort processing and return DRV_INVALID_PARAM. analogIn.c:analogIn_getTemp() Test Closed
LLR_ANALOGIN_ANALOGIN_GETTEMP_02 HLR_AIN_31357 WHEN a driver operation reports a failure status other than DRV_SUCCESS, the analogIn_getTemp() function SHALL abort processing and return that driver failure status. analogIn.c:analogIn_getTemp() Test Closed
LLR_ANALOGIN_ANALOGIN_GETTEMP_03 HLR_AIN_31357 WHEN preconditions are satisfied, the analogIn_getTemp() function SHALL read the memory map offset list (ADC_TEMP_5V) at physical offset 0x011C (MMAP_ADC_TEMP_5V) using readAnInReg(). analogIn.c:analogIn_getTemp() Test Closed
LLR_ANALOGIN_ANALOGIN_GETTEMP_04 HLR_AIN_31357 WHEN preconditions are satisfied, the analogIn_getTemp() function SHALL invoke routine 005() to execute target subsystem hardware operation. analogIn.c:analogIn_getTemp() Test Closed
LLR_ANALOGIN_ANALOGIN_GETTEMP_05 HLR_AIN_31357 WHEN all operational processing completes successfully, the analogIn_getTemp() function SHALL return DRV_SUCCESS. analogIn.c:analogIn_getTemp() Test Closed

Control Coupling Diagram (CCD)

ControlCouplingStructureChart Caller analogIn_getTemp() [Low-Level Device Drivers] Target readAnInReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   analogInDevHdl (Flag) r_b0->r_t0   statusCode (DriverStatus)
Control Coupling Structure Chart

Data Coupling Diagram (DCD)

DataCouplingStructureChart Caller analogIn_getTemp() [Low-Level Device Drivers] Target readAnInReg() [Low-Level Driver Helper] Caller:s->Target:n l_t0->l_b0   analogInDevHdl (Payload) r_b0->r_t0   *temp5v (Output Data) r_b1->r_t1   *temp10v (Output Data)
Data Coupling Structure Chart

Control Flow Diagram (CFD)

cfd_analogIn_getTemp start Entry: analogIn_getTemp() guard_1 LLR_01: Guard Check Is the pointer `temp5v` is NULL (invalid) or the pointer `temp10v` is NULL (invalid)? start->guard_1 err_exit_1 LLR_01 Error Exit abort processing and return `DRV_INVALID_PARAM` guard_1->err_exit_1 YES (TRUE) guard_2 LLR_02: Guard Check Is a driver operation reports a failure status other than DRV_SUCCESS? guard_1->guard_2 err_exit_2 LLR_02 Error Exit abort processing and return `retStatus` guard_2->err_exit_2 YES (TRUE) act_3 LLR_03: Action Step read the memory map offset list (ADC_TEMP_5V) at physical offset `0x011C` (`MMAP_ADC_TEMP_5V`) using `readAnInReg()` guard_2->act_3 NO (FALSE) act_4 LLR_04: Action Step invoke routine `005()` to execute target subsystem hardware operation act_3->act_4 success_exit LLR_05: Final Exit return `DRV_SUCCESS` act_4->success_exit
Control Flow Diagram

Data Flow Diagram (DFD)

dfd_analogIn_getTemp in_store Input Data Sources & Parameters • analogInDevHdl (const AnalogInDevHandler) proc_1 LLR_01: Data Validation Check • Evaluate Parameter / State: temp5v in_store->proc_1 Validated Input Data proc_2 LLR_02: Data Validation Check • Evaluate Parameter / State: retStatus proc_1->proc_2 Validated Input Data proc_3 LLR_03: Data Payload Transformation • Process payload via readAnInReg() proc_2->proc_3 Data Payload (readAnInReg) proc_4 LLR_04: Data Payload Transformation • Process payload via 005() proc_3->proc_4 Data Payload (005) proc_5 LLR_05: Status Output Packaging • Format Return Payload: DriverStatus proc_4->proc_5 Final Output Data out_sink Output Data Sinks & Status Return • temp5v (Float32) • temp10v (Float32) proc_5->out_sink Output Data & Status Code
Data Flow Diagram
Here is the call graph for this function:
analogIn_getTemp Node1 analogIn_getTemp Node1->Node1 Node2 readAnInReg Node1->Node2 Node2->Node2 Node3 interDrv_Read32 Node2->Node3 Node3->Node3 Node4 interDrv_isAddressValid Node3->Node4 Node5 memoryMap_Read32 Node3->Node5 Node4->Node4 Node5->Node5
Here is the caller graph for this function:
analogIn_getTemp Node1 analogIn_getTemp Node1->Node1 Node2 modHsb_getAnalogInCbit Node1->Node2 Node2->Node2