foboot/booster/include/spi.h
Sean Cross fb08d194ca foboot: spi: fix spiId and remove dead code
Remove code that doesn't get called.

Also, remove the `spi_id` global.  It conflicted with one from
the linker, which was causing contention.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-24 20:08:24 +08:00

20 lines
491 B
C

#ifndef _FOBOOST_SPI_H
#define _FOBOOST_SPI_H
#include <stdint.h>
#define SPI_ERASE_SECTOR_SIZE 4096
#define SPI_PROGRAM_PAGE_SIZE 256
uint8_t spiCommandRx(void);
uint8_t spiReadStatus(void);
void spiBeginErase4(uint32_t erase_addr);
void spiBeginErase32(uint32_t erase_addr);
void spiBeginErase64(uint32_t erase_addr);
int spiIsBusy(void);
void spiBeginWrite(uint32_t addr, const void *v_data, unsigned int count);
uint32_t spiId(void);
void spiReset(void);
#endif /* _FOBOOST_SPI_H */