Reintegrate the FullEPAddresses development branch into trunk.
This commit is contained in:
parent
e8570c4a37
commit
47f6a35013
265 changed files with 2120 additions and 2486 deletions
|
@ -71,10 +71,10 @@
|
|||
#define DATAFLASH_TOTALCHIPS 1
|
||||
|
||||
/** Mask for no dataflash chip selected. */
|
||||
#define DATAFLASH_NO_CHIP DATAFLASH_CHIPCS_MASK
|
||||
#define DATAFLASH_NO_CHIP 0
|
||||
|
||||
/** Mask for the first dataflash chip selected. */
|
||||
#define DATAFLASH_CHIP1 0
|
||||
#define DATAFLASH_CHIP1 (1 << 4)
|
||||
|
||||
/** Internal main memory page size for the board's dataflash ICs. */
|
||||
#define DATAFLASH_PAGE_SIZE 1024
|
||||
|
@ -88,8 +88,10 @@
|
|||
*/
|
||||
static inline void Dataflash_Init(void)
|
||||
{
|
||||
DATAFLASH_CHIPCS_PORT.DIRSET = DATAFLASH_CHIPCS_MASK;
|
||||
DATAFLASH_CHIPCS_PORT.OUTSET = DATAFLASH_CHIPCS_MASK;
|
||||
DATAFLASH_CHIPCS_PORT.DIRSET = DATAFLASH_CHIPCS_MASK;
|
||||
|
||||
PORTCFG.MPCMASK = DATAFLASH_CHIPCS_MASK;
|
||||
DATAFLASH_CHIPCS_PORT.PIN0CTRL = PORT_INVEN_bm;
|
||||
}
|
||||
|
||||
/** Sends a byte to the currently selected dataflash IC, and returns a byte from the dataflash.
|
||||
|
@ -143,7 +145,8 @@
|
|||
static inline void Dataflash_SelectChip(const uint8_t ChipMask) ATTR_ALWAYS_INLINE;
|
||||
static inline void Dataflash_SelectChip(const uint8_t ChipMask)
|
||||
{
|
||||
DATAFLASH_CHIPCS_PORT.OUT = ((DATAFLASH_CHIPCS_PORT.OUT & ~DATAFLASH_CHIPCS_MASK) | ChipMask);
|
||||
DATAFLASH_CHIPCS_PORT.OUTCLR = DATAFLASH_CHIPCS_MASK;
|
||||
DATAFLASH_CHIPCS_PORT.OUTSET = ChipMask;
|
||||
}
|
||||
|
||||
/** Deselects the current dataflash chip, so that no dataflash is selected. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue