Working on AVR support.
[goodfet] / firmware / include / avr.h
diff --git a/firmware/include/avr.h b/firmware/include/avr.h
new file mode 100644 (file)
index 0000000..75cd504
--- /dev/null
@@ -0,0 +1,37 @@
+/*! \file avr.h
+  \author Travis Goodspeed
+  \brief AVR SPI Programmer
+*/
+
+#include "spi.h"
+
+//! Setup the AVR pins.
+void avrsetup();
+
+//! Initialized an attached AVR.
+void avrconnect();
+
+//! Enable AVR programming mode.
+void avr_prgen();
+//! Read AVR device code.
+u8 avr_devicecode();
+
+
+//Command codes.
+//! Performa  chip erase.
+#define AVR_ERASE 0xF0
+//! Fetch RDY/!BSY byte.
+#define AVR_RDYBSY 0xF1
+
+//! Read Program Memory
+#define AVR_PEEKPGM 0x80
+//! Read EEPROM
+#define AVR_PEEKEEPROM 0x81
+//! Read lock bits.
+#define AVR_PEEKLOCK 0x82
+//! Read signature.
+#define AVR_PEEKSIG 0x83
+//! Read fuse bits.
+#define AVR_READFUSES 0x84
+//! Read calibration byte.
+#define AVR_READCAL 0x85