diff options
| author | Keith Packard <keithp@keithp.com> | 2010-11-01 17:30:49 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2010-11-01 17:30:49 -0700 |
| commit | 3d70461d5860ce8b86ecf900925e2b48f19ce040 (patch) | |
| tree | d206faa62e2b7dccb4610da052e810b846afe009 /src/ao.h | |
| parent | 1557b0049e0b8a7995c54cde8b7a19cce49445a6 (diff) | |
altos: Split out SPI driver. Add Numonyx M25P driver for TT.
For TT (and TM with the companion connector), the SPI bus will be
shared among multiple devices. Split out the existing SPI code into a
common driver, with the SPI bus protected by a mutex.
Add the Numonyx M25Pxx driver to support the flash chips on TT and
newer TM versions. This is not yet integrated into the TM code.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao.h')
| -rw-r--r-- | src/ao.h | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -479,6 +479,24 @@ void ao_ee_init(void); /* + * ao_m25.c + * + * Numonyx M25P family flash driver + */ + +void +ao_flash_erase_sector(uint8_t sector) __reentrant; + +void +ao_flash_write_page(uint16_t page, __xdata uint8_t d[256]) __reentrant; + +void +ao_flash_read_page(uint16_t page, __xdata uint8_t d[256]) __reentrant; + +void +ao_flash_init(void); + +/* * ao_log.c */ @@ -748,6 +766,19 @@ ao_serial_init(void); #endif /* + * ao_spi.c + */ + +void +ao_spi_send(void __xdata *block, uint16_t len) __reentrant; + +void +ao_spi_recv(void __xdata *block, uint16_t len) __reentrant; + +void +ao_spi_init(void); + +/* * ao_gps.c */ |
