arch/arm: Remove FAR and CODE from board folder(2)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
cd001725b7
commit
a3c9b413d8
@ -99,11 +99,11 @@
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
static void spi_select(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
static void spi_select(struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool selected);
|
||||
static uint8_t spi_status(FAR struct spi_bitbang_s *priv, uint32_t devid);
|
||||
static uint8_t spi_status(struct spi_bitbang_s *priv, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
static int spi_cmddata(struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool cmd);
|
||||
#endif
|
||||
|
||||
@ -127,7 +127,7 @@ static int spi_cmddata(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void spi_select(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
static void spi_select(struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
if (devid == SPIDEV_MMCSD(0))
|
||||
@ -158,7 +158,7 @@ static void spi_select(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint8_t spi_status(FAR struct spi_bitbang_s *priv, uint32_t devid)
|
||||
static uint8_t spi_status(struct spi_bitbang_s *priv, uint32_t devid)
|
||||
{
|
||||
if (devid == SPIDEV_MMCSD(0))
|
||||
{
|
||||
@ -185,7 +185,7 @@ static uint8_t spi_status(FAR struct spi_bitbang_s *priv, uint32_t devid)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
static int spi_cmddata(struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool cmd)
|
||||
{
|
||||
return OK;
|
||||
@ -206,7 +206,7 @@ static int spi_cmddata(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static FAR struct spi_dev_s *sam_mmcsd_spiinitialize(void)
|
||||
static struct spi_dev_s *sam_mmcsd_spiinitialize(void)
|
||||
{
|
||||
/* Initialize GPIOs */
|
||||
|
||||
@ -234,7 +234,7 @@ static FAR struct spi_dev_s *sam_mmcsd_spiinitialize(void)
|
||||
|
||||
int sam_sdinitialize(int minor)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
struct spi_dev_s *spi;
|
||||
int ret;
|
||||
|
||||
/* Get the SPI driver instance for the SD chip select */
|
||||
|
@ -112,11 +112,11 @@
|
||||
|
||||
/* Lower-half SPI */
|
||||
|
||||
static void spi_select(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
static void spi_select(struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool selected);
|
||||
static uint8_t spi_status(FAR struct spi_bitbang_s *priv, uint32_t devid);
|
||||
static uint8_t spi_status(struct spi_bitbang_s *priv, uint32_t devid);
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
static int spi_cmddata(struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool cmd);
|
||||
#endif
|
||||
|
||||
@ -132,11 +132,11 @@ static int spi_cmddata(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
* pendown - Return the state of the pen down GPIO input
|
||||
*/
|
||||
|
||||
static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr);
|
||||
static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable);
|
||||
static void tsc_clear(FAR struct ads7843e_config_s *state);
|
||||
static bool tsc_busy(FAR struct ads7843e_config_s *state);
|
||||
static bool tsc_pendown(FAR struct ads7843e_config_s *state);
|
||||
static int tsc_attach(struct ads7843e_config_s *state, xcpt_t isr);
|
||||
static void tsc_enable(struct ads7843e_config_s *state, bool enable);
|
||||
static void tsc_clear(struct ads7843e_config_s *state);
|
||||
static bool tsc_busy(struct ads7843e_config_s *state);
|
||||
static bool tsc_pendown(struct ads7843e_config_s *state);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
@ -183,7 +183,7 @@ static struct ads7843e_config_s g_tscinfo =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void spi_select(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
static void spi_select(struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
/* The touchscreen controller is always selected */
|
||||
@ -204,7 +204,7 @@ static void spi_select(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint8_t spi_status(FAR struct spi_bitbang_s *priv, uint32_t devid)
|
||||
static uint8_t spi_status(struct spi_bitbang_s *priv, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -226,7 +226,7 @@ static uint8_t spi_status(FAR struct spi_bitbang_s *priv, uint32_t devid)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
static int spi_cmddata(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
static int spi_cmddata(struct spi_bitbang_s *priv, uint32_t devid,
|
||||
bool cmd)
|
||||
{
|
||||
return OK;
|
||||
@ -247,7 +247,7 @@ static int spi_cmddata(FAR struct spi_bitbang_s *priv, uint32_t devid,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr)
|
||||
static int tsc_attach(struct ads7843e_config_s *state, xcpt_t isr)
|
||||
{
|
||||
/* Attach the XPT2046 interrupt */
|
||||
|
||||
@ -255,7 +255,7 @@ static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr)
|
||||
return irq_attach(SAM_TSC_IRQ, isr, NULL);
|
||||
}
|
||||
|
||||
static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable)
|
||||
static void tsc_enable(struct ads7843e_config_s *state, bool enable)
|
||||
{
|
||||
/* Attach and enable, or detach and disable */
|
||||
|
||||
@ -270,17 +270,17 @@ static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable)
|
||||
}
|
||||
}
|
||||
|
||||
static void tsc_clear(FAR struct ads7843e_config_s *state)
|
||||
static void tsc_clear(struct ads7843e_config_s *state)
|
||||
{
|
||||
/* Does nothing */
|
||||
}
|
||||
|
||||
static bool tsc_busy(FAR struct ads7843e_config_s *state)
|
||||
static bool tsc_busy(struct ads7843e_config_s *state)
|
||||
{
|
||||
return false; /* The BUSY signal is not connected */
|
||||
}
|
||||
|
||||
static bool tsc_pendown(FAR struct ads7843e_config_s *state)
|
||||
static bool tsc_pendown(struct ads7843e_config_s *state)
|
||||
{
|
||||
/* The /PENIRQ value is active low */
|
||||
|
||||
@ -303,7 +303,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static FAR struct spi_dev_s *sam_tsc_spiinitialize(void)
|
||||
static struct spi_dev_s *sam_tsc_spiinitialize(void)
|
||||
{
|
||||
/* Configure the SPI bit-bang pins */
|
||||
|
||||
@ -339,7 +339,7 @@ static FAR struct spi_dev_s *sam_tsc_spiinitialize(void)
|
||||
|
||||
int sam_tsc_setup(int minor)
|
||||
{
|
||||
FAR struct spi_dev_s *dev;
|
||||
struct spi_dev_s *dev;
|
||||
int ret;
|
||||
|
||||
iinfo("minor %d\n", minor);
|
||||
|
@ -258,7 +258,7 @@ int sam_bringup(void);
|
||||
|
||||
#ifdef HAVE_SSD1306
|
||||
struct lcd_dev_s; /* Forward reference */
|
||||
FAR struct lcd_dev_s *sam_graphics_setup(unsigned int devno);
|
||||
struct lcd_dev_s *sam_graphics_setup(unsigned int devno);
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
@ -154,7 +154,7 @@ void sam_spi0select(uint32_t devid, bool selected)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
spiinfo("Returning nothing\n");
|
||||
return 0;
|
||||
@ -185,7 +185,7 @@ uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi0cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
spiinfo("devid: %08x %s\n", (unsigned int)devid, cmd ? "cmd" : "data");
|
||||
|
||||
|
@ -84,10 +84,10 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *sam_graphics_setup(unsigned int devno)
|
||||
struct lcd_dev_s *sam_graphics_setup(unsigned int devno)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
FAR struct lcd_dev_s *dev;
|
||||
struct spi_dev_s *spi;
|
||||
struct lcd_dev_s *dev;
|
||||
|
||||
/* Configure the OLED GPIOs. This initial configuration is RESET low,
|
||||
* putting the OLED into reset state.
|
||||
@ -151,7 +151,7 @@ FAR struct lcd_dev_s *sam_graphics_setup(unsigned int devno)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NXSTART_EXTERNINIT
|
||||
FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
{
|
||||
return sam_graphics_setup(devno);
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ int board_app_initialize(uintptr_t arg)
|
||||
int ret;
|
||||
|
||||
#ifdef NSH_HAVE_MMCSD
|
||||
FAR struct sdio_dev_s *sdio;
|
||||
struct sdio_dev_s *sdio;
|
||||
|
||||
/* Mount the SDIO-based MMC/SD block driver */
|
||||
|
||||
|
@ -148,7 +148,7 @@ uint32_t board_buttons(void)
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SAM34_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, void *arg)
|
||||
{
|
||||
if (id == BUTTON1)
|
||||
{
|
||||
|
@ -314,18 +314,18 @@ static void sam_dumpreg(uint8_t startreg, uint8_t endreg);
|
||||
/* LCD Data Transfer Methods */
|
||||
|
||||
static int sam_putrun(fb_coord_t row, fb_coord_t col,
|
||||
FAR const uint8_t *buffer,
|
||||
const uint8_t *buffer,
|
||||
size_t npixels);
|
||||
static int sam_getrun(fb_coord_t row, fb_coord_t col,
|
||||
FAR uint8_t *buffer,
|
||||
uint8_t *buffer,
|
||||
size_t npixels);
|
||||
|
||||
/* LCD Configuration */
|
||||
|
||||
static int sam_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo);
|
||||
static int sam_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
FAR struct lcd_planeinfo_s *pinfo);
|
||||
static int sam_getvideoinfo(struct lcd_dev_s *dev,
|
||||
struct fb_videoinfo_s *vinfo);
|
||||
static int sam_getplaneinfo(struct lcd_dev_s *dev, unsigned int planeno,
|
||||
struct lcd_planeinfo_s *pinfo);
|
||||
|
||||
/* LCD RGB Mapping */
|
||||
|
||||
@ -592,7 +592,7 @@ static void sam_dumpreg(uint8_t startreg, uint8_t endreg)
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_putrun(fb_coord_t row, fb_coord_t col,
|
||||
FAR const uint8_t *buffer,
|
||||
const uint8_t *buffer,
|
||||
size_t npixels)
|
||||
{
|
||||
uint16_t *run = (uint16_t *)buffer;
|
||||
@ -662,7 +662,7 @@ static int sam_putrun(fb_coord_t row, fb_coord_t col,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
|
||||
static int sam_getrun(fb_coord_t row, fb_coord_t col, uint8_t *buffer,
|
||||
size_t npixels)
|
||||
{
|
||||
uint16_t *run = (uint16_t *)buffer;
|
||||
@ -721,8 +721,8 @@ static int sam_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
static int sam_getvideoinfo(struct lcd_dev_s *dev,
|
||||
struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
@ -740,8 +740,8 @@ static int sam_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
FAR struct lcd_planeinfo_s *pinfo)
|
||||
static int sam_getplaneinfo(struct lcd_dev_s *dev, unsigned int planeno,
|
||||
struct lcd_planeinfo_s *pinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && pinfo && planeno == 0);
|
||||
lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
@ -1060,7 +1060,7 @@ int board_lcd_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
lcdinfo("lcddev: %d\n", lcddev);
|
||||
return lcddev == 0 ? &g_lcddev_s.dev : NULL;
|
||||
|
@ -156,7 +156,7 @@ void sam_spi0select(uint32_t devid, bool selected)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -91,11 +91,11 @@
|
||||
* pendown - Return the state of the pen down GPIO input
|
||||
*/
|
||||
|
||||
static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr);
|
||||
static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable);
|
||||
static void tsc_clear(FAR struct ads7843e_config_s *state);
|
||||
static bool tsc_busy(FAR struct ads7843e_config_s *state);
|
||||
static bool tsc_pendown(FAR struct ads7843e_config_s *state);
|
||||
static int tsc_attach(struct ads7843e_config_s *state, xcpt_t isr);
|
||||
static void tsc_enable(struct ads7843e_config_s *state, bool enable);
|
||||
static void tsc_clear(struct ads7843e_config_s *state);
|
||||
static bool tsc_busy(struct ads7843e_config_s *state);
|
||||
static bool tsc_pendown(struct ads7843e_config_s *state);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
@ -138,7 +138,7 @@ static struct ads7843e_config_s g_tscinfo =
|
||||
* pendown - Return the state of the pen down GPIO input
|
||||
*/
|
||||
|
||||
static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr)
|
||||
static int tsc_attach(struct ads7843e_config_s *state, xcpt_t isr)
|
||||
{
|
||||
/* Attach the ADS7843E interrupt */
|
||||
|
||||
@ -146,7 +146,7 @@ static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr)
|
||||
return irq_attach(SAM_TCS_IRQ, isr, NULL);
|
||||
}
|
||||
|
||||
static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable)
|
||||
static void tsc_enable(struct ads7843e_config_s *state, bool enable)
|
||||
{
|
||||
/* Attach and enable, or detach and disable */
|
||||
|
||||
@ -161,12 +161,12 @@ static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable)
|
||||
}
|
||||
}
|
||||
|
||||
static void tsc_clear(FAR struct ads7843e_config_s *state)
|
||||
static void tsc_clear(struct ads7843e_config_s *state)
|
||||
{
|
||||
/* Does nothing */
|
||||
}
|
||||
|
||||
static bool tsc_busy(FAR struct ads7843e_config_s *state)
|
||||
static bool tsc_busy(struct ads7843e_config_s *state)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_INFO)
|
||||
static bool last = (bool)-1;
|
||||
@ -188,7 +188,7 @@ static bool tsc_busy(FAR struct ads7843e_config_s *state)
|
||||
return busy;
|
||||
}
|
||||
|
||||
static bool tsc_pendown(FAR struct ads7843e_config_s *state)
|
||||
static bool tsc_pendown(struct ads7843e_config_s *state)
|
||||
{
|
||||
/* The /PENIRQ value is active low */
|
||||
|
||||
@ -220,7 +220,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state)
|
||||
|
||||
int sam_tsc_setup(int minor)
|
||||
{
|
||||
FAR struct spi_dev_s *dev;
|
||||
struct spi_dev_s *dev;
|
||||
int ret;
|
||||
|
||||
iinfo("minor %d\n", minor);
|
||||
|
@ -59,7 +59,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume)
|
||||
void sam_usbsuspend(struct usbdev_s *dev, bool resume)
|
||||
{
|
||||
uinfo("resume: %d\n", resume);
|
||||
}
|
||||
|
@ -66,7 +66,7 @@
|
||||
|
||||
int board_usbmsc_initialize(int port)
|
||||
{
|
||||
FAR struct sdio_dev_s *sdio;
|
||||
struct sdio_dev_s *sdio;
|
||||
int ret;
|
||||
|
||||
/* First, get an instance of the SDIO interface */
|
||||
|
@ -88,11 +88,11 @@
|
||||
* pendown - Return the state of the pen down GPIO input
|
||||
*/
|
||||
|
||||
static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr);
|
||||
static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable);
|
||||
static void tsc_clear(FAR struct ads7843e_config_s *state);
|
||||
static bool tsc_busy(FAR struct ads7843e_config_s *state);
|
||||
static bool tsc_pendown(FAR struct ads7843e_config_s *state);
|
||||
static int tsc_attach(struct ads7843e_config_s *state, xcpt_t isr);
|
||||
static void tsc_enable(struct ads7843e_config_s *state, bool enable);
|
||||
static void tsc_clear(struct ads7843e_config_s *state);
|
||||
static bool tsc_busy(struct ads7843e_config_s *state);
|
||||
static bool tsc_pendown(struct ads7843e_config_s *state);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
@ -135,7 +135,7 @@ static struct ads7843e_config_s g_tscinfo =
|
||||
* pendown - Return the state of the pen down GPIO input
|
||||
*/
|
||||
|
||||
static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr)
|
||||
static int tsc_attach(struct ads7843e_config_s *state, xcpt_t isr)
|
||||
{
|
||||
/* Attach the ADS7843E interrupt */
|
||||
|
||||
@ -143,7 +143,7 @@ static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr)
|
||||
return irq_attach(SAM_TCS_IRQ, isr, NULL);
|
||||
}
|
||||
|
||||
static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable)
|
||||
static void tsc_enable(struct ads7843e_config_s *state, bool enable)
|
||||
{
|
||||
/* Attach and enable, or detach and disable */
|
||||
|
||||
@ -158,12 +158,12 @@ static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable)
|
||||
}
|
||||
}
|
||||
|
||||
static void tsc_clear(FAR struct ads7843e_config_s *state)
|
||||
static void tsc_clear(struct ads7843e_config_s *state)
|
||||
{
|
||||
/* Does nothing */
|
||||
}
|
||||
|
||||
static bool tsc_busy(FAR struct ads7843e_config_s *state)
|
||||
static bool tsc_busy(struct ads7843e_config_s *state)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_INFO)
|
||||
static bool last = (bool)-1;
|
||||
@ -185,7 +185,7 @@ static bool tsc_busy(FAR struct ads7843e_config_s *state)
|
||||
return busy;
|
||||
}
|
||||
|
||||
static bool tsc_pendown(FAR struct ads7843e_config_s *state)
|
||||
static bool tsc_pendown(struct ads7843e_config_s *state)
|
||||
{
|
||||
/* The /PENIRQ value is active low */
|
||||
|
||||
@ -217,7 +217,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state)
|
||||
|
||||
int sam_tsc_setup(int minor)
|
||||
{
|
||||
FAR struct spi_dev_s *dev;
|
||||
struct spi_dev_s *dev;
|
||||
int ret;
|
||||
|
||||
iinfo("minor %d\n", minor);
|
||||
|
@ -58,8 +58,8 @@
|
||||
|
||||
int sam_at25_automount(int minor)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
struct spi_dev_s *spi;
|
||||
struct mtd_dev_s *mtd;
|
||||
static bool initialized = false;
|
||||
int ret;
|
||||
|
||||
|
@ -151,7 +151,7 @@ uint32_t board_buttons(void)
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SAM34_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, void *arg)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
|
@ -173,7 +173,7 @@ void weak_function sam_netinitialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAM34_GPIOD_IRQ
|
||||
int arch_phy_irq(FAR const char *intf, xcpt_t handler, void *arg,
|
||||
int arch_phy_irq(const char *intf, xcpt_t handler, void *arg,
|
||||
phy_enable_t *enable)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
@ -76,7 +76,7 @@ static struct sam_hsmci_state_s g_hsmci;
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_hsmci_cardetect(int irq, void *regs, FAR void *arg)
|
||||
static int sam_hsmci_cardetect(int irq, void *regs, void *arg)
|
||||
{
|
||||
bool inserted;
|
||||
|
||||
|
@ -291,24 +291,24 @@ static void sam_set_cursor(uint16_t col, uint16_t row);
|
||||
|
||||
static void sam_disable_backlight(void);
|
||||
static void sam_set_backlight(unsigned int power);
|
||||
static int sam_poweroff(FAR struct sam_dev_s *priv);
|
||||
static int sam_poweroff(struct sam_dev_s *priv);
|
||||
|
||||
/* LCD Data Transfer Methods */
|
||||
|
||||
static int sam_putrun(fb_coord_t row, fb_coord_t col,
|
||||
FAR const uint8_t *buffer,
|
||||
const uint8_t *buffer,
|
||||
size_t npixels);
|
||||
static int sam_getrun(fb_coord_t row, fb_coord_t col,
|
||||
FAR uint8_t *buffer,
|
||||
uint8_t *buffer,
|
||||
size_t npixels);
|
||||
|
||||
/* LCD Configuration */
|
||||
|
||||
static int sam_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo);
|
||||
static int sam_getplaneinfo(FAR struct lcd_dev_s *dev,
|
||||
static int sam_getvideoinfo(struct lcd_dev_s *dev,
|
||||
struct fb_videoinfo_s *vinfo);
|
||||
static int sam_getplaneinfo(struct lcd_dev_s *dev,
|
||||
unsigned int planeno,
|
||||
FAR struct lcd_planeinfo_s *pinfo);
|
||||
struct lcd_planeinfo_s *pinfo);
|
||||
|
||||
/* LCD RGB Mapping */
|
||||
|
||||
@ -545,7 +545,7 @@ static void sam_set_cursor(uint16_t col, uint16_t row)
|
||||
****************************************************************************/
|
||||
|
||||
#if 0 /* Sometimes useful */
|
||||
static void sam_dumprun(FAR const char *msg, FAR uint16_t *run,
|
||||
static void sam_dumprun(const char *msg, uint16_t *run,
|
||||
size_t npixels)
|
||||
{
|
||||
int i;
|
||||
@ -636,7 +636,7 @@ static void sam_set_backlight(unsigned int power)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_poweroff(FAR struct sam_dev_s *priv)
|
||||
static int sam_poweroff(struct sam_dev_s *priv)
|
||||
{
|
||||
/* Turn the display off */
|
||||
|
||||
@ -667,15 +667,15 @@ static int sam_poweroff(FAR struct sam_dev_s *priv)
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_putrun(fb_coord_t row, fb_coord_t col,
|
||||
FAR const uint8_t *buffer,
|
||||
const uint8_t *buffer,
|
||||
size_t npixels)
|
||||
{
|
||||
#if defined(CONFIG_SAM4EEK_LCD_RGB565)
|
||||
FAR const uint16_t *src = (FAR const uint16_t *)buffer;
|
||||
const uint16_t *src = (const uint16_t *)buffer;
|
||||
#elif defined(CONFIG_SAM4EEK_LCD_RGB24)
|
||||
FAR const uint8_t *src = (FAR const uint8_t *)buffer;
|
||||
const uint8_t *src = (const uint8_t *)buffer;
|
||||
#elif defined(CONFIG_SAM4EEK_LCD_RGB32)
|
||||
FAR const uint32_t *src = (FAR const uint32_t *)buffer;
|
||||
const uint32_t *src = (const uint32_t *)buffer;
|
||||
#endif
|
||||
|
||||
/* Buffer must be provided and aligned to a 16-bit address boundary */
|
||||
@ -729,12 +729,12 @@ static int sam_putrun(fb_coord_t row, fb_coord_t col,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
|
||||
static int sam_getrun(fb_coord_t row, fb_coord_t col, uint8_t *buffer,
|
||||
size_t npixels)
|
||||
{
|
||||
uint8_t value[2];
|
||||
#if defined(CONFIG_SAM4EEK_LCD_RGB24)
|
||||
FAR uint8_t *ptr = (FAR uint8_t *)buffer;
|
||||
uint8_t *ptr = (uint8_t *)buffer;
|
||||
#endif
|
||||
/* Set the cursor position */
|
||||
|
||||
@ -794,8 +794,8 @@ static int sam_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
static int sam_getvideoinfo(struct lcd_dev_s *dev,
|
||||
struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
@ -813,8 +813,8 @@ static int sam_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
FAR struct lcd_planeinfo_s *pinfo)
|
||||
static int sam_getplaneinfo(struct lcd_dev_s *dev, unsigned int planeno,
|
||||
struct lcd_planeinfo_s *pinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && pinfo && planeno == 0);
|
||||
lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
@ -834,7 +834,7 @@ static int sam_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
|
||||
static int sam_getpower(struct lcd_dev_s *dev)
|
||||
{
|
||||
FAR struct sam_dev_s *priv = (FAR struct sam_dev_s *)dev;
|
||||
struct sam_dev_s *priv = (struct sam_dev_s *)dev;
|
||||
|
||||
lcdinfo("power: %d\n", 0);
|
||||
return priv->power;
|
||||
@ -852,7 +852,7 @@ static int sam_getpower(struct lcd_dev_s *dev)
|
||||
|
||||
static int sam_setpower(struct lcd_dev_s *dev, int power)
|
||||
{
|
||||
FAR struct sam_dev_s *priv = (FAR struct sam_dev_s *)dev;
|
||||
struct sam_dev_s *priv = (struct sam_dev_s *)dev;
|
||||
|
||||
lcdinfo("power: %d\n", power);
|
||||
DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER);
|
||||
@ -1312,7 +1312,7 @@ static inline int sam_lcd_initialize(void)
|
||||
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
FAR struct sam_dev_s *priv = &g_lcddev;
|
||||
struct sam_dev_s *priv = &g_lcddev;
|
||||
int ret;
|
||||
|
||||
lcdinfo("Initializing\n");
|
||||
@ -1356,7 +1356,7 @@ int board_lcd_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return &g_lcddev.dev;
|
||||
@ -1372,7 +1372,7 @@ FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
FAR struct sam_dev_s *priv = &g_lcddev;
|
||||
struct sam_dev_s *priv = &g_lcddev;
|
||||
|
||||
/* Put the LCD in the lowest possible power state */
|
||||
|
||||
|
@ -283,9 +283,9 @@ struct sam_dev_s
|
||||
|
||||
/* Low Level LCD access */
|
||||
|
||||
static void sam_putreg(uint8_t regaddr, FAR const uint8_t *buffer,
|
||||
static void sam_putreg(uint8_t regaddr, const uint8_t *buffer,
|
||||
unsigned int buflen);
|
||||
static void sam_getreg(uint8_t regaddr, FAR uint8_t *buffer,
|
||||
static void sam_getreg(uint8_t regaddr, uint8_t *buffer,
|
||||
unsigned int buflen);
|
||||
static void sam_setwindow(sam_color_t row, sam_color_t col,
|
||||
sam_color_t width, sam_color_t height);
|
||||
@ -298,24 +298,24 @@ static inline sam_color_t sam_gram_read(void);
|
||||
|
||||
static void sam_disable_backlight(void);
|
||||
static void sam_set_backlight(unsigned int power);
|
||||
static int sam_poweroff(FAR struct sam_dev_s *priv);
|
||||
static int sam_poweroff(struct sam_dev_s *priv);
|
||||
|
||||
/* LCD Data Transfer Methods */
|
||||
|
||||
static int sam_putrun(fb_coord_t row, fb_coord_t col,
|
||||
FAR const uint8_t *buffer,
|
||||
const uint8_t *buffer,
|
||||
size_t npixels);
|
||||
static int sam_getrun(fb_coord_t row, fb_coord_t col,
|
||||
FAR uint8_t *buffer,
|
||||
uint8_t *buffer,
|
||||
size_t npixels);
|
||||
|
||||
/* LCD Configuration */
|
||||
|
||||
static int sam_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo);
|
||||
static int sam_getplaneinfo(FAR struct lcd_dev_s *dev,
|
||||
static int sam_getvideoinfo(struct lcd_dev_s *dev,
|
||||
struct fb_videoinfo_s *vinfo);
|
||||
static int sam_getplaneinfo(struct lcd_dev_s *dev,
|
||||
unsigned int planeno,
|
||||
FAR struct lcd_planeinfo_s *pinfo);
|
||||
struct lcd_planeinfo_s *pinfo);
|
||||
|
||||
/* LCD RGB Mapping */
|
||||
|
||||
@ -428,7 +428,7 @@ static struct sam_dev_s g_lcddev =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void sam_putreg(uint8_t regaddr, FAR const uint8_t *buffer,
|
||||
static void sam_putreg(uint8_t regaddr, const uint8_t *buffer,
|
||||
unsigned int buflen)
|
||||
{
|
||||
LCD_INDEX = 0;
|
||||
@ -450,7 +450,7 @@ static void sam_putreg(uint8_t regaddr, FAR const uint8_t *buffer,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void sam_getreg(uint8_t regaddr, FAR uint8_t *buffer,
|
||||
static void sam_getreg(uint8_t regaddr, uint8_t *buffer,
|
||||
unsigned int buflen)
|
||||
{
|
||||
LCD_INDEX = 0;
|
||||
@ -579,7 +579,7 @@ static inline sam_color_t sam_gram_read(void)
|
||||
****************************************************************************/
|
||||
|
||||
#if 0 /* Sometimes useful */
|
||||
static void sam_dumprun(FAR const char *msg, FAR uint16_t *run,
|
||||
static void sam_dumprun(const char *msg, uint16_t *run,
|
||||
size_t npixels)
|
||||
{
|
||||
int i;
|
||||
@ -672,7 +672,7 @@ static void sam_set_backlight(unsigned int power)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_poweroff(FAR struct sam_dev_s *priv)
|
||||
static int sam_poweroff(struct sam_dev_s *priv)
|
||||
{
|
||||
lcdinfo("OFF\n");
|
||||
|
||||
@ -705,15 +705,15 @@ static int sam_poweroff(FAR struct sam_dev_s *priv)
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_putrun(fb_coord_t row, fb_coord_t col,
|
||||
FAR const uint8_t *buffer,
|
||||
const uint8_t *buffer,
|
||||
size_t npixels)
|
||||
{
|
||||
#if defined(CONFIG_SAM4EEK_LCD_RGB565)
|
||||
FAR const uint16_t *src = (FAR const uint16_t *)buffer;
|
||||
const uint16_t *src = (const uint16_t *)buffer;
|
||||
#elif defined(CONFIG_SAM4EEK_LCD_RGB24)
|
||||
FAR const uint8_t *src = (FAR const uint8_t *)buffer;
|
||||
const uint8_t *src = (const uint8_t *)buffer;
|
||||
#elif defined(CONFIG_SAM4EEK_LCD_RGB32)
|
||||
FAR const uint32_t *src = (FAR const uint32_t *)buffer;
|
||||
const uint32_t *src = (const uint32_t *)buffer;
|
||||
#endif
|
||||
|
||||
/* Buffer must be provided and aligned to a 16-bit address boundary */
|
||||
@ -763,15 +763,15 @@ static int sam_putrun(fb_coord_t row, fb_coord_t col,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
|
||||
static int sam_getrun(fb_coord_t row, fb_coord_t col, uint8_t *buffer,
|
||||
size_t npixels)
|
||||
{
|
||||
#if defined(CONFIG_SAM4EEK_LCD_RGB565)
|
||||
FAR uint16_t *dest = (FAR uint16_t *)buffer;
|
||||
uint16_t *dest = (uint16_t *)buffer;
|
||||
#elif defined(CONFIG_SAM4EEK_LCD_RGB24)
|
||||
FAR uint8_t *dest = (FAR uint8_t *)buffer;
|
||||
uint8_t *dest = (uint8_t *)buffer;
|
||||
#elif defined(dest)
|
||||
FAR uint32_t *dest = (FAR uint32_t *)buffer;
|
||||
uint32_t *dest = (uint32_t *)buffer;
|
||||
#endif
|
||||
|
||||
/* Buffer must be provided and aligned to a 16-bit address boundary */
|
||||
@ -815,8 +815,8 @@ static int sam_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
static int sam_getvideoinfo(struct lcd_dev_s *dev,
|
||||
struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
@ -834,8 +834,8 @@ static int sam_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
FAR struct lcd_planeinfo_s *pinfo)
|
||||
static int sam_getplaneinfo(struct lcd_dev_s *dev, unsigned int planeno,
|
||||
struct lcd_planeinfo_s *pinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && pinfo && planeno == 0);
|
||||
lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
@ -855,7 +855,7 @@ static int sam_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
|
||||
static int sam_getpower(struct lcd_dev_s *dev)
|
||||
{
|
||||
FAR struct sam_dev_s *priv = (FAR struct sam_dev_s *)dev;
|
||||
struct sam_dev_s *priv = (struct sam_dev_s *)dev;
|
||||
|
||||
lcdinfo("power: %d\n", 0);
|
||||
return priv->power;
|
||||
@ -873,7 +873,7 @@ static int sam_getpower(struct lcd_dev_s *dev)
|
||||
|
||||
static int sam_setpower(struct lcd_dev_s *dev, int power)
|
||||
{
|
||||
FAR struct sam_dev_s *priv = (FAR struct sam_dev_s *)dev;
|
||||
struct sam_dev_s *priv = (struct sam_dev_s *)dev;
|
||||
|
||||
lcdinfo("power: %d\n", power);
|
||||
DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER);
|
||||
@ -1178,7 +1178,7 @@ static inline int sam_lcd_initialize(void)
|
||||
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
FAR struct sam_dev_s *priv = &g_lcddev;
|
||||
struct sam_dev_s *priv = &g_lcddev;
|
||||
int ret;
|
||||
|
||||
lcdinfo("Initializing\n");
|
||||
@ -1222,7 +1222,7 @@ int board_lcd_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return &g_lcddev.dev;
|
||||
@ -1238,7 +1238,7 @@ FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
FAR struct sam_dev_s *priv = &g_lcddev;
|
||||
struct sam_dev_s *priv = &g_lcddev;
|
||||
|
||||
/* Put the LCD in the lowest possible power state */
|
||||
|
||||
|
@ -173,7 +173,7 @@ void sam_spi0select(uint32_t devid, bool selected)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -69,7 +69,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void sam_udp_suspend(FAR struct usbdev_s *dev, bool resume)
|
||||
void sam_udp_suspend(struct usbdev_s *dev, bool resume)
|
||||
{
|
||||
uinfo("resume: %d\n", resume);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ uint32_t board_buttons(void)
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SAM34_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, void *arg)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
|
||||
|
@ -75,7 +75,7 @@
|
||||
|
||||
int sam_sdinitialize(int minor)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
struct spi_dev_s *spi;
|
||||
int ret;
|
||||
|
||||
/* Get the SPI driver instance for the SD chip select */
|
||||
|
@ -231,7 +231,7 @@
|
||||
struct slcd_instream_s
|
||||
{
|
||||
struct lib_instream_s stream;
|
||||
FAR const char *buffer;
|
||||
const char *buffer;
|
||||
ssize_t nbytes;
|
||||
};
|
||||
|
||||
@ -260,8 +260,8 @@ struct slcd_pixel_s
|
||||
/* Debug */
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||
static void slcd_dumpstate(FAR const char *msg);
|
||||
static void slcd_dumpslcd(FAR const char *msg);
|
||||
static void slcd_dumpstate(const char *msg);
|
||||
static void slcd_dumpslcd(const char *msg);
|
||||
#else
|
||||
# define slcd_dumpstate(msg)
|
||||
# define slcd_dumpslcd(msg)
|
||||
@ -272,11 +272,11 @@ static void slcd_dumpslcd(FAR const char *msg);
|
||||
#if 0 /* Not used */
|
||||
static void slcd_clear(void);
|
||||
#endif
|
||||
static void slcd_setpixel(FAR const struct slcd_pixel_s *info);
|
||||
static void slcd_clrpixel(FAR const struct slcd_pixel_s *info);
|
||||
static void slcd_setpixel(const struct slcd_pixel_s *info);
|
||||
static void slcd_clrpixel(const struct slcd_pixel_s *info);
|
||||
static inline void slcd_setdp(uint8_t curpos);
|
||||
static inline void slcd_clrdp(uint8_t curpos);
|
||||
static int slcd_getstream(FAR struct lib_instream_s *instream);
|
||||
static int slcd_getstream(struct lib_instream_s *instream);
|
||||
static uint8_t slcd_getcontrast(void);
|
||||
static int slcd_setcontrast(unsigned int contrast);
|
||||
static void slcd_writech(uint8_t ch, uint8_t curpos, uint8_t options);
|
||||
@ -284,10 +284,10 @@ static void slcd_action(enum slcdcode_e code, uint8_t count);
|
||||
|
||||
/* Character driver methods */
|
||||
|
||||
static ssize_t slcd_read(FAR struct file *, FAR char *, size_t);
|
||||
static ssize_t slcd_write(FAR struct file *, FAR const char *, size_t);
|
||||
static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
|
||||
static int slcd_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
static ssize_t slcd_read(struct file *, char *, size_t);
|
||||
static ssize_t slcd_write(struct file *, const char *, size_t);
|
||||
static int slcd_ioctl(struct file *filep, int cmd, unsigned long arg);
|
||||
static int slcd_poll(struct file *filep, struct pollfd *fds,
|
||||
bool setup);
|
||||
|
||||
/****************************************************************************
|
||||
@ -393,7 +393,7 @@ static const struct slcd_pixel_s g_einfo[SLCD_NE] =
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||
static void slcd_dumpstate(FAR const char *msg)
|
||||
static void slcd_dumpstate(const char *msg)
|
||||
{
|
||||
lcdinfo("%s:\n", msg);
|
||||
lcdinfo(" curpos: %d\n",
|
||||
@ -418,7 +418,7 @@ static void slcd_dumpstate(FAR const char *msg)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD_INFO
|
||||
static void slcd_dumpslcd(FAR const char *msg)
|
||||
static void slcd_dumpslcd(const char *msg)
|
||||
{
|
||||
lcdinfo("%s:\n", msg);
|
||||
lcdinfo(" CFG: %08x TIM: %08x SR: %08x\n",
|
||||
@ -458,7 +458,7 @@ static void slcd_clear(void)
|
||||
* Name: slcd_setpixel
|
||||
****************************************************************************/
|
||||
|
||||
static void slcd_setpixel(FAR const struct slcd_pixel_s *info)
|
||||
static void slcd_setpixel(const struct slcd_pixel_s *info)
|
||||
{
|
||||
uintptr_t regaddr;
|
||||
uint32_t regval;
|
||||
@ -473,7 +473,7 @@ static void slcd_setpixel(FAR const struct slcd_pixel_s *info)
|
||||
* Name: slcd_clrpixel
|
||||
****************************************************************************/
|
||||
|
||||
static void slcd_clrpixel(FAR const struct slcd_pixel_s *info)
|
||||
static void slcd_clrpixel(const struct slcd_pixel_s *info)
|
||||
{
|
||||
uintptr_t regaddr;
|
||||
uint32_t regval;
|
||||
@ -522,10 +522,10 @@ static inline void slcd_clrdp(uint8_t curpos)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int slcd_getstream(FAR struct lib_instream_s *instream)
|
||||
static int slcd_getstream(struct lib_instream_s *instream)
|
||||
{
|
||||
FAR struct slcd_instream_s *slcdstream =
|
||||
(FAR struct slcd_instream_s *)instream;
|
||||
struct slcd_instream_s *slcdstream =
|
||||
(struct slcd_instream_s *)instream;
|
||||
|
||||
DEBUGASSERT(slcdstream && slcdstream->buffer);
|
||||
if (slcdstream->nbytes > 0)
|
||||
@ -858,8 +858,8 @@ static void slcd_action(enum slcdcode_e code, uint8_t count)
|
||||
* Name: slcd_read
|
||||
****************************************************************************/
|
||||
|
||||
static ssize_t slcd_read(FAR struct file *filep,
|
||||
FAR char *buffer, size_t len)
|
||||
static ssize_t slcd_read(struct file *filep,
|
||||
char *buffer, size_t len)
|
||||
{
|
||||
int ret = 0;
|
||||
int i;
|
||||
@ -896,8 +896,8 @@ static ssize_t slcd_read(FAR struct file *filep,
|
||||
* Name: slcd_write
|
||||
****************************************************************************/
|
||||
|
||||
static ssize_t slcd_write(FAR struct file *filep,
|
||||
FAR const char *buffer, size_t len)
|
||||
static ssize_t slcd_write(struct file *filep,
|
||||
const char *buffer, size_t len)
|
||||
{
|
||||
struct slcd_instream_s instream;
|
||||
struct slcdstate_s state;
|
||||
@ -1011,7 +1011,7 @@ static ssize_t slcd_write(FAR struct file *filep,
|
||||
* Name: slcd_poll
|
||||
****************************************************************************/
|
||||
|
||||
static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
static int slcd_ioctl(struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
switch (cmd)
|
||||
{
|
||||
@ -1023,8 +1023,8 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
case SLCDIOC_GETATTRIBUTES:
|
||||
{
|
||||
FAR struct slcd_attributes_s *attr =
|
||||
(FAR struct slcd_attributes_s *)((uintptr_t)arg);
|
||||
struct slcd_attributes_s *attr =
|
||||
(struct slcd_attributes_s *)((uintptr_t)arg);
|
||||
|
||||
lcdinfo("SLCDIOC_GETATTRIBUTES:\n");
|
||||
|
||||
@ -1049,8 +1049,8 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
case SLCDIOC_CURPOS:
|
||||
{
|
||||
FAR struct slcd_curpos_s *curpos =
|
||||
(FAR struct slcd_curpos_s *)((uintptr_t)arg);
|
||||
struct slcd_curpos_s *curpos =
|
||||
(struct slcd_curpos_s *)((uintptr_t)arg);
|
||||
|
||||
lcdinfo("SLCDIOC_CURPOS: row=0 column=%d\n", g_slcdstate.curpos);
|
||||
|
||||
@ -1119,7 +1119,7 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
case SLCDIOC_GETCONTRAST:
|
||||
{
|
||||
FAR int *contrast = (FAR int *)((uintptr_t)arg);
|
||||
int *contrast = (int *)((uintptr_t)arg);
|
||||
if (!contrast)
|
||||
{
|
||||
return -EINVAL;
|
||||
@ -1161,8 +1161,8 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
* Name: slcd_poll
|
||||
****************************************************************************/
|
||||
|
||||
static int slcd_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
bool setup)
|
||||
static int slcd_poll(struct file *filep, struct pollfd *fds,
|
||||
bool setup)
|
||||
{
|
||||
if (setup)
|
||||
{
|
||||
|
@ -169,7 +169,7 @@ void sam_spi0select(uint32_t devid, bool selected)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -217,7 +217,7 @@ uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int sam_spic0mddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spic0mddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_SAM4L_XPLAINED_OLED1MODULE
|
||||
if (devid == SPIDEV_DISPLAY(0))
|
||||
|
@ -92,10 +92,10 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
FAR struct lcd_dev_s *dev;
|
||||
struct spi_dev_s *spi;
|
||||
struct lcd_dev_s *dev;
|
||||
|
||||
/* Configure the OLED GPIOs. This initial configuration is RESET low,
|
||||
* putting the OLED into reset state.
|
||||
|
@ -94,7 +94,7 @@ uint32_t board_buttons(void)
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SAM34_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, void *arg)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
|
||||
|
@ -80,7 +80,7 @@ static struct sam_hsmci_state_s g_hsmci;
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_MMCSD_HAVE_CARDDETECT
|
||||
static int sam_hsmci_cardetect_int(int irq, void *regs, FAR void *arg)
|
||||
static int sam_hsmci_cardetect_int(int irq, void *regs, void *arg)
|
||||
{
|
||||
bool inserted;
|
||||
|
||||
|
@ -184,7 +184,7 @@ int board_nandflash_config(int cs)
|
||||
|
||||
int sam_nand_automount(int minor)
|
||||
{
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
struct mtd_dev_s *mtd;
|
||||
static bool initialized = false;
|
||||
|
||||
/* Have we already initialized? */
|
||||
|
@ -150,7 +150,7 @@ void sam_spi0select(uint32_t devid, bool selected)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAM34_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return SPI_STATUS_PRESENT;
|
||||
}
|
||||
@ -158,7 +158,7 @@ uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
|
||||
int sam_sdinitialize(int port, int minor)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
struct spi_dev_s *spi;
|
||||
int ret;
|
||||
|
||||
/* Get the SPI driver instance for the SD chip select */
|
||||
|
@ -69,7 +69,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void sam_udp_suspend(FAR struct usbdev_s *dev, bool resume)
|
||||
void sam_udp_suspend(struct usbdev_s *dev, bool resume)
|
||||
{
|
||||
uinfo("resume: %d\n", resume);
|
||||
}
|
||||
|
@ -80,7 +80,7 @@
|
||||
#if defined(CONFIG_WDT_THREAD)
|
||||
static int wdog_daemon(int argc, char *argv[])
|
||||
{
|
||||
FAR struct file filestruct;
|
||||
struct file filestruct;
|
||||
int ret;
|
||||
|
||||
/* Open the watchdog device for reading */
|
||||
@ -137,7 +137,7 @@ errout:
|
||||
int sam_watchdog_initialize(void)
|
||||
{
|
||||
#if (defined(CONFIG_SAM34_WDT) && !defined(CONFIG_WDT_DISABLE_ON_RESET))
|
||||
FAR struct file filestruct;
|
||||
struct file filestruct;
|
||||
int ret;
|
||||
|
||||
/* Initialize the watchdog timer device */
|
||||
@ -188,7 +188,7 @@ int sam_watchdog_initialize(void)
|
||||
int taskid = kthread_create(CONFIG_WDT_THREAD_NAME,
|
||||
CONFIG_WDT_THREAD_PRIORITY,
|
||||
CONFIG_WDT_THREAD_STACKSIZE,
|
||||
(main_t)wdog_daemon, (FAR char * const *)NULL);
|
||||
(main_t)wdog_daemon, (char * const *)NULL);
|
||||
|
||||
DEBUGASSERT(taskid > 0);
|
||||
UNUSED(taskid);
|
||||
|
@ -94,7 +94,7 @@ uint32_t board_buttons(void)
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SAM34_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, void *arg)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
|
||||
|
@ -85,18 +85,18 @@
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
static ajoy_buttonset_t ajoy_supported(FAR const struct ajoy_lowerhalf_s
|
||||
static ajoy_buttonset_t ajoy_supported(const struct ajoy_lowerhalf_s
|
||||
*lower);
|
||||
static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
|
||||
FAR struct ajoy_sample_s *sample);
|
||||
static ajoy_buttonset_t ajoy_buttons(FAR const struct ajoy_lowerhalf_s
|
||||
static int ajoy_sample(const struct ajoy_lowerhalf_s *lower,
|
||||
struct ajoy_sample_s *sample);
|
||||
static ajoy_buttonset_t ajoy_buttons(const struct ajoy_lowerhalf_s
|
||||
*lower);
|
||||
static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower,
|
||||
ajoy_buttonset_t press, ajoy_buttonset_t release,
|
||||
ajoy_handler_t handler, FAR void *arg);
|
||||
static void ajoy_enable(const struct ajoy_lowerhalf_s *lower,
|
||||
ajoy_buttonset_t press, ajoy_buttonset_t release,
|
||||
ajoy_handler_t handler, void *arg);
|
||||
|
||||
static void ajoy_disable(void);
|
||||
static int ajoy_interrupt(int irq, FAR void *context, FAR void *arg);
|
||||
static int ajoy_interrupt(int irq, void *context, void *arg);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
@ -135,7 +135,7 @@ static struct file g_adcfile;
|
||||
/* Current interrupt handler and argument */
|
||||
|
||||
static ajoy_handler_t g_ajoyhandler;
|
||||
static FAR void *g_ajoyarg;
|
||||
static void *g_ajoyarg;
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
@ -149,7 +149,7 @@ static FAR void *g_ajoyarg;
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static ajoy_buttonset_t ajoy_supported(FAR const struct ajoy_lowerhalf_s
|
||||
static ajoy_buttonset_t ajoy_supported(const struct ajoy_lowerhalf_s
|
||||
*lower)
|
||||
{
|
||||
iinfo("Supported: %02x\n", AJOY_SUPPORTED);
|
||||
@ -164,11 +164,11 @@ static ajoy_buttonset_t ajoy_supported(FAR const struct ajoy_lowerhalf_s
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
|
||||
FAR struct ajoy_sample_s *sample)
|
||||
static int ajoy_sample(const struct ajoy_lowerhalf_s *lower,
|
||||
struct ajoy_sample_s *sample)
|
||||
{
|
||||
struct adc_msg_s adcmsg[SAM_ADC_NCHANNELS];
|
||||
FAR struct adc_msg_s *ptr;
|
||||
struct adc_msg_s *ptr;
|
||||
ssize_t nread;
|
||||
ssize_t offset;
|
||||
int have;
|
||||
@ -245,7 +245,7 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static ajoy_buttonset_t ajoy_buttons(FAR const struct ajoy_lowerhalf_s
|
||||
static ajoy_buttonset_t ajoy_buttons(const struct ajoy_lowerhalf_s
|
||||
*lower)
|
||||
{
|
||||
ajoy_buttonset_t ret = 0;
|
||||
@ -278,9 +278,9 @@ static ajoy_buttonset_t ajoy_buttons(FAR const struct ajoy_lowerhalf_s
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower,
|
||||
ajoy_buttonset_t press, ajoy_buttonset_t release,
|
||||
ajoy_handler_t handler, FAR void *arg)
|
||||
static void ajoy_enable(const struct ajoy_lowerhalf_s *lower,
|
||||
ajoy_buttonset_t press, ajoy_buttonset_t release,
|
||||
ajoy_handler_t handler, void *arg)
|
||||
{
|
||||
irqstate_t flags;
|
||||
ajoy_buttonset_t either = press | release;
|
||||
@ -367,7 +367,7 @@ static void ajoy_disable(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int ajoy_interrupt(int irq, FAR void *context, FAR void *arg)
|
||||
static int ajoy_interrupt(int irq, void *context, void *arg)
|
||||
{
|
||||
DEBUGASSERT(g_ajoyhandler);
|
||||
if (g_ajoyhandler)
|
||||
|
@ -84,7 +84,7 @@
|
||||
#ifdef HAVE_I2CTOOL
|
||||
static void sam_i2c_register(int bus)
|
||||
{
|
||||
FAR struct i2c_master_s *i2c;
|
||||
struct i2c_master_s *i2c;
|
||||
int ret;
|
||||
|
||||
i2c = sam_i2cbus_initialize(bus);
|
||||
|
@ -80,7 +80,7 @@ struct sam_sdmmc_state_s
|
||||
/* SDMMC device state */
|
||||
|
||||
#ifdef CONFIG_SAMA5_SDMMC0
|
||||
static int sam_sdmmc0_cardetect(int irq, void *regs, FAR void *arg);
|
||||
static int sam_sdmmc0_cardetect(int irq, void *regs, void *arg);
|
||||
|
||||
static struct sam_sdmmc_state_s g_sdmmc0 =
|
||||
{
|
||||
@ -92,7 +92,7 @@ static struct sam_sdmmc_state_s g_sdmmc0 =
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_SDMMC1
|
||||
static int sam_sdmmc1_cardetect(int irq, void *regs, FAR void *arg);
|
||||
static int sam_sdmmc1_cardetect(int irq, void *regs, void *arg);
|
||||
|
||||
static struct sam_sdmmc_state_s g_sdmmc1 =
|
||||
{
|
||||
@ -157,14 +157,14 @@ static int sam_sdmmc_cardetect(struct sam_sdmmc_state_s *state)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SAMA5_SDMMC0
|
||||
static int sam_sdmmc0_cardetect(int irq, void *regs, FAR void *arg)
|
||||
static int sam_sdmmc0_cardetect(int irq, void *regs, void *arg)
|
||||
{
|
||||
return sam_sdmmc_cardetect(&g_sdmmc0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_SDMMC1
|
||||
static int sam_sdmmc1_cardetect(int irq, void *regs, FAR void *arg)
|
||||
static int sam_sdmmc1_cardetect(int irq, void *regs, void *arg)
|
||||
{
|
||||
return sam_sdmmc_cardetect(&g_sdmmc1);
|
||||
}
|
||||
|
@ -150,14 +150,14 @@ void sam_spi1select(uint32_t devid, bool selected)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi1status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ int sam_usbhost_initialize(void)
|
||||
ret = kthread_create("OHCI Monitor",
|
||||
CONFIG_SAMA5D27_GIANT_BOARD_USBHOST_PRIO,
|
||||
CONFIG_SAMA5D27_GIANT_BOARD_USBHOST_STACKSIZE,
|
||||
(main_t)ohci_waiter, (FAR char * const *)NULL);
|
||||
(main_t)ohci_waiter, (char * const *)NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
uerr("ERROR: Failed to create ohci_waiter task: %d\n", ret);
|
||||
@ -316,7 +316,7 @@ int sam_usbhost_initialize(void)
|
||||
ret = kthread_create("EHCI Monitor",
|
||||
CONFIG_SAMA5D27_GIANT_BOARD_USBHOST_PRIO,
|
||||
CONFIG_SAMA5D27_GIANT_BOARD_USBHOST_STACKSIZE,
|
||||
(main_t)ehci_waiter, (FAR char * const *)NULL);
|
||||
(main_t)ehci_waiter, (char * const *)NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
uerr("ERROR: Failed to create ehci_waiter task: %d\n", ret);
|
||||
@ -470,7 +470,7 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_USBDEV
|
||||
void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume)
|
||||
void sam_usbsuspend(struct usbdev_s *dev, bool resume)
|
||||
{
|
||||
uinfo("resume: %d\n", resume);
|
||||
}
|
||||
|
@ -85,18 +85,18 @@
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
static ajoy_buttonset_t ajoy_supported(FAR const struct ajoy_lowerhalf_s
|
||||
static ajoy_buttonset_t ajoy_supported(const struct ajoy_lowerhalf_s
|
||||
*lower);
|
||||
static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
|
||||
FAR struct ajoy_sample_s *sample);
|
||||
static ajoy_buttonset_t ajoy_buttons(FAR const struct ajoy_lowerhalf_s
|
||||
static int ajoy_sample(const struct ajoy_lowerhalf_s *lower,
|
||||
struct ajoy_sample_s *sample);
|
||||
static ajoy_buttonset_t ajoy_buttons(const struct ajoy_lowerhalf_s
|
||||
*lower);
|
||||
static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower,
|
||||
ajoy_buttonset_t press, ajoy_buttonset_t release,
|
||||
ajoy_handler_t handler, FAR void *arg);
|
||||
static void ajoy_enable(const struct ajoy_lowerhalf_s *lower,
|
||||
ajoy_buttonset_t press, ajoy_buttonset_t release,
|
||||
ajoy_handler_t handler, void *arg);
|
||||
|
||||
static void ajoy_disable(void);
|
||||
static int ajoy_interrupt(int irq, FAR void *context, FAR void *arg);
|
||||
static int ajoy_interrupt(int irq, void *context, void *arg);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
@ -135,7 +135,7 @@ static struct file g_adcfile;
|
||||
/* Current interrupt handler and argument */
|
||||
|
||||
static ajoy_handler_t g_ajoyhandler;
|
||||
static FAR void *g_ajoyarg;
|
||||
static void *g_ajoyarg;
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
@ -149,7 +149,7 @@ static FAR void *g_ajoyarg;
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static ajoy_buttonset_t ajoy_supported(FAR const struct ajoy_lowerhalf_s
|
||||
static ajoy_buttonset_t ajoy_supported(const struct ajoy_lowerhalf_s
|
||||
*lower)
|
||||
{
|
||||
iinfo("Supported: %02x\n", AJOY_SUPPORTED);
|
||||
@ -164,11 +164,11 @@ static ajoy_buttonset_t ajoy_supported(FAR const struct ajoy_lowerhalf_s
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
|
||||
FAR struct ajoy_sample_s *sample)
|
||||
static int ajoy_sample(const struct ajoy_lowerhalf_s *lower,
|
||||
struct ajoy_sample_s *sample)
|
||||
{
|
||||
struct adc_msg_s adcmsg[SAM_ADC_NCHANNELS];
|
||||
FAR struct adc_msg_s *ptr;
|
||||
struct adc_msg_s *ptr;
|
||||
ssize_t nread;
|
||||
ssize_t offset;
|
||||
int have;
|
||||
@ -245,7 +245,7 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static ajoy_buttonset_t ajoy_buttons(FAR const struct ajoy_lowerhalf_s
|
||||
static ajoy_buttonset_t ajoy_buttons(const struct ajoy_lowerhalf_s
|
||||
*lower)
|
||||
{
|
||||
ajoy_buttonset_t ret = 0;
|
||||
@ -278,9 +278,9 @@ static ajoy_buttonset_t ajoy_buttons(FAR const struct ajoy_lowerhalf_s
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower,
|
||||
ajoy_buttonset_t press, ajoy_buttonset_t release,
|
||||
ajoy_handler_t handler, FAR void *arg)
|
||||
static void ajoy_enable(const struct ajoy_lowerhalf_s *lower,
|
||||
ajoy_buttonset_t press, ajoy_buttonset_t release,
|
||||
ajoy_handler_t handler, void *arg)
|
||||
{
|
||||
irqstate_t flags;
|
||||
ajoy_buttonset_t either = press | release;
|
||||
@ -367,7 +367,7 @@ static void ajoy_disable(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int ajoy_interrupt(int irq, FAR void *context, FAR void *arg)
|
||||
static int ajoy_interrupt(int irq, void *context, void *arg)
|
||||
{
|
||||
DEBUGASSERT(g_ajoyhandler);
|
||||
if (g_ajoyhandler)
|
||||
|
@ -57,8 +57,8 @@
|
||||
|
||||
int sam_at25_automount(int minor)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
struct spi_dev_s *spi;
|
||||
struct mtd_dev_s *mtd;
|
||||
static bool initialized = false;
|
||||
int ret;
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
||||
#ifdef HAVE_I2CTOOL
|
||||
static void sam_i2c_register(int bus)
|
||||
{
|
||||
FAR struct i2c_master_s *i2c;
|
||||
struct i2c_master_s *i2c;
|
||||
int ret;
|
||||
|
||||
i2c = sam_i2cbus_initialize(bus);
|
||||
|
@ -104,7 +104,7 @@ uint32_t board_buttons(void)
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SAMA5_PIOB_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, void *arg)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
|
||||
|
@ -241,7 +241,7 @@ void weak_function sam_netinitialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_PIOE_IRQ
|
||||
int arch_phy_irq(FAR const char *intf, xcpt_t handler, void *arg,
|
||||
int arch_phy_irq(const char *intf, xcpt_t handler, void *arg,
|
||||
phy_enable_t *enable)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
@ -152,7 +152,7 @@ int board_nandflash_config(int cs)
|
||||
#ifdef HAVE_NAND
|
||||
int sam_nand_automount(int minor)
|
||||
{
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
struct mtd_dev_s *mtd;
|
||||
static bool initialized = false;
|
||||
int ret;
|
||||
|
||||
|
@ -97,7 +97,7 @@ struct sam_sdmmc_state_s
|
||||
/* SDMMC device state */
|
||||
|
||||
#ifdef CONFIG_SAMA5_SDMMC0
|
||||
static int sam_sdmmc0_cardetect(int irq, void *regs, FAR void *arg);
|
||||
static int sam_sdmmc0_cardetect(int irq, void *regs, void *arg);
|
||||
|
||||
static struct sam_sdmmc_state_s g_sdmmc0 =
|
||||
{
|
||||
@ -109,7 +109,7 @@ static struct sam_sdmmc_state_s g_sdmmc0 =
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_SDMMC1
|
||||
static int sam_sdmmc1_cardetect(int irq, void *regs, FAR void *arg);
|
||||
static int sam_sdmmc1_cardetect(int irq, void *regs, void *arg);
|
||||
|
||||
static struct sam_sdmmc_state_s g_sdmmc1 =
|
||||
{
|
||||
@ -174,14 +174,14 @@ static int sam_sdmmc_cardetect(struct sam_sdmmc_state_s *state)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SAMA5_SDMMC0
|
||||
static int sam_sdmmc0_cardetect(int irq, void *regs, FAR void *arg)
|
||||
static int sam_sdmmc0_cardetect(int irq, void *regs, void *arg)
|
||||
{
|
||||
return sam_sdmmc_cardetect(&g_sdmmc0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_SDMMC1
|
||||
static int sam_sdmmc1_cardetect(int irq, void *regs, FAR void *arg)
|
||||
static int sam_sdmmc1_cardetect(int irq, void *regs, void *arg)
|
||||
{
|
||||
return sam_sdmmc_cardetect(&g_sdmmc1);
|
||||
}
|
||||
|
@ -163,14 +163,14 @@ void sam_spi1select(uint32_t devid, bool selected)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi1status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -340,7 +340,7 @@ int sam_usbhost_initialize(void)
|
||||
|
||||
ret = kthread_create("OHCI Monitor", CONFIG_SAMA5D2XULT_USBHOST_PRIO,
|
||||
CONFIG_SAMA5D2XULT_USBHOST_STACKSIZE,
|
||||
(main_t)ohci_waiter, (FAR char * const *)NULL);
|
||||
(main_t)ohci_waiter, (char * const *)NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
uerr("ERROR: Failed to create ohci_waiter task: %d\n", ret);
|
||||
@ -362,7 +362,7 @@ int sam_usbhost_initialize(void)
|
||||
|
||||
ret = kthread_create("EHCI Monitor", CONFIG_SAMA5D2XULT_USBHOST_PRIO,
|
||||
CONFIG_SAMA5D2XULT_USBHOST_STACKSIZE,
|
||||
(main_t)ehci_waiter, (FAR char * const *)NULL);
|
||||
(main_t)ehci_waiter, (char * const *)NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
uerr("ERROR: Failed to create ehci_waiter task: %d\n", ret);
|
||||
@ -518,7 +518,7 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_USBDEV
|
||||
void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume)
|
||||
void sam_usbsuspend(struct usbdev_s *dev, bool resume)
|
||||
{
|
||||
uinfo("resume: %d\n", resume);
|
||||
}
|
||||
|
@ -86,17 +86,17 @@
|
||||
****************************************************************************/
|
||||
|
||||
static ajoy_buttonset_t
|
||||
ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower);
|
||||
static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
|
||||
FAR struct ajoy_sample_s *sample);
|
||||
ajoy_supported(const struct ajoy_lowerhalf_s *lower);
|
||||
static int ajoy_sample(const struct ajoy_lowerhalf_s *lower,
|
||||
struct ajoy_sample_s *sample);
|
||||
static ajoy_buttonset_t
|
||||
ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower);
|
||||
static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower,
|
||||
ajoy_buttons(const struct ajoy_lowerhalf_s *lower);
|
||||
static void ajoy_enable(const struct ajoy_lowerhalf_s *lower,
|
||||
ajoy_buttonset_t press, ajoy_buttonset_t release,
|
||||
ajoy_handler_t handler, FAR void *arg);
|
||||
ajoy_handler_t handler, void *arg);
|
||||
|
||||
static void ajoy_disable(void);
|
||||
static int ajoy_interrupt(int irq, FAR void *context, FAR void *arg);
|
||||
static int ajoy_interrupt(int irq, void *context, void *arg);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
@ -135,7 +135,7 @@ static struct file g_adcfile;
|
||||
/* Current interrupt handler and argument */
|
||||
|
||||
static ajoy_handler_t g_ajoyhandler;
|
||||
static FAR void *g_ajoyarg;
|
||||
static void *g_ajoyarg;
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
@ -150,7 +150,7 @@ static FAR void *g_ajoyarg;
|
||||
****************************************************************************/
|
||||
|
||||
static ajoy_buttonset_t
|
||||
ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower)
|
||||
ajoy_supported(const struct ajoy_lowerhalf_s *lower)
|
||||
{
|
||||
iinfo("Supported: %02x\n", AJOY_SUPPORTED);
|
||||
return (ajoy_buttonset_t)AJOY_SUPPORTED;
|
||||
@ -164,11 +164,11 @@ ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
|
||||
FAR struct ajoy_sample_s *sample)
|
||||
static int ajoy_sample(const struct ajoy_lowerhalf_s *lower,
|
||||
struct ajoy_sample_s *sample)
|
||||
{
|
||||
struct adc_msg_s adcmsg[SAM_ADC_NCHANNELS];
|
||||
FAR struct adc_msg_s *ptr;
|
||||
struct adc_msg_s *ptr;
|
||||
ssize_t nread;
|
||||
ssize_t offset;
|
||||
int have;
|
||||
@ -246,7 +246,7 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
|
||||
****************************************************************************/
|
||||
|
||||
static ajoy_buttonset_t
|
||||
ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower)
|
||||
ajoy_buttons(const struct ajoy_lowerhalf_s *lower)
|
||||
{
|
||||
ajoy_buttonset_t ret = 0;
|
||||
int i;
|
||||
@ -278,9 +278,9 @@ ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower,
|
||||
ajoy_buttonset_t press, ajoy_buttonset_t release,
|
||||
ajoy_handler_t handler, FAR void *arg)
|
||||
static void ajoy_enable(const struct ajoy_lowerhalf_s *lower,
|
||||
ajoy_buttonset_t press, ajoy_buttonset_t release,
|
||||
ajoy_handler_t handler, void *arg)
|
||||
{
|
||||
irqstate_t flags;
|
||||
ajoy_buttonset_t either = press | release;
|
||||
@ -367,7 +367,7 @@ static void ajoy_disable(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int ajoy_interrupt(int irq, FAR void *context, FAR void *arg)
|
||||
static int ajoy_interrupt(int irq, void *context, void *arg)
|
||||
{
|
||||
DEBUGASSERT(g_ajoyhandler);
|
||||
if (g_ajoyhandler)
|
||||
|
@ -57,8 +57,8 @@
|
||||
|
||||
int sam_at25_automount(int minor)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
struct spi_dev_s *spi;
|
||||
struct mtd_dev_s *mtd;
|
||||
static bool initialized = false;
|
||||
int ret;
|
||||
|
||||
|
@ -75,7 +75,7 @@
|
||||
#ifdef HAVE_I2CTOOL
|
||||
static void sam_i2c_register(int bus)
|
||||
{
|
||||
FAR struct i2c_master_s *i2c;
|
||||
struct i2c_master_s *i2c;
|
||||
int ret;
|
||||
|
||||
i2c = sam_i2cbus_initialize(bus);
|
||||
|
@ -108,7 +108,7 @@ uint32_t board_buttons(void)
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SAMA5_PIOE_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, void *arg)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
|
||||
|
@ -241,7 +241,7 @@ void weak_function sam_netinitialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_PIOE_IRQ
|
||||
int arch_phy_irq(FAR const char *intf, xcpt_t handler, void *arg,
|
||||
int arch_phy_irq(const char *intf, xcpt_t handler, void *arg,
|
||||
phy_enable_t *enable)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
@ -96,7 +96,7 @@ struct sam_hsmci_state_s
|
||||
/* HSCMI device state */
|
||||
|
||||
#ifdef CONFIG_SAMA5_HSMCI0
|
||||
static int sam_hsmci0_cardetect(int irq, void *regs, FAR void *arg);
|
||||
static int sam_hsmci0_cardetect(int irq, void *regs, void *arg);
|
||||
|
||||
static struct sam_hsmci_state_s g_hsmci0 =
|
||||
{
|
||||
@ -108,7 +108,7 @@ static struct sam_hsmci_state_s g_hsmci0 =
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_HSMCI1
|
||||
static int sam_hsmci1_cardetect(int irq, void *regs, FAR void *arg);
|
||||
static int sam_hsmci1_cardetect(int irq, void *regs, void *arg);
|
||||
|
||||
static struct sam_hsmci_state_s g_hsmci1 =
|
||||
{
|
||||
@ -173,14 +173,14 @@ static int sam_hsmci_cardetect(struct sam_hsmci_state_s *state)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SAMA5_HSMCI0
|
||||
static int sam_hsmci0_cardetect(int irq, void *regs, FAR void *arg)
|
||||
static int sam_hsmci0_cardetect(int irq, void *regs, void *arg)
|
||||
{
|
||||
return sam_hsmci_cardetect(&g_hsmci0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_HSMCI1
|
||||
static int sam_hsmci1_cardetect(int irq, void *regs, FAR void *arg)
|
||||
static int sam_hsmci1_cardetect(int irq, void *regs, void *arg)
|
||||
{
|
||||
return sam_hsmci_cardetect(&g_hsmci1);
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ int board_nandflash_config(int cs)
|
||||
#ifdef HAVE_NAND
|
||||
int sam_nand_automount(int minor)
|
||||
{
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
struct mtd_dev_s *mtd;
|
||||
static bool initialized = false;
|
||||
int ret;
|
||||
|
||||
|
@ -163,14 +163,14 @@ void sam_spi1select(uint32_t devid, bool selected)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi1status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ int sam_usbhost_initialize(void)
|
||||
|
||||
ret = kthread_create("OHCI Monitor", CONFIG_SAMA5D3XPLAINED_USBHOST_PRIO,
|
||||
CONFIG_SAMA5D3XPLAINED_USBHOST_STACKSIZE,
|
||||
(main_t)ohci_waiter, (FAR char * const *)NULL);
|
||||
(main_t)ohci_waiter, (char * const *)NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
uerr("ERROR: Failed to create ohci_waiter task: %d\n", ret);
|
||||
@ -370,7 +370,7 @@ int sam_usbhost_initialize(void)
|
||||
|
||||
ret = kthread_create("EHCI Monitor", CONFIG_SAMA5D3XPLAINED_USBHOST_PRIO,
|
||||
CONFIG_SAMA5D3XPLAINED_USBHOST_STACKSIZE,
|
||||
(main_t)ehci_waiter, (FAR char * const *)NULL);
|
||||
(main_t)ehci_waiter, (char * const *)NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
uerr("ERROR: Failed to create ehci_waiter task: %d\n", ret);
|
||||
@ -535,7 +535,7 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_USBDEV
|
||||
void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume)
|
||||
void sam_usbsuspend(struct usbdev_s *dev, bool resume)
|
||||
{
|
||||
uinfo("resume: %d\n", resume);
|
||||
}
|
||||
|
@ -75,8 +75,8 @@
|
||||
|
||||
int sam_at24_automount(int minor)
|
||||
{
|
||||
FAR struct i2c_master_s *i2c;
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
struct i2c_master_s *i2c;
|
||||
struct mtd_dev_s *mtd;
|
||||
static bool initialized = false;
|
||||
int ret;
|
||||
|
||||
|
@ -57,8 +57,8 @@
|
||||
|
||||
int sam_at25_automount(int minor)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
struct spi_dev_s *spi;
|
||||
struct mtd_dev_s *mtd;
|
||||
static bool initialized = false;
|
||||
int ret;
|
||||
|
||||
|
@ -108,7 +108,7 @@ uint32_t board_buttons(void)
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SAMA5_PIOE_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, void *arg)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
|
||||
|
@ -241,7 +241,7 @@ void weak_function sam_netinitialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_PIOE_IRQ
|
||||
int arch_phy_irq(FAR const char *intf, xcpt_t handler, void *arg,
|
||||
int arch_phy_irq(const char *intf, xcpt_t handler, void *arg,
|
||||
phy_enable_t *enable)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
@ -97,7 +97,7 @@ struct sam_hsmci_state_s
|
||||
/* HSCMI device state */
|
||||
|
||||
#ifdef CONFIG_SAMA5_HSMCI0
|
||||
static int sam_hsmci0_cardetect(int irq, void *regs, FAR void *arg);
|
||||
static int sam_hsmci0_cardetect(int irq, void *regs, void *arg);
|
||||
|
||||
static struct sam_hsmci_state_s g_hsmci0 =
|
||||
{
|
||||
@ -109,7 +109,7 @@ static struct sam_hsmci_state_s g_hsmci0 =
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_HSMCI1
|
||||
static int sam_hsmci1_cardetect(int irq, void *regs, FAR void *arg);
|
||||
static int sam_hsmci1_cardetect(int irq, void *regs, void *arg);
|
||||
|
||||
static struct sam_hsmci_state_s g_hsmci1 =
|
||||
{
|
||||
@ -174,14 +174,14 @@ static int sam_hsmci_cardetect(struct sam_hsmci_state_s *state)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SAMA5_HSMCI0
|
||||
static int sam_hsmci0_cardetect(int irq, void *regs, FAR void *arg)
|
||||
static int sam_hsmci0_cardetect(int irq, void *regs, void *arg)
|
||||
{
|
||||
return sam_hsmci_cardetect(&g_hsmci0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_HSMCI1
|
||||
static int sam_hsmci1_cardetect(int irq, void *regs, FAR void *arg)
|
||||
static int sam_hsmci1_cardetect(int irq, void *regs, void *arg)
|
||||
{
|
||||
return sam_hsmci_cardetect(&g_hsmci1);
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ int board_nandflash_config(int cs)
|
||||
#ifdef HAVE_NAND
|
||||
int sam_nand_automount(int minor)
|
||||
{
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
struct mtd_dev_s *mtd;
|
||||
static bool initialized = false;
|
||||
int ret;
|
||||
|
||||
|
@ -63,9 +63,9 @@
|
||||
* Name: ov2640_lcd_initialize
|
||||
****************************************************************************/
|
||||
|
||||
static inline FAR struct fb_vtable_s *ov2640_lcd_initialize(void)
|
||||
static inline struct fb_vtable_s *ov2640_lcd_initialize(void)
|
||||
{
|
||||
FAR struct fb_vtable_s *vplane;
|
||||
struct fb_vtable_s *vplane;
|
||||
int ret;
|
||||
|
||||
/* Initialize the frame buffer device */
|
||||
@ -143,7 +143,7 @@ static inline FAR struct fb_vtable_s *ov2640_lcd_initialize(void)
|
||||
|
||||
static inline int ov2640_camera_initialize(void)
|
||||
{
|
||||
FAR struct i2c_master_s *i2c;
|
||||
struct i2c_master_s *i2c;
|
||||
uint32_t actual;
|
||||
int ret;
|
||||
|
||||
@ -223,7 +223,7 @@ static inline int ov2640_camera_initialize(void)
|
||||
|
||||
int ov2640_main(int argc, char *argv[])
|
||||
{
|
||||
FAR struct fb_vtable_s *vplane;
|
||||
struct fb_vtable_s *vplane;
|
||||
int ret;
|
||||
|
||||
/* First, initialize the display */
|
||||
|
@ -162,14 +162,14 @@ void sam_spi1select(uint32_t devid, bool selected)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi1status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -347,7 +347,7 @@ int sam_usbhost_initialize(void)
|
||||
ret = kthread_create("OHCI Monitor",
|
||||
CONFIG_SAMA5D3XEK_USBHOST_PRIO,
|
||||
CONFIG_SAMA5D3XEK_USBHOST_STACKSIZE,
|
||||
(main_t)ohci_waiter, (FAR char * const *)NULL);
|
||||
(main_t)ohci_waiter, (char * const *)NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
uerr("ERROR: Failed to create ohci_waiter task: %d\n", ret);
|
||||
@ -369,7 +369,7 @@ int sam_usbhost_initialize(void)
|
||||
|
||||
ret = kthread_create("EHCI Monitor", CONFIG_SAMA5D3XEK_USBHOST_PRIO,
|
||||
CONFIG_SAMA5D3XEK_USBHOST_STACKSIZE,
|
||||
(main_t)ehci_waiter, (FAR char * const *)NULL);
|
||||
(main_t)ehci_waiter, (char * const *)NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
uerr("ERROR: Failed to create ehci_waiter task: %d\n", ret);
|
||||
@ -528,7 +528,7 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_USBDEV
|
||||
void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume)
|
||||
void sam_usbsuspend(struct usbdev_s *dev, bool resume)
|
||||
{
|
||||
uinfo("resume: %d\n", resume);
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ struct sama5d3ek_mwinfo_s
|
||||
/* Extensions for the sama5d3x-ek board */
|
||||
|
||||
wm8904_handler_t handler;
|
||||
FAR void *arg;
|
||||
void *arg;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
@ -82,9 +82,9 @@ struct sama5d3ek_mwinfo_s
|
||||
* enable - Enable or disable the PIO interrupt
|
||||
*/
|
||||
|
||||
static int wm8904_attach(FAR const struct wm8904_lower_s *lower,
|
||||
wm8904_handler_t isr, FAR void *arg);
|
||||
static bool wm8904_enable(FAR const struct wm8904_lower_s *lower,
|
||||
static int wm8904_attach(const struct wm8904_lower_s *lower,
|
||||
wm8904_handler_t isr, void *arg);
|
||||
static bool wm8904_enable(const struct wm8904_lower_s *lower,
|
||||
bool enable);
|
||||
|
||||
/****************************************************************************
|
||||
@ -133,8 +133,8 @@ static struct sama5d3ek_mwinfo_s g_wm8904info =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int wm8904_attach(FAR const struct wm8904_lower_s *lower,
|
||||
wm8904_handler_t isr, FAR void *arg)
|
||||
static int wm8904_attach(const struct wm8904_lower_s *lower,
|
||||
wm8904_handler_t isr, void *arg)
|
||||
{
|
||||
if (isr)
|
||||
{
|
||||
@ -158,7 +158,7 @@ static int wm8904_attach(FAR const struct wm8904_lower_s *lower,
|
||||
return OK;
|
||||
}
|
||||
|
||||
static bool wm8904_enable(FAR const struct wm8904_lower_s *lower,
|
||||
static bool wm8904_enable(const struct wm8904_lower_s *lower,
|
||||
bool enable)
|
||||
{
|
||||
static bool enabled;
|
||||
@ -191,7 +191,7 @@ static bool wm8904_enable(FAR const struct wm8904_lower_s *lower,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int wm8904_interrupt(int irq, FAR void *context, FAR void *arg)
|
||||
static int wm8904_interrupt(int irq, void *context, void *arg)
|
||||
{
|
||||
/* Just forward the interrupt to the WM8904 driver */
|
||||
|
||||
@ -232,10 +232,10 @@ static int wm8904_interrupt(int irq, FAR void *context, FAR void *arg)
|
||||
|
||||
int sam_wm8904_initialize(int minor)
|
||||
{
|
||||
FAR struct audio_lowerhalf_s *wm8904;
|
||||
FAR struct audio_lowerhalf_s *pcm;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
FAR struct i2s_dev_s *i2s;
|
||||
struct audio_lowerhalf_s *wm8904;
|
||||
struct audio_lowerhalf_s *pcm;
|
||||
struct i2c_master_s *i2c;
|
||||
struct i2s_dev_s *i2s;
|
||||
static bool initialized = false;
|
||||
char devname[12];
|
||||
int ret;
|
||||
|
@ -144,7 +144,7 @@ int at25_main(int argc, char *argv)
|
||||
* which we can buffer the binary data.
|
||||
*/
|
||||
|
||||
lib_memsostream(&memoutstream, (FAR char *)SAM_DDRCS_VSECTION,
|
||||
lib_memsostream(&memoutstream, (char *)SAM_DDRCS_VSECTION,
|
||||
CONFIG_SAMA5D4EK_AT25_PROGSIZE);
|
||||
|
||||
/* We are ready to load the Intel HEX stream into DRAM.
|
||||
|
@ -58,8 +58,8 @@
|
||||
|
||||
int sam_at25_automount(int minor)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
struct spi_dev_s *spi;
|
||||
struct mtd_dev_s *mtd;
|
||||
#ifdef CONFIG_SAMA5D4EK_AT25_CHARDEV
|
||||
#if defined(CONFIG_BCH)
|
||||
char blockdev[18];
|
||||
|
@ -79,8 +79,8 @@
|
||||
|
||||
int sam_audio_null_initialize(int minor)
|
||||
{
|
||||
FAR struct audio_lowerhalf_s *nullaudio;
|
||||
FAR struct audio_lowerhalf_s *pcm;
|
||||
struct audio_lowerhalf_s *nullaudio;
|
||||
struct audio_lowerhalf_s *pcm;
|
||||
static bool initialized = false;
|
||||
char devname[12];
|
||||
int ret;
|
||||
|
@ -44,7 +44,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef NULL
|
||||
# define NULL (FAR void *)0
|
||||
# define NULL (void *)0
|
||||
#endif
|
||||
|
||||
#ifndef OK
|
||||
@ -59,10 +59,10 @@
|
||||
|
||||
struct sam_automount_state_s
|
||||
{
|
||||
volatile automount_handler_t handler; /* Upper half handler */
|
||||
FAR void *arg; /* Handler argument */
|
||||
bool enable; /* Fake interrupt enable */
|
||||
bool pending; /* Set if there an event while disabled */
|
||||
volatile automount_handler_t handler; /* Upper half handler */
|
||||
void *arg; /* Handler argument */
|
||||
bool enable; /* Fake interrupt enable */
|
||||
bool pending; /* Set if there an event while disabled */
|
||||
};
|
||||
|
||||
/* This structure represents the static configuration of an automounter */
|
||||
@ -73,20 +73,20 @@ struct sam_automount_config_s
|
||||
* struct automount_lower_s to struct sam_automount_config_s
|
||||
*/
|
||||
|
||||
struct automount_lower_s lower; /* Publicly visible part */
|
||||
uint8_t hsmci; /* HSMCI0_SLOTNO or HSMCI1_SLOTNO */
|
||||
FAR struct sam_automount_state_s *state; /* Changeable state */
|
||||
struct automount_lower_s lower; /* Publicly visible part */
|
||||
uint8_t hsmci; /* HSMCI0_SLOTNO or HSMCI1_SLOTNO */
|
||||
struct sam_automount_state_s *state; /* Changeable state */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_attach(FAR const struct automount_lower_s *lower,
|
||||
automount_handler_t isr, FAR void *arg);
|
||||
static void sam_enable(FAR const struct automount_lower_s *lower,
|
||||
static int sam_attach(const struct automount_lower_s *lower,
|
||||
automount_handler_t isr, void *arg);
|
||||
static void sam_enable(const struct automount_lower_s *lower,
|
||||
bool enable);
|
||||
static bool sam_inserted(FAR const struct automount_lower_s *lower);
|
||||
static bool sam_inserted(const struct automount_lower_s *lower);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
@ -152,15 +152,15 @@ static const struct sam_automount_config_s g_hsmci1config =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_attach(FAR const struct automount_lower_s *lower,
|
||||
automount_handler_t isr, FAR void *arg)
|
||||
static int sam_attach(const struct automount_lower_s *lower,
|
||||
automount_handler_t isr, void *arg)
|
||||
{
|
||||
FAR const struct sam_automount_config_s *config;
|
||||
FAR struct sam_automount_state_s *state;
|
||||
const struct sam_automount_config_s *config;
|
||||
struct sam_automount_state_s *state;
|
||||
|
||||
/* Recover references to our structure */
|
||||
|
||||
config = (FAR struct sam_automount_config_s *)lower;
|
||||
config = (struct sam_automount_config_s *)lower;
|
||||
DEBUGASSERT(config && config->state);
|
||||
|
||||
state = config->state;
|
||||
@ -191,16 +191,16 @@ static int sam_attach(FAR const struct automount_lower_s *lower,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void sam_enable(FAR const struct automount_lower_s *lower,
|
||||
static void sam_enable(const struct automount_lower_s *lower,
|
||||
bool enable)
|
||||
{
|
||||
FAR const struct sam_automount_config_s *config;
|
||||
FAR struct sam_automount_state_s *state;
|
||||
const struct sam_automount_config_s *config;
|
||||
struct sam_automount_state_s *state;
|
||||
irqstate_t flags;
|
||||
|
||||
/* Recover references to our structure */
|
||||
|
||||
config = (FAR struct sam_automount_config_s *)lower;
|
||||
config = (struct sam_automount_config_s *)lower;
|
||||
DEBUGASSERT(config && config->state);
|
||||
|
||||
state = config->state;
|
||||
@ -242,11 +242,11 @@ static void sam_enable(FAR const struct automount_lower_s *lower,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static bool sam_inserted(FAR const struct automount_lower_s *lower)
|
||||
static bool sam_inserted(const struct automount_lower_s *lower)
|
||||
{
|
||||
FAR const struct sam_automount_config_s *config;
|
||||
const struct sam_automount_config_s *config;
|
||||
|
||||
config = (FAR struct sam_automount_config_s *)lower;
|
||||
config = (struct sam_automount_config_s *)lower;
|
||||
DEBUGASSERT(config && config->state);
|
||||
|
||||
return sam_cardinserted(config->hsmci);
|
||||
@ -272,7 +272,7 @@ static bool sam_inserted(FAR const struct automount_lower_s *lower)
|
||||
|
||||
void sam_automount_initialize(void)
|
||||
{
|
||||
FAR void *handle;
|
||||
void *handle;
|
||||
|
||||
finfo("Initializing automounter(s)\n");
|
||||
|
||||
@ -325,8 +325,8 @@ void sam_automount_initialize(void)
|
||||
|
||||
void sam_automount_event(int slotno, bool inserted)
|
||||
{
|
||||
FAR const struct sam_automount_config_s *config;
|
||||
FAR struct sam_automount_state_s *state;
|
||||
const struct sam_automount_config_s *config;
|
||||
struct sam_automount_state_s *state;
|
||||
|
||||
#ifdef CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT
|
||||
/* Is this a change in the HSMCI0 insertion state? */
|
||||
|
@ -70,7 +70,7 @@
|
||||
#ifdef HAVE_I2CTOOL
|
||||
static void sam_i2c_register(int bus)
|
||||
{
|
||||
FAR struct i2c_master_s *i2c;
|
||||
struct i2c_master_s *i2c;
|
||||
int ret;
|
||||
|
||||
i2c = sam_i2cbus_initialize(bus);
|
||||
|
@ -104,7 +104,7 @@ uint32_t board_buttons(void)
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SAMA5_PIOE_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, void *arg)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
|
||||
|
@ -209,7 +209,7 @@ void weak_function sam_netinitialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_PIOE_IRQ
|
||||
int arch_phy_irq(FAR const char *intf, xcpt_t handler, void *arg,
|
||||
int arch_phy_irq(const char *intf, xcpt_t handler, void *arg,
|
||||
phy_enable_t *enable)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
@ -110,7 +110,7 @@ struct sam_hsmci_state_s
|
||||
/* HSCMI device state */
|
||||
|
||||
#ifdef CONFIG_SAMA5_HSMCI0
|
||||
static int sam_hsmci0_cardetect(int irq, void *regs, FAR void *arg);
|
||||
static int sam_hsmci0_cardetect(int irq, void *regs, void *arg);
|
||||
|
||||
static struct sam_hsmci_state_s g_hsmci0 =
|
||||
{
|
||||
@ -122,7 +122,7 @@ static struct sam_hsmci_state_s g_hsmci0 =
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_HSMCI1
|
||||
static int sam_hsmci1_cardetect(int irq, void *regs, FAR void *arg);
|
||||
static int sam_hsmci1_cardetect(int irq, void *regs, void *arg);
|
||||
|
||||
static struct sam_hsmci_state_s g_hsmci1 =
|
||||
{
|
||||
@ -188,7 +188,7 @@ static int sam_hsmci_cardetect(struct sam_hsmci_state_s *state)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SAMA5_HSMCI0
|
||||
static int sam_hsmci0_cardetect(int irq, FAR void *regs, FAR void *arg)
|
||||
static int sam_hsmci0_cardetect(int irq, void *regs, void *arg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@ -210,7 +210,7 @@ static int sam_hsmci0_cardetect(int irq, FAR void *regs, FAR void *arg)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_HSMCI1
|
||||
static int sam_hsmci1_cardetect(int irq, FAR void *regs, FAR void *arg)
|
||||
static int sam_hsmci1_cardetect(int irq, void *regs, void *arg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -75,7 +75,7 @@ struct sama5d4ek_tscinfo_s
|
||||
/* Extensions for the sama5d4ek board */
|
||||
|
||||
mxt_handler_t handler;
|
||||
FAR void *arg;
|
||||
void *arg;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
@ -93,11 +93,11 @@ struct sama5d4ek_tscinfo_s
|
||||
* clear - Acknowledge/clear any pending PIO interrupt
|
||||
*/
|
||||
|
||||
static int mxt_attach(FAR const struct mxt_lower_s *lower,
|
||||
static int mxt_attach(const struct mxt_lower_s *lower,
|
||||
mxt_handler_t isr,
|
||||
FAR void *arg);
|
||||
static void mxt_enable(FAR const struct mxt_lower_s *lower, bool enable);
|
||||
static void mxt_clear(FAR const struct mxt_lower_s *lower);
|
||||
void *arg);
|
||||
static void mxt_enable(const struct mxt_lower_s *lower, bool enable);
|
||||
static void mxt_clear(const struct mxt_lower_s *lower);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
@ -141,8 +141,8 @@ static struct sama5d4ek_tscinfo_s g_mxtinfo =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int mxt_attach(FAR const struct mxt_lower_s *lower, mxt_handler_t isr,
|
||||
FAR void *arg)
|
||||
static int mxt_attach(const struct mxt_lower_s *lower, mxt_handler_t isr,
|
||||
void *arg)
|
||||
{
|
||||
if (isr)
|
||||
{
|
||||
@ -166,7 +166,7 @@ static int mxt_attach(FAR const struct mxt_lower_s *lower, mxt_handler_t isr,
|
||||
return OK;
|
||||
}
|
||||
|
||||
static void mxt_enable(FAR const struct mxt_lower_s *lower, bool enable)
|
||||
static void mxt_enable(const struct mxt_lower_s *lower, bool enable)
|
||||
{
|
||||
/* Enable or disable interrupts */
|
||||
|
||||
@ -180,12 +180,12 @@ static void mxt_enable(FAR const struct mxt_lower_s *lower, bool enable)
|
||||
}
|
||||
}
|
||||
|
||||
static void mxt_clear(FAR const struct mxt_lower_s *lower)
|
||||
static void mxt_clear(const struct mxt_lower_s *lower)
|
||||
{
|
||||
/* Does nothing */
|
||||
}
|
||||
|
||||
static int mxt_interrupt(int irq, FAR void *context, FAR void *arg)
|
||||
static int mxt_interrupt(int irq, void *context, void *arg)
|
||||
{
|
||||
/* Just forward the interrupt to the maXTouch driver */
|
||||
|
||||
@ -225,7 +225,7 @@ static int mxt_interrupt(int irq, FAR void *context, FAR void *arg)
|
||||
|
||||
int sam_tsc_setup(int minor)
|
||||
{
|
||||
FAR struct i2c_master_s *i2c;
|
||||
struct i2c_master_s *i2c;
|
||||
int ret;
|
||||
|
||||
iinfo("minor %d\n", minor);
|
||||
|
@ -152,7 +152,7 @@ int board_nandflash_config(int cs)
|
||||
#ifdef HAVE_NAND
|
||||
int sam_nand_automount(int minor)
|
||||
{
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
struct mtd_dev_s *mtd;
|
||||
static bool initialized = false;
|
||||
int ret;
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
||||
|
||||
void sam_pmic_initialize(void)
|
||||
{
|
||||
FAR struct i2c_master_s *i2c;
|
||||
struct i2c_master_s *i2c;
|
||||
struct i2c_config_s config;
|
||||
uint8_t buffer[2];
|
||||
|
||||
|
@ -162,14 +162,14 @@ void sam_spi1select(uint32_t devid, bool selected)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_SPI0
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi1status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -346,7 +346,7 @@ int sam_usbhost_initialize(void)
|
||||
|
||||
ret = kthread_create("OHCI Monitor", CONFIG_SAMA5D4EK_USBHOST_PRIO,
|
||||
CONFIG_SAMA5D4EK_USBHOST_STACKSIZE,
|
||||
(main_t)ohci_waiter, (FAR char * const *)NULL);
|
||||
(main_t)ohci_waiter, (char * const *)NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
uerr("ERROR: Failed to create ohci_waiter task: %d\n", ret);
|
||||
@ -368,7 +368,7 @@ int sam_usbhost_initialize(void)
|
||||
|
||||
ret = kthread_create("EHCI Monitor", CONFIG_SAMA5D4EK_USBHOST_PRIO,
|
||||
CONFIG_SAMA5D4EK_USBHOST_STACKSIZE,
|
||||
(main_t)ehci_waiter, (FAR char * const *)NULL);
|
||||
(main_t)ehci_waiter, (char * const *)NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
uerr("ERROR: Failed to create ehci_waiter task: %d\n", ret);
|
||||
@ -528,7 +528,7 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_USBDEV
|
||||
void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume)
|
||||
void sam_usbsuspend(struct usbdev_s *dev, bool resume)
|
||||
{
|
||||
uinfo("resume: %d\n", resume);
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ struct sama5d4ek_mwinfo_s
|
||||
/* Extensions for the sama5d4ek board */
|
||||
|
||||
wm8904_handler_t handler;
|
||||
FAR void *arg;
|
||||
void *arg;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
@ -82,9 +82,9 @@ struct sama5d4ek_mwinfo_s
|
||||
* enable - Enable or disable the PIO interrupt
|
||||
*/
|
||||
|
||||
static int wm8904_attach(FAR const struct wm8904_lower_s *lower,
|
||||
wm8904_handler_t isr, FAR void *arg);
|
||||
static bool wm8904_enable(FAR const struct wm8904_lower_s *lower,
|
||||
static int wm8904_attach(const struct wm8904_lower_s *lower,
|
||||
wm8904_handler_t isr, void *arg);
|
||||
static bool wm8904_enable(const struct wm8904_lower_s *lower,
|
||||
bool enable);
|
||||
|
||||
/****************************************************************************
|
||||
@ -133,8 +133,8 @@ static struct sama5d4ek_mwinfo_s g_wm8904info =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int wm8904_attach(FAR const struct wm8904_lower_s *lower,
|
||||
wm8904_handler_t isr, FAR void *arg)
|
||||
static int wm8904_attach(const struct wm8904_lower_s *lower,
|
||||
wm8904_handler_t isr, void *arg)
|
||||
{
|
||||
if (isr)
|
||||
{
|
||||
@ -158,7 +158,7 @@ static int wm8904_attach(FAR const struct wm8904_lower_s *lower,
|
||||
return OK;
|
||||
}
|
||||
|
||||
static bool wm8904_enable(FAR const struct wm8904_lower_s *lower,
|
||||
static bool wm8904_enable(const struct wm8904_lower_s *lower,
|
||||
bool enable)
|
||||
{
|
||||
static bool enabled;
|
||||
@ -191,7 +191,7 @@ static bool wm8904_enable(FAR const struct wm8904_lower_s *lower,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int wm8904_interrupt(int irq, FAR void *context, FAR void *arg)
|
||||
static int wm8904_interrupt(int irq, void *context, void *arg)
|
||||
{
|
||||
/* Just forward the interrupt to the WM8904 driver */
|
||||
|
||||
@ -232,10 +232,10 @@ static int wm8904_interrupt(int irq, FAR void *context, FAR void *arg)
|
||||
|
||||
int sam_wm8904_initialize(int minor)
|
||||
{
|
||||
FAR struct audio_lowerhalf_s *wm8904;
|
||||
FAR struct audio_lowerhalf_s *pcm;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
FAR struct i2s_dev_s *i2s;
|
||||
struct audio_lowerhalf_s *wm8904;
|
||||
struct audio_lowerhalf_s *pcm;
|
||||
struct i2c_master_s *i2c;
|
||||
struct i2s_dev_s *i2s;
|
||||
static bool initialized = false;
|
||||
char devname[12];
|
||||
int ret;
|
||||
|
@ -119,42 +119,42 @@ void weak_function sam_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI0
|
||||
void sam_spi0select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi0select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI1
|
||||
void sam_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi1select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI2
|
||||
void sam_spi2select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi2select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI3
|
||||
void sam_spi3select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi3select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI4
|
||||
void sam_spi4select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi4select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI5
|
||||
void sam_spi5select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi5select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
@ -176,42 +176,42 @@ void sam_spi5select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI1
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi1status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI2
|
||||
uint8_t sam_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi2status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI3
|
||||
uint8_t sam_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi3status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI4
|
||||
uint8_t sam_spi4status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi4status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI5
|
||||
uint8_t sam_spi5status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi5status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
return ret;
|
||||
@ -244,42 +244,42 @@ uint8_t sam_spi5status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef SAMD2L2_HAVE_SPI0
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi0cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI1
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI2
|
||||
int sam_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI3
|
||||
int sam_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI4
|
||||
int sam_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi4cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI5
|
||||
int sam_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi5cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ void weak_function sam_usbinitialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_USBDEV
|
||||
void sam_usb_suspend(FAR struct usbdev_s *dev, bool resume)
|
||||
void sam_usb_suspend(struct usbdev_s *dev, bool resume)
|
||||
{
|
||||
uinfo("board: resume: %d\n", resume);
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ void weak_function sam_usbinitialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_USBDEV
|
||||
void sam_usb_suspend(FAR struct usbdev_s *dev, bool resume)
|
||||
void sam_usb_suspend(struct usbdev_s *dev, bool resume)
|
||||
{
|
||||
uinfo("board: resume: %d\n", resume);
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ uint32_t board_buttons(void)
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_PORTA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, void *arg)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
|
||||
|
@ -77,7 +77,7 @@
|
||||
|
||||
int sam_sdinitialize(int port, int minor)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
struct spi_dev_s *spi;
|
||||
int ret;
|
||||
|
||||
/* Get the SPI driver instance for the SD chip select */
|
||||
|
@ -134,7 +134,7 @@ void weak_function sam_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI0
|
||||
void sam_spi0select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi0select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
#ifdef CONFIG_SAMD20_XPLAINED_IOMODULE_EXT1
|
||||
@ -162,7 +162,7 @@ void sam_spi0select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI1
|
||||
void sam_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi1select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
#ifdef CONFIG_SAMD20_XPLAINED_IOMODULE_EXT2
|
||||
@ -190,28 +190,28 @@ void sam_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI2
|
||||
void sam_spi2select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi2select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI3
|
||||
void sam_spi3select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi3select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI4
|
||||
void sam_spi4select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi4select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI5
|
||||
void sam_spi5select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi5select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
@ -233,7 +233,7 @@ void sam_spi5select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -256,7 +256,7 @@ uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI1
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi1status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -279,28 +279,28 @@ uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI2
|
||||
uint8_t sam_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi2status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI3
|
||||
uint8_t sam_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi3status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI4
|
||||
uint8_t sam_spi4status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi4status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI5
|
||||
uint8_t sam_spi5status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi5status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
return ret;
|
||||
@ -333,7 +333,7 @@ uint8_t sam_spi5status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef SAMD2L2_HAVE_SPI0
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi0cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_SAMD20_XPLAINED_OLED1MODULE_EXT1
|
||||
if (devid == SPIDEV_DISPLAY(0))
|
||||
@ -354,7 +354,7 @@ int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI1
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_SAMD20_XPLAINED_OLED1MODULE_EXT2
|
||||
if (devid == SPIDEV_DISPLAY(0))
|
||||
@ -375,28 +375,28 @@ int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI2
|
||||
int sam_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI3
|
||||
int sam_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI4
|
||||
int sam_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi4cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI5
|
||||
int sam_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi5cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
@ -45,10 +45,10 @@
|
||||
* 10 DISPLAY_RESET 10 PB05 PORT 10 PB15 PORT
|
||||
* ----------------- ---------------------- ----------------------
|
||||
* 11 N/C 11 PA08 SERCOM2 PAD[0] 11 PA08 SERCOM2 PAD[0]
|
||||
* I²C SDA I²C SDA
|
||||
* I<EFBFBD>C SDA I<EFBFBD>C SDA
|
||||
* ----------------- ---------------------- ----------------------
|
||||
* 12 N/C 12 PA09 SERCOM2 PAD[1] 12 PA09 SERCOM2 PAD[1]
|
||||
* I²C SCL I²C SCL
|
||||
* I<EFBFBD>C SCL I<EFBFBD>C SCL
|
||||
* ----------------- ---------------------- ----------------------
|
||||
* 13 N/C 13 PB09 SERCOM4 PAD[1] 13 PB13 SERCOM4 PAD[1]
|
||||
* USART RX USART RX
|
||||
@ -143,10 +143,10 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
FAR struct lcd_dev_s *dev;
|
||||
struct spi_dev_s *spi;
|
||||
struct lcd_dev_s *dev;
|
||||
|
||||
/* Configure the OLED PORTs. This initial configuration is RESET low,
|
||||
* putting the OLED into reset state.
|
||||
|
@ -96,7 +96,7 @@ uint32_t board_buttons(void)
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_PORTA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, void *arg)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
|
||||
|
@ -77,7 +77,7 @@
|
||||
|
||||
int sam_sdinitialize(int port, int minor)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
struct spi_dev_s *spi;
|
||||
int ret;
|
||||
|
||||
/* Get the SPI driver instance for the SD chip select */
|
||||
|
@ -134,7 +134,7 @@ void weak_function sam_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI0
|
||||
void sam_spi0select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi0select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
#ifdef CONFIG_SAMD21_XPLAINED_IOMODULE_EXT1
|
||||
@ -162,7 +162,7 @@ void sam_spi0select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI1
|
||||
void sam_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi1select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
#ifdef CONFIG_SAMD21_XPLAINED_IOMODULE_EXT2
|
||||
@ -190,28 +190,28 @@ void sam_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI2
|
||||
void sam_spi2select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi2select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI3
|
||||
void sam_spi3select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi3select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI4
|
||||
void sam_spi4select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi4select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI5
|
||||
void sam_spi5select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi5select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
@ -233,7 +233,7 @@ void sam_spi5select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -256,7 +256,7 @@ uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI1
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi1status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -279,28 +279,28 @@ uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI2
|
||||
uint8_t sam_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi2status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI3
|
||||
uint8_t sam_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi3status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI4
|
||||
uint8_t sam_spi4status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi4status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI5
|
||||
uint8_t sam_spi5status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi5status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
return ret;
|
||||
@ -333,7 +333,7 @@ uint8_t sam_spi5status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef SAMD2L2_HAVE_SPI0
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi0cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_SAMD21_XPLAINED_OLED1MODULE_EXT1
|
||||
if (devid == SPIDEV_DISPLAY(0))
|
||||
@ -354,7 +354,7 @@ int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI1
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_SAMD21_XPLAINED_OLED1MODULE_EXT2
|
||||
if (devid == SPIDEV_DISPLAY(0))
|
||||
@ -375,28 +375,28 @@ int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI2
|
||||
int sam_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI3
|
||||
int sam_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI4
|
||||
int sam_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi4cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI5
|
||||
int sam_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi5cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
@ -45,10 +45,10 @@
|
||||
* 10 DISPLAY_RESET 10 PB05 PORT 10 PB15 PORT
|
||||
* ----------------- ---------------------- ----------------------
|
||||
* 11 N/C 11 PA08 SERCOM2 PAD[0] 11 PA08 SERCOM2 PAD[0]
|
||||
* I²C SDA I²C SDA
|
||||
* I<EFBFBD>C SDA I<EFBFBD>C SDA
|
||||
* ----------------- ---------------------- ----------------------
|
||||
* 12 N/C 12 PA09 SERCOM2 PAD[1] 12 PA09 SERCOM2 PAD[1]
|
||||
* I²C SCL I²C SCL
|
||||
* I<EFBFBD>C SCL I<EFBFBD>C SCL
|
||||
* ----------------- ---------------------- ----------------------
|
||||
* 13 N/C 13 PB09 SERCOM4 PAD[1] 13 PB11 SERCOM4 PAD[1]
|
||||
* USART RX USART RX
|
||||
@ -143,10 +143,10 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
FAR struct lcd_dev_s *dev;
|
||||
struct spi_dev_s *spi;
|
||||
struct lcd_dev_s *dev;
|
||||
|
||||
/* Configure the OLED PORTs. This initial configuration is RESET low,
|
||||
* putting the OLED into reset state.
|
||||
|
@ -95,7 +95,7 @@ uint32_t board_buttons(void)
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_PORTA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, void *arg)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
|
||||
|
@ -77,7 +77,7 @@
|
||||
|
||||
int sam_sdinitialize(int port, int minor)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
struct spi_dev_s *spi;
|
||||
int ret;
|
||||
|
||||
/* Get the SPI driver instance for the SD chip select */
|
||||
|
@ -134,7 +134,7 @@ void weak_function sam_spidev_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI0
|
||||
void sam_spi0select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi0select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
#ifdef CONFIG_SAML21_XPLAINED_IOMODULE_EXT1
|
||||
@ -162,7 +162,7 @@ void sam_spi0select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI1
|
||||
void sam_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi1select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
#ifdef CONFIG_SAML21_XPLAINED_IOMODULE_EXT2
|
||||
@ -190,28 +190,28 @@ void sam_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI2
|
||||
void sam_spi2select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi2select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI3
|
||||
void sam_spi3select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi3select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI4
|
||||
void sam_spi4select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi4select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI5
|
||||
void sam_spi5select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
void sam_spi5select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
}
|
||||
@ -233,7 +233,7 @@ void sam_spi5select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI0
|
||||
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -256,7 +256,7 @@ uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI1
|
||||
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi1status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
@ -279,28 +279,28 @@ uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI2
|
||||
uint8_t sam_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi2status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI3
|
||||
uint8_t sam_spi3status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi3status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI4
|
||||
uint8_t sam_spi4status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi4status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI5
|
||||
uint8_t sam_spi5status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
uint8_t sam_spi5status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
return ret;
|
||||
@ -333,7 +333,7 @@ uint8_t sam_spi5status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
#ifdef SAMD2L2_HAVE_SPI0
|
||||
int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi0cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_SAML21_XPLAINED_OLED1MODULE_EXT1
|
||||
if (devid == SPIDEV_DISPLAY(0))
|
||||
@ -354,7 +354,7 @@ int sam_spi0cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI1
|
||||
int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_SAML21_XPLAINED_OLED1MODULE_EXT2
|
||||
if (devid == SPIDEV_DISPLAY(0))
|
||||
@ -375,28 +375,28 @@ int sam_spi1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI2
|
||||
int sam_spi2cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi2cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI3
|
||||
int sam_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi3cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI4
|
||||
int sam_spi4cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi4cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SAMD2L2_HAVE_SPI5
|
||||
int sam_spi5cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
int sam_spi5cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
@ -45,10 +45,10 @@
|
||||
* 10 DISPLAY_RESET 10 PB05 PORT 10 PB15 PORT
|
||||
* ----------------- ---------------------- ----------------------
|
||||
* 11 N/C 11 PA08 SERCOM2 PAD[0] 11 PA08 SERCOM2 PAD[0]
|
||||
* I²C SDA I²C SDA
|
||||
* I<EFBFBD>C SDA I<EFBFBD>C SDA
|
||||
* ----------------- ---------------------- ----------------------
|
||||
* 12 N/C 12 PA09 SERCOM2 PAD[1] 12 PA09 SERCOM2 PAD[1]
|
||||
* I²C SCL I²C SCL
|
||||
* I<EFBFBD>C SCL I<EFBFBD>C SCL
|
||||
* ----------------- ---------------------- ----------------------
|
||||
* 13 N/C 13 PB09 SERCOM4 PAD[1] 13 PB13 SERCOM4 PAD[1]
|
||||
* USART RX USART RX
|
||||
@ -143,10 +143,10 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
struct lcd_dev_s *board_graphics_setup(unsigned int devno)
|
||||
{
|
||||
FAR struct spi_dev_s *spi;
|
||||
FAR struct lcd_dev_s *dev;
|
||||
struct spi_dev_s *spi;
|
||||
struct lcd_dev_s *dev;
|
||||
|
||||
/* Configure the OLED PORTs. This initial configuration is RESET low,
|
||||
* putting the OLED into reset state.
|
||||
|
@ -143,7 +143,7 @@ void sam_automount_event(bool inserted);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMD5E5_SERCOM5_ISI2C
|
||||
FAR struct i2c_master_s *g_i2c5_dev;
|
||||
struct i2c_master_s *g_i2c5_dev;
|
||||
int metro_m4_i2cdev_initialize(void);
|
||||
#endif
|
||||
|
||||
@ -152,7 +152,7 @@ int sam_smartfs_initialize(void);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BQ27426
|
||||
int sam_bq27426_initialize(FAR const char *devname);
|
||||
int sam_bq27426_initialize(const char *devname);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEV_GPIO
|
||||
|
@ -54,11 +54,11 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
extern FAR struct i2c_master_s *g_i2c5_dev;
|
||||
extern struct i2c_master_s *g_i2c5_dev;
|
||||
|
||||
int sam_at24_automount(int minor)
|
||||
{
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
struct mtd_dev_s *mtd;
|
||||
static bool initialized = false;
|
||||
int ret;
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef NULL
|
||||
# define NULL (FAR void *)0
|
||||
# define NULL (void *)0
|
||||
#endif
|
||||
|
||||
#ifndef OK
|
||||
@ -59,10 +59,10 @@
|
||||
|
||||
struct sam_automount_state_s
|
||||
{
|
||||
volatile automount_handler_t handler; /* Upper half handler */
|
||||
FAR void *arg; /* Handler argument */
|
||||
bool enable; /* Fake interrupt enable */
|
||||
bool pending; /* Set if there an event while disabled */
|
||||
volatile automount_handler_t handler; /* Upper half handler */
|
||||
void *arg; /* Handler argument */
|
||||
bool enable; /* Fake interrupt enable */
|
||||
bool pending; /* Set if there an event while disabled */
|
||||
bool inserted;
|
||||
};
|
||||
|
||||
@ -74,19 +74,19 @@ struct sam_automount_config_s
|
||||
* struct automount_lower_s to struct sam_automount_config_s
|
||||
*/
|
||||
|
||||
struct automount_lower_s lower; /* Publicly visible part */
|
||||
FAR struct sam_automount_state_s *state; /* Changeable state */
|
||||
struct automount_lower_s lower; /* Publicly visible part */
|
||||
struct sam_automount_state_s *state; /* Changeable state */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_attach(FAR const struct automount_lower_s *lower,
|
||||
automount_handler_t isr, FAR void *arg);
|
||||
static void sam_enable(FAR const struct automount_lower_s *lower,
|
||||
static int sam_attach(const struct automount_lower_s *lower,
|
||||
automount_handler_t isr, void *arg);
|
||||
static void sam_enable(const struct automount_lower_s *lower,
|
||||
bool enable);
|
||||
static bool sam_inserted(FAR const struct automount_lower_s *lower);
|
||||
static bool sam_inserted(const struct automount_lower_s *lower);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
@ -131,17 +131,17 @@ static const struct sam_automount_config_s g_port0config =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int sam_attach(FAR const struct automount_lower_s *lower,
|
||||
automount_handler_t isr, FAR void *arg)
|
||||
static int sam_attach(const struct automount_lower_s *lower,
|
||||
automount_handler_t isr, void *arg)
|
||||
{
|
||||
FAR const struct sam_automount_config_s *config;
|
||||
FAR struct sam_automount_state_s *state;
|
||||
const struct sam_automount_config_s *config;
|
||||
struct sam_automount_state_s *state;
|
||||
|
||||
finfo("Entry\n");
|
||||
|
||||
/* Recover references to our structure */
|
||||
|
||||
config = (FAR struct sam_automount_config_s *)lower;
|
||||
config = (struct sam_automount_config_s *)lower;
|
||||
DEBUGASSERT(config && config->state);
|
||||
|
||||
state = config->state;
|
||||
@ -172,18 +172,18 @@ static int sam_attach(FAR const struct automount_lower_s *lower,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void sam_enable(FAR const struct automount_lower_s *lower,
|
||||
static void sam_enable(const struct automount_lower_s *lower,
|
||||
bool enable)
|
||||
{
|
||||
FAR const struct sam_automount_config_s *config;
|
||||
FAR struct sam_automount_state_s *state;
|
||||
const struct sam_automount_config_s *config;
|
||||
struct sam_automount_state_s *state;
|
||||
irqstate_t flags;
|
||||
|
||||
finfo("Entry\n");
|
||||
|
||||
/* Recover references to our structure */
|
||||
|
||||
config = (FAR struct sam_automount_config_s *)lower;
|
||||
config = (struct sam_automount_config_s *)lower;
|
||||
DEBUGASSERT(config && config->state);
|
||||
|
||||
state = config->state;
|
||||
@ -224,11 +224,11 @@ static void sam_enable(FAR const struct automount_lower_s *lower,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static bool sam_inserted(FAR const struct automount_lower_s *lower)
|
||||
static bool sam_inserted(const struct automount_lower_s *lower)
|
||||
{
|
||||
FAR const struct sam_automount_config_s *config;
|
||||
const struct sam_automount_config_s *config;
|
||||
|
||||
config = (FAR struct sam_automount_config_s *)lower;
|
||||
config = (struct sam_automount_config_s *)lower;
|
||||
DEBUGASSERT(config && config->state);
|
||||
finfo("inserted:%d\n", config->state->inserted);
|
||||
return config->state->inserted;
|
||||
@ -254,7 +254,7 @@ static bool sam_inserted(FAR const struct automount_lower_s *lower)
|
||||
|
||||
void sam_automount_initialize(void)
|
||||
{
|
||||
FAR void *handle;
|
||||
void *handle;
|
||||
|
||||
finfo("Initializing automounter(s)\n");
|
||||
|
||||
@ -290,8 +290,8 @@ void sam_automount_initialize(void)
|
||||
|
||||
void sam_automount_event(bool inserted)
|
||||
{
|
||||
FAR const struct sam_automount_config_s *config;
|
||||
FAR struct sam_automount_state_s *state;
|
||||
const struct sam_automount_config_s *config;
|
||||
struct sam_automount_state_s *state;
|
||||
|
||||
#ifdef CONFIG_METRO_M4_USB_AUTOMOUNT
|
||||
config = &g_port0config;
|
||||
|
@ -61,11 +61,11 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int sam_bq27426_initialize(FAR const char *devname)
|
||||
int sam_bq27426_initialize(const char *devname)
|
||||
{
|
||||
FAR struct battery_gauge_dev_s *bq27426_m4;
|
||||
struct battery_gauge_dev_s *bq27426_m4;
|
||||
|
||||
bq27426_m4 = (FAR struct battery_gauge_dev_s *)bq27426_initialize(
|
||||
bq27426_m4 = (struct battery_gauge_dev_s *)bq27426_initialize(
|
||||
g_i2c5_dev,
|
||||
BQ27426_I2C_ADDRESS,
|
||||
100000);
|
||||
|
@ -42,7 +42,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_USBMSC_COMPOSITE
|
||||
static FAR void *g_mschandle;
|
||||
static void *g_mschandle;
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -74,8 +74,8 @@ static FAR void *g_mschandle;
|
||||
|
||||
#ifdef CONFIG_USBMSC_COMPOSITE
|
||||
static int board_mscclassobject(int minor,
|
||||
FAR struct usbdev_devinfo_s *devinfo,
|
||||
FAR struct usbdevclass_driver_s **classdev)
|
||||
struct usbdev_devinfo_s *devinfo,
|
||||
struct usbdevclass_driver_s **classdev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@ -138,7 +138,7 @@ static int board_mscclassobject(int minor,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_USBMSC_COMPOSITE
|
||||
static void board_mscuninitialize(FAR struct usbdevclass_driver_s *classdev)
|
||||
static void board_mscuninitialize(struct usbdevclass_driver_s *classdev)
|
||||
{
|
||||
DEBUGASSERT(g_mschandle != NULL);
|
||||
usbmsc_uninitialize(g_mschandle);
|
||||
@ -181,7 +181,7 @@ int board_composite_initialize(int port)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR void *board_composite_connect(int port, int configid)
|
||||
void *board_composite_connect(int port, int configid)
|
||||
{
|
||||
/* Here we are composing the configuration of the usb composite device.
|
||||
*
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user