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

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
* 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

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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)
{

View file

@ -344,49 +344,50 @@ struct cxd56_aca_pwoutput_param_s
/* Interface functions */
#ifdef CONFIG_AUDIO_MULTI_SESSION
static int cxd56_configure(FAR struct audio_lowerhalf_s *lower,
FAR void *session, FAR const struct audio_caps_s *caps);
static int cxd56_start(FAR struct audio_lowerhalf_s *lower,
FAR void *session);
static int cxd56_configure(struct audio_lowerhalf_s *lower,
void *session,
const struct audio_caps_s *caps);
static int cxd56_start(struct audio_lowerhalf_s *lower,
void *session);
#ifndef CONFIG_AUDIO_EXCLUDE_STOP
static int cxd56_stop(FAR struct audio_lowerhalf_s *lower,
FAR void *session);
static int cxd56_stop(struct audio_lowerhalf_s *lower,
void *session);
#endif /* CONFIG_AUDIO_EXCLUDE_STOP */
#ifndef CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME
static int cxd56_pause(FAR struct audio_lowerhalf_s *lower,
FAR void *session);
static int cxd56_resume(FAR struct audio_lowerhalf_s *lower,
FAR void *session);
static int cxd56_pause(struct audio_lowerhalf_s *lower,
void *session);
static int cxd56_resume(struct audio_lowerhalf_s *lower,
void *session);
#endif /* CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME */
static int cxd56_reserve(FAR struct audio_lowerhalf_s *lower,
FAR void** session);
static int cxd56_release(FAR struct audio_lowerhalf_s *lower,
FAR void *session);
static int cxd56_reserve(struct audio_lowerhalf_s *lower,
void **session);
static int cxd56_release(struct audio_lowerhalf_s *lower,
void *session);
#else
static int cxd56_configure(FAR struct audio_lowerhalf_s *lower,
FAR const struct audio_caps_s *caps);
static int cxd56_start(FAR struct audio_lowerhalf_s *lower);
static int cxd56_configure(struct audio_lowerhalf_s *lower,
const struct audio_caps_s *caps);
static int cxd56_start(struct audio_lowerhalf_s *lower);
#ifndef CONFIG_AUDIO_EXCLUDE_STOP
static int cxd56_stop(FAR struct audio_lowerhalf_s *lower);
static int cxd56_stop(struct audio_lowerhalf_s *lower);
#endif /* CONFIG_AUDIO_EXCLUDE_STOP */
#ifndef CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME
static int cxd56_pause(FAR struct audio_lowerhalf_s *lower);
static int cxd56_resume(FAR struct audio_lowerhalf_s *lower);
static int cxd56_pause(struct audio_lowerhalf_s *lower);
static int cxd56_resume(struct audio_lowerhalf_s *lower);
#endif /* CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME */
static int cxd56_reserve(FAR struct audio_lowerhalf_s *lower);
static int cxd56_release(FAR struct audio_lowerhalf_s *lower);
static int cxd56_reserve(struct audio_lowerhalf_s *lower);
static int cxd56_release(struct audio_lowerhalf_s *lower);
#endif /* CONFIG_AUDIO_MULTI_SESSION */
static int cxd56_getcaps(FAR struct audio_lowerhalf_s *lower, int type,
FAR struct audio_caps_s *caps);
static int cxd56_shutdown(FAR struct audio_lowerhalf_s *lower);
static int cxd56_enqueuebuffer(FAR struct audio_lowerhalf_s *lower,
FAR struct ap_buffer_s *apb);
static int cxd56_cancelbuffer(FAR struct audio_lowerhalf_s *lower,
FAR struct ap_buffer_s *apb);
static int cxd56_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
unsigned long arg);
static int cxd56_getcaps(struct audio_lowerhalf_s *lower, int type,
struct audio_caps_s *caps);
static int cxd56_shutdown(struct audio_lowerhalf_s *lower);
static int cxd56_enqueuebuffer(struct audio_lowerhalf_s *lower,
struct ap_buffer_s *apb);
static int cxd56_cancelbuffer(struct audio_lowerhalf_s *lower,
struct ap_buffer_s *apb);
static int cxd56_ioctl(struct audio_lowerhalf_s *lower, int cmd,
unsigned long arg);
/* Non-interface functions */
@ -396,30 +397,30 @@ static uint32_t cxd56_get_i2s_rate(uint32_t samplerate);
static void cxd56_get_mic_config(uint8_t *count,
uint8_t *dev,
uint8_t *mode);
static void cxd56_init_dma(FAR struct cxd56_dev_s *dev);
static void cxd56_init_dma(struct cxd56_dev_s *dev);
static void cxd56_init_i2s1_output(uint8_t bits);
static void cxd56_init_mic_input(uint8_t mic_num, uint8_t bits);
static int cxd56_init_worker(FAR struct audio_lowerhalf_s *lower);
static int cxd56_init_worker(struct audio_lowerhalf_s *lower);
static uint8_t cxd56_get_mic_mode(void);
static int cxd56_power_off(FAR struct cxd56_dev_s *dev);
static int cxd56_power_on(FAR struct cxd56_dev_s *dev);
static int cxd56_power_off(struct cxd56_dev_s *dev);
static int cxd56_power_on(struct cxd56_dev_s *dev);
static int cxd56_power_on_aca(uint32_t samplerate);
static int cxd56_power_on_analog_output(FAR struct cxd56_dev_s *dev);
static int cxd56_power_on_analog_output(struct cxd56_dev_s *dev);
static void cxd56_audio_power_on_cic(uint8_t mic_in,
uint8_t mic_mode,
uint8_t cic_num,
FAR struct cxd56_audio_mic_gain_s *gain);
uint8_t mic_mode,
uint8_t cic_num,
struct cxd56_audio_mic_gain_s *gain);
static int cxd56_power_on_decim(uint8_t mic_mode, uint32_t samplerate);
static void cxd56_power_on_i2s1(FAR struct cxd56_dev_s *dev);
static int cxd56_power_on_input(FAR struct cxd56_dev_s *dev);
static int cxd56_power_on_micbias(FAR struct cxd56_dev_s *dev);
static int cxd56_start_dma(FAR struct cxd56_dev_s *dev);
static int cxd56_stop_dma(FAR struct cxd56_dev_s *priv);
static void cxd56_power_on_i2s1(struct cxd56_dev_s *dev);
static int cxd56_power_on_input(struct cxd56_dev_s *dev);
static int cxd56_power_on_micbias(struct cxd56_dev_s *dev);
static int cxd56_start_dma(struct cxd56_dev_s *dev);
static int cxd56_stop_dma(struct cxd56_dev_s *priv);
static void cxd56_set_dma_int_en(bool enabled);
static void cxd56_set_dma_running(cxd56_dmahandle_t handle, bool running);
static int cxd56_set_mic_gains(uint8_t gain, enum cxd56_mic_type_e mic_dev,
struct cxd56_aca_pwinput_param_s *param);
static void cxd56_set_mic_out_channel(FAR struct cxd56_dev_s *dev);
static void cxd56_set_mic_out_channel(struct cxd56_dev_s *dev);
static int cxd56_set_volume(enum cxd56_audio_volid_e id, int16_t vol);
static void cxd56_swap_buffer_rl(uint32_t addr, uint16_t size);
static void *cxd56_workerthread(pthread_addr_t pvarg);
@ -1332,7 +1333,7 @@ static void _process_audio_with_src(cxd56_dmahandle_t hdl, uint16_t err_code)
msg.msg_id = AUDIO_MSG_STOP;
msg.u.data = 0;
spin_unlock_irqrestore(&dev->lock, flags);
ret = file_mq_send(&dev->mq, (FAR const char *)&msg,
ret = file_mq_send(&dev->mq, (const char *)&msg,
sizeof(msg), CONFIG_CXD56_MSG_PRIO);
flags = spin_lock_irqsave(&dev->lock);
if (ret != OK)
@ -1344,7 +1345,7 @@ static void _process_audio_with_src(cxd56_dmahandle_t hdl, uint16_t err_code)
if (dq_count(&dev->down_runq) > 0)
{
FAR struct ap_buffer_s *src_apb;
struct ap_buffer_s *src_apb;
src_apb = (struct ap_buffer_s *) dq_get(&dev->down_runq);
src_apb->nbytes = 0;
@ -1366,7 +1367,7 @@ static void _process_audio_with_src(cxd56_dmahandle_t hdl, uint16_t err_code)
msg.msg_id = AUDIO_MSG_STOP;
msg.u.data = 0;
spin_unlock_irqrestore(&dev->lock, flags);
ret = file_mq_send(&dev->mq, (FAR const char *)&msg,
ret = file_mq_send(&dev->mq, (const char *)&msg,
sizeof(msg), CONFIG_CXD56_MSG_PRIO);
flags = spin_lock_irqsave(&dev->lock);
if (ret != OK)
@ -1386,7 +1387,7 @@ static void _process_audio_with_src(cxd56_dmahandle_t hdl, uint16_t err_code)
msg.msg_id = AUDIO_MSG_DATA_REQUEST;
msg.u.data = 0;
spin_unlock_irqrestore(&dev->lock, flags);
ret = file_mq_send(&dev->mq, (FAR const char *) &msg,
ret = file_mq_send(&dev->mq, (const char *) &msg,
sizeof(msg), CONFIG_CXD56_MSG_PRIO);
flags = spin_lock_irqsave(&dev->lock);
if (ret != OK)
@ -1414,7 +1415,7 @@ static void _process_audio(cxd56_dmahandle_t hdl, uint16_t err_code)
if (dq_count(&dev->up_runq) > 0)
{
FAR struct ap_buffer_s *apb;
struct ap_buffer_s *apb;
apb = (struct ap_buffer_s *) dq_get(&dev->up_runq);
spin_unlock_irqrestore(&dev->lock, flags);
@ -1435,7 +1436,7 @@ static void _process_audio(cxd56_dmahandle_t hdl, uint16_t err_code)
dq_count(&dev->up_pendq));
msg.msg_id = AUDIO_MSG_STOP;
msg.u.data = 0;
ret = file_mq_send(&dev->mq, (FAR const char *)&msg,
ret = file_mq_send(&dev->mq, (const char *)&msg,
sizeof(msg), CONFIG_CXD56_MSG_PRIO);
if (ret != OK)
{
@ -1449,7 +1450,7 @@ static void _process_audio(cxd56_dmahandle_t hdl, uint16_t err_code)
msg.msg_id = AUDIO_MSG_DATA_REQUEST;
msg.u.data = 0;
ret = file_mq_send(&dev->mq, (FAR const char *) &msg,
ret = file_mq_send(&dev->mq, (const char *) &msg,
sizeof(msg), CONFIG_CXD56_MSG_PRIO);
if (ret != OK)
{
@ -1755,7 +1756,7 @@ static void cxd56_set_dma_running(cxd56_dmahandle_t handle, bool running)
}
}
static void cxd56_init_dma(FAR struct cxd56_dev_s *dev)
static void cxd56_init_dma(struct cxd56_dev_s *dev)
{
uint8_t err;
uint8_t ints;
@ -1832,7 +1833,7 @@ static uint32_t cxd56_get_i2s_rate(uint32_t samplerate)
return 3; /* high */
}
static void cxd56_power_on_i2s1(FAR struct cxd56_dev_s *dev)
static void cxd56_power_on_i2s1(struct cxd56_dev_s *dev)
{
uint32_t rate;
@ -1914,7 +1915,7 @@ static int cxd56_power_on_aca(uint32_t samplerate)
return OK;
}
static int cxd56_power_on_analog_output(FAR struct cxd56_dev_s *dev)
static int cxd56_power_on_analog_output(struct cxd56_dev_s *dev)
{
struct cxd56_aca_smaster_param_s smaster_param;
struct cxd56_aca_pwoutput_param_s pwon_param;
@ -2084,7 +2085,7 @@ static uint8_t cxd56_get_mic_mode(void)
return mode;
}
static int cxd56_power_on_micbias(FAR struct cxd56_dev_s *dev)
static int cxd56_power_on_micbias(struct cxd56_dev_s *dev)
{
struct timespec start;
@ -2111,7 +2112,7 @@ static int cxd56_power_on_micbias(FAR struct cxd56_dev_s *dev)
static void cxd56_audio_power_on_cic(uint8_t mic_in,
uint8_t mic_mode,
uint8_t cic_num,
FAR struct cxd56_audio_mic_gain_s *gain)
struct cxd56_audio_mic_gain_s *gain)
{
/* Power on CIC. */
@ -2258,7 +2259,7 @@ static int cxd56_power_on_decim(uint8_t mic_mode, uint32_t samplerate)
return OK;
}
static void cxd56_set_mic_out_channel(FAR struct cxd56_dev_s *dev)
static void cxd56_set_mic_out_channel(struct cxd56_dev_s *dev)
{
uint8_t i;
uint8_t ch_sel[CXD56_IN_CHANNELS_MAX];
@ -2298,7 +2299,7 @@ static void cxd56_set_mic_out_channel(FAR struct cxd56_dev_s *dev)
*
****************************************************************************/
static int cxd56_power_on_input(FAR struct cxd56_dev_s *dev)
static int cxd56_power_on_input(struct cxd56_dev_s *dev)
{
uint8_t i;
uint8_t cic_num;
@ -2377,7 +2378,7 @@ static int cxd56_power_on_input(FAR struct cxd56_dev_s *dev)
return ret;
}
static int cxd56_power_on(FAR struct cxd56_dev_s *dev)
static int cxd56_power_on(struct cxd56_dev_s *dev)
{
uint8_t mic_mode;
@ -2516,7 +2517,7 @@ static int cxd56_power_on(FAR struct cxd56_dev_s *dev)
return OK;
}
static int cxd56_power_off(FAR struct cxd56_dev_s *dev)
static int cxd56_power_off(struct cxd56_dev_s *dev)
{
/* Disable AHBMASTER. */
@ -2581,8 +2582,8 @@ static int cxd56_power_off(FAR struct cxd56_dev_s *dev)
*
****************************************************************************/
static int cxd56_getcaps(FAR struct audio_lowerhalf_s *lower, int type,
FAR struct audio_caps_s *caps)
static int cxd56_getcaps(struct audio_lowerhalf_s *lower, int type,
struct audio_caps_s *caps)
{
DEBUGASSERT(caps && caps->ac_len >= sizeof(struct audio_caps_s));
@ -2697,10 +2698,10 @@ static int cxd56_getcaps(FAR struct audio_lowerhalf_s *lower, int type,
*
****************************************************************************/
static int cxd56_shutdown(FAR struct audio_lowerhalf_s *lower)
static int cxd56_shutdown(struct audio_lowerhalf_s *lower)
{
int ret;
FAR struct cxd56_dev_s *priv = (FAR struct cxd56_dev_s *)lower;
struct cxd56_dev_s *priv = (struct cxd56_dev_s *)lower;
if (priv->state != CXD56_DEV_STATE_OFF)
{
@ -2726,16 +2727,16 @@ static int cxd56_shutdown(FAR struct audio_lowerhalf_s *lower)
****************************************************************************/
#ifdef CONFIG_AUDIO_MULTI_SESSION
static int cxd56_configure(FAR struct audio_lowerhalf_s *lower,
FAR void *session, FAR const struct audio_caps_s *caps)
static int cxd56_configure(struct audio_lowerhalf_s *lower,
void *session, const struct audio_caps_s *caps)
#else
static int cxd56_configure(FAR struct audio_lowerhalf_s *lower,
FAR const struct audio_caps_s *caps)
static int cxd56_configure(struct audio_lowerhalf_s *lower,
const struct audio_caps_s *caps)
#endif
{
int ret = 0;
uint8_t poweron = 0;
FAR struct cxd56_dev_s *priv = (FAR struct cxd56_dev_s *)lower;
struct cxd56_dev_s *priv = (struct cxd56_dev_s *)lower;
switch (caps->ac_type)
{
@ -2907,14 +2908,13 @@ static int cxd56_configure(FAR struct audio_lowerhalf_s *lower,
****************************************************************************/
#ifdef CONFIG_AUDIO_MULTI_SESSION
static int cxd56_start(FAR struct audio_lowerhalf_s *lower,
FAR void *session)
static int cxd56_start(struct audio_lowerhalf_s *lower, void *session)
#else
static int cxd56_start(FAR struct audio_lowerhalf_s *lower)
static int cxd56_start(struct audio_lowerhalf_s *lower)
#endif
{
int ret;
FAR struct cxd56_dev_s *priv = (FAR struct cxd56_dev_s *)lower;
struct cxd56_dev_s *priv = (struct cxd56_dev_s *)lower;
/* Set audio path and enable analog input/output */
@ -2988,7 +2988,7 @@ static int cxd56_start(FAR struct audio_lowerhalf_s *lower)
*
****************************************************************************/
static int cxd56_stop_dma(FAR struct cxd56_dev_s *priv)
static int cxd56_stop_dma(struct cxd56_dev_s *priv)
{
int ret;
@ -3050,21 +3050,21 @@ static int cxd56_stop_dma(FAR struct cxd56_dev_s *priv)
#ifndef CONFIG_AUDIO_EXCLUDE_STOP
#ifdef CONFIG_AUDIO_MULTI_SESSION
static int cxd56_stop(FAR struct audio_lowerhalf_s *lower, FAR void *session)
static int cxd56_stop(struct audio_lowerhalf_s *lower, void *session)
#else
static int cxd56_stop(FAR struct audio_lowerhalf_s *lower)
static int cxd56_stop(struct audio_lowerhalf_s *lower)
#endif
{
int ret;
FAR void *value;
void *value;
struct audio_msg_s msg;
FAR struct cxd56_dev_s *priv = (FAR struct cxd56_dev_s *)lower;
struct cxd56_dev_s *priv = (struct cxd56_dev_s *)lower;
audinfo("cxd56_stop\n");
msg.msg_id = AUDIO_MSG_STOP;
msg.u.data = 0;
ret = file_mq_send(&priv->mq, (FAR const char *)&msg,
ret = file_mq_send(&priv->mq, (const char *)&msg,
sizeof(msg), CONFIG_CXD56_MSG_PRIO);
if (ret != OK)
{
@ -3090,14 +3090,13 @@ static int cxd56_stop(FAR struct audio_lowerhalf_s *lower)
#ifndef CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME
#ifdef CONFIG_AUDIO_MULTI_SESSION
static int cxd56_pause(FAR struct audio_lowerhalf_s *lower,
FAR void *session)
static int cxd56_pause(struct audio_lowerhalf_s *lower, void *session)
#else
static int cxd56_pause(FAR struct audio_lowerhalf_s *lower)
static int cxd56_pause(struct audio_lowerhalf_s *lower)
#endif
{
int ret;
FAR struct cxd56_dev_s *dev = (FAR struct cxd56_dev_s *)lower;
struct cxd56_dev_s *dev = (struct cxd56_dev_s *)lower;
if (dev->state == CXD56_DEV_STATE_STARTED)
{
@ -3122,14 +3121,13 @@ static int cxd56_pause(FAR struct audio_lowerhalf_s *lower)
****************************************************************************/
#ifdef CONFIG_AUDIO_MULTI_SESSION
static int cxd56_resume(FAR struct audio_lowerhalf_s *lower,
FAR void *session)
static int cxd56_resume(struct audio_lowerhalf_s *lower, void *session)
#else
static int cxd56_resume(FAR struct audio_lowerhalf_s *lower)
static int cxd56_resume(struct audio_lowerhalf_s *lower)
#endif
{
int ret;
FAR struct cxd56_dev_s *dev = (FAR struct cxd56_dev_s *)lower;
struct cxd56_dev_s *dev = (struct cxd56_dev_s *)lower;
if (dev->state == CXD56_DEV_STATE_PAUSED ||
dev->state == CXD56_DEV_STATE_BUFFERING)
@ -3170,10 +3168,9 @@ static int cxd56_resume(FAR struct audio_lowerhalf_s *lower)
****************************************************************************/
#ifdef CONFIG_AUDIO_MULTI_SESSION
static int cxd56_release(FAR struct audio_lowerhalf_s *lower,
FAR void *session)
static int cxd56_release(struct audio_lowerhalf_s *lower, void *session)
#else
static int cxd56_release(FAR struct audio_lowerhalf_s *lower)
static int cxd56_release(struct audio_lowerhalf_s *lower)
#endif
{
return OK;
@ -3187,10 +3184,9 @@ static int cxd56_release(FAR struct audio_lowerhalf_s *lower)
****************************************************************************/
#ifdef CONFIG_AUDIO_MULTI_SESSION
static int cxd56_reserve(FAR struct audio_lowerhalf_s *lower,
FAR void **session)
static int cxd56_reserve(struct audio_lowerhalf_s *lower, void **session)
#else
static int cxd56_reserve(FAR struct audio_lowerhalf_s *lower)
static int cxd56_reserve(struct audio_lowerhalf_s *lower)
#endif
{
return OK;
@ -3214,19 +3210,19 @@ static void cxd56_swap_buffer_rl(uint32_t addr, uint16_t size)
}
}
static void send_message_underrun(FAR struct cxd56_dev_s *dev)
static void send_message_underrun(struct cxd56_dev_s *dev)
{
struct audio_msg_s msg;
msg.msg_id = AUDIO_MSG_UNDERRUN;
msg.u.ptr = NULL;
dev->dev.upper(dev->dev.priv, AUDIO_CALLBACK_MESSAGE,
(FAR struct ap_buffer_s *)&msg, OK);
(struct ap_buffer_s *)&msg, OK);
}
static int cxd56_start_dma(FAR struct cxd56_dev_s *dev)
static int cxd56_start_dma(struct cxd56_dev_s *dev)
{
FAR struct ap_buffer_s *apb;
struct ap_buffer_s *apb;
irqstate_t flags;
int retry;
int timeout;
@ -3236,7 +3232,7 @@ static int cxd56_start_dma(FAR struct cxd56_dev_s *dev)
flags = spin_lock_irqsave(&dev->lock);
#ifdef CONFIG_AUDIO_CXD56_SRC
FAR struct ap_buffer_s *src_apb;
struct ap_buffer_s *src_apb;
if (dq_count(&dev->down_pendq) == 0)
#else
@ -3449,7 +3445,7 @@ static int cxd56_start_dma(FAR struct cxd56_dev_s *dev)
msg.u.data = 0;
spin_unlock_irqrestore(&dev->lock, flags);
ret = file_mq_send(&dev->mq, (FAR const char *)&msg,
ret = file_mq_send(&dev->mq, (const char *)&msg,
sizeof(msg), CONFIG_CXD56_MSG_PRIO);
flags = spin_lock_irqsave(&dev->lock);
@ -3476,10 +3472,10 @@ exit:
*
****************************************************************************/
static int cxd56_enqueuebuffer(FAR struct audio_lowerhalf_s *lower,
FAR struct ap_buffer_s *apb)
static int cxd56_enqueuebuffer(struct audio_lowerhalf_s *lower,
struct ap_buffer_s *apb)
{
FAR struct cxd56_dev_s *priv = (FAR struct cxd56_dev_s *)lower;
struct cxd56_dev_s *priv = (struct cxd56_dev_s *)lower;
struct audio_msg_s msg;
irqstate_t flags;
int ret;
@ -3505,7 +3501,7 @@ static int cxd56_enqueuebuffer(FAR struct audio_lowerhalf_s *lower,
msg.msg_id = AUDIO_MSG_ENQUEUE;
msg.u.data = 0;
ret = file_mq_send(&priv->mq, (FAR const char *) &msg,
ret = file_mq_send(&priv->mq, (const char *) &msg,
sizeof(msg), CONFIG_CXD56_MSG_PRIO);
if (ret != OK)
{
@ -3527,8 +3523,8 @@ static int cxd56_enqueuebuffer(FAR struct audio_lowerhalf_s *lower,
*
****************************************************************************/
static int cxd56_cancelbuffer(FAR struct audio_lowerhalf_s *lower,
FAR struct ap_buffer_s *apb)
static int cxd56_cancelbuffer(struct audio_lowerhalf_s *lower,
struct ap_buffer_s *apb)
{
return OK;
}
@ -3540,12 +3536,12 @@ static int cxd56_cancelbuffer(FAR struct audio_lowerhalf_s *lower,
*
****************************************************************************/
static int cxd56_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
unsigned long arg)
static int cxd56_ioctl(struct audio_lowerhalf_s *lower, int cmd,
unsigned long arg)
{
int ret = OK;
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
FAR struct ap_buffer_info_s *bufinfo;
struct ap_buffer_info_s *bufinfo;
#endif
/* Handle ioctl commands from the upper-half driver */
@ -3558,7 +3554,7 @@ static int cxd56_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
case AUDIOIOC_GETBUFFERINFO:
{
audinfo("AUDIOIOC_GETBUFFERINFO:\n");
bufinfo = (FAR struct ap_buffer_info_s *) arg;
bufinfo = (struct ap_buffer_info_s *) arg;
bufinfo->buffer_size = CONFIG_CXD56_AUDIO_BUFFER_SIZE;
bufinfo->nbuffers = CONFIG_CXD56_AUDIO_NUM_BUFFERS;
}
@ -3584,7 +3580,7 @@ static int cxd56_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
static void *cxd56_workerthread(pthread_addr_t pvarg)
{
FAR struct cxd56_dev_s *priv = (struct cxd56_dev_s *)pvarg;
struct cxd56_dev_s *priv = (struct cxd56_dev_s *)pvarg;
struct audio_msg_s msg;
unsigned int prio;
int size;
@ -3612,7 +3608,7 @@ static void *cxd56_workerthread(pthread_addr_t pvarg)
while (priv->running)
{
size = file_mq_receive(&priv->mq, (FAR char *)&msg,
size = file_mq_receive(&priv->mq, (char *)&msg,
sizeof(msg), &prio);
/* Handle the case when we return with no message */
@ -3666,7 +3662,7 @@ static void *cxd56_workerthread(pthread_addr_t pvarg)
audwarn("Buffering up_pendq=%d\n",
dq_count(&priv->up_pendq));
FAR struct ap_buffer_s *apb;
struct ap_buffer_s *apb;
apb = (struct ap_buffer_s *)(&priv->up_pendq)->tail;
bool final = (apb != NULL) &&
@ -3679,7 +3675,7 @@ static void *cxd56_workerthread(pthread_addr_t pvarg)
if (CONFIG_CXD56_AUDIO_NUM_BUFFERS <=
dq_count(&priv->up_pendq) || final)
{
cxd56_resume((FAR struct audio_lowerhalf_s *)priv);
cxd56_resume((struct audio_lowerhalf_s *)priv);
}
}
break;
@ -3712,9 +3708,9 @@ static void *cxd56_workerthread(pthread_addr_t pvarg)
/* Setup worker thread and message queue */
static int cxd56_init_worker(FAR struct audio_lowerhalf_s *dev)
static int cxd56_init_worker(struct audio_lowerhalf_s *dev)
{
FAR struct cxd56_dev_s *priv = (FAR struct cxd56_dev_s *)dev;
struct cxd56_dev_s *priv = (struct cxd56_dev_s *)dev;
struct sched_param sparam;
struct mq_attr m_attr;
pthread_attr_t t_attr;
@ -3777,10 +3773,9 @@ static int cxd56_init_worker(FAR struct audio_lowerhalf_s *dev)
*
****************************************************************************/
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)
{
FAR struct cxd56_dev_s *priv;
struct cxd56_dev_s *priv;
audinfo("cxd56_initialize\n");
priv = kmm_zalloc(sizeof(struct cxd56_dev_s));

View file

@ -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 */

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->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)
{

View file

@ -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 */

View file

@ -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)

View file

@ -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

View file

@ -648,7 +648,7 @@ struct stm32_ltdcdev_s
#ifdef CONFIG_STM32H7_DMA2D
/* Interface to the dma2d controller */
FAR struct dma2d_layer_s *dma2d;
struct dma2d_layer_s *dma2d;
#endif
};
@ -673,23 +673,23 @@ static void stm32_ltdc_periphconfig(void);
static void stm32_ltdc_bgcolor(uint32_t rgb);
static void stm32_ltdc_dither(bool enable, uint8_t red,
uint8_t green, uint8_t blue);
static int stm32_ltdcirq(int irq, void *context, FAR void *arg);
static int stm32_ltdcirq(int irq, void *context, void *arg);
static int stm32_ltdc_waitforirq(void);
static int stm32_ltdc_reload(uint8_t value, bool waitvblank);
/* Helper for layer register configuration */
static void stm32_ltdc_lpixelformat(FAR struct stm32_ltdc_s *layer);
static void stm32_ltdc_lframebuffer(FAR struct stm32_ltdc_s *layer);
static void stm32_ltdc_lenable(FAR struct stm32_ltdc_s *layer, bool enable);
static void stm32_ltdc_ldefaultcolor(FAR struct stm32_ltdc_s * layer,
static void stm32_ltdc_lpixelformat(struct stm32_ltdc_s *layer);
static void stm32_ltdc_lframebuffer(struct stm32_ltdc_s *layer);
static void stm32_ltdc_lenable(struct stm32_ltdc_s *layer, bool enable);
static void stm32_ltdc_ldefaultcolor(struct stm32_ltdc_s *layer,
uint32_t rgb);
static void stm32_ltdc_ltransp(FAR struct stm32_ltdc_s *layer,
static void stm32_ltdc_ltransp(struct stm32_ltdc_s *layer,
uint8_t transp,
uint32_t mode);
static void stm32_ltdc_lchromakey(FAR struct stm32_ltdc_s *layer,
static void stm32_ltdc_lchromakey(struct stm32_ltdc_s *layer,
uint32_t chromakey);
static void stm32_ltdc_lchromakeyenable(FAR struct stm32_ltdc_s *layer,
static void stm32_ltdc_lchromakeyenable(struct stm32_ltdc_s *layer,
bool enable);
static void stm32_ltdc_linit(uint8_t lid);
@ -697,17 +697,17 @@ static void stm32_ltdc_linit(uint8_t lid);
static void stm32_ltdc_dma2dlinit(void);
# ifdef CONFIG_FB_OVERLAY_BLIT
static bool stm32_ltdc_lvalidate(FAR const struct stm32_ltdc_s *layer,
FAR const struct fb_area_s *area);
static bool stm32_ltdc_lvalidate(const struct stm32_ltdc_s *layer,
const struct fb_area_s *area);
# endif
#endif
#ifdef CONFIG_STM32H7_FB_CMAP
static void stm32_ltdc_lputclut(FAR struct stm32_ltdc_s * layer,
FAR const struct fb_cmap_s *cmap);
static void stm32_ltdc_lgetclut(FAR struct stm32_ltdc_s * layer,
FAR struct fb_cmap_s *cmap);
static void stm32_ltdc_lclutenable(FAR struct stm32_ltdc_s *layer,
static void stm32_ltdc_lputclut(struct stm32_ltdc_s *layer,
const struct fb_cmap_s *cmap);
static void stm32_ltdc_lgetclut(struct stm32_ltdc_s *layer,
struct fb_cmap_s *cmap);
static void stm32_ltdc_lclutenable(struct stm32_ltdc_s *layer,
bool enable);
#endif
@ -715,21 +715,21 @@ static void stm32_ltdc_lclear(uint8_t overlayno);
/* Framebuffer interface */
static int stm32_getvideoinfo(FAR struct fb_vtable_s *vtable,
FAR struct fb_videoinfo_s *vinfo);
static int stm32_getplaneinfo(FAR struct fb_vtable_s *vtable,
static int stm32_getvideoinfo(struct fb_vtable_s *vtable,
struct fb_videoinfo_s *vinfo);
static int stm32_getplaneinfo(struct fb_vtable_s *vtable,
int planeno,
FAR struct fb_planeinfo_s *pinfo);
struct fb_planeinfo_s *pinfo);
/* The following is provided only if the video hardware supports RGB color
* mapping
*/
#ifdef CONFIG_STM32H7_FB_CMAP
static int stm32_getcmap(FAR struct fb_vtable_s *vtable,
FAR struct fb_cmap_s *cmap);
static int stm32_putcmap(FAR struct fb_vtable_s *vtable,
FAR const struct fb_cmap_s *cmap);
static int stm32_getcmap(struct fb_vtable_s *vtable,
struct fb_cmap_s *cmap);
static int stm32_putcmap(struct fb_vtable_s *vtable,
const struct fb_cmap_s *cmap);
#endif
/* The following is provided only if the video hardware signals vertical
@ -737,35 +737,35 @@ static int stm32_putcmap(FAR struct fb_vtable_s *vtable,
*/
#ifdef CONFIG_FB_SYNC
static int stm32_waitforvsync(FAR struct fb_vtable_s *vtable);
static int stm32_waitforvsync(struct fb_vtable_s *vtable);
#endif
/* The following is provided only if the video hardware supports overlays */
#ifdef CONFIG_FB_OVERLAY
static int stm32_getoverlayinfo(FAR struct fb_vtable_s *vtable,
static int stm32_getoverlayinfo(struct fb_vtable_s *vtable,
int overlayno,
FAR struct fb_overlayinfo_s *oinfo);
static int stm32_settransp(FAR struct fb_vtable_s *vtable,
FAR const struct fb_overlayinfo_s *oinfo);
static int stm32_setchromakey(FAR struct fb_vtable_s *vtable,
FAR const struct fb_overlayinfo_s *oinfo);
static int stm32_setcolor(FAR struct fb_vtable_s *vtable,
FAR const struct fb_overlayinfo_s *oinfo);
static int stm32_setblank(FAR struct fb_vtable_s *vtable,
FAR const struct fb_overlayinfo_s *oinfo);
static int stm32_setarea(FAR struct fb_vtable_s *vtable,
FAR const struct fb_overlayinfo_s *oinfo);
struct fb_overlayinfo_s *oinfo);
static int stm32_settransp(struct fb_vtable_s *vtable,
const struct fb_overlayinfo_s *oinfo);
static int stm32_setchromakey(struct fb_vtable_s *vtable,
const struct fb_overlayinfo_s *oinfo);
static int stm32_setcolor(struct fb_vtable_s *vtable,
const struct fb_overlayinfo_s *oinfo);
static int stm32_setblank(struct fb_vtable_s *vtable,
const struct fb_overlayinfo_s *oinfo);
static int stm32_setarea(struct fb_vtable_s *vtable,
const struct fb_overlayinfo_s *oinfo);
/* The following is provided only if the video hardware supports blit and
* blend operation
*/
# ifdef CONFIG_FB_OVERLAY_BLIT
static int stm32_blit(FAR struct fb_vtable_s *vtable,
FAR const struct fb_overlayblit_s *blit);
static int stm32_blend(FAR struct fb_vtable_s *vtable,
FAR const struct fb_overlayblend_s *blend);
static int stm32_blit(struct fb_vtable_s *vtable,
const struct fb_overlayblit_s *blit);
static int stm32_blend(struct fb_vtable_s *vtable,
const struct fb_overlayblend_s *blend);
# endif /* CONFIG_FB_OVERLAY_BLIT */
#endif /* CONFIG_FB_OVERLAY */
@ -1331,7 +1331,7 @@ static void stm32_ltdc_periphconfig(void)
*
****************************************************************************/
static void stm32_ltdc_ldefaultcolor(FAR struct stm32_ltdc_s * layer,
static void stm32_ltdc_ldefaultcolor(struct stm32_ltdc_s *layer,
uint32_t rgb)
{
DEBUGASSERT(layer->layerno < LTDC_NLAYERS);
@ -1452,10 +1452,10 @@ static void stm32_ltdc_irqctrl(uint32_t setirqs, uint32_t clrirqs)
*
****************************************************************************/
static int stm32_ltdcirq(int irq, void *context, FAR void *arg)
static int stm32_ltdcirq(int irq, void *context, void *arg)
{
int ret;
FAR struct stm32_interrupt_s *priv = &g_interrupt;
struct stm32_interrupt_s *priv = &g_interrupt;
uint32_t regval = getreg32(STM32_LTDC_ISR);
reginfo("irq = %d, regval = %08x\n", irq, regval);
@ -1533,7 +1533,7 @@ static int stm32_ltdcirq(int irq, void *context, FAR void *arg)
static int stm32_ltdc_waitforirq(void)
{
int ret = OK;
FAR struct stm32_interrupt_s *priv = &g_interrupt;
struct stm32_interrupt_s *priv = &g_interrupt;
ret = nxsem_wait(priv->sem);
@ -1673,7 +1673,7 @@ static void stm32_ltdc_globalconfig(void)
static void stm32_ltdc_enable(bool enable)
{
uint32_t regval;
uint32_t regval;
regval = getreg32(STM32_LTDC_GCR);
reginfo("get LTDC_GCR=%08x\n", regval);
@ -1705,7 +1705,7 @@ static void stm32_ltdc_enable(bool enable)
*
****************************************************************************/
static void stm32_ltdc_lpixelformat(FAR struct stm32_ltdc_s *layer)
static void stm32_ltdc_lpixelformat(struct stm32_ltdc_s *layer)
{
uint8_t overlay = layer->layerno;
DEBUGASSERT(layer->layerno < LTDC_NLAYERS);
@ -1734,7 +1734,7 @@ static void stm32_ltdc_lpixelformat(FAR struct stm32_ltdc_s *layer)
*
****************************************************************************/
static void stm32_ltdc_lframebuffer(FAR struct stm32_ltdc_s *layer)
static void stm32_ltdc_lframebuffer(struct stm32_ltdc_s *layer)
{
uint32_t cfblr;
uint32_t rxpos;
@ -1811,9 +1811,9 @@ static void stm32_ltdc_lframebuffer(FAR struct stm32_ltdc_s *layer)
*
****************************************************************************/
static void stm32_ltdc_lenable(FAR struct stm32_ltdc_s *layer, bool enable)
static void stm32_ltdc_lenable(struct stm32_ltdc_s *layer, bool enable)
{
uint32_t regval;
uint32_t regval;
DEBUGASSERT(layer->layerno < LTDC_NLAYERS);
regval = getreg32(stm32_cr_layer_t[layer->layerno]);
@ -1852,7 +1852,7 @@ static void stm32_ltdc_lenable(FAR struct stm32_ltdc_s *layer, bool enable)
*
****************************************************************************/
static void stm32_ltdc_ltransp(FAR struct stm32_ltdc_s *layer,
static void stm32_ltdc_ltransp(struct stm32_ltdc_s *layer,
uint8_t transp, uint32_t mode)
{
uint32_t bf1;
@ -1908,7 +1908,7 @@ static void stm32_ltdc_ltransp(FAR struct stm32_ltdc_s *layer,
*
****************************************************************************/
static void stm32_ltdc_lchromakey(FAR struct stm32_ltdc_s *layer,
static void stm32_ltdc_lchromakey(struct stm32_ltdc_s *layer,
uint32_t chroma)
{
uint32_t rgb;
@ -1949,10 +1949,10 @@ static void stm32_ltdc_lchromakey(FAR struct stm32_ltdc_s *layer,
*
****************************************************************************/
static void stm32_ltdc_lchromakeyenable(FAR struct stm32_ltdc_s *layer,
static void stm32_ltdc_lchromakeyenable(struct stm32_ltdc_s *layer,
bool enable)
{
uint32_t regval;
uint32_t regval;
DEBUGASSERT(layer->layerno < LTDC_NLAYERS);
regval = getreg32(stm32_cr_layer_t[layer->layerno]);
@ -1989,10 +1989,9 @@ static void stm32_ltdc_lchromakeyenable(FAR struct stm32_ltdc_s *layer,
****************************************************************************/
#ifdef CONFIG_STM32H7_FB_CMAP
static void stm32_ltdc_lclutenable(FAR struct stm32_ltdc_s *layer,
bool enable)
static void stm32_ltdc_lclutenable(struct stm32_ltdc_s *layer, bool enable)
{
uint32_t regval;
uint32_t regval;
regval = getreg32(stm32_cr_layer_t[layer->oinfo.overlay]);
reginfo("get LTDC_L%dCR=%08x\n", layer->oinfo.overlay + 1, regval);
@ -2029,8 +2028,8 @@ static void stm32_ltdc_lclutenable(FAR struct stm32_ltdc_s *layer,
*
****************************************************************************/
static void stm32_ltdc_lputclut(FAR struct stm32_ltdc_s *layer,
FAR const struct fb_cmap_s *cmap)
static void stm32_ltdc_lputclut(struct stm32_ltdc_s *layer,
const struct fb_cmap_s *cmap)
{
int n;
irqstate_t flags;
@ -2082,11 +2081,11 @@ static void stm32_ltdc_lputclut(FAR struct stm32_ltdc_s *layer,
*
****************************************************************************/
static void stm32_ltdc_lgetclut(FAR struct stm32_ltdc_s * layer,
FAR struct fb_cmap_s * cmap)
static void stm32_ltdc_lgetclut(struct stm32_ltdc_s *layer,
struct fb_cmap_s * cmap)
{
int n;
FAR struct fb_cmap_s *priv_cmap = &g_vtable.cmap;
struct fb_cmap_s *priv_cmap = &g_vtable.cmap;
/* Copy from internal cmap */
@ -2142,8 +2141,8 @@ static void stm32_ltdc_lclear(uint8_t overlayno)
****************************************************************************/
#if defined(CONFIG_STM32H7_DMA2D) && defined(CONFIG_FB_OVERLAY_BLIT)
static bool stm32_ltdc_lvalidate(FAR const struct stm32_ltdc_s *layer,
FAR const struct fb_area_s *area)
static bool stm32_ltdc_lvalidate(const struct stm32_ltdc_s *layer,
const struct fb_area_s *area)
{
uint32_t offset;
@ -2177,8 +2176,8 @@ static void stm32_ltdc_linit(uint8_t overlay)
{
DEBUGASSERT(overlay < LTDC_NLAYERS);
FAR struct stm32_ltdcdev_s *dev = &g_vtable;
FAR struct stm32_ltdc_s *layer = &dev->layer[overlay];
struct stm32_ltdcdev_s *dev = &g_vtable;
struct stm32_ltdc_s *layer = &dev->layer[overlay];
/* Disable layer */
@ -2256,13 +2255,13 @@ static void stm32_ltdc_linit(uint8_t overlay)
static void stm32_ltdc_dma2dlinit(void)
{
int n;
FAR struct stm32_ltdcdev_s *dev = &g_vtable;
struct stm32_ltdcdev_s *dev = &g_vtable;
for (n = 0; n < DMA2D_NLAYERS; n++)
{
uint32_t overlay = n + LTDC_NLAYERS;
FAR struct stm32_ltdc_s *layer = &dev->layer[overlay];
uint8_t * fbmem = (uint8_t *)STM32_DMA2D_BUFFER_START;
struct stm32_ltdc_s *layer = &dev->layer[overlay];
uint8_t *fbmem = (uint8_t *)STM32_DMA2D_BUFFER_START;
layer->layerno = overlay;
layer->oinfo.fbmem = fbmem + STM32_DMA2D_LAYER_SIZE * n;
@ -2314,7 +2313,7 @@ static void stm32_ltdc_dma2dlinit(void)
static int stm32_getvideoinfo(struct fb_vtable_s *vtable,
struct fb_videoinfo_s *vinfo)
{
FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)vtable;
struct stm32_ltdcdev_s *priv = (struct stm32_ltdcdev_s *)vtable;
lcdinfo("vtable=%p vinfo=%p\n", vtable, vinfo);
DEBUGASSERT(vtable != NULL && priv == &g_vtable && vinfo != NULL);
@ -2343,7 +2342,7 @@ static int stm32_getvideoinfo(struct fb_vtable_s *vtable,
static int stm32_getplaneinfo(struct fb_vtable_s *vtable, int planeno,
struct fb_planeinfo_s *pinfo)
{
FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)vtable;
struct stm32_ltdcdev_s *priv = (struct stm32_ltdcdev_s *)vtable;
DEBUGASSERT(vtable != NULL && priv == &g_vtable);
lcdinfo("vtable=%p planeno=%d pinfo=%p\n", vtable, planeno, pinfo);
@ -2380,7 +2379,7 @@ static int stm32_getcmap(struct fb_vtable_s *vtable,
struct fb_cmap_s *cmap)
{
int ret;
FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)vtable;
struct stm32_ltdcdev_s *priv = (struct stm32_ltdcdev_s *)vtable;
DEBUGASSERT(vtable != NULL && priv == &g_vtable && cmap != NULL);
lcdinfo("vtable=%p cmap=%p\n", vtable, cmap);
@ -2404,7 +2403,7 @@ static int stm32_getcmap(struct fb_vtable_s *vtable,
* from the main overlay.
*/
FAR struct stm32_ltdc_s * layer;
struct stm32_ltdc_s *layer;
# ifdef CONFIG_STM32H7_LTDC_L2
layer = &priv->layer[LTDC_LAYER_L2];
# else
@ -2441,7 +2440,7 @@ static int stm32_putcmap(struct fb_vtable_s *vtable,
const struct fb_cmap_s *cmap)
{
int ret;
FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)vtable;
struct stm32_ltdcdev_s *priv = (struct stm32_ltdcdev_s *)vtable;
DEBUGASSERT(vtable != NULL && priv == &g_vtable && cmap != NULL);
lcdinfo("vtable=%p cmap=%p\n", vtable, cmap);
@ -2466,7 +2465,7 @@ static int stm32_putcmap(struct fb_vtable_s *vtable,
*/
int n;
FAR struct fb_cmap_s *priv_cmap = &g_vtable.cmap;
struct fb_cmap_s *priv_cmap = &g_vtable.cmap;
/* First copy to internal cmap */
@ -2491,7 +2490,7 @@ static int stm32_putcmap(struct fb_vtable_s *vtable,
for (n = 0; n < LTDC_NLAYERS; n++)
{
FAR struct stm32_ltdc_s * layer = &priv->layer[n];
struct stm32_ltdc_s *layer = &priv->layer[n];
stm32_ltdc_lputclut(layer, priv_cmap);
}
@ -2516,7 +2515,7 @@ static int stm32_putcmap(struct fb_vtable_s *vtable,
****************************************************************************/
#ifdef CONFIG_FB_SYNC
static int stm32_waitforvsync(FAR struct fb_vtable_s *vtable)
static int stm32_waitforvsync(struct fb_vtable_s *vtable)
{
int ret;
@ -2537,18 +2536,18 @@ static int stm32_waitforvsync(FAR struct fb_vtable_s *vtable)
****************************************************************************/
#ifdef CONFIG_FB_OVERLAY
static int stm32_getoverlayinfo(FAR struct fb_vtable_s *vtable,
static int stm32_getoverlayinfo(struct fb_vtable_s *vtable,
int overlayno,
FAR struct fb_overlayinfo_s *oinfo)
struct fb_overlayinfo_s *oinfo)
{
FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)vtable;
struct stm32_ltdcdev_s *priv = (struct stm32_ltdcdev_s *)vtable;
lcdinfo("vtable=%p overlay=%d oinfo=%p\n", vtable, overlayno, oinfo);
DEBUGASSERT(vtable != NULL && priv == &g_vtable);
if (overlayno < LTDC_NOVERLAYS)
{
FAR struct stm32_ltdc_s * layer = &priv->layer[overlayno];
struct stm32_ltdc_s *layer = &priv->layer[overlayno];
memcpy(oinfo, &layer->oinfo, sizeof(struct fb_overlayinfo_s));
return OK;
}
@ -2563,10 +2562,10 @@ static int stm32_getoverlayinfo(FAR struct fb_vtable_s *vtable,
* Entrypoint ioctl FBIOSET_TRANSP
****************************************************************************/
static int stm32_settransp(FAR struct fb_vtable_s *vtable,
FAR const struct fb_overlayinfo_s *oinfo)
static int stm32_settransp(struct fb_vtable_s *vtable,
const struct fb_overlayinfo_s *oinfo)
{
FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)vtable;
struct stm32_ltdcdev_s *priv = (struct stm32_ltdcdev_s *)vtable;
DEBUGASSERT(vtable != NULL && priv == &g_vtable);
lcdinfo("vtable=%p, overlay=%d, transp=%02x, transp_mode=%02x\n", vtable,
@ -2580,7 +2579,7 @@ static int stm32_settransp(FAR struct fb_vtable_s *vtable,
if (oinfo->overlay < LTDC_NOVERLAYS)
{
FAR struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay];
struct stm32_ltdc_s *layer = &priv->layer[oinfo->overlay];
nxsem_wait(layer->lock);
layer->oinfo.transp.transp = oinfo->transp.transp;
@ -2619,10 +2618,10 @@ static int stm32_settransp(FAR struct fb_vtable_s *vtable,
* Entrypoint ioctl FBIOSET_CHROMAKEY
****************************************************************************/
static int stm32_setchromakey(FAR struct fb_vtable_s *vtable,
FAR const struct fb_overlayinfo_s *oinfo)
static int stm32_setchromakey(struct fb_vtable_s *vtable,
const struct fb_overlayinfo_s *oinfo)
{
FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)vtable;
struct stm32_ltdcdev_s *priv = (struct stm32_ltdcdev_s *)vtable;
DEBUGASSERT(vtable != NULL && priv == &g_vtable && oinfo != NULL);
lcdinfo("vtable=%p, overlay=%d, chromakey=%08x\n", vtable,
@ -2631,7 +2630,7 @@ static int stm32_setchromakey(FAR struct fb_vtable_s *vtable,
if (oinfo->overlay < LTDC_NLAYERS)
{
int ret;
FAR struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay];
struct stm32_ltdc_s *layer = &priv->layer[oinfo->overlay];
# ifndef CONFIG_STM32H7_LTDC_L1_CHROMAKEY
if (oinfo->overlay == LTDC_LAYER_L1)
@ -2687,8 +2686,8 @@ static int stm32_setchromakey(FAR struct fb_vtable_s *vtable,
* Entrypoint ioctl FBIOSET_COLOR
****************************************************************************/
static int stm32_setcolor(FAR struct fb_vtable_s *vtable,
FAR const struct fb_overlayinfo_s *oinfo)
static int stm32_setcolor(struct fb_vtable_s *vtable,
const struct fb_overlayinfo_s *oinfo)
{
DEBUGASSERT(vtable != NULL && vtable == &g_vtable.vtable && oinfo != NULL);
lcdinfo("vtable=%p, overlay=%d, color=%08x\n", vtable, oinfo->color);
@ -2702,10 +2701,9 @@ static int stm32_setcolor(FAR struct fb_vtable_s *vtable,
*/
int ret;
FAR struct stm32_ltdcdev_s *priv =
(FAR struct stm32_ltdcdev_s *)vtable;
FAR struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay];
FAR struct fb_overlayinfo_s * poverlay = layer->dma2dinfo.oinfo;
struct stm32_ltdcdev_s *priv = (struct stm32_ltdcdev_s *)vtable;
struct stm32_ltdc_s *layer = &priv->layer[oinfo->overlay];
struct fb_overlayinfo_s *poverlay = layer->dma2dinfo.oinfo;
DEBUGASSERT(&layer->oinfo == poverlay);
@ -2733,17 +2731,17 @@ static int stm32_setcolor(FAR struct fb_vtable_s *vtable,
* Entrypoint ioctl FBIOSET_BLANK
****************************************************************************/
static int stm32_setblank(FAR struct fb_vtable_s *vtable,
FAR const struct fb_overlayinfo_s *oinfo)
static int stm32_setblank(struct fb_vtable_s *vtable,
const struct fb_overlayinfo_s *oinfo)
{
FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)vtable;
struct stm32_ltdcdev_s *priv = (struct stm32_ltdcdev_s *)vtable;
DEBUGASSERT(vtable != NULL && priv == &g_vtable && oinfo != NULL);
lcdinfo("vtable=%p, overlay=%d, blank=%02x\n", vtable, oinfo->blank);
if (oinfo->overlay < LTDC_NLAYERS)
{
FAR struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay];
struct stm32_ltdc_s *layer = &priv->layer[oinfo->overlay];
nxsem_wait(layer->lock);
layer->oinfo.blank = oinfo->blank;
@ -2774,8 +2772,8 @@ static int stm32_setblank(FAR struct fb_vtable_s *vtable,
* Entrypoint ioctl FBIOSET_AREA
****************************************************************************/
static int stm32_setarea(FAR struct fb_vtable_s *vtable,
FAR const struct fb_overlayinfo_s *oinfo)
static int stm32_setarea(struct fb_vtable_s *vtable,
const struct fb_overlayinfo_s *oinfo)
{
DEBUGASSERT(vtable != NULL && vtable == &g_vtable.vtable && oinfo != NULL);
lcdinfo("vtable=%p, overlay=%d, x=%d, y=%d, w=%d, h=%d\n", vtable,
@ -2792,10 +2790,8 @@ static int stm32_setarea(FAR struct fb_vtable_s *vtable,
# ifdef CONFIG_STM32H7_DMA2D
if (oinfo->overlay < LTDC_NOVERLAYS)
{
FAR struct stm32_ltdcdev_s *priv =
(FAR struct stm32_ltdcdev_s *)vtable;
FAR struct stm32_ltdc_s * layer =
&priv->layer[oinfo->overlay];
struct stm32_ltdcdev_s *priv = (struct stm32_ltdcdev_s *)vtable;
struct stm32_ltdc_s *layer = &priv->layer[oinfo->overlay];
nxsem_wait(layer->lock);
memcpy(&layer->oinfo.sarea, &oinfo->sarea, sizeof(struct fb_area_s));
@ -2816,8 +2812,8 @@ static int stm32_setarea(FAR struct fb_vtable_s *vtable,
****************************************************************************/
# ifdef CONFIG_FB_OVERLAY_BLIT
static int stm32_blit(FAR struct fb_vtable_s *vtable,
FAR const struct fb_overlayblit_s *blit)
static int stm32_blit(struct fb_vtable_s *vtable,
const struct fb_overlayblit_s *blit)
{
DEBUGASSERT(vtable != NULL && vtable == &g_vtable.vtable && blit != NULL);
lcdinfo("vtable = %p, blit = %p\n", vtable, blit);
@ -2828,13 +2824,10 @@ static int stm32_blit(FAR struct fb_vtable_s *vtable,
# ifdef CONFIG_STM32H7_DMA2D
int ret;
struct fb_area_s sarea;
FAR const struct fb_area_s *darea = &blit->dest.area;
FAR struct stm32_ltdcdev_s *priv =
(FAR struct stm32_ltdcdev_s *)vtable;
FAR struct stm32_ltdc_s *dlayer =
&priv->layer[blit->dest.overlay];
FAR struct stm32_ltdc_s *slayer =
&priv->layer[blit->src.overlay];
const struct fb_area_s *darea = &blit->dest.area;
struct stm32_ltdcdev_s *priv = (struct stm32_ltdcdev_s *)vtable;
struct stm32_ltdc_s *dlayer = &priv->layer[blit->dest.overlay];
struct stm32_ltdc_s *slayer = &priv->layer[blit->src.overlay];
DEBUGASSERT(&dlayer->oinfo == dlayer->dma2dinfo.oinfo &&
&slayer->oinfo == slayer->dma2dinfo.oinfo);
@ -2877,8 +2870,8 @@ static int stm32_blit(FAR struct fb_vtable_s *vtable,
* Entrypoint ioctl FBIOSET_BLEND
****************************************************************************/
static int stm32_blend(FAR struct fb_vtable_s *vtable,
FAR const struct fb_overlayblend_s *blend)
static int stm32_blend(struct fb_vtable_s *vtable,
const struct fb_overlayblend_s *blend)
{
DEBUGASSERT(vtable != NULL && vtable == &g_vtable.vtable && blend != NULL);
lcdinfo("vtable = %p, blend = %p\n", vtable, blend);
@ -2890,15 +2883,12 @@ static int stm32_blend(FAR struct fb_vtable_s *vtable,
# ifdef CONFIG_STM32H7_DMA2D
int ret;
struct fb_area_s barea;
FAR const struct fb_area_s *darea = &blend->dest.area;
FAR const struct fb_area_s *farea = &blend->foreground.area;
FAR struct stm32_ltdcdev_s *priv =
(FAR struct stm32_ltdcdev_s *)vtable;
FAR struct stm32_ltdc_s *dlayer = &priv->layer[blend->dest.overlay];
FAR struct stm32_ltdc_s *flayer =
&priv->layer[blend->foreground.overlay];
FAR struct stm32_ltdc_s *blayer =
&priv->layer[blend->background.overlay];
const struct fb_area_s *darea = &blend->dest.area;
const struct fb_area_s *farea = &blend->foreground.area;
struct stm32_ltdcdev_s *priv = (struct stm32_ltdcdev_s *)vtable;
struct stm32_ltdc_s *dlayer = &priv->layer[blend->dest.overlay];
struct stm32_ltdc_s *flayer = &priv->layer[blend->foreground.overlay];
struct stm32_ltdc_s *blayer = &priv->layer[blend->background.overlay];
DEBUGASSERT(&dlayer->oinfo == dlayer->dma2dinfo.oinfo &&
&flayer->oinfo == flayer->dma2dinfo.oinfo &&

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

View file

@ -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)

View file

@ -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)
{

View file

@ -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;

View file

@ -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).

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 esp32c6_uart_s *priv = dev->priv;

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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);
}
}
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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");

View file

@ -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);

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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);
}

View file

@ -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>

View file

@ -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);
}
}
}

View file

@ -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");

View file

@ -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

View file

@ -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? */

View file

@ -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;