![]() |
AMS Advanced Air Mobility Sensors UG
|
Public Member Functions | |
| void | Init () override |
| bool | IsInitialized () override |
| void | PollSensor (uint64_t uTimestamp) |
| Poll the MMC5983 sensor. | |
| void | PollSensor () |
| A function overload that generates a timestamp without a data-ready interrupt. | |
| Public Member Functions inherited from CSoftwareComponent< CMmc5983Driver, 1U > | |
| CSoftwareComponent (CSoftwareComponent &)=delete | |
| CSoftwareComponent & | operator= (const CSoftwareComponent &orOther)=delete |
Private Types | |
| enum class | EMeasurementMode { eSkip = 0x00 , e1Hz = 0x01 , e10Hz = 0x02 , e20Hz = 0x03 , e50Hz = 0x04 , e100Hz = 0x05 , e200Hz = 0x06 , e1000Hz = 0x07 } |
| An enum of measurement mode. More... | |
| enum class | EBandwidth { e100Hz = 0x00 , e200Hz = 0x01 , e400Hz = 0x02 , e800Hz = 0x03 } |
| An enum of bandwidth filter. More... | |
Private Member Functions | |
| CMmc5983Driver (CMmc5983Driver &)=delete | |
| CMmc5983Driver (CMmc5983Driver &&)=delete | |
| CMmc5983Driver & | operator= (const CMmc5983Driver &orOther)=delete |
| CMmc5983Driver & | operator= (CMmc5983Driver &&orOther)=delete |
| CMmc5983Driver ()=default | |
| ~CMmc5983Driver ()=default | |
| void | setSoftReset () |
| Full sensor reset. | |
| void | setBitSet () |
| Request SET function inductor coil integrated into chip See sensor datasheet for more information. | |
| void | setBitReset () |
| Request RESET function inductor coil integrated into chip See sensor datasheet for more information. | |
| void | setContinuousModeFrequency (EMeasurementMode eMeasurementMode) |
| Set the Measurement Mode value and enable continuous mode. | |
| void | setFilterBandwidth (EBandwidth eBandwidth) |
| Set the Filter Bandwidth value. | |
| void | setAutoSetReset () |
| Enable auto Set/Reset mode. | |
| void | getMeasurementXYZ (float &frValueX, float &frValueY, float &frValueZ) |
| Get measured magnetic field vector. | |
| float | getTemperature () |
| Get the Temperature value. | |
| uint8_t | getProductID () |
| Get the Product ID value. | |
| uint8_t | getStatusRegValue () |
| Is the data ready to be read. | |
| void | readFromAddress (uint8_t *upBuffer, uint8_t uReadAddr, uint16_t uNumByteToRead) |
| Read from address via SPI. | |
| void | writeToAddress (uint8_t uWriteAddr, uint8_t uVal) |
| Write to address via SPI. | |
| void | setCsOn () |
| Set the chip select pin is On. | |
| void | setCsOff () |
| Set the chip select pin is Off. | |
| uint8_t | spiWriteRead (uint8_t uByte) |
| Read/Write via SPI. | |
Static Private Member Functions | |
| static CMmc5983Driver & | getInstanceImpl (unsigned uInstanceIndex) |
Private Attributes | |
| uint8_t | uSensorStatus_ = 0 |
| Sensor status after initialization. | |
Static Private Attributes | |
| static constexpr uint32_t | skuReadWriteTimeoutSpi_ {2U} |
| static constexpr uint32_t | skuReadWriteTimeoutI2c_ {3U} |
Friends | |
| class | CSoftwareComponent< CMmc5983Driver, 1U > |
Additional Inherited Members | |
| Static Public Member Functions inherited from CSoftwareComponent< CMmc5983Driver, 1U > | |
| static CMmc5983Driver & | GetInstance (unsigned uInstanceIndex=0U) |
| Static Public Attributes inherited from CSoftwareComponent< CMmc5983Driver, 1U > | |
| static constexpr unsigned | skuInstanceCount_ |
| Protected Member Functions inherited from CSoftwareComponent< CMmc5983Driver, 1U > | |
| ~CSoftwareComponent ()=default | |
|
strongprivate |
|
strongprivate |
|
privatedelete |
|
privatedelete |
|
privatedefault |
|
privatedefault |
|
staticprivate |
|
private |
Get measured magnetic field vector.
| frValueX | reference to the value X variable |
| frValueY | reference to the value Y variable |
| frValueZ | reference to the value Z variable |
|
private |
Get the Product ID value.
|
private |
Is the data ready to be read.
|
private |
Get the Temperature value.
|
overridevirtual |
Initialize the software component.
Implements CSoftwareComponent< CMmc5983Driver, 1U >.
|
overridevirtual |
Get initialization status of the software component.
Implements CSoftwareComponent< CMmc5983Driver, 1U >.
|
privatedelete |
|
privatedelete |
| void CMmc5983Driver::PollSensor | ( | ) |
A function overload that generates a timestamp without a data-ready interrupt.
| void CMmc5983Driver::PollSensor | ( | uint64_t | uTimestamp | ) |
Poll the MMC5983 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 |
Enable auto Set/Reset mode.
|
private |
Request RESET function inductor coil integrated into chip See sensor datasheet for more information.
|
private |
Request SET function inductor coil integrated into chip See sensor datasheet for more information.
|
private |
Set the Measurement Mode value and enable continuous mode.
| eMeasurementMode | Mode value |
|
private |
Set the chip select pin is Off.
|
private |
Set the chip select pin is On.
|
private |
Set the Filter Bandwidth value.
| eBandwidth | filter value |
|
private |
Full sensor reset.
|
private |
Read/Write via SPI.
| uByte | Register add or dummy byte |
|
private |
Write to address via SPI.
| uWriteAddr | Register address |
| uVal | The resulting value |
|
friend |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
private |
Sensor status after initialization.