#include "24LC02.h"
#include "ADBMS_Abstraction.h"

#include <stdint.h>

uint8_t eeprom_init() {
    uint8_t StartAddr = 0;
    uint8_t data = 0;

    return amsWriteComm(EEPROM_ADDR, StartAddr, data);
}

uint8_t eeprom_write(uint8_t addr, uint8_t data) {
    return amsWriteComm(EEPROM_ADDR, addr, data);
}

uint8_t eeprom_read(uint8_t addr, uint8_t* data) {
    return amsReadComm(EEPROM_ADDR, addr, &data);
}