aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/Board/AVR8/STK525/Dataflash.h
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Drivers/Board/AVR8/STK525/Dataflash.h')
-rw-r--r--LUFA/Drivers/Board/AVR8/STK525/Dataflash.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/LUFA/Drivers/Board/AVR8/STK525/Dataflash.h b/LUFA/Drivers/Board/AVR8/STK525/Dataflash.h
index 608400c8d..b34907b03 100644
--- a/LUFA/Drivers/Board/AVR8/STK525/Dataflash.h
+++ b/LUFA/Drivers/Board/AVR8/STK525/Dataflash.h
@@ -90,12 +90,14 @@
/* Inline Functions: */
/** Initializes the dataflash driver so that commands and data may be sent to an attached dataflash IC.
- * The microcontroller's SPI driver MUST be initialized before any of the dataflash commands are used.
+ * The appropriate SPI interface will be automatically configured.
*/
static inline void Dataflash_Init(void)
{
DATAFLASH_CHIPCS_DDR |= DATAFLASH_CHIPCS_MASK;
DATAFLASH_CHIPCS_PORT |= DATAFLASH_CHIPCS_MASK;
+
+ SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_ORDER_MSB_FIRST | SPI_SCK_LEAD_FALLING | SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
}
/** Sends a byte to the currently selected dataflash IC, and returns a byte from the dataflash.