aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-08-23 08:37:11 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-08-23 08:37:11 +0000
commitf229502d9addacfbefe955a47931b980bfbb1a10 (patch)
tree17311a066348fa23088257d51a95354bdb152885 /Demos/Device
parent1e8df8951a3335e4b45ad0c25a82df3d90d785f3 (diff)
downloadlufa-f229502d9addacfbefe955a47931b980bfbb1a10.tar.gz
lufa-f229502d9addacfbefe955a47931b980bfbb1a10.tar.bz2
lufa-f229502d9addacfbefe955a47931b980bfbb1a10.zip
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.
Diffstat (limited to 'Demos/Device')
-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 52ed2d938..4092680c4 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 1a2d8d468..cf276fd81 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 */