//! Setup the AVR pins.
void avrsetup(){
spisetup();
-
- glitchsetup();
}
//! Initialized an attached AVR.
SETSS;
CLRCLK;
- delay(500);
+ //delay(5);
CLRSS;
- delay(500);
+ //delay(5);
//Enable programming
avr_prgen();
}
//! Read and write an SPI byte with delays.
-unsigned char avrtrans8(unsigned char byte){
- register unsigned int bit;
+u8 avrtrans8(u8 byte){
+ register u16 bit;
//This function came from the SPI Wikipedia article.
//Minor alterations.