![]() |
AMS Advanced Air Mobility Sensors UG
|
The class implements the BMP384 Driver. The driver adjusts the sensor BMP384. More...
Classes | |
| struct | SFloatParams |
| Structure of BMP384 compensation trim parameters. More... | |
| struct | SParams |
| Integer pressure compensation parameters read from the NVM of BMP384. More... | |
Public Member Functions | |
| void | Init () override |
| bool | IsInitialized () override |
| void | PollSensor (uint64_t uTimestamp) |
| Poll the BMP384 sensor. | |
| void | PollSensor () |
| A function overload that generates a timestamp without a data-ready interrupt. | |
Public Member Functions inherited from CSoftwareComponent< CBmp384Driver, 1U > | |
| CSoftwareComponent (CSoftwareComponent &)=delete | |
| CSoftwareComponent (CSoftwareComponent &&)=delete | |
| CSoftwareComponent & | operator= (const CSoftwareComponent &orOther)=delete |
| CSoftwareComponent & | operator= (CSoftwareComponent &&orOther)=delete |
| virtual void | Init ()=0 |
| virtual bool | IsInitialized ()=0 |
Private Types | |
| enum class | EOversampling { eSkip = 0x00 , eX2 = 0x01 , eX4 = 0x02 , eX8 = 0x03 , eX16 = 0x04 , eX32 = 0x05 } |
| An enum of bit fields with redundant sampling in the control and measurement register. More... | |
| enum class | EIirFilter { eOff = 0x00 , e1 = 0x01 , e3 = 0x02 , e7 = 0x03 , e15 = 0x04 , e31 = 0x05 , e63 = 0x06 , e127 = 0x07 } |
| An enum of the bit fields of the infinite Impulse response (IIR) filter in the configuration register. More... | |
| enum class | ETimeStandby { e5MS = 0x00 , e10MS = 0x01 , e20MS = 0x02 , e40MS = 0x03 , e80MS = 0x04 , e160MS = 0x05 , e320MS = 0x06 , e640MS = 0x07 , e1280MS = 0x08 , e2560MS = 0x09 , e5120MS = 0x0A , e10240MS = 0x0B , e20480MS = 0x0C , e40960MS = 0x0D , e81920MS = 0x0E , e163840MS = 0x0F , e327680MS = 0x10 , e655360MS = 0x11 } |
| An enum of the waiting time bit fields in the output data rate register (ODR) More... | |
| enum class | EMode { eSleep , eForce , eNormal } |
| An enum of operated power modes. More... | |
Private Member Functions | |
| CBmp384Driver (CBmp384Driver &)=delete | |
| CBmp384Driver (CBmp384Driver &&)=delete | |
| CBmp384Driver & | operator= (const CBmp384Driver &orOther)=delete |
| CBmp384Driver & | operator= (CBmp384Driver &&orOther)=delete |
| CBmp384Driver ()=default | |
| ~CBmp384Driver ()=default | |
| bool | getChipID (uint8_t &urChipId) |
| Get the Chip ID value. | |
| bool | getTrimParam () |
| Get the Trim Parameters structure. | |
| bool | getTemperatureAndPressure (float &frTemperature, float &frPressure) |
| Get the Temperature And Pressure values. | |
| bool | setSoftReset () |
| Request soft reset. | |
| bool | enableInterrupt () |
| Configure interrupts. | |
| bool | setPowerMode (EMode eMode) |
| Set the Power Mode. | |
| bool | setFilter (EIirFilter eFilterType) |
| Set the Filter value. | |
| bool | setTimeStandby (ETimeStandby eTimeStandby) |
| Set the Time Standby. | |
| bool | setPresOversampling (EOversampling ePresOversampling) |
| Set the Pressure Oversampling value. | |
| bool | setTempOversampling (EOversampling eTempOversampling) |
| Set the Temperature oversampling value. | |
| bool | setOversamplingRegister (EOversampling ePresOversampling, EOversampling eTempOversamping) |
| Set the Oversampling Register value. | |
| bool | isReadyRead () |
| Is the data ready to be read. | |
| bool | readFromAddress (uint8_t *upBuffer, uint8_t uReadAddr, uint16_t uNumByteToRead) |
| Read from address via SPI. | |
| bool | writeToAddress (uint8_t uWriteAddr, uint8_t uVal) |
| Write to address via SPI. | |
| float | compensateTemperature (float fUncompensatedTemperature) |
| Compensate temperature value. | |
| float | compensatePressure (float fUncompensatedPressure, float fCompensatedTemperature) |
| Compensate pressure value. | |
| void | setCsOn () |
| Set the chip select pin is On. | |
| void | setCsOff () |
| Set the chip select pin is Off. | |
Static Private Member Functions | |
| static CBmp384Driver & | getInstanceImpl (unsigned uInstanceIndex) |
Private Attributes | |
| SFloatParams | oFloatParams_ |
| Float point compensation trim parameters. | |
| SParams | oParams_ |
| Compensation trim parameters (coefficients) | |
| bool | bIsInitialized_ { false } |
| Sensor status after initialization. | |
Friends | |
| class | CSoftwareComponent< CBmp384Driver, 1U > |
Additional Inherited Members | |
Static Public Member Functions inherited from CSoftwareComponent< CBmp384Driver, 1U > | |
| static CBmp384Driver & | GetInstance (unsigned uInstanceIndex=0U) |
Static Public Attributes inherited from CSoftwareComponent< CBmp384Driver, 1U > | |
| static constexpr unsigned | skuInstanceCount_ |
Protected Member Functions inherited from CSoftwareComponent< CBmp384Driver, 1U > | |
| CSoftwareComponent ()=default | |
| ~CSoftwareComponent ()=default | |
The class implements the BMP384 Driver. The driver adjusts the sensor BMP384.
|
strongprivate |
|
strongprivate |
|
strongprivate |
|
strongprivate |
An enum of the waiting time bit fields in the output data rate register (ODR)
|
privatedelete |
|
privatedelete |
|
privatedefault |
|
privatedefault |
|
private |
Compensate pressure value.
| fUncompensatedPressure | Pressure value |
| fCompensatedTemperature | Temperature value (after compensation) |
|
private |
Compensate temperature value.
| fUncompensatedTemperature | Temperature value |
|
private |
Configure interrupts.
|
private |
Get the Chip ID value.
| urChipId | Reference to the chip ID to be filled |
|
staticprivate |
|
private |
Get the Temperature And Pressure values.
| frTemperature | reference to the temperature variable |
| frPressure | reference to the pressure variable |
|
private |
Get the Trim Parameters structure.
|
overridevirtual |
Initialize the software component.
Implements CSoftwareComponent< CBmp384Driver, 1U >.
|
overridevirtual |
Get initialization status of the software component.
Implements CSoftwareComponent< CBmp384Driver, 1U >.
|
private |
Is the data ready to be read.
|
privatedelete |
|
privatedelete |
| void CBmp384Driver::PollSensor | ( | ) |
A function overload that generates a timestamp without a data-ready interrupt.
| void CBmp384Driver::PollSensor | ( | uint64_t | uTimestamp | ) |
Poll the BMP384 sensor.
| uTimestamp | Timestamp of the measurement generated by data-ready interrupt handler. |
|
private |
Read from address via SPI.
| upBuffer | Buffer for record |
| uReadAddr | Register address |
| uNumByteToRead | Number of bytes to read |
|
private |
Set the chip select pin is Off.
|
private |
Set the chip select pin is On.
|
private |
Set the Filter value.
| eFilterType | Filter value |
|
private |
Set the Oversampling Register value.
| ePresOversampling | Pressure over sampling value |
| eTempOversamping | Temperature over sampling value |
|
private |
Set the Power Mode.
| eMode | power mode |
|
private |
Set the Pressure Oversampling value.
| ePresOversampling | Pressure Oversampling value |
|
private |
Request soft reset.
|
private |
Set the Temperature oversampling value.
| eTempOversampling | Temperature oversampling value |
|
private |
Set the Time Standby.
| eTimeStandby | Time Standby |
|
private |
Write to address via SPI.
| uWriteAddr | Register address |
| uVal | The resulting value |
|
friend |
|
private |
Sensor status after initialization.
|
private |
Float point compensation trim parameters.
|
private |
Compensation trim parameters (coefficients)