icE1usb firmware: Detect A-bit in TS0; report via USB + LED
Scan over every odd E1 frame TS0 byte to check if the A-bit is set,
indicating a remote alarm. If so, set yellow LED and report via the
error flags communicated to the host by USB interrupt transfer.
Change-Id: Ic4f57cf79bd32cf75f81ef3073cb8d4a2d1857d8
diff --git a/firmware/ice40-riscv/icE1usb/ice1usb_proto.h b/firmware/ice40-riscv/icE1usb/ice1usb_proto.h
index 71f7236..d0d7304 100644
--- a/firmware/ice40-riscv/icE1usb/ice1usb_proto.h
+++ b/firmware/ice40-riscv/icE1usb/ice1usb_proto.h
@@ -85,9 +85,10 @@
ICE1USB_IRQ_T_ERRCNT = 1,
};
-/* Ensue ro keep those in sync with e1.h */
+/* Ensue to keep those in sync with e1.h */
#define ICE1USB_ERR_F_ALIGN_ERR 0x01
#define ICE1USB_ERR_F_LOS 0x02
+#define ICE1USB_ERR_F_RAI 0x04
struct ice1usb_irq_err {
/* 16-bit little-endian counters */