Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
led_hw.h File Reference
#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

◆ _LED_EVAL

#define _LED_EVAL (   i)    i

Definition at line 43 of file led_hw.h.

◆ LED_DISABLE

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

Definition at line 54 of file led_hw.h.

◆ LED_GPIO

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

Definition at line 45 of file led_hw.h.

◆ LED_GPIO_OFF

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

Definition at line 48 of file led_hw.h.

◆ LED_GPIO_ON

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

Definition at line 47 of file led_hw.h.

◆ LED_GPIO_PIN

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

Definition at line 46 of file led_hw.h.

◆ LED_INIT

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

Definition at line 50 of file led_hw.h.

◆ LED_OFF

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

Definition at line 52 of file led_hw.h.

◆ LED_ON

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

Definition at line 51 of file led_hw.h.

◆ LED_PERIODIC

#define LED_PERIODIC ( )    {}

Definition at line 55 of file led_hw.h.

◆ LED_TOGGLE

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

Definition at line 53 of file led_hw.h.