Minor clean-up for last big commit
This commit is contained in:
parent
3a1d3bba5a
commit
7ee6c5bcfc
@ -205,7 +205,6 @@ struct rit_dev_s
|
|||||||
|
|
||||||
/* Low-level SPI helpers */
|
/* Low-level SPI helpers */
|
||||||
|
|
||||||
static inline void rit_configspi(FAR struct spi_dev_s *spi);
|
|
||||||
static void rit_select(FAR struct spi_dev_s *spi);
|
static void rit_select(FAR struct spi_dev_s *spi);
|
||||||
static void rit_deselect(FAR struct spi_dev_s *spi);
|
static void rit_deselect(FAR struct spi_dev_s *spi);
|
||||||
static void rit_sndbytes(FAR struct rit_dev_s *priv, FAR const uint8_t *buffer,
|
static void rit_sndbytes(FAR struct rit_dev_s *priv, FAR const uint8_t *buffer,
|
||||||
@ -423,43 +422,6 @@ static const uint8_t g_setallrow[] =
|
|||||||
* Private Functions
|
* Private Functions
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
|
||||||
/**************************************************************************************
|
|
||||||
* Name: rit_configspi
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Configure the SPI for use with the P14201
|
|
||||||
*
|
|
||||||
* Input Parameters:
|
|
||||||
* spi - Reference to the SPI driver structure
|
|
||||||
*
|
|
||||||
* Returned Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Assumptions:
|
|
||||||
*
|
|
||||||
**************************************************************************************/
|
|
||||||
|
|
||||||
static inline void rit_configspi(FAR struct spi_dev_s *spi)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_P14201_FREQUENCY
|
|
||||||
ritdbg("Mode: %d Bits: 8 Frequency: %d\n",
|
|
||||||
CONFIG_P14201_SPIMODE, CONFIG_P14201_FREQUENCY);
|
|
||||||
#else
|
|
||||||
ritdbg("Mode: %d Bits: 8\n", CONFIG_P14201_SPIMODE);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Configure SPI for the P14201. But only if we own the SPI bus. Otherwise, don't
|
|
||||||
* bother because it might change.
|
|
||||||
*/
|
|
||||||
|
|
||||||
SPI_SETMODE(spi, CONFIG_P14201_SPIMODE);
|
|
||||||
SPI_SETBITS(spi, 8);
|
|
||||||
(void)SPI_HWFEATURES(spi, 0);
|
|
||||||
#ifdef CONFIG_P14201_FREQUENCY
|
|
||||||
(void)SPI_SETFREQUENCY(spi, CONFIG_P14201_FREQUENCY)
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* Name: rit_select
|
* Name: rit_select
|
||||||
*
|
*
|
||||||
@ -1204,7 +1166,6 @@ FAR struct lcd_dev_s *rit_initialize(FAR struct spi_dev_s *spi, unsigned int dev
|
|||||||
|
|
||||||
/* Select the SD1329 controller */
|
/* Select the SD1329 controller */
|
||||||
|
|
||||||
rit_configspi(spi);
|
|
||||||
rit_select(spi);
|
rit_select(spi);
|
||||||
|
|
||||||
/* Clear the display */
|
/* Clear the display */
|
||||||
|
@ -285,7 +285,6 @@ static struct enc_driver_s g_encx24j600[CONFIG_ENCX24J600_NINTERFACES];
|
|||||||
|
|
||||||
/* Low-level SPI helpers */
|
/* Low-level SPI helpers */
|
||||||
|
|
||||||
static inline void enc_configspi(FAR struct spi_dev_s *spi);
|
|
||||||
static void enc_lock(FAR struct enc_driver_s *priv);
|
static void enc_lock(FAR struct enc_driver_s *priv);
|
||||||
static inline void enc_unlock(FAR struct enc_driver_s *priv);
|
static inline void enc_unlock(FAR struct enc_driver_s *priv);
|
||||||
|
|
||||||
@ -373,32 +372,6 @@ static int enc_reset(FAR struct enc_driver_s *priv);
|
|||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Function: enc_configspi
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Configure the SPI for use with the ENCX24J600
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* spi - Reference to the SPI driver structure
|
|
||||||
*
|
|
||||||
* Returned Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Assumptions:
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static inline void enc_configspi(FAR struct spi_dev_s *spi)
|
|
||||||
{
|
|
||||||
/* Configure SPI for the ENCX24J600. */
|
|
||||||
|
|
||||||
SPI_SETMODE(spi, CONFIG_ENCX24J600_SPIMODE);
|
|
||||||
SPI_SETBITS(spi, 8);
|
|
||||||
(void)SPI_HWFEATURES(spi, 0);
|
|
||||||
(void)SPI_SETFREQUENCY(spi, CONFIG_ENCX24J600_FREQUENCY);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Function: enc_lock
|
* Function: enc_lock
|
||||||
*
|
*
|
||||||
@ -2912,10 +2885,6 @@ int enc_initialize(FAR struct spi_dev_s *spi,
|
|||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Configure SPI for the ENCX24J600 */
|
|
||||||
|
|
||||||
enc_configspi(priv->spi);
|
|
||||||
|
|
||||||
/* Lock the SPI bus so that we have exclusive access */
|
/* Lock the SPI bus so that we have exclusive access */
|
||||||
|
|
||||||
enc_lock(priv);
|
enc_lock(priv);
|
||||||
|
Loading…
Reference in New Issue
Block a user