Update XMEGA board drivers to use the port inversion feature of the XMEGA architecture rather than performing the inversion in software. Add partially completed XMEGA-B1-XPLAINED Dataflash board driver and revert implementation of the XMEGA-A3BU-XPLAINED Dataflash driver as the chip is connected to the USART, not the SPI interface.

This commit is contained in:
Dean Camera 2012-02-09 20:26:13 +00:00
parent 7a1033025b
commit a2d18e46f8
7 changed files with 292 additions and 54 deletions

View file

@ -29,24 +29,24 @@
*/
/** \file
* \brief Board specific Dataflash driver header for the Atmel XMEGA A3BU Xplained.
* \copydetails Group_Dataflash_A3BU_XPLAINED
* \brief Board specific Dataflash driver header for the Atmel XMEGA B1 Xplained.
* \copydetails Group_Dataflash_B1_XPLAINED
*
* \note This file should not be included directly. It is automatically included as needed by the dataflash driver
* dispatch header located in LUFA/Drivers/Board/Dataflash.h.
*/
/** \ingroup Group_Dataflash
* \defgroup Group_Dataflash_A3BU_XPLAINED A3BU_XPLAINED
* \brief Board specific Dataflash driver header for the Atmel XMEGA A3BU Xplained.
* \defgroup Group_Dataflash_B1_XPLAINED B1_XPLAINED
* \brief Board specific Dataflash driver header for the Atmel XMEGA B1 Xplained.
*
* Board specific Dataflash driver header for the Atmel XMEGA A3BU Xplained board.
* Board specific Dataflash driver header for the Atmel XMEGA B1 Xplained board.
*
* @{
*/
#ifndef __DATAFLASH_A3BU_XPLAINED_H__
#define __DATAFLASH_A3BU_XPLAINED_H__
#ifndef __DATAFLASH_B1_XPLAINED_H__
#define __DATAFLASH_B1_XPLAINED_H__
/* Includes: */
#include "../../../../Common/Common.h"
@ -100,7 +100,9 @@
static inline uint8_t Dataflash_TransferByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
static inline uint8_t Dataflash_TransferByte(const uint8_t Byte)
{
return SPI_TransferByte(&SPID, Byte);
// TODO: USART in SPI mode on PORT D
#warning The Dataflash driver for the selected board is currently incomplete and non-functional.
return 0;
}
/** Sends a byte to the currently selected dataflash IC, and ignores the next byte from the dataflash.
@ -110,7 +112,7 @@
static inline void Dataflash_SendByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
static inline void Dataflash_SendByte(const uint8_t Byte)
{
SPI_SendByte(&SPID, Byte);
return; // TODO
}
/** Sends a dummy byte to the currently selected dataflash IC, and returns the next byte from the dataflash.
@ -120,7 +122,7 @@
static inline uint8_t Dataflash_ReceiveByte(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Dataflash_ReceiveByte(void)
{
return SPI_ReceiveByte(&SPID);
return 0; // TODO
}
/** Determines the currently selected dataflash chip.