mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
nxstyle fixes
This commit is contained in:
committed by
Alin Jerpelea
parent
cf1ff36e0e
commit
856c3e4263
@@ -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
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user