From 32ed04c7e1435b8019974ac0671a6896e2786f31 Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Tue, 12 Jan 2010 23:51:26 +0100 Subject: digital/avr/modules/flash: flash sst driver Modify flash source code to initialise the SPI interface and detect the flash type using JDEC. Once the JDEC is read the flash driver initialise functions pointers to pilot the flash memory. The final objective is to have several flash support. --- digital/avr/modules/flash/flash_sst.c | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 digital/avr/modules/flash/flash_sst.c (limited to 'digital/avr/modules/flash/flash_sst.c') diff --git a/digital/avr/modules/flash/flash_sst.c b/digital/avr/modules/flash/flash_sst.c new file mode 100644 index 00000000..aac0867f --- /dev/null +++ b/digital/avr/modules/flash/flash_sst.c @@ -0,0 +1,37 @@ +/* flash_sst.c */ +/* avr.flash - AVR Flash SPI use. {{{ + * + * Copyright (C) 2009 Nelio Laranjeiro + * + * APBTeam: + * Web: http://apbteam.org/ + * Email: team AT apbteam DOT org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * }}} */ +#include "flash_sst.h" + +uint32_t +flash_sst_size (void) +{ + return FLASH_SST_SIZE; +} + +uint32_t +flash_sst_block_size (void) +{ + return FLASH_SST_BLOCK_SIZE; +} -- cgit v1.2.3