Paparazzi UAS  v5.15_devel-99-g2ff7410
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
led_hw.h File Reference
#include "mcu_periph/gpio.h"
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/rcc.h>
#include <BOARD_CONFIG>
#include "std.h"
+ Include dependency graph for led_hw.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _LED_EVAL(i)   i
 
#define LED_GPIO(i)   _LED_EVAL(LED_ ## i ## _GPIO)
 
#define LED_GPIO_PIN(i)   _LED_EVAL(LED_ ## i ## _GPIO_PIN)
 
#define LED_GPIO_ON(i)   _LED_EVAL(LED_ ## i ## _GPIO_ON)
 
#define LED_GPIO_OFF(i)   _LED_EVAL(LED_ ## i ## _GPIO_OFF)
 
#define LED_AFIO_REMAP(i)   _LED_EVAL(LED_ ## i ## _AFIO_REMAP)
 
#define LED_INIT(i)
 
#define LED_ON(i)   LED_GPIO_ON(i)(LED_GPIO(i), LED_GPIO_PIN(i))
 
#define LED_OFF(i)   LED_GPIO_OFF(i)(LED_GPIO(i), LED_GPIO_PIN(i))
 
#define LED_TOGGLE(i)   gpio_toggle(LED_GPIO(i), LED_GPIO_PIN(i))
 
#define LED_DISABLE(i)   gpio_setup_input(LED_GPIO(i), LED_GPIO_PIN(i))
 
#define LED_PERIODIC()   {}
 

Macro Definition Documentation

#define _LED_EVAL (   i)    i

Definition at line 40 of file led_hw.h.

#define LED_AFIO_REMAP (   i)    _LED_EVAL(LED_ ## i ## _AFIO_REMAP)

Definition at line 46 of file led_hw.h.

#define LED_DISABLE (   i)    gpio_setup_input(LED_GPIO(i), LED_GPIO_PIN(i))

Definition at line 58 of file led_hw.h.

#define LED_GPIO (   i)    _LED_EVAL(LED_ ## i ## _GPIO)

Definition at line 42 of file led_hw.h.

#define LED_GPIO_OFF (   i)    _LED_EVAL(LED_ ## i ## _GPIO_OFF)

Definition at line 45 of file led_hw.h.

#define LED_GPIO_ON (   i)    _LED_EVAL(LED_ ## i ## _GPIO_ON)

Definition at line 44 of file led_hw.h.

#define LED_GPIO_PIN (   i)    _LED_EVAL(LED_ ## i ## _GPIO_PIN)

Definition at line 43 of file led_hw.h.

#define LED_INIT (   i)
Value:
{ \
}
#define LED_AFIO_REMAP(i)
Definition: led_hw.h:46
#define LED_GPIO(i)
Definition: led_hw.h:42
void gpio_setup_output(ioportid_t port, uint16_t gpios)
Setup one or more pins of the given GPIO port as outputs.
Definition: gpio_arch.c:33
#define LED_GPIO_PIN(i)
Definition: led_hw.h:43

Definition at line 49 of file led_hw.h.

#define LED_OFF (   i)    LED_GPIO_OFF(i)(LED_GPIO(i), LED_GPIO_PIN(i))

Definition at line 55 of file led_hw.h.

#define LED_ON (   i)    LED_GPIO_ON(i)(LED_GPIO(i), LED_GPIO_PIN(i))

Definition at line 54 of file led_hw.h.

#define LED_PERIODIC ( )    {}

Definition at line 60 of file led_hw.h.

#define LED_TOGGLE (   i)    gpio_toggle(LED_GPIO(i), LED_GPIO_PIN(i))

Definition at line 56 of file led_hw.h.