2 \author Travis Goodspeed
3 \brief AVR SPI Programmer
12 /* AVR is a known macro for the AVR C includes */
15 //! Setup the AVR pins.
18 //! Initialized an attached AVR.
21 //! Enable AVR programming mode.
23 //! Read AVR device code.
24 uint8_t avr_sig(uint8_t i);
25 //! Erase an AVR device
28 uint8_t avr_lockbits();
30 void avr_setlock(uint8_t bits);
32 //! Read a byte of Flash
33 uint8_t avr_peekflash(uint16_t adr);
35 //! Read a byte of EEPROM.
36 uint8_t avr_peekeeprom(uint16_t adr);
37 //! Read a byte of EEPROM.
38 uint8_t avr_pokeeeprom(uint16_t adr, uint8_t val);
40 //! Is the AVR ready or busy?
41 uint8_t avr_isready();
44 //! Perform a chip erase.
45 #define AVR_ERASE 0xF0
46 //! Fetch RDY/!BSY byte.
47 #define AVR_RDYBSY 0xF1
49 //! Read Program Memory
50 #define AVR_PEEKPGM 0x80
52 #define AVR_PEEKEEPROM 0x81
54 #define AVR_POKEEEPROM 0x91
56 #define AVR_PEEKLOCK 0x82
58 #define AVR_POKELOCK 0x92
60 #define AVR_PEEKSIG 0x83
62 #define AVR_READFUSES 0x84
63 //! Read calibration byte.
64 #define AVR_READCAL 0x85
66 #define AVR_BULKLOAD 0x86
68 extern app_t const avr_app;