#ifndef EEPROM_H_
#define EEPROM_H_

#include "spi.h"

#define EEPROM_SPI_FREQ_HZ  (2000000)
#define EEPROM_RESPONSE_ATTEMPTS 10

uint16_t EEPROM_read_status(sensor_axis_e axis, sensor_board_e board);
void EEPROM_write_enable (sensor_axis_e axis, sensor_board_e board);
void EEPROM_write_status (sensor_axis_e axis, sensor_board_e board, uint8_t data);
void EEPROM_write_data (sensor_axis_e axis, sensor_board_e board, uint16_t address, uint8_t data);
uint8_t EEPROM_read_data (sensor_axis_e axis, sensor_board_e board, uint16_t address);
void EEPROM_init_spi(void);

#endif /* EEPROM_H_ */