-
Notifications
You must be signed in to change notification settings - Fork 0
MiP_EEPROM
Manages access to MiP's EEPROM for reading and writing.
Signature: constexpr uint8_t MIP_CMD_SET_USER_DATA
MiP protocol command bytes used by the EEPROM subsystem.
Details:
These values are placed in the first byte of requests sent to the MiP (and appear in the corresponding responses). See the official MiP BLE Protocol for the complete list.
Signature: constexpr uint8_t MIP_CMD_GET_USER_DATA
Signature: constexpr uint8_t BASE_EEPROM_ADDRESS
The EEPROM boundaries. Attempts to write outside these addresses will fail.
Signature: constexpr uint8_t LAST_EEPROM_ADDRESS
Signature: MiP_EEPROM(MiP &mip)
Constructs the EEPROM manager.
Parameters:
| Parameter | Description |
|---|---|
mip |
A reference to the main MiP object to access core services. |
Signature: uint8_t read(uint8_t addressOffset)
Reads a byte from the MiP's user EEPROM area.
Details:
Performs a verified read with retries on communication errors.
Parameters:
| Parameter | Description |
|---|---|
addressOffset |
Offset from BASE_EEPROM_ADDRESS (0-15). |
Returns: The stored byte value, or 0 on error.
Signature: void write(uint8_t addressOffset, uint8_t userData)
Writes a byte to the MiP's user EEPROM area and verifies it.
Details:
This function performs a verified write: it sends the data, reads it back, and retries (up to MIP_MAX_RETRIES) if the value doesn't match or an error occurs.
Parameters:
| Parameter | Description |
|---|---|
addressOffset |
Offset from BASE_EEPROM_ADDRESS (0-15). |
userData |
Byte value to store (0-255). |
- MiP
- MiPChestLED
- MiPClapSettings
- MiPDebug
- MiPHardwareInfo
- MiPHeadLEDs
- MiPIRDongleCode
- MiPSoftwareVersion
- MiPStatus
- MiP_Battery
- MiP_ChestLED
- MiP_Clap
- MiP_EEPROM
- MiP_Gesture
- MiP_HeadLEDs
- MiP_Infrared
- MiP_Mode
- MiP_Motion
- MiP_Odometer
- MiP_Position
- MiP_Radar
- MiP_Serial
- MiP_Shake
- MiP_Sound
- MiP_Version
- MiP_Weight
- MiP_WiFi