Merged in petekol/arch (pull request #31)

forgotten changes
This commit is contained in:
Gregory Nutt 2015-11-11 07:38:38 -06:00
commit 518b4b14b2

View File

@ -131,9 +131,12 @@ static uint32_t ssp_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency);
static void ssp_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode);
static void ssp_setbits(FAR struct spi_dev_s *dev, int nbits);
static uint16_t ssp_send(FAR struct spi_dev_s *dev, uint16_t ch);
static void ssp_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
FAR void *rxbuffer, size_t nwords);
#ifndef CONFIG_SPI_EXCHANGE
static void ssp_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size_t nwords);
static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nwords);
#endif
/* Initialization */
#ifdef CONFIG_LPC43_SSP0
@ -563,13 +566,13 @@ static void ssp_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
{
FAR uint8_t *p8;
FAR uint16_t *p16;
FAR const void *pv;
FAR void *pv;
} tx;
union
{
FAR uint8_t *p8;
FAR uint16_t *p16;
FAR const void *pv;
FAR void *pv;
} rx;
uint32_t data;
uint32_t datadummy = (priv->nbits > 8) ? 0xffff : 0xff;
@ -646,7 +649,7 @@ static void ssp_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
* None
*
****************************************************************************/
#ifndef CONFIG_SPI_EXCHANGE
static void ssp_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size_t nwords)
{
return ssp_exchange(dev, buffer, NULL, nwords);
@ -677,6 +680,9 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw
return ssp_exchange(dev, NULL, buffer, nwords);
}
#endif
#ifdef CONFIG_LPC43_SSP0
/****************************************************************************
* Name: lpc43_ssp0initialize
*
@ -691,7 +697,6 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw
*
****************************************************************************/
#ifdef CONFIG_LPC43_SSP0
static inline FAR struct lpc43_sspdev_s *lpc43_ssp0initialize(void)
{
irqstate_t flags;
@ -721,7 +726,6 @@ static inline FAR struct lpc43_sspdev_s *lpc43_ssp0initialize(void)
/* Pin configuration */
lpc43_pin_config(PINCONF_SSP0_SCK);
lpc43_pin_config(PINCONF_SSP0_SSEL);
lpc43_pin_config(PINCONF_SSP0_MISO);
lpc43_pin_config(PINCONF_SSP0_MOSI);
@ -775,7 +779,6 @@ static inline FAR struct lpc43_sspdev_s *lpc43_ssp1initialize(void)
/* Pins configuration */
lpc43_pin_config(PINCONF_SSP1_SCK);
lpc43_pin_config(PINCONF_SSP1_SSEL);
lpc43_pin_config(PINCONF_SSP1_MISO);
lpc43_pin_config(PINCONF_SSP1_MOSI);