summaryrefslogtreecommitdiff
path: root/digital/avr/modules/flash/flash_sst.c
diff options
context:
space:
mode:
authorNélio Laranjeiro2010-01-12 23:51:26 +0100
committerNélio Laranjeiro2010-01-12 23:51:26 +0100
commit32ed04c7e1435b8019974ac0671a6896e2786f31 (patch)
treed3e9300a81c32838a938d4b6ec827611f8871b46 /digital/avr/modules/flash/flash_sst.c
parent0f278970130103b1df4a2b308359943520f10987 (diff)
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.
Diffstat (limited to 'digital/avr/modules/flash/flash_sst.c')
-rw-r--r--digital/avr/modules/flash/flash_sst.c37
1 files changed, 37 insertions, 0 deletions
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;
+}