31 #ifndef EEPROM25AA256_H
32 #define EEPROM25AA256_H
42 #ifndef E25_IN_BUFFER_LEN
43 #define E25_IN_BUFFER_LEN (1024 + 3)
51 #ifndef E25_OUT_BUFFER_LEN
52 #define E25_OUT_BUFFER_LEN 3
87 #endif // EEPROM25AA256_H
struct spi_transaction spi_trans
spi transaction
void eeprom25AA256_event(struct Eeprom25AA256 *eeprom)
Event function.
SPI transaction structure.
void eeprom25AA256_read(struct Eeprom25AA256 *eeprom, uint16_t addr, uint16_t length)
Read function.
struct spi_periph * spi_p
spi peripheral
bool data_available
data read flag
#define E25_OUT_BUFFER_LEN
Output buffer length.
Architecture independent SPI (Serial Peripheral Interface) API.
SPI peripheral structure.
#define E25_IN_BUFFER_LEN
Input buffer length.
volatile uint8_t rx_buf[E25_IN_BUFFER_LEN]
receive buffer
volatile uint8_t tx_buf[E25_OUT_BUFFER_LEN]
transmit buffer
uint8_t slave_idx
slave id: SPI_SLAVE0 to SPI_SLAVE4
void eeprom25AA256_init(struct Eeprom25AA256 *eeprom, struct spi_periph *spi_p, uint8_t slave_idx)
Init function.