Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
led_hw.h
Go to the documentation of this file.
1 #ifndef LED_HW_H
2 #define LED_HW_H
3 
4 #include <stdio.h>
5 #include <caml/mlvalues.h>
6 #include <caml/memory.h>
7 #include <caml/callback.h>
8 
9 extern value *leds_closure;
10 
11 #define LED_INIT(i) { }
12 #define LED_ON(i) { if (leds_closure) callback2(*leds_closure, Val_int(i), Val_int(1)); }
13 #define LED_OFF(i) { if (leds_closure) callback2(*leds_closure, Val_int(i), Val_int(0)); }
14 #define LED_TOGGLE(i) { if (leds_closure) callback2(*leds_closure, Val_int(i), Val_int(2)); }
15 
16 #define LED_PERIODIC() {}
17 
18 #endif /* LED_HW_H */
uint16_t value
Definition: adc_arch.c:586
value * leds_closure
Definition: led_hw.c:3