nxp boards

This commit is contained in:
Sebastien Lorquet 2017-04-28 18:29:43 +02:00
parent 6574f8e610
commit 6d830f46e9
12 changed files with 46 additions and 46 deletions

View File

@ -130,7 +130,7 @@ void weak_function lpcxpresso_sspdev_initialize(void)
************************************************************************************/
#ifdef CONFIG_LPC17_SSP0
void lpc11_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
void lpc11_ssp0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
ssp_dumpgpio("lpc11_ssp0select() Entry");
@ -140,7 +140,7 @@ void lpc11_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
ssp_dumpgpio("lpc11_ssp0select() Exit");
}
uint8_t lpc11_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t lpc11_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid)
{
spiinfo("Returning SPI_STATUS_PRESENT\n");
return SPI_STATUS_PRESENT;
@ -148,7 +148,7 @@ uint8_t lpc11_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
#endif
#ifdef CONFIG_LPC17_SSP1
void lpc11_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
void lpc11_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
ssp_dumpgpio("lpc11_ssp1select() Entry");
@ -170,7 +170,7 @@ void lpc11_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
ssp_dumpgpio("lpc11_ssp1select() Exit");
}
uint8_t lpc11_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t lpc11_ssp1status(FAR struct spi_dev_s *dev, uint32_t devid)
{
if (devid == SPIDEV_MMCSD)
{

View File

@ -159,7 +159,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
*
****************************************************************************/
int lpc17_ssp1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
int lpc17_ssp1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
{
if (devid == SPIDEV_DISPLAY)
{

View File

@ -130,7 +130,7 @@ void weak_function lpcxpresso_sspdev_initialize(void)
************************************************************************************/
#ifdef CONFIG_LPC17_SSP0
void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
void lpc17_ssp0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
ssp_dumpgpio("lpc17_ssp0select() Entry");
@ -140,7 +140,7 @@ void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
ssp_dumpgpio("lpc17_ssp0select() Exit");
}
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid)
{
spiinfo("Returning SPI_STATUS_PRESENT\n");
return SPI_STATUS_PRESENT;
@ -148,7 +148,7 @@ uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
#endif
#ifdef CONFIG_LPC17_SSP1
void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
void lpc17_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
ssp_dumpgpio("lpc17_ssp1select() Entry");
@ -170,7 +170,7 @@ void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
ssp_dumpgpio("lpc17_ssp1select() Exit");
}
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, uint32_t devid)
{
if (devid == SPIDEV_MMCSD)
{

View File

@ -108,11 +108,11 @@
****************************************************************************/
static int spi_lock(FAR struct spi_dev_s *dev, bool lock);
static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency);
static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid);
#ifdef CONFIG_SPI_CMDDATA
static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
#endif
static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t ch);
static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size_t nwords);
@ -210,7 +210,7 @@ static int spi_lock(FAR struct spi_dev_s *dev, bool lock)
*
****************************************************************************/
static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
uint32_t bit = 1 << 20;
@ -301,7 +301,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
*
****************************************************************************/
static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid)
{
/* I don't think there is anyway to determine these things on the mcu123.com
* board.
@ -336,7 +336,7 @@ static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
****************************************************************************/
#ifdef CONFIG_SPI_CMDDATA
static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
{
# error "spi_cmddata not implemented"
return -ENOSYS;

View File

@ -99,13 +99,13 @@ void weak_function lpc31_spidev_intialize(void)
*
************************************************************************************/
void lpc31_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
void lpc31_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
#warning "Missing logic"
}
uint8_t lpc31_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t lpc31_spistatus(FAR struct spi_dev_s *dev, uint32_t devid)
{
return SPI_STATUS_PRESENT;
}

View File

@ -263,7 +263,7 @@ void weak_function lpc1766stk_sspdev_initialize(void)
************************************************************************************/
#ifdef CONFIG_LPC17_SSP0
void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
void lpc17_ssp0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
if (devid == SPIDEV_DISPLAY)
@ -276,7 +276,7 @@ void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
}
}
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid)
{
spiinfo("Returning nothing\n");
return 0;
@ -284,7 +284,7 @@ uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
#endif
#ifdef CONFIG_LPC17_SSP1
void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
void lpc17_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
if (devid == SPIDEV_MMCSD)
@ -297,7 +297,7 @@ void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
}
}
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, uint32_t devid)
{
spiinfo("Returning SPI_STATUS_PRESENT\n");
return SPI_STATUS_PRESENT;

View File

@ -130,12 +130,12 @@ void weak_function open1788_sspdev_initialize(void)
************************************************************************************/
#ifdef CONFIG_LPC17_SSP0
void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
void lpc17_ssp0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
}
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid)
{
spiinfo("Returning nothing\n");
return 0;
@ -143,7 +143,7 @@ uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
#endif
#ifdef CONFIG_LPC17_SSP1
void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
void lpc17_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
if (devid == SPIDEV_TOUCHSCREEN)
@ -156,7 +156,7 @@ void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
}
}
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, uint32_t devid)
{
spiinfo("Returning nothing\n");
return 0;
@ -164,12 +164,12 @@ uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
#endif
#ifdef CONFIG_LPC17_SSP2
void lpc17_ssp2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
void lpc17_ssp2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
}
uint8_t lpc17_ssp2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t lpc17_ssp2status(FAR struct spi_dev_s *dev, uint32_t devid)
{
spiinfo("Returning nothing\n");
return 0;

View File

@ -120,7 +120,7 @@ void weak_function c027_sspdev_initialize(void)
************************************************************************************/
#ifdef CONFIG_LPC17_SSP0
void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
void lpc17_ssp0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
ssp_dumpgpio("lpc17_ssp0select() Entry");
@ -130,7 +130,7 @@ void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
ssp_dumpgpio("lpc17_ssp0select() Exit");
}
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid)
{
spiinfo("Returning SPI_STATUS_PRESENT\n");
return SPI_STATUS_PRESENT;
@ -138,7 +138,7 @@ uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
#endif
#ifdef CONFIG_LPC17_SSP1
void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
void lpc17_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
ssp_dumpgpio("lpc17_ssp1select() Entry");
@ -160,7 +160,7 @@ void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
ssp_dumpgpio("lpc17_ssp1select() Exit");
}
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, uint32_t devid)
{
if (devid == SPIDEV_MMCSD)
{

View File

@ -156,7 +156,7 @@ void board_lcd_uninitialize(void)
*
****************************************************************************/
int lpc17_ssp0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
int lpc17_ssp0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
{
if (devid == SPIDEV_DISPLAY)
{

View File

@ -123,7 +123,7 @@ void weak_function zkit_spidev_initialize(void)
*
************************************************************************************/
void lpc17_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
void lpc17_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
spi_dumpgpio("lpc17_spiselect() Entry");
@ -138,7 +138,7 @@ void lpc17_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
spi_dumpgpio("lpc17_spiselect() Exit");
}
uint8_t lpc17_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t lpc17_spistatus(FAR struct spi_dev_s *dev, uint32_t devid)
{
if (devid == SPIDEV_MMCSD)
{
@ -163,7 +163,7 @@ uint8_t lpc17_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
*
****************************************************************************/
int lpc17_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
int lpc17_spicmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
{
return OK;
}

View File

@ -126,7 +126,7 @@ void weak_function zkit_sspdev_initialize(void)
************************************************************************************/
#ifdef CONFIG_LPC17_SSP1
void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
void lpc17_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
ssp_dumpgpio("lpc17_ssp1select() Entry");
@ -136,7 +136,7 @@ void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
ssp_dumpgpio("lpc17_ssp1select() Exit");
}
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, uint32_t devid)
{
spiinfo("Returning SPI_STATUS_PRESENT\n");
return SPI_STATUS_PRESENT;
@ -151,7 +151,7 @@ uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
#ifdef CONFIG_SPI_CMDDATA
int weak_function lpc17_ssp1cmddata(FAR struct spi_dev_s *dev,
enum spi_dev_e devid, bool cmd)
uint32_t devid, bool cmd)
{
return OK;
}
@ -160,7 +160,7 @@ int weak_function lpc17_ssp1cmddata(FAR struct spi_dev_s *dev,
#endif /* CONFIG_LPC17_SSP1 */
#ifdef CONFIG_LPC17_SSP0
void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
void lpc17_ssp0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
ssp_dumpgpio("lpc17_ssp0select() Entry");
@ -177,7 +177,7 @@ void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
ssp_dumpgpio("lpc17_ssp0select() Exit");
}
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid)
{
if (devid == SPIDEV_DISPLAY)
{

View File

@ -111,11 +111,11 @@
****************************************************************************/
static int spi_lock(FAR struct spi_dev_s *dev, bool lock);
static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency);
static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid);
#ifdef CONFIG_SPI_CMDDATA
static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
#endif
static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t ch);
static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size_t nwords);
@ -213,7 +213,7 @@ static int spi_lock(FAR struct spi_dev_s *dev, bool lock)
*
****************************************************************************/
static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
#ifdef CONFIG_DEBUG_SPI_INFO
uint32_t regval;
@ -315,7 +315,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
*
****************************************************************************/
static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid)
{
spiinfo("Return 0\n");
return 0;
@ -346,7 +346,7 @@ static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
****************************************************************************/
#ifdef CONFIG_SPI_CMDDATA
static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
{
#ifdef CONFIG_DEBUG_SPI_INFO
uint32_t regval;