Paparazzi UAS  v5.15_devel-230-gc96ce27
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

Led macro implementation for ChibiOS arch. More...

#include <hal.h>
#include "mcu_periph/gpio.h"
#include <BOARD_CONFIG>
+ Include dependency graph for led_hw.h:

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_INIT(i)   gpio_setup_output(LED_GPIO(i), LED_GPIO_PIN(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()   {}
 

Detailed Description

Led macro implementation for ChibiOS arch.

Definition in file led_hw.h.

Macro Definition Documentation

#define _LED_EVAL (   i)    i

Definition at line 43 of file led_hw.h.

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

Definition at line 54 of file led_hw.h.

Referenced by led_disable().

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

Definition at line 45 of file led_hw.h.

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

Definition at line 48 of file led_hw.h.

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

Definition at line 47 of file led_hw.h.

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

Definition at line 46 of file led_hw.h.

#define LED_INIT (   i)    gpio_setup_output(LED_GPIO(i), LED_GPIO_PIN(i))

Definition at line 50 of file led_hw.h.

Referenced by bluegiga_init(), init_bat_checker(), init_demo(), init_light(), and led_init().

#define LED_PERIODIC ( )    {}

Definition at line 55 of file led_hw.h.

Referenced by handle_periodic_tasks_ap(), main_periodic(), and main_periodic_task().