Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
led_hw.h File Reference
#include <BOARD_CONFIG>
#include "LPC21xx.h"
#include "std.h"
+ Include dependency graph for led_hw.h:

Go to the source code of this file.

Macros

#define LED_PERIODIC()   {}
 
#define __LED_DIR(i)   IO ## i ## DIR
 
#define _LED_DIR(i)   __LED_DIR(i)
 
#define __LED_CLR(i)   IO ## i ## CLR
 
#define _LED_CLR(i)   __LED_CLR(i)
 
#define __LED_SET(i)   IO ## i ## SET
 
#define _LED_SET(i)   __LED_SET(i)
 
#define __LED_PIN_REG(i)   IO ## i ## PIN
 
#define _LED_PIN_REG(i)   __LED_PIN_REG(i)
 
#define LED_DIR(i)   _LED_DIR(LED_ ## i ## _BANK)
 
#define LED_CLR(i)   _LED_CLR(LED_ ## i ## _BANK)
 
#define LED_SET(i)   _LED_SET(LED_ ## i ## _BANK)
 
#define LED_PIN_REG(i)   _LED_PIN_REG(LED_ ## i ## _BANK)
 
#define LED_PIN(i)   LED_ ## i ## _PIN
 
#define LED_INIT(i)   LED_DIR(i) |= _BV(LED_PIN(i))
 
#define LED_ON(i)   LED_CLR(i) = _BV(LED_PIN(i));
 
#define LED_OFF(i)   LED_SET(i) = _BV(LED_PIN(i));
 
#define LED_TOGGLE(i)
 
#define LED_DISABLE(i)   LED_DIR(i) &= ~(_BV(LED_PIN(i)))
 

Macro Definition Documentation

◆ __LED_CLR

#define __LED_CLR (   i)    IO ## i ## CLR

Definition at line 12 of file led_hw.h.

◆ __LED_DIR

#define __LED_DIR (   i)    IO ## i ## DIR

Definition at line 10 of file led_hw.h.

◆ __LED_PIN_REG

#define __LED_PIN_REG (   i)    IO ## i ## PIN

Definition at line 16 of file led_hw.h.

◆ __LED_SET

#define __LED_SET (   i)    IO ## i ## SET

Definition at line 14 of file led_hw.h.

◆ _LED_CLR

#define _LED_CLR (   i)    __LED_CLR(i)

Definition at line 13 of file led_hw.h.

◆ _LED_DIR

#define _LED_DIR (   i)    __LED_DIR(i)

Definition at line 11 of file led_hw.h.

◆ _LED_PIN_REG

#define _LED_PIN_REG (   i)    __LED_PIN_REG(i)

Definition at line 17 of file led_hw.h.

◆ _LED_SET

#define _LED_SET (   i)    __LED_SET(i)

Definition at line 15 of file led_hw.h.

◆ LED_CLR

#define LED_CLR (   i)    _LED_CLR(LED_ ## i ## _BANK)

Definition at line 20 of file led_hw.h.

◆ LED_DIR

#define LED_DIR (   i)    _LED_DIR(LED_ ## i ## _BANK)

Definition at line 19 of file led_hw.h.

◆ LED_DISABLE

#define LED_DISABLE (   i)    LED_DIR(i) &= ~(_BV(LED_PIN(i)))

Definition at line 38 of file led_hw.h.

◆ LED_INIT

#define LED_INIT (   i)    LED_DIR(i) |= _BV(LED_PIN(i))

Definition at line 26 of file led_hw.h.

◆ LED_OFF

#define LED_OFF (   i)    LED_SET(i) = _BV(LED_PIN(i));

Definition at line 29 of file led_hw.h.

◆ LED_ON

#define LED_ON (   i)    LED_CLR(i) = _BV(LED_PIN(i));

Definition at line 28 of file led_hw.h.

◆ LED_PERIODIC

#define LED_PERIODIC ( )    {}

Definition at line 8 of file led_hw.h.

◆ LED_PIN

#define LED_PIN (   i)    LED_ ## i ## _PIN

Definition at line 23 of file led_hw.h.

◆ LED_PIN_REG

#define LED_PIN_REG (   i)    _LED_PIN_REG(LED_ ## i ## _BANK)

Definition at line 22 of file led_hw.h.

◆ LED_SET

#define LED_SET (   i)    _LED_SET(LED_ ## i ## _BANK)

Definition at line 21 of file led_hw.h.

◆ LED_TOGGLE

#define LED_TOGGLE (   i)
Value:
{ \
if (LED_PIN_REG(i) & _BV(LED_PIN(i))) \
LED_ON(i) \
}

Definition at line 30 of file led_hw.h.

LED_PIN
#define LED_PIN(i)
Definition: led_hw.h:23
LED_OFF
#define LED_OFF(i)
Definition: led_hw.h:29
LED_PIN_REG
#define LED_PIN_REG(i)
Definition: led_hw.h:22