From 3d70461d5860ce8b86ecf900925e2b48f19ce040 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 1 Nov 2010 17:30:49 -0700 Subject: 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 --- src/ao.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'src/ao.h') diff --git a/src/ao.h b/src/ao.h index a3519150..7750504f 100644 --- a/src/ao.h +++ b/src/ao.h @@ -478,6 +478,24 @@ ao_ee_read_config(uint8_t *buf, uint16_t len) __reentrant; 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 */ @@ -747,6 +765,19 @@ void 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 */ -- cgit v1.2.3