X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=include%2Ffx2lafw.h;fp=include%2Ffx2lafw.h;h=07f378f063687fae4829abb3b84a37ae2c1f2dd3;hb=553c0ee354bb2ae5eb36c8ba84f22b948708e785;hp=7a24cf66240dfc0030044b37e2ad1adc5524b9fc;hpb=f6ef2ff72979fd6504b930d7db9506f35ce07d37;p=sigrok-firmware-fx2lafw.git diff --git a/include/fx2lafw.h b/include/fx2lafw.h index 7a24cf66..07f378f0 100644 --- a/include/fx2lafw.h +++ b/include/fx2lafw.h @@ -39,4 +39,11 @@ #define FX2LAFW_VERSION_MAJOR 1 #define FX2LAFW_VERSION_MINOR 2 +#define LED_POLARITY 1 /* 1: active-high, 0: active-low */ + +#define LED_INIT() do { PORTACFG = 0; OEA = (1 << 1); } while (0) +#define LED_ON() do { PA1 = LED_POLARITY; } while (0) +#define LED_OFF() do { PA1 = !LED_POLARITY; } while (0) +#define LED_TOGGLE() do { PA1 = !PA1; } while (0) + #endif