Paparazzi UAS  v5.14.0_stable-0-g3f680d1
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_def.h"
#include <BOARD_CONFIG>
+ Include dependency graph for led_hw.h:

Go to the source code of this file.

Macros

#define _LED_GPIO(i)   i
 
#define _LED_GPIO_PIN(i)   i
 
#define LED_GPIO(i)   _LED_GPIO(LED_ ## i ## _GPIO)
 
#define LED_GPIO_PIN(i)   _LED_GPIO_PIN(LED_ ## i ## _GPIO_PIN)
 
#define LED_INIT(i)   palSetPadMode(LED_GPIO(i), LED_GPIO_PIN(i), PAL_MODE_OUTPUT_PUSHPULL)
 
#define LED_ON(i)   palClearPad(LED_GPIO(i), LED_GPIO_PIN(i))
 
#define LED_OFF(i)   palSetPad(LED_GPIO(i), LED_GPIO_PIN(i))
 
#define LED_TOGGLE(i)   palTogglePad(LED_GPIO(i), LED_GPIO_PIN(i))
 
#define LED_DISABLE(i)   palSetPadMode(LED_GPIO(i), LED_GPIO_PIN(i), PAL_MODE_INPUT)
 
#define LED_PERIODIC()   {}
 

Detailed Description

Led macro implementation for ChibiOS arch.

Definition in file led_hw.h.

Macro Definition Documentation

#define _LED_GPIO (   i)    i

Definition at line 43 of file led_hw.h.

#define _LED_GPIO_PIN (   i)    i

Definition at line 44 of file led_hw.h.

#define LED_DISABLE (   i)    palSetPadMode(LED_GPIO(i), LED_GPIO_PIN(i), PAL_MODE_INPUT)

Definition at line 53 of file led_hw.h.

Referenced by led_disable().

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

Definition at line 46 of file led_hw.h.

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

Definition at line 47 of file led_hw.h.

#define LED_INIT (   i)    palSetPadMode(LED_GPIO(i), LED_GPIO_PIN(i), PAL_MODE_OUTPUT_PUSHPULL)

Definition at line 49 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 54 of file led_hw.h.

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