arch/arm: Remove FAR and CODE from board folder(3)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-04-17 14:01:48 +08:00
committed by Petro Karashchenko
parent a3c9b413d8
commit c628529e2d
272 changed files with 1787 additions and 1787 deletions
@@ -49,7 +49,7 @@ extern "C"
* Name: stm32_ihm07m1_initialize
****************************************************************************/
int board_ihm07m1_initialize(FAR struct stm32_foc_adc_s *adc_cfg);
int board_ihm07m1_initialize(struct stm32_foc_adc_s *adc_cfg);
#undef EXTERN
#ifdef __cplusplus
@@ -49,7 +49,7 @@ extern "C"
* Name: stm32_ihm08m1_initialize
****************************************************************************/
int board_ihm08m1_initialize(FAR struct stm32_foc_adc_s *adc_cfg);
int board_ihm08m1_initialize(struct stm32_foc_adc_s *adc_cfg);
#undef EXTERN
#ifdef __cplusplus
@@ -49,7 +49,7 @@ extern "C"
* Name: stm32_ihm16m1_initialize
****************************************************************************/
int board_ihm16m1_initialize(FAR struct stm32_foc_adc_s *adc_cfg);
int board_ihm16m1_initialize(struct stm32_foc_adc_s *adc_cfg);
#undef EXTERN
#ifdef __cplusplus
@@ -70,7 +70,7 @@ int board_ssd1306_initialize(int busno);
*
****************************************************************************/
FAR struct lcd_dev_s *board_ssd1306_getdev(void);
struct lcd_dev_s *board_ssd1306_getdev(void);
#undef EXTERN
#ifdef __cplusplus
+1 -1
View File
@@ -81,7 +81,7 @@
int board_apa102_initialize(int devno, int spino)
{
FAR struct spi_dev_s *spi;
struct spi_dev_s *spi;
char devpath[13];
int ret;
+7 -7
View File
@@ -51,16 +51,16 @@ struct stm32_apds9960config_s
/* Additional private definitions only known to this driver */
FAR void *arg; /* Argument to pass to the interrupt handler */
FAR xcpt_t isr; /* ISR Handler */
void *arg; /* Argument to pass to the interrupt handler */
xcpt_t isr; /* ISR Handler */
};
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
static int apds9960_irq_attach(FAR struct apds9960_config_s *state,
xcpt_t isr, FAR void *arg);
static int apds9960_irq_attach(struct apds9960_config_s *state,
xcpt_t isr, void *arg);
/****************************************************************************
* Private Data
@@ -90,8 +90,8 @@ static struct stm32_apds9960config_s g_apds9960config =
/* Attach the APDS-9960 interrupt handler to the GPIO interrupt */
static int apds9960_irq_attach(FAR struct apds9960_config_s *state,
xcpt_t isr, FAR void *arg)
static int apds9960_irq_attach(struct apds9960_config_s *state,
xcpt_t isr, void *arg)
{
irqstate_t flags;
@@ -129,7 +129,7 @@ static int apds9960_irq_attach(FAR struct apds9960_config_s *state,
int board_apds9960_initialize(int devno, int busno)
{
FAR struct i2c_master_s *i2c;
struct i2c_master_s *i2c;
char devpath[12];
int ret;
+1 -1
View File
@@ -60,7 +60,7 @@
int board_bh1750_initialize(int devno, int busno)
{
FAR struct i2c_master_s *i2c;
struct i2c_master_s *i2c;
int ret;
sninfo("Initializing BH1750FVI!\n");
+1 -1
View File
@@ -75,7 +75,7 @@
int board_bmp180_initialize(int devno, int busno)
{
FAR struct i2c_master_s *i2c;
struct i2c_master_s *i2c;
char devpath[12];
int ret;
+8 -8
View File
@@ -45,11 +45,11 @@
* Private Function Prototypes
****************************************************************************/
static void dhtxx_config_data_pin(FAR struct dhtxx_config_s *state,
static void dhtxx_config_data_pin(struct dhtxx_config_s *state,
bool mode);
static void dhtxx_set_data_pin(FAR struct dhtxx_config_s *state, bool value);
static bool dhtxx_read_data_pin(FAR struct dhtxx_config_s *state);
static int64_t dhtxx_get_clock(FAR struct dhtxx_config_s *state);
static void dhtxx_set_data_pin(struct dhtxx_config_s *state, bool value);
static bool dhtxx_read_data_pin(struct dhtxx_config_s *state);
static int64_t dhtxx_get_clock(struct dhtxx_config_s *state);
/****************************************************************************
* Private Data
@@ -71,7 +71,7 @@ struct timespec ts;
* Private Functions
****************************************************************************/
static void dhtxx_config_data_pin(FAR struct dhtxx_config_s *state,
static void dhtxx_config_data_pin(struct dhtxx_config_s *state,
bool mode)
{
if (mode)
@@ -84,17 +84,17 @@ static void dhtxx_config_data_pin(FAR struct dhtxx_config_s *state,
}
}
static void dhtxx_set_data_pin(FAR struct dhtxx_config_s *state, bool value)
static void dhtxx_set_data_pin(struct dhtxx_config_s *state, bool value)
{
stm32_gpiowrite(BOARD_DHTXX_GPIO_OUTPUT, value);
}
static bool dhtxx_read_data_pin(FAR struct dhtxx_config_s *state)
static bool dhtxx_read_data_pin(struct dhtxx_config_s *state)
{
return stm32_gpioread(BOARD_DHTXX_GPIO_INPUT);
}
static int64_t dhtxx_get_clock(FAR struct dhtxx_config_s *state)
static int64_t dhtxx_get_clock(struct dhtxx_config_s *state)
{
/* Get the time from free running timer */
+25 -25
View File
@@ -56,26 +56,26 @@ struct stm32_hcsr04config_s
/* Additional private definitions only known to this driver */
FAR void *arg; /* Argument to pass to the interrupt handler */
FAR xcpt_t isr; /* ISR Handler */
bool rising; /* Rising edge enabled */
bool falling; /* Falling edge enabled */
void *arg; /* Argument to pass to the interrupt handler */
xcpt_t isr; /* ISR Handler */
bool rising; /* Rising edge enabled */
bool falling; /* Falling edge enabled */
};
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
static int hcsr04_irq_attach(FAR struct hcsr04_config_s *state, xcpt_t isr,
FAR void *arg);
static void hcsr04_irq_enable(FAR const struct hcsr04_config_s *state,
static int hcsr04_irq_attach(struct hcsr04_config_s *state, xcpt_t isr,
void *arg);
static void hcsr04_irq_enable(const struct hcsr04_config_s *state,
bool enable);
static void hcsr04_irq_clear(FAR const struct hcsr04_config_s *state);
static void hcsr04_irq_setmode(FAR struct hcsr04_config_s *state,
static void hcsr04_irq_clear(const struct hcsr04_config_s *state);
static void hcsr04_irq_setmode(struct hcsr04_config_s *state,
bool rise_mode);
static void hcsr04_set_trigger(FAR const struct hcsr04_config_s *state,
static void hcsr04_set_trigger(const struct hcsr04_config_s *state,
bool on);
static int64_t hcsr04_get_clock(FAR const struct hcsr04_config_s *state);
static int64_t hcsr04_get_clock(const struct hcsr04_config_s *state);
/****************************************************************************
* Private Data
@@ -113,11 +113,11 @@ struct timespec ts;
/* Attach the HC-SR04 interrupt handler to the GPIO interrupt */
static int hcsr04_irq_attach(FAR struct hcsr04_config_s *state, xcpt_t isr,
FAR void *arg)
static int hcsr04_irq_attach(struct hcsr04_config_s *state, xcpt_t isr,
void *arg)
{
FAR struct stm32_hcsr04config_s *priv =
(FAR struct stm32_hcsr04config_s *)state;
struct stm32_hcsr04config_s *priv =
(struct stm32_hcsr04config_s *)state;
irqstate_t flags;
sinfo("hcsr04_irq_attach\n");
@@ -139,11 +139,11 @@ static int hcsr04_irq_attach(FAR struct hcsr04_config_s *state, xcpt_t isr,
/* Setup the interruption mode: Rising or Falling */
static void hcsr04_irq_setmode(FAR struct hcsr04_config_s *state,
static void hcsr04_irq_setmode(struct hcsr04_config_s *state,
bool rise_mode)
{
FAR struct stm32_hcsr04config_s *priv =
(FAR struct stm32_hcsr04config_s *)state;
struct stm32_hcsr04config_s *priv =
(struct stm32_hcsr04config_s *)state;
if (rise_mode)
{
@@ -159,11 +159,11 @@ static void hcsr04_irq_setmode(FAR struct hcsr04_config_s *state,
/* Enable or disable the GPIO interrupt */
static void hcsr04_irq_enable(FAR const struct hcsr04_config_s *state,
bool enable)
static void hcsr04_irq_enable(const struct hcsr04_config_s *state,
bool enable)
{
FAR struct stm32_hcsr04config_s *priv =
(FAR struct stm32_hcsr04config_s *)state;
struct stm32_hcsr04config_s *priv =
(struct stm32_hcsr04config_s *)state;
iinfo("%d\n", enable);
@@ -173,14 +173,14 @@ static void hcsr04_irq_enable(FAR const struct hcsr04_config_s *state,
/* Acknowledge/clear any pending GPIO interrupt */
static void hcsr04_irq_clear(FAR const struct hcsr04_config_s *state)
static void hcsr04_irq_clear(const struct hcsr04_config_s *state)
{
/* FIXME: Nothing to do ? */
}
/* Set the Trigger pin state */
static void hcsr04_set_trigger(FAR const struct hcsr04_config_s *state,
static void hcsr04_set_trigger(const struct hcsr04_config_s *state,
bool on)
{
stm32_gpiowrite(BOARD_HCSR04_GPIO_TRIG, on);
@@ -188,7 +188,7 @@ static void hcsr04_set_trigger(FAR const struct hcsr04_config_s *state,
/* Return the current Free Running clock tick */
static int64_t hcsr04_get_clock(FAR const struct hcsr04_config_s *state)
static int64_t hcsr04_get_clock(const struct hcsr04_config_s *state)
{
/* Get the time from free running timer */
+27 -27
View File
@@ -105,17 +105,17 @@
* Private Function Protototypes
****************************************************************************/
static int board_foc_setup(FAR struct foc_dev_s *dev);
static int board_foc_shutdown(FAR struct foc_dev_s *dev);
static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state);
static int board_foc_fault_clear(FAR struct foc_dev_s *dev);
static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state);
static int board_foc_current_get(FAR struct foc_dev_s *dev,
FAR int16_t *curr_raw,
FAR foc_current_t *curr);
static int board_foc_setup(struct foc_dev_s *dev);
static int board_foc_shutdown(struct foc_dev_s *dev);
static int board_foc_calibration(struct foc_dev_s *dev, bool state);
static int board_foc_fault_clear(struct foc_dev_s *dev);
static int board_foc_pwm_start(struct foc_dev_s *dev, bool state);
static int board_foc_current_get(struct foc_dev_s *dev,
int16_t *curr_raw,
foc_current_t *curr);
#ifdef CONFIG_MOTOR_FOC_TRACE
static int board_foc_trace_init(FAR struct foc_dev_s *dev);
static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state);
static int board_foc_trace_init(struct foc_dev_s *dev);
static void board_foc_trace(struct foc_dev_s *dev, int type, bool state);
#endif
/****************************************************************************
@@ -158,7 +158,7 @@ static struct stm32_foc_board_s g_stm32_foc_board =
/* Global pointer to the upper FOC driver */
static FAR struct foc_dev_s *g_foc_dev = NULL;
static struct foc_dev_s *g_foc_dev = NULL;
/****************************************************************************
* Private Functions
@@ -168,7 +168,7 @@ static FAR struct foc_dev_s *g_foc_dev = NULL;
* Name: board_foc_setup
****************************************************************************/
static int board_foc_setup(FAR struct foc_dev_s *dev)
static int board_foc_setup(struct foc_dev_s *dev)
{
DEBUGASSERT(dev);
@@ -189,7 +189,7 @@ static int board_foc_setup(FAR struct foc_dev_s *dev)
* Name: board_foc_shutdown
****************************************************************************/
static int board_foc_shutdown(FAR struct foc_dev_s *dev)
static int board_foc_shutdown(struct foc_dev_s *dev)
{
DEBUGASSERT(dev);
@@ -202,7 +202,7 @@ static int board_foc_shutdown(FAR struct foc_dev_s *dev)
* Name: board_foc_calibration
****************************************************************************/
static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state)
static int board_foc_calibration(struct foc_dev_s *dev, bool state)
{
DEBUGASSERT(dev);
@@ -215,7 +215,7 @@ static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state)
* Name: board_foc_fault_clear
****************************************************************************/
static int board_foc_fault_clear(FAR struct foc_dev_s *dev)
static int board_foc_fault_clear(struct foc_dev_s *dev)
{
DEBUGASSERT(dev);
@@ -228,7 +228,7 @@ static int board_foc_fault_clear(FAR struct foc_dev_s *dev)
* Name: board_foc_pwm_start
****************************************************************************/
static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state)
static int board_foc_pwm_start(struct foc_dev_s *dev, bool state)
{
DEBUGASSERT(dev);
@@ -251,9 +251,9 @@ static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state)
* Name: board_foc_current_get
****************************************************************************/
static int board_foc_current_get(FAR struct foc_dev_s *dev,
FAR int16_t *curr_raw,
FAR foc_current_t *curr)
static int board_foc_current_get(struct foc_dev_s *dev,
int16_t *curr_raw,
foc_current_t *curr)
{
DEBUGASSERT(dev);
DEBUGASSERT(curr_raw);
@@ -273,7 +273,7 @@ static int board_foc_current_get(FAR struct foc_dev_s *dev,
* Name: board_foc_trace_init
****************************************************************************/
static int board_foc_trace_init(FAR struct foc_dev_s *dev)
static int board_foc_trace_init(struct foc_dev_s *dev)
{
DEBUGASSERT(dev);
@@ -293,7 +293,7 @@ static int board_foc_trace_init(FAR struct foc_dev_s *dev)
* Name: board_foc_trace
****************************************************************************/
static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state)
static void board_foc_trace(struct foc_dev_s *dev, int type, bool state)
{
DEBUGASSERT(dev);
@@ -351,10 +351,10 @@ static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state)
* Name: board_ihm07m1_initialize
****************************************************************************/
int board_ihm07m1_initialize(FAR struct stm32_foc_adc_s *adc_cfg)
int board_ihm07m1_initialize(struct stm32_foc_adc_s *adc_cfg)
{
FAR struct foc_dev_s *foc = NULL;
int ret = OK;
struct foc_dev_s *foc = NULL;
int ret = OK;
DEBUGASSERT(adc_cfg);
@@ -407,9 +407,9 @@ errout:
int stm32_adc_setup(void)
{
FAR struct adc_dev_s *adc = NULL;
int ret = OK;
static bool initialized = false;
struct adc_dev_s *adc = NULL;
int ret = OK;
static bool initialized = false;
/* Initialize only once */
+27 -27
View File
@@ -113,17 +113,17 @@
* Private Function Protototypes
****************************************************************************/
static int board_foc_setup(FAR struct foc_dev_s *dev);
static int board_foc_shutdown(FAR struct foc_dev_s *dev);
static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state);
static int board_foc_fault_clear(FAR struct foc_dev_s *dev);
static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state);
static int board_foc_current_get(FAR struct foc_dev_s *dev,
FAR int16_t *curr_raw,
FAR foc_current_t *curr);
static int board_foc_setup(struct foc_dev_s *dev);
static int board_foc_shutdown(struct foc_dev_s *dev);
static int board_foc_calibration(struct foc_dev_s *dev, bool state);
static int board_foc_fault_clear(struct foc_dev_s *dev);
static int board_foc_pwm_start(struct foc_dev_s *dev, bool state);
static int board_foc_current_get(struct foc_dev_s *dev,
int16_t *curr_raw,
foc_current_t *curr);
#ifdef CONFIG_MOTOR_FOC_TRACE
static int board_foc_trace_init(FAR struct foc_dev_s *dev);
static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state);
static int board_foc_trace_init(struct foc_dev_s *dev);
static void board_foc_trace(struct foc_dev_s *dev, int type, bool state);
#endif
/****************************************************************************
@@ -166,7 +166,7 @@ static struct stm32_foc_board_s g_stm32_foc_board =
/* Global pointer to the upper FOC driver */
static FAR struct foc_dev_s *g_foc_dev = NULL;
static struct foc_dev_s *g_foc_dev = NULL;
/****************************************************************************
* Private Functions
@@ -176,7 +176,7 @@ static FAR struct foc_dev_s *g_foc_dev = NULL;
* Name: board_foc_setup
****************************************************************************/
static int board_foc_setup(FAR struct foc_dev_s *dev)
static int board_foc_setup(struct foc_dev_s *dev)
{
DEBUGASSERT(dev);
@@ -189,7 +189,7 @@ static int board_foc_setup(FAR struct foc_dev_s *dev)
* Name: board_foc_shutdown
****************************************************************************/
static int board_foc_shutdown(FAR struct foc_dev_s *dev)
static int board_foc_shutdown(struct foc_dev_s *dev)
{
DEBUGASSERT(dev);
@@ -202,7 +202,7 @@ static int board_foc_shutdown(FAR struct foc_dev_s *dev)
* Name: board_foc_calibration
****************************************************************************/
static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state)
static int board_foc_calibration(struct foc_dev_s *dev, bool state)
{
DEBUGASSERT(dev);
@@ -215,7 +215,7 @@ static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state)
* Name: board_foc_fault_clear
****************************************************************************/
static int board_foc_fault_clear(FAR struct foc_dev_s *dev)
static int board_foc_fault_clear(struct foc_dev_s *dev)
{
DEBUGASSERT(dev);
@@ -228,7 +228,7 @@ static int board_foc_fault_clear(FAR struct foc_dev_s *dev)
* Name: board_foc_pwm_start
****************************************************************************/
static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state)
static int board_foc_pwm_start(struct foc_dev_s *dev, bool state)
{
DEBUGASSERT(dev);
@@ -241,9 +241,9 @@ static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state)
* Name: board_foc_current_get
****************************************************************************/
static int board_foc_current_get(FAR struct foc_dev_s *dev,
FAR int16_t *curr_raw,
FAR foc_current_t *curr)
static int board_foc_current_get(struct foc_dev_s *dev,
int16_t *curr_raw,
foc_current_t *curr)
{
DEBUGASSERT(dev);
DEBUGASSERT(curr_raw);
@@ -263,7 +263,7 @@ static int board_foc_current_get(FAR struct foc_dev_s *dev,
* Name: board_foc_trace_init
****************************************************************************/
static int board_foc_trace_init(FAR struct foc_dev_s *dev)
static int board_foc_trace_init(struct foc_dev_s *dev)
{
DEBUGASSERT(dev);
@@ -283,7 +283,7 @@ static int board_foc_trace_init(FAR struct foc_dev_s *dev)
* Name: board_foc_trace
****************************************************************************/
static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state)
static void board_foc_trace(struct foc_dev_s *dev, int type, bool state)
{
DEBUGASSERT(dev);
@@ -341,10 +341,10 @@ static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state)
* Name: board_ihm08m1_initialize
****************************************************************************/
int board_ihm08m1_initialize(FAR struct stm32_foc_adc_s *adc_cfg)
int board_ihm08m1_initialize(struct stm32_foc_adc_s *adc_cfg)
{
FAR struct foc_dev_s *foc = NULL;
int ret = OK;
struct foc_dev_s *foc = NULL;
int ret = OK;
/* Initialize only once */
@@ -395,9 +395,9 @@ errout:
int stm32_adc_setup(void)
{
FAR struct adc_dev_s *adc = NULL;
int ret = OK;
static bool initialized = false;
struct adc_dev_s *adc = NULL;
int ret = OK;
static bool initialized = false;
/* Initialize only once */
+27 -27
View File
@@ -103,17 +103,17 @@
* Private Function Protototypes
****************************************************************************/
static int board_foc_setup(FAR struct foc_dev_s *dev);
static int board_foc_shutdown(FAR struct foc_dev_s *dev);
static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state);
static int board_foc_fault_clear(FAR struct foc_dev_s *dev);
static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state);
static int board_foc_current_get(FAR struct foc_dev_s *dev,
FAR int16_t *curr_raw,
FAR foc_current_t *curr);
static int board_foc_setup(struct foc_dev_s *dev);
static int board_foc_shutdown(struct foc_dev_s *dev);
static int board_foc_calibration(struct foc_dev_s *dev, bool state);
static int board_foc_fault_clear(struct foc_dev_s *dev);
static int board_foc_pwm_start(struct foc_dev_s *dev, bool state);
static int board_foc_current_get(struct foc_dev_s *dev,
int16_t *curr_raw,
foc_current_t *curr);
#ifdef CONFIG_MOTOR_FOC_TRACE
static int board_foc_trace_init(FAR struct foc_dev_s *dev);
static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state);
static int board_foc_trace_init(struct foc_dev_s *dev);
static void board_foc_trace(struct foc_dev_s *dev, int type, bool state);
#endif
/****************************************************************************
@@ -156,7 +156,7 @@ static struct stm32_foc_board_s g_stm32_foc_board =
/* Global pointer to the upper FOC driver */
static FAR struct foc_dev_s *g_foc_dev = NULL;
static struct foc_dev_s *g_foc_dev = NULL;
/****************************************************************************
* Private Functions
@@ -166,7 +166,7 @@ static FAR struct foc_dev_s *g_foc_dev = NULL;
* Name: board_foc_setup
****************************************************************************/
static int board_foc_setup(FAR struct foc_dev_s *dev)
static int board_foc_setup(struct foc_dev_s *dev)
{
DEBUGASSERT(dev);
@@ -187,7 +187,7 @@ static int board_foc_setup(FAR struct foc_dev_s *dev)
* Name: board_foc_shutdown
****************************************************************************/
static int board_foc_shutdown(FAR struct foc_dev_s *dev)
static int board_foc_shutdown(struct foc_dev_s *dev)
{
DEBUGASSERT(dev);
@@ -200,7 +200,7 @@ static int board_foc_shutdown(FAR struct foc_dev_s *dev)
* Name: board_foc_calibration
****************************************************************************/
static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state)
static int board_foc_calibration(struct foc_dev_s *dev, bool state)
{
DEBUGASSERT(dev);
@@ -213,7 +213,7 @@ static int board_foc_calibration(FAR struct foc_dev_s *dev, bool state)
* Name: board_foc_fault_clear
****************************************************************************/
static int board_foc_fault_clear(FAR struct foc_dev_s *dev)
static int board_foc_fault_clear(struct foc_dev_s *dev)
{
DEBUGASSERT(dev);
@@ -226,7 +226,7 @@ static int board_foc_fault_clear(FAR struct foc_dev_s *dev)
* Name: board_foc_pwm_start
****************************************************************************/
static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state)
static int board_foc_pwm_start(struct foc_dev_s *dev, bool state)
{
DEBUGASSERT(dev);
@@ -249,9 +249,9 @@ static int board_foc_pwm_start(FAR struct foc_dev_s *dev, bool state)
* Name: board_foc_current_get
****************************************************************************/
static int board_foc_current_get(FAR struct foc_dev_s *dev,
FAR int16_t *curr_raw,
FAR foc_current_t *curr)
static int board_foc_current_get(struct foc_dev_s *dev,
int16_t *curr_raw,
foc_current_t *curr)
{
DEBUGASSERT(dev);
DEBUGASSERT(curr_raw);
@@ -271,7 +271,7 @@ static int board_foc_current_get(FAR struct foc_dev_s *dev,
* Name: board_foc_trace_init
****************************************************************************/
static int board_foc_trace_init(FAR struct foc_dev_s *dev)
static int board_foc_trace_init(struct foc_dev_s *dev)
{
DEBUGASSERT(dev);
@@ -291,7 +291,7 @@ static int board_foc_trace_init(FAR struct foc_dev_s *dev)
* Name: board_foc_trace
****************************************************************************/
static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state)
static void board_foc_trace(struct foc_dev_s *dev, int type, bool state)
{
DEBUGASSERT(dev);
@@ -349,10 +349,10 @@ static void board_foc_trace(FAR struct foc_dev_s *dev, int type, bool state)
* Name: board_ihm16m1_initialize
****************************************************************************/
int board_ihm16m1_initialize(FAR struct stm32_foc_adc_s *adc_cfg)
int board_ihm16m1_initialize(struct stm32_foc_adc_s *adc_cfg)
{
FAR struct foc_dev_s *foc = NULL;
int ret = OK;
struct foc_dev_s *foc = NULL;
int ret = OK;
DEBUGASSERT(adc_cfg);
@@ -405,9 +405,9 @@ errout:
int stm32_adc_setup(void)
{
FAR struct adc_dev_s *adc = NULL;
int ret = OK;
static bool initialized = false;
struct adc_dev_s *adc = NULL;
int ret = OK;
static bool initialized = false;
/* Initialize only once */
+1 -1
View File
@@ -76,7 +76,7 @@
int board_ina219_initialize(int devno, int busno)
{
FAR struct i2c_master_s *i2c;
struct i2c_master_s *i2c;
char devpath[12];
int ret;
+2 -2
View File
@@ -43,7 +43,7 @@
* Private Function Prototypes
****************************************************************************/
static int l3gd20_attach(FAR struct l3gd20_config_s * cfg, xcpt_t irq);
static int l3gd20_attach(struct l3gd20_config_s * cfg, xcpt_t irq);
/****************************************************************************
* Private Data
@@ -69,7 +69,7 @@ static struct l3gd20_config_s g_l3gd20_config =
*
****************************************************************************/
static int l3gd20_attach(FAR struct l3gd20_config_s *cfg, xcpt_t irq)
static int l3gd20_attach(struct l3gd20_config_s *cfg, xcpt_t irq)
{
return stm32_gpiosetevent(BOARD_L3GD20_GPIO_DREADY, true, false,
true, irq, NULL);
@@ -58,9 +58,9 @@
int board_lcd_backpack_init(int devno, int busno, int rows, int cols)
{
FAR struct pcf8574_lcd_backpack_config_s cfg =
struct pcf8574_lcd_backpack_config_s cfg =
LCD_I2C_BACKPACK_CFG_SAINSMART;
FAR struct i2c_master_s *i2c;
struct i2c_master_s *i2c;
char devpath[12];
int ret;
+1 -1
View File
@@ -60,7 +60,7 @@
*
****************************************************************************/
int attach_disc_lis3dsh(FAR struct lis3dsh_config_s *config,
int attach_disc_lis3dsh(struct lis3dsh_config_s *config,
xcpt_t interrupt_handler)
{
return stm32_gpiosetevent(BOARD_LIS3DSH_GPIO_EXT0, true, false, false,
+1 -1
View File
@@ -78,7 +78,7 @@
int board_lm75_initialize(int devno, int busno)
{
FAR struct i2c_master_s *i2c;
struct i2c_master_s *i2c;
char devpath[12];
int ret;
+1 -1
View File
@@ -56,7 +56,7 @@
int board_max31855_initialize(int devno, int busno)
{
FAR struct spi_dev_s *spi;
struct spi_dev_s *spi;
char devpath[12];
int ret;
+1 -1
View File
@@ -77,7 +77,7 @@
int board_max6675_initialize(int devno, int busno)
{
FAR struct spi_dev_s *spi;
struct spi_dev_s *spi;
char devpath[12];
int ret;
+1 -1
View File
@@ -61,7 +61,7 @@
int board_mlx90614_initialize(int devno, int busno)
{
FAR struct i2c_master_s *i2c;
struct i2c_master_s *i2c;
char devpath[12];
int ret;
+1 -1
View File
@@ -59,7 +59,7 @@
int board_mpl115a_initialize(int devno, int busno)
{
FAR struct spi_dev_s *spi;
struct spi_dev_s *spi;
char devpath[12];
int ret;
+5 -5
View File
@@ -52,21 +52,21 @@
* Private Function Prototypes
****************************************************************************/
static int nrf24l01_irq_attach(xcpt_t isr, FAR void *arg);
static int nrf24l01_irq_attach(xcpt_t isr, void *arg);
static void nrf24l01_chip_enable(bool enable);
/****************************************************************************
* Private Data
****************************************************************************/
static FAR struct nrf24l01_config_s nrf_cfg =
static struct nrf24l01_config_s nrf_cfg =
{
.irqattach = nrf24l01_irq_attach,
.chipenable = nrf24l01_chip_enable,
};
static xcpt_t g_isr;
static FAR void *g_arg;
static void *g_arg;
/****************************************************************************
* Public Data
@@ -76,7 +76,7 @@ static FAR void *g_arg;
* Private Functions
****************************************************************************/
static int nrf24l01_irq_attach(xcpt_t isr, FAR void *arg)
static int nrf24l01_irq_attach(xcpt_t isr, void *arg)
{
wlinfo("Attach IRQ\n");
g_isr = isr;
@@ -112,7 +112,7 @@ static void nrf24l01_chip_enable(bool enable)
int board_nrf24l01_initialize(int busno)
{
FAR struct spi_dev_s *spidev;
struct spi_dev_s *spidev;
int result;
/* Setup CE & IRQ line IOs */
+1 -1
View File
@@ -82,7 +82,7 @@
int board_nunchuck_initialize(int devno, int busno)
{
FAR struct i2c_master_s *i2c;
struct i2c_master_s *i2c;
char devpath[15];
int ret;
+4 -4
View File
@@ -39,7 +39,7 @@
* Private Data
****************************************************************************/
static FAR struct lcd_dev_s *g_lcddev;
static struct lcd_dev_s *g_lcddev;
/****************************************************************************
* Public Functions
@@ -61,7 +61,7 @@ static FAR struct lcd_dev_s *g_lcddev;
#ifdef CONFIG_LCD_SSD1306_I2C
int board_ssd1306_initialize(int busno)
{
FAR struct i2c_master_s *i2c;
struct i2c_master_s *i2c;
const int devno = 0;
/* Initialize I2C */
@@ -109,7 +109,7 @@ int board_ssd1306_initialize(int busno)
#ifdef CONFIG_LCD_SSD1306_SPI
int board_ssd1306_initialize(int busno)
{
FAR struct spi_dev_s *spi;
struct spi_dev_s *spi;
const int devno = 0;
/* Initialize SPI */
@@ -152,7 +152,7 @@ int board_ssd1306_initialize(int busno)
*
****************************************************************************/
FAR struct lcd_dev_s *board_ssd1306_getdev(void)
struct lcd_dev_s *board_ssd1306_getdev(void)
{
return g_lcddev;
}
+1 -1
View File
@@ -82,7 +82,7 @@
int board_veml6070_initialize(int devno, int busno)
{
FAR struct i2c_master_s *i2c;
struct i2c_master_s *i2c;
char devpath[14];
int ret;
+1 -1
View File
@@ -82,7 +82,7 @@
int board_ws2812_initialize(int devno, int spino, uint16_t nleds)
{
FAR struct spi_dev_s *spi;
struct spi_dev_s *spi;
char devpath[13];
int ret;
+16 -16
View File
@@ -60,9 +60,9 @@ struct stm32_xen1210config_s
/* Additional private definitions only known to this driver */
XEN1210_HANDLE handle; /* The XEN1210 driver handle */
xen1210_handler_t handler; /* The XEN1210 interrupt handler */
FAR void *arg; /* Argument to pass to the interrupt handler */
XEN1210_HANDLE handle; /* The XEN1210 driver handle */
xen1210_handler_t handler; /* The XEN1210 interrupt handler */
void *arg; /* Argument to pass to the interrupt handler */
};
/****************************************************************************
@@ -78,10 +78,10 @@ struct stm32_xen1210config_s
* clear - Acknowledge/clear any pending GPIO interrupt
*/
static int xen1210_attach(FAR struct xen1210_config_s *state,
xen1210_handler_t handler, FAR void *arg);
static void xen1210_enable(FAR struct xen1210_config_s *state, bool enable);
static void xen1210_clear(FAR struct xen1210_config_s *state);
static int xen1210_attach(struct xen1210_config_s *state,
xen1210_handler_t handler, void *arg);
static void xen1210_enable(struct xen1210_config_s *state, bool enable);
static void xen1210_clear(struct xen1210_config_s *state);
/****************************************************************************
* Private Data
@@ -114,7 +114,7 @@ static struct stm32_xen1210config_s g_xen1210config =
/* This is the XEN1210 Interrupt handler */
static int xen1210_interrupt(int irq, FAR void *context, FAR void *arg)
static int xen1210_interrupt(int irq, void *context, void *arg)
{
/* Verify that we have a handler attached */
@@ -137,11 +137,11 @@ static int xen1210_interrupt(int irq, FAR void *context, FAR void *arg)
* clear - Acknowledge/clear any pending GPIO interrupt
*/
static int xen1210_attach(FAR struct xen1210_config_s *state,
xen1210_handler_t handler, FAR void *arg)
static int xen1210_attach(struct xen1210_config_s *state,
xen1210_handler_t handler, void *arg)
{
FAR struct stm32_xen1210config_s *priv =
(FAR struct stm32_xen1210config_s *)state;
struct stm32_xen1210config_s *priv =
(struct stm32_xen1210config_s *)state;
sninfo("Saving handler %p\n", handler);
DEBUGASSERT(priv);
@@ -155,7 +155,7 @@ static int xen1210_attach(FAR struct xen1210_config_s *state,
return OK;
}
static void xen1210_enable(FAR struct xen1210_config_s *state, bool enable)
static void xen1210_enable(struct xen1210_config_s *state, bool enable)
{
irqstate_t flags;
@@ -184,7 +184,7 @@ static void xen1210_enable(FAR struct xen1210_config_s *state, bool enable)
leave_critical_section(flags);
}
static void xen1210_clear(FAR struct xen1210_config_s *state)
static void xen1210_clear(struct xen1210_config_s *state)
{
/* Does nothing */
}
@@ -257,7 +257,7 @@ static int xen1210_pwm_setup(void)
int board_xen1210_initialize(int devno, int busno)
{
FAR struct spi_dev_s *dev;
struct spi_dev_s *dev;
int ret;
/* Check if we are already initialized */
@@ -289,7 +289,7 @@ int board_xen1210_initialize(int devno, int busno)
g_xen1210config.handle =
xen1210_instantiate(dev,
(FAR struct xen1210_config_s *)
(struct xen1210_config_s *)
&g_xen1210config);
if (!g_xen1210config.handle)
{
@@ -39,11 +39,11 @@
* Private Function Prototypes
****************************************************************************/
static void zcross_enable(FAR const struct zc_lowerhalf_s *lower,
zc_interrupt_t handler, FAR void *arg);
static void zcross_enable(const struct zc_lowerhalf_s *lower,
zc_interrupt_t handler, void *arg);
static void zcross_disable(void);
static int zcross_interrupt(int irq, FAR void *context, FAR void *arg);
static int zcross_interrupt(int irq, void *context, void *arg);
/****************************************************************************
* Private Data
@@ -52,7 +52,7 @@ static int zcross_interrupt(int irq, FAR void *context, FAR void *arg);
/* Current interrupt handler and argument */
static zc_interrupt_t g_zcrosshandler;
static FAR void *g_zcrossarg;
static void *g_zcrossarg;
/* This is the zero cross lower half driver interface */
@@ -74,8 +74,8 @@ static struct zc_lowerhalf_s g_zcrosslower =
*
****************************************************************************/
static void zcross_enable(FAR const struct zc_lowerhalf_s *lower,
zc_interrupt_t handler, FAR void *arg)
static void zcross_enable(const struct zc_lowerhalf_s *lower,
zc_interrupt_t handler, void *arg)
{
irqstate_t flags;
bool rising = false;
@@ -134,7 +134,7 @@ static void zcross_disable(void)
*
****************************************************************************/
static int zcross_interrupt(int irq, FAR void *context, FAR void *arg)
static int zcross_interrupt(int irq, void *context, void *arg)
{
DEBUGASSERT(g_zcrosshandler != NULL);
if (g_zcrosshandler)