//Higher level left to client application.
-#include "platform.h"
+
#include "command.h"
#include <signal.h>
#include "spi.h"
+#define SPIAPPLICATION
+
+#include "platform.h"
+
//! Handles a monitor command.
void spi_handle_fn( uint8_t const app,
uint8_t const verb,
//! Set up the pins for SPI mode.
void spisetup(){
SETSS;
- P5DIR|=MOSI+SCK+BIT0; //BIT0 might be SS
- P5DIR&=~MISO;
+ SPIDIR|=MOSI+SCK+BIT0; //BIT0 might be SS
+ SPIDIR&=~MISO;
DIRSS;
//Begin a new transaction.
CLRSS;
SETSS;
-
}
SETSS; //Raise !SS to end transaction.
while(spiflash_status()&0x01)//while busy
- PLEDOUT^=PLEDPIN;
- PLEDOUT&=~PLEDPIN;
+ led_toggle();
+ led_off();
txdata(app,verb,0);
break;