projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A major refactor of the GoodFET firmware build system and apps to give better
[goodfet]
/
firmware
/
include
/
spi.h
diff --git
a/firmware/include/spi.h
b/firmware/include/spi.h
index
590db0e
..
dfbb28a
100644
(file)
--- a/
firmware/include/spi.h
+++ b/
firmware/include/spi.h
@@
-3,6
+3,12
@@
\brief Definitions for the SPI application.
*/
\brief Definitions for the SPI application.
*/
+#ifndef SPI_H
+#define SPI_H
+
+#include "app.h"
+
+#define SPI 0x01
//Pins and I/O
//#define SS BIT0
//Pins and I/O
//#define SS BIT0
@@
-21,7
+27,6
@@
#define SETRST P2OUT|=RST
#define CLRRST P2OUT&=~RST
#define SETRST P2OUT|=RST
#define CLRRST P2OUT&=~RST
-
//! Set up the pins for SPI mode.
void spisetup();
//! Set up the pins for SPI mode.
void spisetup();
@@
-49,3
+54,7
@@
unsigned char spitrans8(unsigned char byte);
unsigned char spiflash_status();
//! Erase a sector.
void spiflash_erasesector(unsigned long adr);
unsigned char spiflash_status();
//! Erase a sector.
void spiflash_erasesector(unsigned long adr);
+
+extern app_t const spi_app;
+
+#endif