mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 15:56:38 +08:00
Remove FAR from source code under 32bit arch and board
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
9f049b47bf
commit
8dbe86084e
@@ -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
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -59,8 +59,8 @@ extern "C"
|
||||
|
||||
struct audio_lowerhalf_s;
|
||||
|
||||
FAR struct audio_lowerhalf_s *
|
||||
cxd56_initialize(FAR const struct cxd56_lower_s *lower);
|
||||
struct audio_lowerhalf_s *
|
||||
cxd56_initialize(const struct cxd56_lower_s *lower);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
* 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;
|
||||
uint32_t cpuid;
|
||||
|
||||
@@ -61,7 +61,7 @@ static int hwcap_extract_field(uint32_t features, int field)
|
||||
* 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;
|
||||
uint32_t cpuid;
|
||||
|
||||
@@ -59,7 +59,7 @@ static int hwcap_extract_field(uint32_t features, int field)
|
||||
* 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;
|
||||
uint32_t cpuid;
|
||||
|
||||
@@ -61,7 +61,7 @@ static int hwcap_extract_field(uint32_t features, int field)
|
||||
* 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;
|
||||
uint32_t cpuid;
|
||||
|
||||
@@ -63,7 +63,7 @@ static int hwcap_extract_field(uint32_t features, int field)
|
||||
* 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;
|
||||
uint32_t cpuid;
|
||||
|
||||
@@ -61,7 +61,7 @@ static int hwcap_extract_field(uint32_t features, int field)
|
||||
* 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;
|
||||
uint32_t cpuid;
|
||||
|
||||
@@ -203,7 +203,7 @@ size_t up_check_tcbstack(struct tcb_s *tcb)
|
||||
size_t size;
|
||||
|
||||
#ifdef CONFIG_ARCH_ADDRENV
|
||||
FAR struct addrenv_s *oldenv;
|
||||
struct addrenv_s *oldenv;
|
||||
|
||||
if (tcb->addrenv_own != NULL)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -263,7 +263,7 @@ struct cxd56_dev_s
|
||||
|
||||
/* 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_dmahandle_e dma_handle; /* DMA handle */
|
||||
struct file mq; /* Message queue for receiving messages */
|
||||
|
||||
@@ -136,7 +136,7 @@ static struct ap_buffer_s *cxd56_src_get_apb(void)
|
||||
|
||||
src_apb->nmaxbytes = CONFIG_CXD56_AUDIO_BUFFER_SIZE;
|
||||
src_apb->nbytes = 0;
|
||||
src_apb->samp = (FAR uint8_t *)(&src_apb->samp + 1);
|
||||
src_apb->samp = (uint8_t *)(&src_apb->samp + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -154,7 +154,7 @@ errorout_with_lock:
|
||||
* 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;
|
||||
irqstate_t flags;
|
||||
@@ -352,7 +352,7 @@ static void *cxd56_src_thread(pthread_addr_t pvarg)
|
||||
|
||||
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);
|
||||
|
||||
/* 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,
|
||||
FAR struct dq_queue_s *inq,
|
||||
FAR struct dq_queue_s *outq)
|
||||
int cxd56_src_init(struct cxd56_dev_s *dev,
|
||||
struct dq_queue_s *inq,
|
||||
struct dq_queue_s *outq)
|
||||
{
|
||||
struct sched_param sparam;
|
||||
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;
|
||||
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.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);
|
||||
if (ret != OK)
|
||||
{
|
||||
@@ -577,7 +577,7 @@ int cxd56_src_stop(void)
|
||||
|
||||
msg.msg_id = AUDIO_MSG_STOP;
|
||||
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);
|
||||
if (ret != OK)
|
||||
{
|
||||
|
||||
@@ -52,10 +52,10 @@
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
int cxd56_src_init(FAR struct cxd56_dev_s *dev, FAR struct dq_queue_s *inq,
|
||||
FAR struct dq_queue_s *outq);
|
||||
int cxd56_src_init(struct cxd56_dev_s *dev, struct dq_queue_s *inq,
|
||||
struct dq_queue_s *outq);
|
||||
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);
|
||||
|
||||
#endif /* CONFIG_AUDIO */
|
||||
|
||||
@@ -52,7 +52,7 @@ void arm_boot(void)
|
||||
goldfish_setupmappings();
|
||||
|
||||
#ifdef CONFIG_DEVICE_TREE
|
||||
fdt_register((FAR const char *)0x40000000);
|
||||
fdt_register((const char *)0x40000000);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARCH_HAVE_PSCI)
|
||||
|
||||
@@ -56,7 +56,7 @@ void arm_boot(void)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEVICE_TREE
|
||||
fdt_register((FAR const char *)0x40000000);
|
||||
fdt_register((const char *)0x40000000);
|
||||
#endif
|
||||
|
||||
#ifdef USE_EARLYSERIALINIT
|
||||
|
||||
+115
-125
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
@@ -172,7 +172,7 @@ void arm64_chip_boot(void)
|
||||
arm64_mmu_init(true);
|
||||
|
||||
#ifdef CONFIG_DEVICE_TREE
|
||||
fdt_register((FAR const char *)0x40000000);
|
||||
fdt_register((const char *)0x40000000);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARCH_CHIP_QEMU_WITH_HV)
|
||||
|
||||
@@ -159,7 +159,7 @@ size_t up_check_tcbstack(struct tcb_s *tcb)
|
||||
size_t size;
|
||||
|
||||
#ifdef CONFIG_ARCH_ADDRENV
|
||||
FAR struct addrenv_s *oldenv;
|
||||
struct addrenv_s *oldenv;
|
||||
|
||||
if (tcb->addrenv_own != NULL)
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
* 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;
|
||||
|
||||
|
||||
@@ -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
|
||||
* flat_memory.ld).
|
||||
|
||||
@@ -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 esp32c6_uart_s *priv = dev->priv;
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
* 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);
|
||||
|
||||
|
||||
@@ -87,10 +87,10 @@ static bool tty_rxavailable(struct uart_dev_s *dev);
|
||||
static bool tty_rxflowcontrol(struct uart_dev_s *dev,
|
||||
unsigned int nbuffered, bool upper);
|
||||
#ifdef CONFIG_SIM_UART_DMA
|
||||
static void tty_dmatxavail(FAR struct uart_dev_s *dev);
|
||||
static void tty_dmasend(FAR struct uart_dev_s *dev);
|
||||
static void tty_dmarxfree(FAR struct uart_dev_s *dev);
|
||||
static void tty_dmareceive(FAR struct uart_dev_s *dev);
|
||||
static void tty_dmatxavail(struct uart_dev_s *dev);
|
||||
static void tty_dmasend(struct uart_dev_s *dev);
|
||||
static void tty_dmarxfree(struct uart_dev_s *dev);
|
||||
static void tty_dmareceive(struct uart_dev_s *dev);
|
||||
#endif
|
||||
static void tty_send(struct uart_dev_s *dev, int ch);
|
||||
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))
|
||||
{
|
||||
@@ -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 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))
|
||||
{
|
||||
@@ -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 uart_dmaxfer_s *xfer = &dev->dmarx;
|
||||
|
||||
@@ -123,37 +123,37 @@ static int sim_usbhost_enumerate(struct usbhost_connection_s *conn,
|
||||
|
||||
/* 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,
|
||||
uint8_t speed, uint16_t maxpacketsize);
|
||||
static int sim_usbhost_epalloc(FAR struct usbhost_driver_s *drvr,
|
||||
FAR const struct usbhost_epdesc_s *epdesc,
|
||||
FAR usbhost_ep_t *ep);
|
||||
static int sim_usbhost_epfree(FAR 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,
|
||||
static int sim_usbhost_epalloc(struct usbhost_driver_s *drvr,
|
||||
const struct usbhost_epdesc_s *epdesc,
|
||||
usbhost_ep_t *ep);
|
||||
static int sim_usbhost_epfree(struct usbhost_driver_s *drvr,
|
||||
usbhost_ep_t ep);
|
||||
static void sim_usbhost_disconnect(FAR struct usbhost_driver_s *drvr,
|
||||
FAR struct usbhost_hubport_s *hport);
|
||||
static int sim_usbhost_alloc(struct usbhost_driver_s *drvr,
|
||||
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
|
||||
@@ -336,7 +336,7 @@ static int sim_usbhost_enumerate(struct usbhost_connection_s *conn,
|
||||
* 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,
|
||||
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
|
||||
****************************************************************************/
|
||||
|
||||
static int sim_usbhost_epalloc(FAR struct usbhost_driver_s *drvr,
|
||||
FAR const struct usbhost_epdesc_s *epdesc,
|
||||
FAR usbhost_ep_t *ep)
|
||||
static int sim_usbhost_epalloc(struct usbhost_driver_s *drvr,
|
||||
const struct usbhost_epdesc_s *epdesc,
|
||||
usbhost_ep_t *ep)
|
||||
{
|
||||
struct sim_epinfo_s *epinfo;
|
||||
struct usbhost_hubport_s *hport;
|
||||
@@ -419,8 +419,8 @@ static int sim_usbhost_epalloc(FAR struct usbhost_driver_s *drvr,
|
||||
* Name: sim_usbhost_epfree
|
||||
****************************************************************************/
|
||||
|
||||
static int sim_usbhost_epfree(FAR struct usbhost_driver_s *drvr,
|
||||
FAR usbhost_ep_t ep)
|
||||
static int sim_usbhost_epfree(struct usbhost_driver_s *drvr,
|
||||
usbhost_ep_t 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
|
||||
****************************************************************************/
|
||||
|
||||
static int sim_usbhost_alloc(FAR struct usbhost_driver_s *drvr,
|
||||
FAR uint8_t **buffer, FAR size_t *maxlen)
|
||||
static int sim_usbhost_alloc(struct usbhost_driver_s *drvr,
|
||||
uint8_t **buffer, size_t *maxlen)
|
||||
{
|
||||
DEBUGASSERT(drvr && buffer && maxlen);
|
||||
|
||||
@@ -457,8 +457,8 @@ static int sim_usbhost_alloc(FAR struct usbhost_driver_s *drvr,
|
||||
* Name: sim_usbhost_free
|
||||
****************************************************************************/
|
||||
|
||||
static int sim_usbhost_free(FAR struct usbhost_driver_s *drvr,
|
||||
FAR uint8_t *buffer)
|
||||
static int sim_usbhost_free(struct usbhost_driver_s *drvr,
|
||||
uint8_t *buffer)
|
||||
{
|
||||
DEBUGASSERT(drvr && buffer);
|
||||
|
||||
@@ -470,8 +470,8 @@ static int sim_usbhost_free(FAR struct usbhost_driver_s *drvr,
|
||||
* Name: sim_usbhost_ioalloc
|
||||
****************************************************************************/
|
||||
|
||||
static int sim_usbhost_ioalloc(FAR struct usbhost_driver_s *drvr,
|
||||
FAR uint8_t **buffer, size_t buflen)
|
||||
static int sim_usbhost_ioalloc(struct usbhost_driver_s *drvr,
|
||||
uint8_t **buffer, size_t buflen)
|
||||
{
|
||||
DEBUGASSERT(drvr && buffer && buflen > 0);
|
||||
|
||||
@@ -483,8 +483,8 @@ static int sim_usbhost_ioalloc(FAR struct usbhost_driver_s *drvr,
|
||||
* Name: sim_usbhost_iofree
|
||||
****************************************************************************/
|
||||
|
||||
static int sim_usbhost_iofree(FAR struct usbhost_driver_s *drvr,
|
||||
FAR uint8_t *buffer)
|
||||
static int sim_usbhost_iofree(struct usbhost_driver_s *drvr,
|
||||
uint8_t *buffer)
|
||||
{
|
||||
DEBUGASSERT(drvr && buffer);
|
||||
|
||||
@@ -496,10 +496,10 @@ static int sim_usbhost_iofree(FAR struct usbhost_driver_s *drvr,
|
||||
* 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,
|
||||
FAR const struct usb_ctrlreq_s *req,
|
||||
FAR uint8_t *buffer)
|
||||
const struct usb_ctrlreq_s *req,
|
||||
uint8_t *buffer)
|
||||
{
|
||||
struct sim_usbhost_s *priv = (struct sim_usbhost_s *)drvr;
|
||||
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
|
||||
****************************************************************************/
|
||||
|
||||
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,
|
||||
FAR const struct usb_ctrlreq_s *req,
|
||||
FAR const uint8_t *buffer)
|
||||
const struct usb_ctrlreq_s *req,
|
||||
const 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
|
||||
****************************************************************************/
|
||||
|
||||
static ssize_t sim_usbhost_transfer(FAR struct usbhost_driver_s *drvr,
|
||||
usbhost_ep_t ep, FAR uint8_t *buffer,
|
||||
static ssize_t sim_usbhost_transfer(struct usbhost_driver_s *drvr,
|
||||
usbhost_ep_t ep, uint8_t *buffer,
|
||||
size_t buflen)
|
||||
{
|
||||
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
|
||||
****************************************************************************/
|
||||
|
||||
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)
|
||||
{
|
||||
return 0;
|
||||
@@ -633,8 +633,8 @@ static int sim_usbhost_cancel(FAR struct usbhost_driver_s *drvr,
|
||||
* Name: sim_usbhost_disconnect
|
||||
****************************************************************************/
|
||||
|
||||
static void sim_usbhost_disconnect(FAR struct usbhost_driver_s *drvr,
|
||||
FAR struct usbhost_hubport_s *hport)
|
||||
static void sim_usbhost_disconnect(struct usbhost_driver_s *drvr,
|
||||
struct usbhost_hubport_s *hport)
|
||||
{
|
||||
DEBUGASSERT(hport != NULL);
|
||||
hport->devclass = NULL;
|
||||
@@ -644,7 +644,7 @@ static void sim_usbhost_disconnect(FAR struct usbhost_driver_s *drvr,
|
||||
* 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;
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ static inline uint32_t xtensa_getconfig1(void)
|
||||
* 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,
|
||||
"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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -78,7 +78,7 @@ int board_bmi160_initialize(int bus);
|
||||
****************************************************************************/
|
||||
|
||||
#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 */
|
||||
int bmi160_init(struct spi_dev_s *dev);
|
||||
#endif
|
||||
|
||||
@@ -155,7 +155,7 @@ static void register_virtio_devices_from_fdt(const void *fdt)
|
||||
irqnum = fdt_get_irq(fdt, offset);
|
||||
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? */
|
||||
|
||||
extern FAR struct qspi_dev_s *stm32f7_qspi_initialize(int intf);
|
||||
extern struct qspi_dev_s *stm32f7_qspi_initialize(int intf);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@@ -124,8 +124,8 @@ void stm32_boardinitialize(void)
|
||||
void board_late_initialize(void)
|
||||
{
|
||||
#ifdef CONFIG_STM32F7_QUADSPI
|
||||
FAR struct qspi_dev_s *qspi;
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
struct qspi_dev_s *qspi;
|
||||
struct mtd_dev_s *mtd;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ int stm32_bringup(void)
|
||||
{
|
||||
int ret;
|
||||
#ifdef CONFIG_RAMMTD
|
||||
FAR uint8_t *ramstart;
|
||||
uint8_t *ramstart;
|
||||
#endif
|
||||
|
||||
UNUSED(ret);
|
||||
@@ -156,7 +156,7 @@ int stm32_bringup(void)
|
||||
{
|
||||
/* 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)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: rammtd_initialize failed\n");
|
||||
|
||||
@@ -69,8 +69,8 @@
|
||||
|
||||
struct stm32_ft5x06_config_s
|
||||
{
|
||||
xcpt_t handler; /* The FT5x06 interrupt handler */
|
||||
FAR void *arg; /* Interrupt handler argument */
|
||||
xcpt_t handler; /* The FT5x06 interrupt handler */
|
||||
void *arg; /* Interrupt handler argument */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
@@ -78,14 +78,14 @@ struct stm32_ft5x06_config_s
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_FT5X06_POLLMODE
|
||||
static int stm32_ft5x06_attach(FAR const struct ft5x06_config_s *config,
|
||||
xcpt_t isr, FAR void *arg);
|
||||
static void stm32_ft5x06_enable(FAR const struct ft5x06_config_s *config,
|
||||
static int stm32_ft5x06_attach(const struct ft5x06_config_s *config,
|
||||
xcpt_t isr, void *arg);
|
||||
static void stm32_ft5x06_enable(const struct ft5x06_config_s *config,
|
||||
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
|
||||
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_wakeup(const struct ft5x06_config_s *config);
|
||||
static void stm32_ft5x06_nreset(const struct ft5x06_config_s *config,
|
||||
bool state);
|
||||
|
||||
/****************************************************************************
|
||||
@@ -126,8 +126,8 @@ static struct stm32_ft5x06_config_s g_priv_config =
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_FT5X06_POLLMODE
|
||||
static int stm32_ft5x06_attach(FAR const struct ft5x06_config_s *config,
|
||||
xcpt_t isr, FAR void *arg)
|
||||
static int stm32_ft5x06_attach(const struct ft5x06_config_s *config,
|
||||
xcpt_t isr, void *arg)
|
||||
{
|
||||
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
|
||||
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)
|
||||
{
|
||||
irqstate_t flags;
|
||||
@@ -203,7 +203,7 @@ static void stm32_ft5x06_enable(FAR const struct ft5x06_config_s *config,
|
||||
****************************************************************************/
|
||||
|
||||
#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 */
|
||||
}
|
||||
@@ -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 */
|
||||
}
|
||||
@@ -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)
|
||||
{
|
||||
/* 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)
|
||||
{
|
||||
FAR struct i2c_master_s *dev;
|
||||
struct i2c_master_s *dev;
|
||||
int ret;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ static uint32_t g_saveregs[XCPTCONTEXT_REGS];
|
||||
* return the current FPU registers.
|
||||
*/
|
||||
|
||||
void arch_getfpu(FAR uint32_t *fpusave)
|
||||
void arch_getfpu(uint32_t *fpusave)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
||||
@@ -87,7 +87,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
|
||||
* 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;
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ int stm32_setup_overcurrent(xcpt_t handler, void *arg)
|
||||
****************************************************************************/
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
#if defined(CONFIG_I2C)
|
||||
|
||||
#include "stm32_i2c.h"
|
||||
FAR struct i2c_master_s *i2c1_m;
|
||||
FAR struct i2c_master_s *i2c2_m;
|
||||
struct i2c_master_s *i2c1_m;
|
||||
struct i2c_master_s *i2c2_m;
|
||||
# ifdef CONFIG_RTC_DSXXXX
|
||||
# include <nuttx/timers/rtc.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);
|
||||
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;
|
||||
char devpath[10];
|
||||
FAR struct mpu_config_s *mpu_config;
|
||||
struct mpu_config_s *mpu_config;
|
||||
int ret;
|
||||
|
||||
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++)
|
||||
{
|
||||
virtio_register_mmio_device((FAR void *)(virtio + size * i), irq + i);
|
||||
virtio_register_mmio_device((void *)(virtio + size * i), irq + i);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -66,9 +66,9 @@
|
||||
int esp32_rgbled_initialize(const char *devname)
|
||||
{
|
||||
static bool initialized = false;
|
||||
FAR struct pwm_lowerhalf_s *ledr;
|
||||
FAR struct pwm_lowerhalf_s *ledg;
|
||||
FAR struct pwm_lowerhalf_s *ledb;
|
||||
struct pwm_lowerhalf_s *ledr;
|
||||
struct pwm_lowerhalf_s *ledg;
|
||||
struct pwm_lowerhalf_s *ledb;
|
||||
int ret;
|
||||
|
||||
/* Have we already initialized? */
|
||||
|
||||
@@ -71,12 +71,12 @@
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
static int rmt_open(FAR struct file *filep)
|
||||
static int rmt_open(struct file *filep)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct rmt_dev_channel_s *dev_data = inode->i_private;
|
||||
struct inode *inode = filep->f_inode;
|
||||
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;
|
||||
int ret;
|
||||
irqstate_t flags;
|
||||
@@ -145,12 +145,12 @@ static int rmt_open(FAR struct file *filep)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int rmt_close(FAR struct file *filep)
|
||||
static int rmt_close(struct file *filep)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct rmt_dev_channel_s *dev_data = inode->i_private;
|
||||
struct inode *inode = filep->f_inode;
|
||||
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;
|
||||
|
||||
int ret;
|
||||
@@ -168,14 +168,14 @@ static int rmt_close(FAR struct file *filep)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ssize_t rmt_write(FAR struct file *filep,
|
||||
FAR const char *data,
|
||||
size_t len)
|
||||
static ssize_t rmt_write(struct file *filep,
|
||||
const char *data,
|
||||
size_t len)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct rmt_dev_channel_s *dev_data = inode->i_private;
|
||||
struct inode *inode = filep->f_inode;
|
||||
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;
|
||||
|
||||
irqstate_t flags;
|
||||
|
||||
Reference in New Issue
Block a user