2 \author Travis Goodspeed
3 \brief AVR SPI Programmer
15 //! Setup the AVR pins.
20 //! Initialized an attached AVR.
23 avrsetup();//set I/O pins
25 //Pulse !RST (SS) at least twice while CLK is low.
38 //! Perform a 4-byte exchange.
39 u8 avrexchange(u8 a, u8 b, u8 c, u8 d){
43 debugstr("AVR sync error, b not returned as c.");
49 //! Enable AVR programming mode.
51 avrexchange(0xac, 0x53, 0, 0);
54 //! Read AVR device code.
56 return avrexchange(0x30, //Read signature byte
58 0x00, //&0x03 is sig adr
63 //! Handles an AVR command.
64 void avrhandle(unsigned char app,
74 cmddata[i]=spitrans8(cmddata[i]);
88 debugstr("Verb unimplemented in AVR application.");