X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Finclude%2Favr.h;h=930ab99eb57076f897ce2383d3dcf337e9ce198a;hp=75cd5043db3a9eb88495e7ac83452dade7d18a04;hb=166ecd9b06d0fd98ad69379f5b0d91c755adff2b;hpb=e2a75fc68bc3cedaadb2db57b9e579a0f4468380 diff --git a/firmware/include/avr.h b/firmware/include/avr.h index 75cd504..930ab99 100644 --- a/firmware/include/avr.h +++ b/firmware/include/avr.h @@ -14,8 +14,24 @@ void avrconnect(); //! Enable AVR programming mode. void avr_prgen(); //! Read AVR device code. -u8 avr_devicecode(); +u8 avr_sig(u8 i); +//! Erase an AVR device +void avr_erase(); +//! Read lock bits. +u8 avr_lockbits(); +//! Write lock bits. +void avr_setlock(u8 bits); + +//! Read a byte of Flash +u8 avr_peekflash(u16 adr); + +//! Read a byte of EEPROM. +u8 avr_peekeeprom(u16 adr); +//! Read a byte of EEPROM. +u8 avr_pokeeeprom(u16 adr, u8 val); +//! Is the AVR ready or busy? +u8 avr_isready(); //Command codes. //! Performa chip erase. @@ -27,8 +43,12 @@ u8 avr_devicecode(); #define AVR_PEEKPGM 0x80 //! Read EEPROM #define AVR_PEEKEEPROM 0x81 +//! Write EEPROM +#define AVR_POKEEEPROM 0x91 //! Read lock bits. #define AVR_PEEKLOCK 0x82 +//! Write lock its. +#define AVR_POKELOCK 0x92 //! Read signature. #define AVR_PEEKSIG 0x83 //! Read fuse bits.