Remove FAR from source code under 32bit arch and board

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2023-09-16 20:50:03 +08:00
committed by Petro Karashchenko
parent 9f049b47bf
commit 8dbe86084e
42 changed files with 375 additions and 390 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* include/nuttx/audio/cxd56.h * arch/arm/include/cxd56xx/nxaudio.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@@ -59,8 +59,8 @@ extern "C"
struct audio_lowerhalf_s; struct audio_lowerhalf_s;
FAR struct audio_lowerhalf_s * struct audio_lowerhalf_s *
cxd56_initialize(FAR const struct cxd56_lower_s *lower); cxd56_initialize(const struct cxd56_lower_s *lower);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
+1 -1
View File
@@ -40,7 +40,7 @@
* name: up_show_cpuinfo * name: up_show_cpuinfo
****************************************************************************/ ****************************************************************************/
ssize_t up_show_cpuinfo(FAR char *buf, size_t buf_size, off_t file_off) ssize_t up_show_cpuinfo(char *buf, size_t buf_size, off_t file_off)
{ {
int i; int i;
uint32_t cpuid; uint32_t cpuid;
+1 -1
View File
@@ -61,7 +61,7 @@ static int hwcap_extract_field(uint32_t features, int field)
* name: up_show_cpuinfo * name: up_show_cpuinfo
****************************************************************************/ ****************************************************************************/
ssize_t up_show_cpuinfo(FAR char *buf, size_t buf_size, off_t file_off) ssize_t up_show_cpuinfo(char *buf, size_t buf_size, off_t file_off)
{ {
int i; int i;
uint32_t cpuid; uint32_t cpuid;
+1 -1
View File
@@ -59,7 +59,7 @@ static int hwcap_extract_field(uint32_t features, int field)
* name: up_show_cpuinfo * name: up_show_cpuinfo
****************************************************************************/ ****************************************************************************/
ssize_t up_show_cpuinfo(FAR char *buf, size_t buf_size, off_t file_off) ssize_t up_show_cpuinfo(char *buf, size_t buf_size, off_t file_off)
{ {
int i; int i;
uint32_t cpuid; uint32_t cpuid;
+1 -1
View File
@@ -61,7 +61,7 @@ static int hwcap_extract_field(uint32_t features, int field)
* name: up_show_cpuinfo * name: up_show_cpuinfo
****************************************************************************/ ****************************************************************************/
ssize_t up_show_cpuinfo(FAR char *buf, size_t buf_size, off_t file_off) ssize_t up_show_cpuinfo(char *buf, size_t buf_size, off_t file_off)
{ {
int i; int i;
uint32_t cpuid; uint32_t cpuid;
+1 -1
View File
@@ -63,7 +63,7 @@ static int hwcap_extract_field(uint32_t features, int field)
* name: up_show_cpuinfo * name: up_show_cpuinfo
****************************************************************************/ ****************************************************************************/
ssize_t up_show_cpuinfo(FAR char *buf, size_t buf_size, off_t file_off) ssize_t up_show_cpuinfo(char *buf, size_t buf_size, off_t file_off)
{ {
int i; int i;
uint32_t cpuid; uint32_t cpuid;
+1 -1
View File
@@ -61,7 +61,7 @@ static int hwcap_extract_field(uint32_t features, int field)
* name: up_show_cpuinfo * name: up_show_cpuinfo
****************************************************************************/ ****************************************************************************/
ssize_t up_show_cpuinfo(FAR char *buf, size_t buf_size, off_t file_off) ssize_t up_show_cpuinfo(char *buf, size_t buf_size, off_t file_off)
{ {
int i; int i;
uint32_t cpuid; uint32_t cpuid;
+1 -1
View File
@@ -203,7 +203,7 @@ size_t up_check_tcbstack(struct tcb_s *tcb)
size_t size; size_t size;
#ifdef CONFIG_ARCH_ADDRENV #ifdef CONFIG_ARCH_ADDRENV
FAR struct addrenv_s *oldenv; struct addrenv_s *oldenv;
if (tcb->addrenv_own != NULL) if (tcb->addrenv_own != NULL)
{ {
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -263,7 +263,7 @@ struct cxd56_dev_s
/* Our specific driver data goes here */ /* Our specific driver data goes here */
FAR const struct cxd56_lower_s *lower; /* Pointer to the board lower functions */ const struct cxd56_lower_s *lower; /* Pointer to the board lower functions */
enum cxd56_devstate_e state; /* Driver state */ enum cxd56_devstate_e state; /* Driver state */
enum cxd56_dmahandle_e dma_handle; /* DMA handle */ enum cxd56_dmahandle_e dma_handle; /* DMA handle */
struct file mq; /* Message queue for receiving messages */ struct file mq; /* Message queue for receiving messages */
+9 -9
View File
@@ -136,7 +136,7 @@ static struct ap_buffer_s *cxd56_src_get_apb(void)
src_apb->nmaxbytes = CONFIG_CXD56_AUDIO_BUFFER_SIZE; src_apb->nmaxbytes = CONFIG_CXD56_AUDIO_BUFFER_SIZE;
src_apb->nbytes = 0; src_apb->nbytes = 0;
src_apb->samp = (FAR uint8_t *)(&src_apb->samp + 1); src_apb->samp = (uint8_t *)(&src_apb->samp + 1);
} }
else else
{ {
@@ -154,7 +154,7 @@ errorout_with_lock:
* out queue accordingly. * out queue accordingly.
*/ */
static int cxd56_src_process(FAR struct ap_buffer_s *apb) static int cxd56_src_process(struct ap_buffer_s *apb)
{ {
int ret = OK; int ret = OK;
irqstate_t flags; irqstate_t flags;
@@ -352,7 +352,7 @@ static void *cxd56_src_thread(pthread_addr_t pvarg)
while (g_src.state == CXD56_SRC_RUNNING) while (g_src.state == CXD56_SRC_RUNNING)
{ {
size = file_mq_receive(&g_src.mq, (FAR char *)&msg, size = file_mq_receive(&g_src.mq, (char *)&msg,
sizeof(msg), &prio); sizeof(msg), &prio);
/* Handle the case when we return with no message */ /* Handle the case when we return with no message */
@@ -402,9 +402,9 @@ static void *cxd56_src_thread(pthread_addr_t pvarg)
* *
****************************************************************************/ ****************************************************************************/
int cxd56_src_init(FAR struct cxd56_dev_s *dev, int cxd56_src_init(struct cxd56_dev_s *dev,
FAR struct dq_queue_s *inq, struct dq_queue_s *inq,
FAR struct dq_queue_s *outq) struct dq_queue_s *outq)
{ {
struct sched_param sparam; struct sched_param sparam;
struct mq_attr m_attr; struct mq_attr m_attr;
@@ -541,7 +541,7 @@ int cxd56_src_deinit(void)
* *
****************************************************************************/ ****************************************************************************/
int cxd56_src_enqueue(FAR struct ap_buffer_s *apb) int cxd56_src_enqueue(struct ap_buffer_s *apb)
{ {
int ret; int ret;
struct audio_msg_s msg; struct audio_msg_s msg;
@@ -550,7 +550,7 @@ int cxd56_src_enqueue(FAR struct ap_buffer_s *apb)
msg.msg_id = AUDIO_MSG_ENQUEUE; msg.msg_id = AUDIO_MSG_ENQUEUE;
msg.u.ptr = apb; msg.u.ptr = apb;
ret = file_mq_send(&g_src.mq, (FAR const char *)&msg, ret = file_mq_send(&g_src.mq, (const char *)&msg,
sizeof(msg), CONFIG_CXD56_MSG_PRIO); sizeof(msg), CONFIG_CXD56_MSG_PRIO);
if (ret != OK) if (ret != OK)
{ {
@@ -577,7 +577,7 @@ int cxd56_src_stop(void)
msg.msg_id = AUDIO_MSG_STOP; msg.msg_id = AUDIO_MSG_STOP;
msg.u.data = 0; msg.u.data = 0;
ret = file_mq_send(&g_src.mq, (FAR const char *)&msg, ret = file_mq_send(&g_src.mq, (const char *)&msg,
sizeof(msg), CONFIG_CXD56_MSG_PRIO); sizeof(msg), CONFIG_CXD56_MSG_PRIO);
if (ret != OK) if (ret != OK)
{ {
+3 -3
View File
@@ -52,10 +52,10 @@
* Public Function Prototypes * Public Function Prototypes
****************************************************************************/ ****************************************************************************/
int cxd56_src_init(FAR struct cxd56_dev_s *dev, FAR struct dq_queue_s *inq, int cxd56_src_init(struct cxd56_dev_s *dev, struct dq_queue_s *inq,
FAR struct dq_queue_s *outq); struct dq_queue_s *outq);
int cxd56_src_deinit(void); int cxd56_src_deinit(void);
int cxd56_src_enqueue(FAR struct ap_buffer_s *apb); int cxd56_src_enqueue(struct ap_buffer_s *apb);
int cxd56_src_stop(void); int cxd56_src_stop(void);
#endif /* CONFIG_AUDIO */ #endif /* CONFIG_AUDIO */
+1 -1
View File
@@ -52,7 +52,7 @@ void arm_boot(void)
goldfish_setupmappings(); goldfish_setupmappings();
#ifdef CONFIG_DEVICE_TREE #ifdef CONFIG_DEVICE_TREE
fdt_register((FAR const char *)0x40000000); fdt_register((const char *)0x40000000);
#endif #endif
#if defined(CONFIG_ARCH_HAVE_PSCI) #if defined(CONFIG_ARCH_HAVE_PSCI)
+1 -1
View File
@@ -56,7 +56,7 @@ void arm_boot(void)
#endif #endif
#ifdef CONFIG_DEVICE_TREE #ifdef CONFIG_DEVICE_TREE
fdt_register((FAR const char *)0x40000000); fdt_register((const char *)0x40000000);
#endif #endif
#ifdef USE_EARLYSERIALINIT #ifdef USE_EARLYSERIALINIT
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -83,7 +83,7 @@ void stm32_ltdcuninitialize(void);
* *
****************************************************************************/ ****************************************************************************/
FAR struct fb_vtable_s *stm32_ltdcgetvplane(int vplane); struct fb_vtable_s *stm32_ltdcgetvplane(int vplane);
/**************************************************************************** /****************************************************************************
* Name: stm32_lcd_backlight * Name: stm32_lcd_backlight
+1 -1
View File
@@ -172,7 +172,7 @@ void arm64_chip_boot(void)
arm64_mmu_init(true); arm64_mmu_init(true);
#ifdef CONFIG_DEVICE_TREE #ifdef CONFIG_DEVICE_TREE
fdt_register((FAR const char *)0x40000000); fdt_register((const char *)0x40000000);
#endif #endif
#if defined(CONFIG_ARCH_CHIP_QEMU_WITH_HV) #if defined(CONFIG_ARCH_CHIP_QEMU_WITH_HV)
+1 -1
View File
@@ -159,7 +159,7 @@ size_t up_check_tcbstack(struct tcb_s *tcb)
size_t size; size_t size;
#ifdef CONFIG_ARCH_ADDRENV #ifdef CONFIG_ARCH_ADDRENV
FAR struct addrenv_s *oldenv; struct addrenv_s *oldenv;
if (tcb->addrenv_own != NULL) if (tcb->addrenv_own != NULL)
{ {
+1 -1
View File
@@ -36,7 +36,7 @@
* name: up_show_cpuinfo * name: up_show_cpuinfo
****************************************************************************/ ****************************************************************************/
ssize_t up_show_cpuinfo(FAR char *buf, size_t buf_size, off_t file_off) ssize_t up_show_cpuinfo(char *buf, size_t buf_size, off_t file_off)
{ {
int i; int i;
@@ -58,7 +58,7 @@
* *
****************************************************************************/ ****************************************************************************/
void up_allocate_heap(FAR void **heap_start, size_t *heap_size) void up_allocate_heap(void **heap_start, size_t *heap_size)
{ {
/* These values come from the linker scripts (legacy_sections.ld and /* These values come from the linker scripts (legacy_sections.ld and
* flat_memory.ld). * flat_memory.ld).
+1 -1
View File
@@ -237,7 +237,7 @@ static uart_dev_t g_uart1_dev =
* *
****************************************************************************/ ****************************************************************************/
static int uart_handler(int irq, FAR void *context, FAR void *arg) static int uart_handler(int irq, void *context, void *arg)
{ {
struct uart_dev_s *dev = (struct uart_dev_s *)arg; struct uart_dev_s *dev = (struct uart_dev_s *)arg;
struct esp32c6_uart_s *priv = dev->priv; struct esp32c6_uart_s *priv = dev->priv;
+1 -1
View File
@@ -51,7 +51,7 @@
* Name: systimer_isr * Name: systimer_isr
****************************************************************************/ ****************************************************************************/
static int systimer_isr(int irq, FAR void *context, FAR void *arg) static int systimer_isr(int irq, void *context, void *arg)
{ {
setbits(SYSTIMER_TARGET0_INT_CLR, SYSTIMER_INT_CLR_REG); setbits(SYSTIMER_TARGET0_INT_CLR, SYSTIMER_INT_CLR_REG);
+8 -8
View File
@@ -87,10 +87,10 @@ static bool tty_rxavailable(struct uart_dev_s *dev);
static bool tty_rxflowcontrol(struct uart_dev_s *dev, static bool tty_rxflowcontrol(struct uart_dev_s *dev,
unsigned int nbuffered, bool upper); unsigned int nbuffered, bool upper);
#ifdef CONFIG_SIM_UART_DMA #ifdef CONFIG_SIM_UART_DMA
static void tty_dmatxavail(FAR struct uart_dev_s *dev); static void tty_dmatxavail(struct uart_dev_s *dev);
static void tty_dmasend(FAR struct uart_dev_s *dev); static void tty_dmasend(struct uart_dev_s *dev);
static void tty_dmarxfree(FAR struct uart_dev_s *dev); static void tty_dmarxfree(struct uart_dev_s *dev);
static void tty_dmareceive(FAR struct uart_dev_s *dev); static void tty_dmareceive(struct uart_dev_s *dev);
#endif #endif
static void tty_send(struct uart_dev_s *dev, int ch); static void tty_send(struct uart_dev_s *dev, int ch);
static void tty_txint(struct uart_dev_s *dev, bool enable); static void tty_txint(struct uart_dev_s *dev, bool enable);
@@ -509,7 +509,7 @@ static bool tty_rxflowcontrol(struct uart_dev_s *dev,
* *
****************************************************************************/ ****************************************************************************/
static void tty_dmatxavail(FAR struct uart_dev_s *dev) static void tty_dmatxavail(struct uart_dev_s *dev)
{ {
if (uart_txready(dev)) if (uart_txready(dev))
{ {
@@ -525,7 +525,7 @@ static void tty_dmatxavail(FAR struct uart_dev_s *dev)
* *
****************************************************************************/ ****************************************************************************/
static void tty_dmasend(FAR struct uart_dev_s *dev) static void tty_dmasend(struct uart_dev_s *dev)
{ {
struct tty_priv_s *priv = dev->priv; struct tty_priv_s *priv = dev->priv;
struct uart_dmaxfer_s *xfer = &dev->dmatx; struct uart_dmaxfer_s *xfer = &dev->dmatx;
@@ -559,7 +559,7 @@ static void tty_dmasend(FAR struct uart_dev_s *dev)
* *
****************************************************************************/ ****************************************************************************/
static void tty_dmarxfree(FAR struct uart_dev_s *dev) static void tty_dmarxfree(struct uart_dev_s *dev)
{ {
if (uart_rxavailable(dev)) if (uart_rxavailable(dev))
{ {
@@ -575,7 +575,7 @@ static void tty_dmarxfree(FAR struct uart_dev_s *dev)
* *
****************************************************************************/ ****************************************************************************/
static void tty_dmareceive(FAR struct uart_dev_s *dev) static void tty_dmareceive(struct uart_dev_s *dev)
{ {
struct tty_priv_s *priv = dev->priv; struct tty_priv_s *priv = dev->priv;
struct uart_dmaxfer_s *xfer = &dev->dmarx; struct uart_dmaxfer_s *xfer = &dev->dmarx;
+54 -54
View File
@@ -123,37 +123,37 @@ static int sim_usbhost_enumerate(struct usbhost_connection_s *conn,
/* USB host driver operations ***********************************************/ /* USB host driver operations ***********************************************/
static int sim_usbhost_ep0configure(FAR struct usbhost_driver_s *drvr, static int sim_usbhost_ep0configure(struct usbhost_driver_s *drvr,
usbhost_ep_t ep0, uint8_t funcaddr, usbhost_ep_t ep0, uint8_t funcaddr,
uint8_t speed, uint16_t maxpacketsize); uint8_t speed, uint16_t maxpacketsize);
static int sim_usbhost_epalloc(FAR struct usbhost_driver_s *drvr, static int sim_usbhost_epalloc(struct usbhost_driver_s *drvr,
FAR const struct usbhost_epdesc_s *epdesc, const struct usbhost_epdesc_s *epdesc,
FAR usbhost_ep_t *ep); usbhost_ep_t *ep);
static int sim_usbhost_epfree(FAR struct usbhost_driver_s *drvr, static int sim_usbhost_epfree(struct usbhost_driver_s *drvr,
FAR usbhost_ep_t ep);
static int sim_usbhost_alloc(FAR struct usbhost_driver_s *drvr,
FAR uint8_t **buffer, FAR size_t *maxlen);
static int sim_usbhost_free(FAR struct usbhost_driver_s *drvr,
FAR uint8_t *buffer);
static int sim_usbhost_ioalloc(FAR struct usbhost_driver_s *drvr,
FAR uint8_t **buffer, size_t buflen);
static int sim_usbhost_iofree(FAR struct usbhost_driver_s *drvr,
FAR uint8_t *buffer);
static int sim_usbhost_ctrlin(FAR struct usbhost_driver_s *drvr,
usbhost_ep_t ep0,
FAR const struct usb_ctrlreq_s *req,
FAR uint8_t *buffer);
static int sim_usbhost_ctrlout(FAR struct usbhost_driver_s *drvr,
usbhost_ep_t ep0,
FAR const struct usb_ctrlreq_s *req,
FAR const uint8_t *buffer);
static ssize_t sim_usbhost_transfer(FAR struct usbhost_driver_s *drvr,
usbhost_ep_t ep, FAR uint8_t *buffer,
size_t buflen);
static int sim_usbhost_cancel(FAR struct usbhost_driver_s *drvr,
usbhost_ep_t ep); usbhost_ep_t ep);
static void sim_usbhost_disconnect(FAR struct usbhost_driver_s *drvr, static int sim_usbhost_alloc(struct usbhost_driver_s *drvr,
FAR struct usbhost_hubport_s *hport); uint8_t **buffer, size_t *maxlen);
static int sim_usbhost_free(struct usbhost_driver_s *drvr,
uint8_t *buffer);
static int sim_usbhost_ioalloc(struct usbhost_driver_s *drvr,
uint8_t **buffer, size_t buflen);
static int sim_usbhost_iofree(struct usbhost_driver_s *drvr,
uint8_t *buffer);
static int sim_usbhost_ctrlin(struct usbhost_driver_s *drvr,
usbhost_ep_t ep0,
const struct usb_ctrlreq_s *req,
uint8_t *buffer);
static int sim_usbhost_ctrlout(struct usbhost_driver_s *drvr,
usbhost_ep_t ep0,
const struct usb_ctrlreq_s *req,
const uint8_t *buffer);
static ssize_t sim_usbhost_transfer(struct usbhost_driver_s *drvr,
usbhost_ep_t ep, uint8_t *buffer,
size_t buflen);
static int sim_usbhost_cancel(struct usbhost_driver_s *drvr,
usbhost_ep_t ep);
static void sim_usbhost_disconnect(struct usbhost_driver_s *drvr,
struct usbhost_hubport_s *hport);
/**************************************************************************** /****************************************************************************
* Private Data * Private Data
@@ -336,7 +336,7 @@ static int sim_usbhost_enumerate(struct usbhost_connection_s *conn,
* Name: sim_usbhost_ep0configure * Name: sim_usbhost_ep0configure
****************************************************************************/ ****************************************************************************/
static int sim_usbhost_ep0configure(FAR struct usbhost_driver_s *drvr, static int sim_usbhost_ep0configure(struct usbhost_driver_s *drvr,
usbhost_ep_t ep0, uint8_t funcaddr, usbhost_ep_t ep0, uint8_t funcaddr,
uint8_t speed, uint16_t maxpacketsize) uint8_t speed, uint16_t maxpacketsize)
{ {
@@ -365,9 +365,9 @@ static int sim_usbhost_ep0configure(FAR struct usbhost_driver_s *drvr,
* Name: sim_usbhost_epalloc * Name: sim_usbhost_epalloc
****************************************************************************/ ****************************************************************************/
static int sim_usbhost_epalloc(FAR struct usbhost_driver_s *drvr, static int sim_usbhost_epalloc(struct usbhost_driver_s *drvr,
FAR const struct usbhost_epdesc_s *epdesc, const struct usbhost_epdesc_s *epdesc,
FAR usbhost_ep_t *ep) usbhost_ep_t *ep)
{ {
struct sim_epinfo_s *epinfo; struct sim_epinfo_s *epinfo;
struct usbhost_hubport_s *hport; struct usbhost_hubport_s *hport;
@@ -419,8 +419,8 @@ static int sim_usbhost_epalloc(FAR struct usbhost_driver_s *drvr,
* Name: sim_usbhost_epfree * Name: sim_usbhost_epfree
****************************************************************************/ ****************************************************************************/
static int sim_usbhost_epfree(FAR struct usbhost_driver_s *drvr, static int sim_usbhost_epfree(struct usbhost_driver_s *drvr,
FAR usbhost_ep_t ep) usbhost_ep_t ep)
{ {
struct sim_epinfo_s *epinfo = (struct sim_epinfo_s *)ep; struct sim_epinfo_s *epinfo = (struct sim_epinfo_s *)ep;
@@ -438,8 +438,8 @@ static int sim_usbhost_epfree(FAR struct usbhost_driver_s *drvr,
* Name: sim_usbhost_alloc * Name: sim_usbhost_alloc
****************************************************************************/ ****************************************************************************/
static int sim_usbhost_alloc(FAR struct usbhost_driver_s *drvr, static int sim_usbhost_alloc(struct usbhost_driver_s *drvr,
FAR uint8_t **buffer, FAR size_t *maxlen) uint8_t **buffer, size_t *maxlen)
{ {
DEBUGASSERT(drvr && buffer && maxlen); DEBUGASSERT(drvr && buffer && maxlen);
@@ -457,8 +457,8 @@ static int sim_usbhost_alloc(FAR struct usbhost_driver_s *drvr,
* Name: sim_usbhost_free * Name: sim_usbhost_free
****************************************************************************/ ****************************************************************************/
static int sim_usbhost_free(FAR struct usbhost_driver_s *drvr, static int sim_usbhost_free(struct usbhost_driver_s *drvr,
FAR uint8_t *buffer) uint8_t *buffer)
{ {
DEBUGASSERT(drvr && buffer); DEBUGASSERT(drvr && buffer);
@@ -470,8 +470,8 @@ static int sim_usbhost_free(FAR struct usbhost_driver_s *drvr,
* Name: sim_usbhost_ioalloc * Name: sim_usbhost_ioalloc
****************************************************************************/ ****************************************************************************/
static int sim_usbhost_ioalloc(FAR struct usbhost_driver_s *drvr, static int sim_usbhost_ioalloc(struct usbhost_driver_s *drvr,
FAR uint8_t **buffer, size_t buflen) uint8_t **buffer, size_t buflen)
{ {
DEBUGASSERT(drvr && buffer && buflen > 0); DEBUGASSERT(drvr && buffer && buflen > 0);
@@ -483,8 +483,8 @@ static int sim_usbhost_ioalloc(FAR struct usbhost_driver_s *drvr,
* Name: sim_usbhost_iofree * Name: sim_usbhost_iofree
****************************************************************************/ ****************************************************************************/
static int sim_usbhost_iofree(FAR struct usbhost_driver_s *drvr, static int sim_usbhost_iofree(struct usbhost_driver_s *drvr,
FAR uint8_t *buffer) uint8_t *buffer)
{ {
DEBUGASSERT(drvr && buffer); DEBUGASSERT(drvr && buffer);
@@ -496,10 +496,10 @@ static int sim_usbhost_iofree(FAR struct usbhost_driver_s *drvr,
* Name: sim_usbhost_ctrlin * Name: sim_usbhost_ctrlin
****************************************************************************/ ****************************************************************************/
static int sim_usbhost_ctrlin(FAR struct usbhost_driver_s *drvr, static int sim_usbhost_ctrlin(struct usbhost_driver_s *drvr,
usbhost_ep_t ep0, usbhost_ep_t ep0,
FAR const struct usb_ctrlreq_s *req, const struct usb_ctrlreq_s *req,
FAR uint8_t *buffer) uint8_t *buffer)
{ {
struct sim_usbhost_s *priv = (struct sim_usbhost_s *)drvr; struct sim_usbhost_s *priv = (struct sim_usbhost_s *)drvr;
struct sim_epinfo_s *ep0info = (struct sim_epinfo_s *)ep0; struct sim_epinfo_s *ep0info = (struct sim_epinfo_s *)ep0;
@@ -559,10 +559,10 @@ static int sim_usbhost_ctrlin(FAR struct usbhost_driver_s *drvr,
* Name: sim_usbhost_ctrlout * Name: sim_usbhost_ctrlout
****************************************************************************/ ****************************************************************************/
static int sim_usbhost_ctrlout(FAR struct usbhost_driver_s *drvr, static int sim_usbhost_ctrlout(struct usbhost_driver_s *drvr,
usbhost_ep_t ep0, usbhost_ep_t ep0,
FAR const struct usb_ctrlreq_s *req, const struct usb_ctrlreq_s *req,
FAR const uint8_t *buffer) const uint8_t *buffer)
{ {
return sim_usbhost_ctrlin(drvr, ep0, req, (uint8_t *)buffer); return sim_usbhost_ctrlin(drvr, ep0, req, (uint8_t *)buffer);
} }
@@ -571,8 +571,8 @@ static int sim_usbhost_ctrlout(FAR struct usbhost_driver_s *drvr,
* Name: sim_usbhost_transfer * Name: sim_usbhost_transfer
****************************************************************************/ ****************************************************************************/
static ssize_t sim_usbhost_transfer(FAR struct usbhost_driver_s *drvr, static ssize_t sim_usbhost_transfer(struct usbhost_driver_s *drvr,
usbhost_ep_t ep, FAR uint8_t *buffer, usbhost_ep_t ep, uint8_t *buffer,
size_t buflen) size_t buflen)
{ {
struct sim_usbhost_s *priv = (struct sim_usbhost_s *)drvr; struct sim_usbhost_s *priv = (struct sim_usbhost_s *)drvr;
@@ -623,7 +623,7 @@ static ssize_t sim_usbhost_transfer(FAR struct usbhost_driver_s *drvr,
* Name: sim_usbhost_cancel * Name: sim_usbhost_cancel
****************************************************************************/ ****************************************************************************/
static int sim_usbhost_cancel(FAR struct usbhost_driver_s *drvr, static int sim_usbhost_cancel(struct usbhost_driver_s *drvr,
usbhost_ep_t ep) usbhost_ep_t ep)
{ {
return 0; return 0;
@@ -633,8 +633,8 @@ static int sim_usbhost_cancel(FAR struct usbhost_driver_s *drvr,
* Name: sim_usbhost_disconnect * Name: sim_usbhost_disconnect
****************************************************************************/ ****************************************************************************/
static void sim_usbhost_disconnect(FAR struct usbhost_driver_s *drvr, static void sim_usbhost_disconnect(struct usbhost_driver_s *drvr,
FAR struct usbhost_hubport_s *hport) struct usbhost_hubport_s *hport)
{ {
DEBUGASSERT(hport != NULL); DEBUGASSERT(hport != NULL);
hport->devclass = NULL; hport->devclass = NULL;
@@ -644,7 +644,7 @@ static void sim_usbhost_disconnect(FAR struct usbhost_driver_s *drvr,
* Name: sim_usbhost_rqcomplete * Name: sim_usbhost_rqcomplete
****************************************************************************/ ****************************************************************************/
static void sim_usbhost_rqcomplete(FAR struct sim_usbhost_s *drvr) static void sim_usbhost_rqcomplete(struct sim_usbhost_s *drvr)
{ {
struct host_usb_datareq_s *datareq; struct host_usb_datareq_s *datareq;
+1 -1
View File
@@ -83,7 +83,7 @@ static inline uint32_t xtensa_getconfig1(void)
* name: up_show_cpuinfo * name: up_show_cpuinfo
****************************************************************************/ ****************************************************************************/
ssize_t up_show_cpuinfo(FAR char *buf, size_t buf_size, off_t file_off) ssize_t up_show_cpuinfo(char *buf, size_t buf_size, off_t file_off)
{ {
procfs_sprintf(buf, buf_size, &file_off, procfs_sprintf(buf, buf_size, &file_off,
"CPU count\t: %u\n" "CPU count\t: %u\n"
@@ -71,7 +71,7 @@ int board_ak09912_initialize(const char *devpath, int bus);
* *
****************************************************************************/ ****************************************************************************/
int ak09912_init(FAR struct i2c_master_s *i2c, int port); int ak09912_init(struct i2c_master_s *i2c, int port);
/**************************************************************************** /****************************************************************************
* Name: ak09912_scu_register * Name: ak09912_scu_register
@@ -56,7 +56,7 @@ extern "C"
* *
****************************************************************************/ ****************************************************************************/
int board_alt1250_initialize(FAR const char *devpath); int board_alt1250_initialize(const char *devpath);
/**************************************************************************** /****************************************************************************
* Name: board_alt1250_uninitialize * Name: board_alt1250_uninitialize
@@ -78,7 +78,7 @@ int board_bmi160_initialize(int bus);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_SENSORS_BMI160_I2C #ifdef CONFIG_SENSORS_BMI160_I2C
int bmi160_init(FAR struct i2c_master_s *dev, int port); int bmi160_init(struct i2c_master_s *dev, int port);
#else /* CONFIG_SENSORS_BMI160_SPI */ #else /* CONFIG_SENSORS_BMI160_SPI */
int bmi160_init(struct spi_dev_s *dev); int bmi160_init(struct spi_dev_s *dev);
#endif #endif
@@ -155,7 +155,7 @@ static void register_virtio_devices_from_fdt(const void *fdt)
irqnum = fdt_get_irq(fdt, offset); irqnum = fdt_get_irq(fdt, offset);
if (addr > 0 && irqnum >= 0) if (addr > 0 && irqnum >= 0)
{ {
virtio_register_mmio_device((FAR void *)addr, irqnum); virtio_register_mmio_device((void *)addr, irqnum);
} }
} }
} }
@@ -45,7 +45,7 @@
/* MEADOW FIXME: header clash? */ /* MEADOW FIXME: header clash? */
extern FAR struct qspi_dev_s *stm32f7_qspi_initialize(int intf); extern struct qspi_dev_s *stm32f7_qspi_initialize(int intf);
#endif #endif
/**************************************************************************** /****************************************************************************
@@ -124,8 +124,8 @@ void stm32_boardinitialize(void)
void board_late_initialize(void) void board_late_initialize(void)
{ {
#ifdef CONFIG_STM32F7_QUADSPI #ifdef CONFIG_STM32F7_QUADSPI
FAR struct qspi_dev_s *qspi; struct qspi_dev_s *qspi;
FAR struct mtd_dev_s *mtd; struct mtd_dev_s *mtd;
struct qspi_meminfo_s meminfo; struct qspi_meminfo_s meminfo;
@@ -109,7 +109,7 @@ void stm32_spi2select(struct spi_dev_s *dev,
); );
} }
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid) uint8_t stm32_spi2status(struct spi_dev_s *dev, uint32_t devid)
{ {
return 0; return 0;
} }
@@ -94,7 +94,7 @@ int stm32_bringup(void)
{ {
int ret; int ret;
#ifdef CONFIG_RAMMTD #ifdef CONFIG_RAMMTD
FAR uint8_t *ramstart; uint8_t *ramstart;
#endif #endif
UNUSED(ret); UNUSED(ret);
@@ -156,7 +156,7 @@ int stm32_bringup(void)
{ {
/* Initialized the RAM MTD */ /* Initialized the RAM MTD */
FAR struct mtd_dev_s *mtd = rammtd_initialize(ramstart, 128 * 1024); struct mtd_dev_s *mtd = rammtd_initialize(ramstart, 128 * 1024);
if (mtd == NULL) if (mtd == NULL)
{ {
syslog(LOG_ERR, "ERROR: rammtd_initialize failed\n"); syslog(LOG_ERR, "ERROR: rammtd_initialize failed\n");
@@ -69,8 +69,8 @@
struct stm32_ft5x06_config_s struct stm32_ft5x06_config_s
{ {
xcpt_t handler; /* The FT5x06 interrupt handler */ xcpt_t handler; /* The FT5x06 interrupt handler */
FAR void *arg; /* Interrupt handler argument */ void *arg; /* Interrupt handler argument */
}; };
/**************************************************************************** /****************************************************************************
@@ -78,14 +78,14 @@ struct stm32_ft5x06_config_s
****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_FT5X06_POLLMODE #ifndef CONFIG_FT5X06_POLLMODE
static int stm32_ft5x06_attach(FAR const struct ft5x06_config_s *config, static int stm32_ft5x06_attach(const struct ft5x06_config_s *config,
xcpt_t isr, FAR void *arg); xcpt_t isr, void *arg);
static void stm32_ft5x06_enable(FAR const struct ft5x06_config_s *config, static void stm32_ft5x06_enable(const struct ft5x06_config_s *config,
bool enable); bool enable);
static void stm32_ft5x06_clear(FAR const struct ft5x06_config_s *config); static void stm32_ft5x06_clear(const struct ft5x06_config_s *config);
#endif #endif
static void stm32_ft5x06_wakeup(FAR const struct ft5x06_config_s *config); static void stm32_ft5x06_wakeup(const struct ft5x06_config_s *config);
static void stm32_ft5x06_nreset(FAR const struct ft5x06_config_s *config, static void stm32_ft5x06_nreset(const struct ft5x06_config_s *config,
bool state); bool state);
/**************************************************************************** /****************************************************************************
@@ -126,8 +126,8 @@ static struct stm32_ft5x06_config_s g_priv_config =
****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_FT5X06_POLLMODE #ifndef CONFIG_FT5X06_POLLMODE
static int stm32_ft5x06_attach(FAR const struct ft5x06_config_s *config, static int stm32_ft5x06_attach(const struct ft5x06_config_s *config,
xcpt_t isr, FAR void *arg) xcpt_t isr, void *arg)
{ {
iinfo("Saving handler %p\n", isr); iinfo("Saving handler %p\n", isr);
@@ -164,7 +164,7 @@ static int stm32_ft5x06_attach(FAR const struct ft5x06_config_s *config,
****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_FT5X06_POLLMODE #ifndef CONFIG_FT5X06_POLLMODE
static void stm32_ft5x06_enable(FAR const struct ft5x06_config_s *config, static void stm32_ft5x06_enable(const struct ft5x06_config_s *config,
bool enable) bool enable)
{ {
irqstate_t flags; irqstate_t flags;
@@ -203,7 +203,7 @@ static void stm32_ft5x06_enable(FAR const struct ft5x06_config_s *config,
****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_FT5X06_POLLMODE #ifndef CONFIG_FT5X06_POLLMODE
static void stm32_ft5x06_clear(FAR const struct ft5x06_config_s *config) static void stm32_ft5x06_clear(const struct ft5x06_config_s *config)
{ {
/* Does nothing */ /* Does nothing */
} }
@@ -218,7 +218,7 @@ static void stm32_ft5x06_clear(FAR const struct ft5x06_config_s *config)
* *
****************************************************************************/ ****************************************************************************/
static void stm32_ft5x06_wakeup(FAR const struct ft5x06_config_s *config) static void stm32_ft5x06_wakeup(const struct ft5x06_config_s *config)
{ {
/* We do not have access to the WAKE pin in the implementation */ /* We do not have access to the WAKE pin in the implementation */
} }
@@ -231,7 +231,7 @@ static void stm32_ft5x06_wakeup(FAR const struct ft5x06_config_s *config)
* *
****************************************************************************/ ****************************************************************************/
static void stm32_ft5x06_nreset(FAR const struct ft5x06_config_s *config, static void stm32_ft5x06_nreset(const struct ft5x06_config_s *config,
bool nstate) bool nstate)
{ {
/* We do not have access to the RESET pin in the implementation */ /* We do not have access to the RESET pin in the implementation */
@@ -260,7 +260,7 @@ static void stm32_ft5x06_nreset(FAR const struct ft5x06_config_s *config,
int stm32_tsc_setup(int minor) int stm32_tsc_setup(int minor)
{ {
FAR struct i2c_master_s *dev; struct i2c_master_s *dev;
int ret; int ret;
iinfo("minor %d\n", minor); iinfo("minor %d\n", minor);
@@ -90,7 +90,7 @@ int up_fbinitialize(int display)
* *
****************************************************************************/ ****************************************************************************/
FAR struct fb_vtable_s *up_fbgetvplane(int display, int vplane) struct fb_vtable_s *up_fbgetvplane(int display, int vplane)
{ {
return stm32_ltdcgetvplane(vplane); return stm32_ltdcgetvplane(vplane);
} }
@@ -68,7 +68,7 @@ static uint32_t g_saveregs[XCPTCONTEXT_REGS];
* return the current FPU registers. * return the current FPU registers.
*/ */
void arch_getfpu(FAR uint32_t *fpusave) void arch_getfpu(uint32_t *fpusave)
{ {
irqstate_t flags; irqstate_t flags;
@@ -87,7 +87,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
* will compare them and return true if they are identical. * will compare them and return true if they are identical.
*/ */
bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2) bool arch_cmpfpu(const uint32_t *fpusave1, const uint32_t *fpusave2)
{ {
return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0; return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0;
} }
@@ -315,7 +315,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg)
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_USBDEV #ifdef CONFIG_USBDEV
void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) void stm32_usbsuspend(struct usbdev_s *dev, bool resume)
{ {
uinfo("resume: %d\n", resume); uinfo("resume: %d\n", resume);
} }
@@ -43,8 +43,8 @@
#if defined(CONFIG_I2C) #if defined(CONFIG_I2C)
#include "stm32_i2c.h" #include "stm32_i2c.h"
FAR struct i2c_master_s *i2c1_m; struct i2c_master_s *i2c1_m;
FAR struct i2c_master_s *i2c2_m; struct i2c_master_s *i2c2_m;
# ifdef CONFIG_RTC_DSXXXX # ifdef CONFIG_RTC_DSXXXX
# include <nuttx/timers/rtc.h> # include <nuttx/timers/rtc.h>
# include <nuttx/timers/ds3231.h> # include <nuttx/timers/ds3231.h>
@@ -155,7 +155,7 @@ static void register_virtio_devices_from_fdt(const void *fdt)
irqnum = fdt_get_irq(fdt, offset); irqnum = fdt_get_irq(fdt, offset);
if (addr > 0 && irqnum >= 0) if (addr > 0 && irqnum >= 0)
{ {
virtio_register_mmio_device((FAR void *)addr, irqnum); virtio_register_mmio_device((void *)addr, irqnum);
} }
} }
} }
@@ -58,7 +58,7 @@ int board_mpu60x0_initialize(int devno, int busno)
{ {
struct i2c_master_s *i2c; struct i2c_master_s *i2c;
char devpath[10]; char devpath[10];
FAR struct mpu_config_s *mpu_config; struct mpu_config_s *mpu_config;
int ret; int ret;
sninfo("Initializing MPU60X0!\n"); sninfo("Initializing MPU60X0!\n");
@@ -65,7 +65,7 @@ static void qemu_virtio_register_mmio_devices(void)
for (i = 0; i < QEMU_VIRTIO_MMIO_NUM; i++) for (i = 0; i < QEMU_VIRTIO_MMIO_NUM; i++)
{ {
virtio_register_mmio_device((FAR void *)(virtio + size * i), irq + i); virtio_register_mmio_device((void *)(virtio + size * i), irq + i);
} }
} }
#endif #endif
@@ -66,9 +66,9 @@
int esp32_rgbled_initialize(const char *devname) int esp32_rgbled_initialize(const char *devname)
{ {
static bool initialized = false; static bool initialized = false;
FAR struct pwm_lowerhalf_s *ledr; struct pwm_lowerhalf_s *ledr;
FAR struct pwm_lowerhalf_s *ledg; struct pwm_lowerhalf_s *ledg;
FAR struct pwm_lowerhalf_s *ledb; struct pwm_lowerhalf_s *ledb;
int ret; int ret;
/* Have we already initialized? */ /* Have we already initialized? */
+14 -14
View File
@@ -71,12 +71,12 @@
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
static int rmt_open(FAR struct file *filep) static int rmt_open(struct file *filep)
{ {
FAR struct inode *inode = filep->f_inode; struct inode *inode = filep->f_inode;
FAR struct rmt_dev_channel_s *dev_data = inode->i_private; struct rmt_dev_channel_s *dev_data = inode->i_private;
FAR struct rmt_dev_s *parent_dev = struct rmt_dev_s *parent_dev =
(struct rmt_dev_s *)dev_data->parent_dev; (struct rmt_dev_s *)dev_data->parent_dev;
int ret; int ret;
irqstate_t flags; irqstate_t flags;
@@ -145,12 +145,12 @@ static int rmt_open(FAR struct file *filep)
return ret; return ret;
} }
static int rmt_close(FAR struct file *filep) static int rmt_close(struct file *filep)
{ {
FAR struct inode *inode = filep->f_inode; struct inode *inode = filep->f_inode;
FAR struct rmt_dev_channel_s *dev_data = inode->i_private; struct rmt_dev_channel_s *dev_data = inode->i_private;
FAR struct rmt_dev_s *parent_dev = struct rmt_dev_s *parent_dev =
(struct rmt_dev_s *)dev_data->parent_dev; (struct rmt_dev_s *)dev_data->parent_dev;
int ret; int ret;
@@ -168,14 +168,14 @@ static int rmt_close(FAR struct file *filep)
return ret; return ret;
} }
static ssize_t rmt_write(FAR struct file *filep, static ssize_t rmt_write(struct file *filep,
FAR const char *data, const char *data,
size_t len) size_t len)
{ {
FAR struct inode *inode = filep->f_inode; struct inode *inode = filep->f_inode;
FAR struct rmt_dev_channel_s *dev_data = inode->i_private; struct rmt_dev_channel_s *dev_data = inode->i_private;
FAR struct rmt_dev_s *parent_dev = struct rmt_dev_s *parent_dev =
(struct rmt_dev_s *)dev_data->parent_dev; (struct rmt_dev_s *)dev_data->parent_dev;
irqstate_t flags; irqstate_t flags;