]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blobdiff - include/fx2lafw.h
Increase FX2LAFW_VERSION_MINOR to 3.
[sigrok-firmware-fx2lafw.git] / include / fx2lafw.h
index 5a66de86442e7db729abdbab3f363fd935a4e814..4a2cb8ae186358f620e8aaf40947998162caa98f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * This file is part of the fx2lafw project.
+ * This file is part of the sigrok-firmware-fx2lafw project.
  *
  * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
  *
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef FX2LAFW_FX2LAFW_H
-#define FX2LAFW_FX2LAFW_H
+#ifndef FX2LAFW_INCLUDE_FX2LAFW_H
+#define FX2LAFW_INCLUDE_FX2LAFW_H
 
 #include <autovector.h>
 
  * longer (properly) work with the new fx2lafw firmware.
  */
 #define FX2LAFW_VERSION_MAJOR  1
-#define FX2LAFW_VERSION_MINOR  0
+#define FX2LAFW_VERSION_MINOR  3
+
+#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