On this page
article
peary::component::EEPROM24LC32A
peary::component::EEPROM24LC32A
EEPROM24LC32A I2C EEPROM Component.
#include <peary/hardware/components/EEPROM24LC32A.hpp>
Inherits from peary::hal::Component< interface::I2CEndpoint >
Public Functions
| Name | |
|---|---|
| EEPROM24LC32A(const std::string & i2c_bus, uint8_t device_address)Constructor for EEPROM24LC32A class. | |
| void | write(uint16_t address, int value)Write a byte to a specific address in the EEPROM. |
| uint8_t | read(uint16_t address)Read a byte from a specific address in the EEPROM. |
Additional inherited members
Public Functions inherited from peary::hal::Component< interface::I2CEndpoint >
| Name | |
|---|---|
| template <typename… Args> requires std::constructible_from< Interface, Args… > | Component(Args &&… args)Constructor which stores argument pack in a functional to generate the interface when accessed. |
| Component() =delete | |
| virtual | ~Component() =default |
| Interface & | interface()Accessor function for the interface. |
Public Functions Documentation
function EEPROM24LC32A
EEPROM24LC32A(
const std::string & i2c_bus,
uint8_t device_address
)
Constructor for EEPROM24LC32A class.
Parameters:
- i2c_bus The I2C bus to which the EEPROM24LC32A is connected
- device_address The I2C address of the EEPROM24LC32A device
function write
void write(
uint16_t address,
int value
)
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
function read
uint8_t read(
uint16_t address
)
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
Updated on 2026-01-30 at 22:01:05 +0100