2 \author Travis Goodspeed
3 \brief Definitions for the SPI application.
13 #define SETMOSI P5OUT|=MOSI
14 #define CLRMOSI P5OUT&=~MOSI
15 #define SETCLK P5OUT|=SCK
16 #define CLRCLK P5OUT&=~SCK
17 #define READMISO (P5IN&MISO?1:0)
19 //! Set up the pins for SPI mode.
22 //! Read and write an SPI byte.
23 unsigned char spitrans8(unsigned char byte);
25 //! Read a block to a buffer.
26 void spiflash_peekblock(unsigned long adr,
31 //! Write many blocks to the SPI Flash.
32 void spiflash_pokeblocks(unsigned long adr,
37 //! Enable SPI writing
38 void spiflash_wrten();
40 //! Read and write an SPI byte.
41 unsigned char spitrans8(unsigned char byte);
42 //! Grab the SPI flash status byte.
43 unsigned char spiflash_status();
45 void spiflash_erasesector(unsigned long adr);