aboutsummaryrefslogtreecommitdiff
path: root/Demos
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2009-08-23 08:37:11 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2009-08-23 08:37:11 +0000
commit08f03f37b3ae405c36761ccf232096c6a30ee0a1 (patch)
tree17311a066348fa23088257d51a95354bdb152885 /Demos
parentdc24abd57cdef40700ac69019dfd7cfd29709de5 (diff)
Fixed AVRISP programmer demo -- can now connect to a target and read/write Sig/Lock/Fuse/OSCCAL bytes successfully.
Changed SPI_Init() to allow for the clock polarity and data sample modes to be set. Changed Dataflash_Init() to no longer call SPI_Init() automatically. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@757 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos')
-rw-r--r--Demos/Device/ClassDriver/MassStorage/MassStorage.c3
-rw-r--r--Demos/Device/LowLevel/MassStorage/MassStorage.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/Demos/Device/ClassDriver/MassStorage/MassStorage.c b/Demos/Device/ClassDriver/MassStorage/MassStorage.c
index 52ed2d93..4092680c 100644
--- a/Demos/Device/ClassDriver/MassStorage/MassStorage.c
+++ b/Demos/Device/ClassDriver/MassStorage/MassStorage.c
@@ -84,7 +84,8 @@ void SetupHardware(void)
/* Hardware Initialization */
LEDs_Init();
- Dataflash_Init(SPI_SPEED_FCPU_DIV_2);
+ SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_SCK_LEAD_FALLING | SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
+ Dataflash_Init();
USB_Init();
/* Clear Dataflash sector protections, if enabled */
diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.c b/Demos/Device/LowLevel/MassStorage/MassStorage.c
index 1a2d8d46..cf276fd8 100644
--- a/Demos/Device/LowLevel/MassStorage/MassStorage.c
+++ b/Demos/Device/LowLevel/MassStorage/MassStorage.c
@@ -75,7 +75,8 @@ void SetupHardware(void)
/* Hardware Initialization */
LEDs_Init();
- Dataflash_Init(SPI_SPEED_FCPU_DIV_2);
+ SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_SCK_LEAD_FALLING | SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
+ Dataflash_Init();
USB_Init();
/* Clear Dataflash sector protections, if enabled */