nxstyle fixes

This commit is contained in:
Matias Nitsche
2020-05-11 18:51:21 -03:00
committed by Alin Jerpelea
parent cf1ff36e0e
commit 856c3e4263
5 changed files with 43 additions and 35 deletions
@@ -1,5 +1,5 @@
/****************************************************************************
* /home/v01d/coding/nuttx_latest/nuttx/boards/arm/stm32/common/include/stm32_apds9960.h
* boards/arm/stm32/common/include/stm32_apds9960.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -1,5 +1,5 @@
/****************************************************************************
* /home/v01d/coding/nuttx_latest/nuttx/boards/arm/stm32/common/include/stm32_zerocross.h
* boards/arm/stm32/common/include/stm32_zerocross.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
+3 -3
View File
@@ -94,9 +94,9 @@ static int apds9960_irq_attach(FAR struct apds9960_config_s *state,
static struct stm32_apds9960config_s g_apds9960config =
{
.config =
{
.irq_attach = apds9960_irq_attach,
},
{
.irq_attach = apds9960_irq_attach,
},
};
/****************************************************************************
+9 -7
View File
@@ -145,8 +145,8 @@ static int hcsr04_irq_attach(FAR struct hcsr04_config_s *state, xcpt_t isr,
priv->isr = isr;
priv->arg = arg;
stm32_gpiosetevent(BOARD_HCSR04_GPIO_INT, priv->rising, priv->falling, true,
isr, arg);
stm32_gpiosetevent(BOARD_HCSR04_GPIO_INT, priv->rising, priv->falling,
true, isr, arg);
leave_critical_section(flags);
@@ -155,7 +155,8 @@ 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, bool rise_mode)
static void hcsr04_irq_setmode(FAR struct hcsr04_config_s *state,
bool rise_mode)
{
FAR struct stm32_hcsr04config_s *priv =
(FAR struct stm32_hcsr04config_s *)state;
@@ -182,20 +183,21 @@ static void hcsr04_irq_enable(FAR const struct hcsr04_config_s *state,
iinfo("%d\n", enable);
stm32_gpiosetevent(BOARD_HCSR04_GPIO_INT, priv->rising, priv->falling, true,
enable ? priv->isr : NULL, priv->arg);
stm32_gpiosetevent(BOARD_HCSR04_GPIO_INT, priv->rising, priv->falling,
true, enable ? priv->isr : NULL, priv->arg);
}
/* Acknowledge/clear any pending GPIO interrupt */
static void hcsr04_irq_clear(FAR const struct hcsr04_config_s *state)
{
// FIXME Nothing to do ?
/* FIXME: Nothing to do ? */
}
/* Set the Trigger pin state */
static void hcsr04_set_trigger(FAR const struct hcsr04_config_s *state, bool on)
static void hcsr04_set_trigger(FAR const struct hcsr04_config_s *state,
bool on)
{
stm32_gpiowrite(BOARD_HCSR04_GPIO_TRIG, on);
}