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
#define E25_IN_BUFFER_LEN
Input buffer length.
void eeprom25AA256_event(struct Eeprom25AA256 *eeprom)
Event function.
struct spi_periph * spi_p
spi peripheral
struct spi_transaction spi_trans
spi transaction
void eeprom25AA256_init(struct Eeprom25AA256 *eeprom, struct spi_periph *spi_p, uint8_t slave_idx)
Init function.
volatile uint8_t tx_buf[E25_OUT_BUFFER_LEN]
transmit buffer
volatile uint8_t rx_buf[E25_IN_BUFFER_LEN]
receive buffer
#define E25_OUT_BUFFER_LEN
Output buffer length.
bool data_available
data read flag
void eeprom25AA256_read(struct Eeprom25AA256 *eeprom, uint16_t addr, uint16_t length)
Read function.
uint8_t slave_idx
slave id: SPI_SLAVE0 to SPI_SLAVE4
SPI peripheral structure.
SPI transaction structure.
Architecture independent SPI (Serial Peripheral Interface) API.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.