On this page
article
peary::board::carboard::EEPROM
peary::board::carboard::EEPROM
EEPROM resource for CaR board.
#include <peary/hardware/boards/Carboard.hpp>
Inherits from peary::hal::E2Writer, peary::hal::E2Reader, peary::hal::Resource
Public Functions
| Name | |
|---|---|
| EEPROM(component::EEPROM24LC32A & eeprom)Constructor for EEPROM class. | |
| virtual void | write(uint16_t address, int value) overrideWrite a byte to a specific address in the EEPROM. |
| virtual uint8_t | read(uint16_t address) overrideRead a byte from a specific address in the EEPROM. |
| int | getBoardID()Get the board ID from the EEPROM. |
Additional inherited members
Public Functions inherited from peary::hal::Resource
| Name | |
|---|---|
| virtual | ~Resource() =defaultDefault constructor. |
| void | setName(const std::string & name)Set the name of the resource. |
| std::string | name() constGet the name of the resource. |
Protected Attributes inherited from peary::hal::Resource
| Name | |
|---|---|
| std::string | _name |
Public Functions Documentation
function EEPROM
inline EEPROM(
component::EEPROM24LC32A & eeprom
)
Constructor for EEPROM class.
Parameters:
- eeprom Reference to the EEPROM24LC32A component
function write
inline virtual void write(
uint16_t address,
int value
) override
Write a byte to a specific address in the EEPROM.
Parameters:
- address The address in the EEPROM to write to
- value The byte value to write
Reimplements: peary::hal::E2Writer::write
function read
inline virtual uint8_t read(
uint16_t address
) override
Read a byte from a specific address in the EEPROM.
Parameters:
- address The address in the EEPROM to read from
Return: The byte value read from the specified address
Reimplements: peary::hal::E2Reader::read
function getBoardID
inline int getBoardID()
Get the board ID from the EEPROM.
Return: The board ID
Updated on 2025-11-14 at 11:31:23 +0100