arch/risc-v: Remove FAR from chip and board folder

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-04-17 20:34:22 +08:00 committed by Petro Karashchenko
parent 84b0453ef3
commit 7a0fd8d10f
24 changed files with 134 additions and 134 deletions

View File

@ -59,7 +59,7 @@
*
****************************************************************************/
int up_addrenv_kstackalloc(FAR struct tcb_s *tcb)
int up_addrenv_kstackalloc(struct tcb_s *tcb)
{
DEBUGASSERT(tcb && tcb->xcp.kstack == NULL);
@ -91,7 +91,7 @@ int up_addrenv_kstackalloc(FAR struct tcb_s *tcb)
*
****************************************************************************/
int up_addrenv_kstackfree(FAR struct tcb_s *tcb)
int up_addrenv_kstackfree(struct tcb_s *tcb)
{
DEBUGASSERT(tcb);

View File

@ -44,7 +44,7 @@
*
****************************************************************************/
int up_saveusercontext(FAR void *saveregs)
int up_saveusercontext(void *saveregs)
{
return sys_call1(SYS_save_context, (uintptr_t)saveregs);
}

View File

@ -115,7 +115,7 @@ static void esp32c3_oneshot_lh_handler(void *arg)
struct esp32c3_oneshot_lowerhalf_s *priv =
(struct esp32c3_oneshot_lowerhalf_s *)arg;
oneshot_callback_t callback;
FAR void *cb_arg;
void *cb_arg;
DEBUGASSERT(priv != NULL);
DEBUGASSERT(priv->callback != NULL);

View File

@ -87,9 +87,9 @@
****************************************************************************/
#ifdef CONFIG_BUILD_KERNEL
void up_allocate_kheap(FAR void **heap_start, size_t *heap_size)
void up_allocate_kheap(void **heap_start, size_t *heap_size)
#else
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
void up_allocate_heap(void **heap_start, size_t *heap_size)
#endif /* CONFIG_BUILD_KERNEL */
{
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_MM_KERNEL_HEAP)

View File

@ -468,7 +468,7 @@ static int mpfs_interrupt_0(int irq, void *context, void *arg)
return OK;
}
static int mpfs_interrupt_1(int irq, void *context, FAR void *arg)
static int mpfs_interrupt_1(int irq, void *context, void *arg)
{
struct mpfs_ethmac_s *priv = (struct mpfs_ethmac_s *)arg;
UNUSED(priv);
@ -479,7 +479,7 @@ static int mpfs_interrupt_1(int irq, void *context, FAR void *arg)
return 0;
}
static int mpfs_interrupt_2(int irq, void *context, FAR void *arg)
static int mpfs_interrupt_2(int irq, void *context, void *arg)
{
struct mpfs_ethmac_s *priv = (struct mpfs_ethmac_s *)arg;
UNUSED(priv);
@ -490,7 +490,7 @@ static int mpfs_interrupt_2(int irq, void *context, FAR void *arg)
return 0;
}
static int mpfs_interrupt_3(int irq, void *context, FAR void *arg)
static int mpfs_interrupt_3(int irq, void *context, void *arg)
{
struct mpfs_ethmac_s *priv = (struct mpfs_ethmac_s *)arg;
UNUSED(priv);

View File

@ -2098,7 +2098,7 @@ static int mpfs_getframe(struct usbdev_s *dev)
return frameno;
}
void mpfs_usb_suspend(FAR struct usbdev_s *dev, bool resume)
void mpfs_usb_suspend(struct usbdev_s *dev, bool resume)
{
}

View File

@ -96,7 +96,7 @@ extern int bl602_net_initialize(void);
#if defined(CONFIG_BL602_BLE_CONTROLLER)
struct bthci_s
{
FAR struct bt_driver_s drv;
struct bt_driver_s drv;
int id;
int fd;
sq_entry_t link;
@ -115,16 +115,16 @@ struct uart_env_tag
struct uart_rxchannel rx;
};
static FAR struct bthci_s *hci_dev;
static FAR struct circbuf_s circbuf_rd;
static struct bthci_s *hci_dev;
static struct circbuf_s circbuf_rd;
static struct uart_env_tag uart_env;
static int bthci_send(FAR struct bt_driver_s *drv,
static int bthci_send(struct bt_driver_s *drv,
enum bt_buf_type_e type,
FAR void *data,
void *data,
size_t len);
static int bthci_open(FAR struct bt_driver_s *drv);
static void bthci_close(FAR struct bt_driver_s *drv);
static int bthci_open(struct bt_driver_s *drv);
static void bthci_close(struct bt_driver_s *drv);
static int bthci_receive(uint8_t *data, uint32_t len);
static int bthci_register(void);
@ -180,12 +180,12 @@ static void ble_uart_write(const uint8_t *bufptr,
return;
}
static int bthci_send(FAR struct bt_driver_s *drv,
static int bthci_send(struct bt_driver_s *drv,
enum bt_buf_type_e type,
FAR void *data,
void *data,
size_t len)
{
FAR char *hdr = (FAR char *)data - drv->head_reserve;
char *hdr = (char *)data - drv->head_reserve;
void (*callback)(void *, uint8_t) = NULL;
void *dummy = NULL;
int nlen;
@ -247,7 +247,7 @@ static int bthci_send(FAR struct bt_driver_s *drv,
return nlen;
}
static void bthci_close(FAR struct bt_driver_s *drv)
static void bthci_close(struct bt_driver_s *drv)
{
}
@ -283,19 +283,19 @@ static int bthci_receive(uint8_t *data, uint32_t len)
len - H4_HEADER_SIZE);
}
static int bthci_open(FAR struct bt_driver_s *drv)
static int bthci_open(struct bt_driver_s *drv)
{
return OK;
}
static FAR struct bthci_s *bthci_alloc(void)
static struct bthci_s *bthci_alloc(void)
{
/* Register the driver with the Bluetooth stack */
FAR struct bthci_s *dev;
FAR struct bt_driver_s *drv;
struct bthci_s *dev;
struct bt_driver_s *drv;
dev = (FAR struct bthci_s *)kmm_zalloc(sizeof(*dev));
dev = (struct bthci_s *)kmm_zalloc(sizeof(*dev));
if (dev == NULL)
{
return NULL;
@ -371,7 +371,7 @@ int bl602_bringup(void)
struct oneshot_lowerhalf_s *os = NULL;
#endif
#if defined(CONFIG_BL602_SPIFLASH)
FAR struct mtd_dev_s *mtd_part = NULL;
struct mtd_dev_s *mtd_part = NULL;
const char *path = "/dev/mtdflash";
#endif
#ifdef CONFIG_I2C
@ -538,7 +538,7 @@ int bl602_bringup(void)
#ifdef CONFIG_RTC_DRIVER
/* Instantiate the BL602 lower-half RTC driver */
FAR struct rtc_lowerhalf_s *lower;
struct rtc_lowerhalf_s *lower;
lower = bl602_rtc_lowerhalf_initialize();
if (!lower)

View File

@ -62,14 +62,14 @@ struct bl602_gpint_dev_s
* Private Function Prototypes
****************************************************************************/
static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value);
static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value);
static int gpout_write(FAR struct gpio_dev_s *dev, bool value);
static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value);
static int gpint_attach(FAR struct gpio_dev_s *dev,
static int gpin_read(struct gpio_dev_s *dev, bool *value);
static int gpout_read(struct gpio_dev_s *dev, bool *value);
static int gpout_write(struct gpio_dev_s *dev, bool value);
static int gpint_read(struct gpio_dev_s *dev, bool *value);
static int gpint_attach(struct gpio_dev_s *dev,
pin_interrupt_t callback);
static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable);
static int gpio_setpintype(FAR struct gpio_dev_s *dev,
static int gpint_enable(struct gpio_dev_s *dev, bool enable);
static int gpio_setpintype(struct gpio_dev_s *dev,
enum gpio_pintype_e gp_pintype);
/****************************************************************************
@ -262,8 +262,8 @@ static void bl602_gpio_intclear(uint8_t gpio_pin, uint8_t int_clear)
static int bl602_gpio_interrupt(int irq, void *context, void *arg)
{
FAR struct bl602_gpint_dev_s *bl602xgpint =
(FAR struct bl602_gpint_dev_s *)arg;
struct bl602_gpint_dev_s *bl602xgpint =
(struct bl602_gpint_dev_s *)arg;
uint32_t time_out = 0;
uint8_t gpio_pin;
@ -310,11 +310,11 @@ static int bl602_gpio_interrupt(int irq, void *context, void *arg)
*
****************************************************************************/
static int gpio_setpintype(FAR struct gpio_dev_s *dev,
static int gpio_setpintype(struct gpio_dev_s *dev,
enum gpio_pintype_e gp_pintype)
{
FAR struct bl602_gpint_dev_s *bl602xgpint =
(FAR struct bl602_gpint_dev_s *)dev;
struct bl602_gpint_dev_s *bl602xgpint =
(struct bl602_gpint_dev_s *)dev;
uint8_t gpio_pin;
uint8_t pintype = bl602xgpint->bl602gpio.gpio.gp_pintype;
@ -392,10 +392,10 @@ static int gpio_setpintype(FAR struct gpio_dev_s *dev,
*
****************************************************************************/
static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value)
static int gpin_read(struct gpio_dev_s *dev, bool *value)
{
FAR struct bl602_gpio_dev_s *bl602xgpio =
(FAR struct bl602_gpio_dev_s *)dev;
struct bl602_gpio_dev_s *bl602xgpio =
(struct bl602_gpio_dev_s *)dev;
DEBUGASSERT(bl602xgpio != NULL && value != NULL);
gpioinfo("Reading...\n");
@ -412,10 +412,10 @@ static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value)
*
****************************************************************************/
static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value)
static int gpout_read(struct gpio_dev_s *dev, bool *value)
{
FAR struct bl602_gpio_dev_s *bl602xgpio =
(FAR struct bl602_gpio_dev_s *)dev;
struct bl602_gpio_dev_s *bl602xgpio =
(struct bl602_gpio_dev_s *)dev;
DEBUGASSERT(bl602xgpio != NULL && value != NULL);
DEBUGASSERT(bl602xgpio->id < BOARD_NGPIOOUT);
@ -437,10 +437,10 @@ static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value)
*
****************************************************************************/
static int gpout_write(FAR struct gpio_dev_s *dev, bool value)
static int gpout_write(struct gpio_dev_s *dev, bool value)
{
FAR struct bl602_gpio_dev_s *bl602xgpio =
(FAR struct bl602_gpio_dev_s *)dev;
struct bl602_gpio_dev_s *bl602xgpio =
(struct bl602_gpio_dev_s *)dev;
DEBUGASSERT(bl602xgpio != NULL);
DEBUGASSERT(bl602xgpio->id < BOARD_NGPIOOUT);
@ -459,10 +459,10 @@ static int gpout_write(FAR struct gpio_dev_s *dev, bool value)
*
****************************************************************************/
static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value)
static int gpint_read(struct gpio_dev_s *dev, bool *value)
{
FAR struct bl602_gpint_dev_s *bl602xgpint =
(FAR struct bl602_gpint_dev_s *)dev;
struct bl602_gpint_dev_s *bl602xgpint =
(struct bl602_gpint_dev_s *)dev;
DEBUGASSERT(bl602xgpint != NULL && value != NULL);
DEBUGASSERT(bl602xgpint->bl602gpio.id < BOARD_NGPIOINT);
@ -481,10 +481,10 @@ static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value)
*
****************************************************************************/
static int gpint_attach(FAR struct gpio_dev_s *dev, pin_interrupt_t callback)
static int gpint_attach(struct gpio_dev_s *dev, pin_interrupt_t callback)
{
FAR struct bl602_gpint_dev_s *bl602xgpint =
(FAR struct bl602_gpint_dev_s *)dev;
struct bl602_gpint_dev_s *bl602xgpint =
(struct bl602_gpint_dev_s *)dev;
uint8_t gpio_pin =
(g_gpiointinputs[bl602xgpint->bl602gpio.id] & GPIO_PIN_MASK) >>
@ -511,10 +511,10 @@ static int gpint_attach(FAR struct gpio_dev_s *dev, pin_interrupt_t callback)
*
****************************************************************************/
static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable)
static int gpint_enable(struct gpio_dev_s *dev, bool enable)
{
FAR struct bl602_gpint_dev_s *bl602xgpint =
(FAR struct bl602_gpint_dev_s *)dev;
struct bl602_gpint_dev_s *bl602xgpint =
(struct bl602_gpint_dev_s *)dev;
if (enable)
{

View File

@ -46,7 +46,7 @@
#ifdef CONFIG_ESP32C3_SPI2
uint8_t esp32c3_spi2_status(FAR struct spi_dev_s *dev, uint32_t devid)
uint8_t esp32c3_spi2_status(struct spi_dev_s *dev, uint32_t devid)
{
uint8_t status = 0;
@ -61,7 +61,7 @@ uint8_t esp32c3_spi2_status(FAR struct spi_dev_s *dev, uint32_t devid)
#if defined(CONFIG_ESP32C3_SPI2) && defined(CONFIG_SPI_CMDDATA)
int esp32c3_spi2_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
int esp32c3_spi2_cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
{
if (devid == SPIDEV_DISPLAY(0))
{

View File

@ -47,7 +47,7 @@
int board_spidev_initialize(int port)
{
int ret;
FAR struct spi_dev_s *spi;
struct spi_dev_s *spi;
syslog(LOG_INFO, "Initializing /dev/spi%d...\n", port);

View File

@ -55,7 +55,7 @@ int board_spislavedev_initialize(int bus)
{
int ret;
FAR struct spi_slave_ctrlr_s *ctrlr;
struct spi_slave_ctrlr_s *ctrlr;
spiinfo("Initializing /dev/spislv%d...\n", bus);

View File

@ -115,7 +115,7 @@ int board_lcd_initialize(void)
*
****************************************************************************/
FAR struct lcd_dev_s *board_lcd_getdev(int devno)
struct lcd_dev_s *board_lcd_getdev(int devno)
{
g_lcd = gc9a01_lcdinitialize(g_spidev);
if (!g_lcd)

View File

@ -82,15 +82,15 @@ struct esp32c3gpint_dev_s
****************************************************************************/
#if BOARD_NGPIOOUT > 0
static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value);
static int gpout_write(FAR struct gpio_dev_s *dev, bool value);
static int gpout_read(struct gpio_dev_s *dev, bool *value);
static int gpout_write(struct gpio_dev_s *dev, bool value);
#endif
#if BOARD_NGPIOINT > 0
static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value);
static int gpint_attach(FAR struct gpio_dev_s *dev,
static int gpint_read(struct gpio_dev_s *dev, bool *value);
static int gpint_attach(struct gpio_dev_s *dev,
pin_interrupt_t callback);
static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable);
static int gpint_enable(struct gpio_dev_s *dev, bool enable);
#endif
/****************************************************************************
@ -144,10 +144,10 @@ static struct esp32c3gpint_dev_s g_gpint[BOARD_NGPIOINT];
****************************************************************************/
#if BOARD_NGPIOOUT > 0
static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value)
static int gpout_read(struct gpio_dev_s *dev, bool *value)
{
FAR struct esp32c3gpio_dev_s *esp32c3gpio =
(FAR struct esp32c3gpio_dev_s *)dev;
struct esp32c3gpio_dev_s *esp32c3gpio =
(struct esp32c3gpio_dev_s *)dev;
DEBUGASSERT(esp32c3gpio != NULL && value != NULL);
DEBUGASSERT(esp32c3gpio->id < BOARD_NGPIOOUT);
@ -161,10 +161,10 @@ static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value)
* Name: gpout_write
****************************************************************************/
static int gpout_write(FAR struct gpio_dev_s *dev, bool value)
static int gpout_write(struct gpio_dev_s *dev, bool value)
{
FAR struct esp32c3gpio_dev_s *esp32c3gpio =
(FAR struct esp32c3gpio_dev_s *)dev;
struct esp32c3gpio_dev_s *esp32c3gpio =
(struct esp32c3gpio_dev_s *)dev;
DEBUGASSERT(esp32c3gpio != NULL);
DEBUGASSERT(esp32c3gpio->id < BOARD_NGPIOOUT);
@ -182,8 +182,8 @@ static int gpout_write(FAR struct gpio_dev_s *dev, bool value)
#if BOARD_NGPIOINT > 0
static int esp32c3gpio_interrupt(int irq, void *context, void *arg)
{
FAR struct esp32c3gpint_dev_s *esp32c3gpint =
(FAR struct esp32c3gpint_dev_s *)arg;
struct esp32c3gpint_dev_s *esp32c3gpint =
(struct esp32c3gpint_dev_s *)arg;
DEBUGASSERT(esp32c3gpint != NULL && esp32c3gpint->callback != NULL);
gpioinfo("Interrupt! callback=%p\n", esp32c3gpint->callback);
@ -197,10 +197,10 @@ static int esp32c3gpio_interrupt(int irq, void *context, void *arg)
* Name: gpint_read
****************************************************************************/
static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value)
static int gpint_read(struct gpio_dev_s *dev, bool *value)
{
FAR struct esp32c3gpint_dev_s *esp32c3gpint =
(FAR struct esp32c3gpint_dev_s *)dev;
struct esp32c3gpint_dev_s *esp32c3gpint =
(struct esp32c3gpint_dev_s *)dev;
DEBUGASSERT(esp32c3gpint != NULL && value != NULL);
DEBUGASSERT(esp32c3gpint->esp32c3gpio.id < BOARD_NGPIOINT);
@ -214,11 +214,11 @@ static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value)
* Name: gpint_attach
****************************************************************************/
static int gpint_attach(FAR struct gpio_dev_s *dev,
static int gpint_attach(struct gpio_dev_s *dev,
pin_interrupt_t callback)
{
FAR struct esp32c3gpint_dev_s *esp32c3gpint =
(FAR struct esp32c3gpint_dev_s *)dev;
struct esp32c3gpint_dev_s *esp32c3gpint =
(struct esp32c3gpint_dev_s *)dev;
int irq = ESP32C3_PIN2IRQ(g_gpiointinputs[esp32c3gpint->esp32c3gpio.id]);
int ret;
@ -245,10 +245,10 @@ static int gpint_attach(FAR struct gpio_dev_s *dev,
* Name: gpint_enable
****************************************************************************/
static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable)
static int gpint_enable(struct gpio_dev_s *dev, bool enable)
{
FAR struct esp32c3gpint_dev_s *esp32c3gpint =
(FAR struct esp32c3gpint_dev_s *)dev;
struct esp32c3gpint_dev_s *esp32c3gpint =
(struct esp32c3gpint_dev_s *)dev;
int irq = ESP32C3_PIN2IRQ(g_gpiointinputs[esp32c3gpint->esp32c3gpio.id]);
if (enable)

View File

@ -53,7 +53,7 @@ int board_i2c_init(void)
int ret = OK;
#ifdef CONFIG_ESP32C3_I2C0
FAR struct i2c_master_s *i2c;
struct i2c_master_s *i2c;
i2c = esp32c3_i2cbus_initialize(0);

View File

@ -54,7 +54,7 @@
int board_oneshot_init(int timer, uint16_t resolution)
{
int ret = OK;
FAR struct oneshot_lowerhalf_s *os_lower = NULL;
struct oneshot_lowerhalf_s *os_lower = NULL;
os_lower = oneshot_initialize(timer, resolution);
if (os_lower != NULL)

View File

@ -139,7 +139,7 @@ static const struct ota_partition_s g_ota_partition_table[] =
#ifdef CONFIG_ESP32C3_HAVE_OTA_PARTITION
static int init_ota_partitions(void)
{
FAR struct mtd_dev_s *mtd;
struct mtd_dev_s *mtd;
#ifdef CONFIG_BCH
char blockdev[18];
#endif
@ -193,7 +193,7 @@ static int init_ota_partitions(void)
****************************************************************************/
#if defined (CONFIG_ESP32C3_SPIFLASH_SMARTFS)
static int setup_smartfs(int smartn, FAR struct mtd_dev_s *mtd,
static int setup_smartfs(int smartn, struct mtd_dev_s *mtd,
const char *mnt_pt)
{
int ret = OK;
@ -254,7 +254,7 @@ static int setup_smartfs(int smartn, FAR struct mtd_dev_s *mtd,
****************************************************************************/
#if defined (CONFIG_ESP32C3_SPIFLASH_LITTLEFS)
static int setup_littlefs(const char *path, FAR struct mtd_dev_s *mtd,
static int setup_littlefs(const char *path, struct mtd_dev_s *mtd,
const char *mnt_pt, int priv)
{
int ret = OK;
@ -303,7 +303,7 @@ static int setup_littlefs(const char *path, FAR struct mtd_dev_s *mtd,
****************************************************************************/
#if defined (CONFIG_ESP32C3_SPIFLASH_SPIFFS)
static int setup_spiffs(const char *path, FAR struct mtd_dev_s *mtd,
static int setup_spiffs(const char *path, struct mtd_dev_s *mtd,
const char *mnt_pt, int priv)
{
int ret = OK;
@ -346,7 +346,7 @@ static int setup_spiffs(const char *path, FAR struct mtd_dev_s *mtd,
****************************************************************************/
#if defined (CONFIG_ESP32C3_SPIFLASH_NXFFS)
static int setup_nxffs(FAR struct mtd_dev_s *mtd, const char *mnt_pt)
static int setup_nxffs(struct mtd_dev_s *mtd, const char *mnt_pt)
{
int ret = OK;
@ -386,7 +386,7 @@ static int setup_nxffs(FAR struct mtd_dev_s *mtd, const char *mnt_pt)
static int init_wifi_partition(void)
{
int ret = OK;
FAR struct mtd_dev_s *mtd;
struct mtd_dev_s *mtd;
mtd = esp32c3_spiflash_alloc_mtdpart(CONFIG_ESP32C3_WIFI_MTD_OFFSET,
CONFIG_ESP32C3_WIFI_MTD_SIZE,
@ -451,7 +451,7 @@ static int init_wifi_partition(void)
static int init_storage_partition(void)
{
int ret = OK;
FAR struct mtd_dev_s *mtd;
struct mtd_dev_s *mtd;
mtd = esp32c3_spiflash_alloc_mtdpart(CONFIG_ESP32C3_STORAGE_MTD_OFFSET,
CONFIG_ESP32C3_STORAGE_MTD_SIZE,

View File

@ -115,7 +115,7 @@ int board_lcd_initialize(void)
*
****************************************************************************/
FAR struct lcd_dev_s *board_lcd_getdev(int devno)
struct lcd_dev_s *board_lcd_getdev(int devno)
{
g_lcd = st7735_lcdinitialize(g_spidev);
if (!g_lcd)

View File

@ -115,7 +115,7 @@ int board_lcd_initialize(void)
*
****************************************************************************/
FAR struct lcd_dev_s *board_lcd_getdev(int devno)
struct lcd_dev_s *board_lcd_getdev(int devno)
{
g_lcd = st7789_lcdinitialize(g_spidev);
if (!g_lcd)

View File

@ -131,7 +131,7 @@ uint32_t board_buttons(void)
****************************************************************************/
#ifdef 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;
ASSERT(id == 0);

View File

@ -66,8 +66,8 @@ struct k210gpio_dev_s
****************************************************************************/
#if BOARD_NGPIOOUT > 0
static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value);
static int gpout_write(FAR struct gpio_dev_s *dev, bool value);
static int gpout_read(struct gpio_dev_s *dev, bool *value);
static int gpout_write(struct gpio_dev_s *dev, bool value);
#endif
/****************************************************************************
@ -102,10 +102,10 @@ static struct k210gpio_dev_s g_gpout[BOARD_NGPIOOUT];
****************************************************************************/
#if BOARD_NGPIOOUT > 0
static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value)
static int gpout_read(struct gpio_dev_s *dev, bool *value)
{
FAR struct k210gpio_dev_s *k210gpio =
(FAR struct k210gpio_dev_s *)dev;
struct k210gpio_dev_s *k210gpio =
(struct k210gpio_dev_s *)dev;
DEBUGASSERT(k210gpio != NULL && value != NULL);
DEBUGASSERT(k210gpio->id < BOARD_NGPIOOUT);
@ -119,10 +119,10 @@ static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value)
* Name: gpout_write
****************************************************************************/
static int gpout_write(FAR struct gpio_dev_s *dev, bool value)
static int gpout_write(struct gpio_dev_s *dev, bool value)
{
FAR struct k210gpio_dev_s *k210gpio =
(FAR struct k210gpio_dev_s *)dev;
struct k210gpio_dev_s *k210gpio =
(struct k210gpio_dev_s *)dev;
DEBUGASSERT(k210gpio != NULL);
DEBUGASSERT(k210gpio->id < BOARD_NGPIOOUT);

View File

@ -52,7 +52,7 @@
struct litex_automount_state_s
{
volatile automount_handler_t handler; /* Upper half handler */
FAR void *arg; /* Handler argument */
void *arg; /* Handler argument */
bool enable; /* Fake interrupt enable */
bool pending; /* Set if there an event while disabled */
};
@ -67,18 +67,18 @@ struct litex_automount_config_s
struct automount_lower_s lower; /* Publicly visible part */
uint8_t mmcsd; /* MB1_MMCSD_SLOTNO or MB2_MMCSD_SLOTNO */
FAR struct litex_automount_state_s *state; /* Changeable state */
struct litex_automount_state_s *state; /* Changeable state */
};
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
static int litex_attach(FAR const struct automount_lower_s *lower,
automount_handler_t isr, FAR void *arg);
static void litex_enable(FAR const struct automount_lower_s *lower,
static int litex_attach(const struct automount_lower_s *lower,
automount_handler_t isr, void *arg);
static void litex_enable(const struct automount_lower_s *lower,
bool enable);
static bool litex_inserted(FAR const struct automount_lower_s *lower);
static bool litex_inserted(const struct automount_lower_s *lower);
/****************************************************************************
* Private Data
@ -126,15 +126,15 @@ static const struct litex_automount_config_s g_mb1_mmcsdconfig =
*
****************************************************************************/
static int litex_attach(FAR const struct automount_lower_s *lower,
automount_handler_t isr, FAR void *arg)
static int litex_attach(const struct automount_lower_s *lower,
automount_handler_t isr, void *arg)
{
FAR const struct litex_automount_config_s *config;
FAR struct litex_automount_state_s *state;
const struct litex_automount_config_s *config;
struct litex_automount_state_s *state;
/* Recover references to our structure */
config = (FAR struct litex_automount_config_s *)lower;
config = (struct litex_automount_config_s *)lower;
DEBUGASSERT(config && config->state);
state = config->state;
@ -165,16 +165,16 @@ static int litex_attach(FAR const struct automount_lower_s *lower,
*
****************************************************************************/
static void litex_enable(FAR const struct automount_lower_s *lower,
static void litex_enable(const struct automount_lower_s *lower,
bool enable)
{
FAR const struct litex_automount_config_s *config;
FAR struct litex_automount_state_s *state;
const struct litex_automount_config_s *config;
struct litex_automount_state_s *state;
irqstate_t flags;
/* Recover references to our structure */
config = (FAR struct litex_automount_config_s *)lower;
config = (struct litex_automount_config_s *)lower;
DEBUGASSERT(config && config->state);
state = config->state;
@ -216,11 +216,11 @@ static void litex_enable(FAR const struct automount_lower_s *lower,
*
****************************************************************************/
static bool litex_inserted(FAR const struct automount_lower_s *lower)
static bool litex_inserted(const struct automount_lower_s *lower)
{
FAR const struct litex_automount_config_s *config;
const struct litex_automount_config_s *config;
config = (FAR struct litex_automount_config_s *)lower;
config = (struct litex_automount_config_s *)lower;
DEBUGASSERT(config && config->state);
return litex_cardinserted(config->mmcsd);
@ -246,7 +246,7 @@ static bool litex_inserted(FAR const struct automount_lower_s *lower)
int litex_automount_initialize(void)
{
FAR void *handle;
void *handle;
finfo("Initializing automounter(s)\n");
@ -290,8 +290,8 @@ int litex_automount_initialize(void)
void litex_automount_event(int slotno, bool inserted)
{
FAR const struct litex_automount_config_s *config;
FAR struct litex_automount_state_s *state;
const struct litex_automount_config_s *config;
struct litex_automount_state_s *state;
#ifdef CONFIG_LITEX_SDIO_MOUNT_MOUNTPOINT
/* Is this a change in the MB1 MMCSD slot insertion state? */

View File

@ -35,7 +35,7 @@
* Private Data
****************************************************************************/
static FAR struct sdio_dev_s *g_sdio_dev;
static struct sdio_dev_s *g_sdio_dev;
/****************************************************************************
* Public Functions

View File

@ -55,7 +55,7 @@ int mpfs_board_i2c_init(void)
#ifdef CONFIG_I2C_DRIVER
int bus = 0;
#endif
FAR struct i2c_master_s *i2c;
struct i2c_master_s *i2c;
#endif
#ifdef CONFIG_MPFS_I2C0

View File

@ -120,7 +120,7 @@ uint32_t board_buttons(void)
****************************************************************************/
#ifdef 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;