projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Python test script using pywinusb for the Class Driver Generic HID Device demo...
[pub/USBasp.git]
/
LUFA
/
Drivers
/
Board
/
AVR8
/
STK525
/
Dataflash.h
diff --git
a/LUFA/Drivers/Board/AVR8/STK525/Dataflash.h
b/LUFA/Drivers/Board/AVR8/STK525/Dataflash.h
index
fd64bcf
..
b34907b
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/STK525/Dataflash.h
+++ b/
LUFA/Drivers/Board/AVR8/STK525/Dataflash.h
@@
-1,13
+1,13
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 201
2
.
+ Copyright (C) Dean Camera, 201
3
.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 201
2
Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 201
3
Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
@@
-90,12
+90,14
@@
/* Inline Functions: */
/** Initializes the dataflash driver so that commands and data may be sent to an attached dataflash IC.
/* 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 us
ed.
+ * The
appropriate SPI interface will be automatically configur
ed.
*/
static inline void Dataflash_Init(void)
{
DATAFLASH_CHIPCS_DDR |= DATAFLASH_CHIPCS_MASK;
DATAFLASH_CHIPCS_PORT |= DATAFLASH_CHIPCS_MASK;
*/
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.
}
/** Sends a byte to the currently selected dataflash IC, and returns a byte from the dataflash.