projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dos2unix, smart card app.
[goodfet]
/
firmware
/
apps
/
avr
/
avr.c
diff --git
a/firmware/apps/avr/avr.c
b/firmware/apps/avr/avr.c
index
4b346c0
..
53d9f30
100644
(file)
--- a/
firmware/apps/avr/avr.c
+++ b/
firmware/apps/avr/avr.c
@@
-11,7
+11,7
@@
#include <iomacros.h>
#include "avr.h"
#include <iomacros.h>
#include "avr.h"
-#include "glitch.h"
+
//
#include "glitch.h"
//! Setup the AVR pins.
void avrsetup(){
//! Setup the AVR pins.
void avrsetup(){
@@
-21,17
+21,21
@@
void avrsetup(){
//! Initialized an attached AVR.
void avrconnect(){
//set I/O pins
//! Initialized an attached AVR.
void avrconnect(){
//set I/O pins
- avrsetup();
+ avrsetup(); //Cut this?
+
+ SETSS;
+ delay(50);
//Pulse !RST (SS) at least twice while CLK is low.
CLRCLK;
CLRSS;
//Pulse !RST (SS) at least twice while CLK is low.
CLRCLK;
CLRSS;
+ delay(5);
SETSS;
CLRCLK;
SETSS;
CLRCLK;
-
//
delay(5);
+ delay(5);
CLRSS;
CLRSS;
-
//
delay(5);
+ delay(5);
//Enable programming
avr_prgen();
//Enable programming
avr_prgen();
@@
-133,7
+137,6
@@
void avrhandle(unsigned char app,
unsigned long len){
unsigned long i;
unsigned int at;
unsigned long len){
unsigned long i;
unsigned int at;
- //static u8 connected=0;
/*
if(!avr_isready() && connected)
/*
if(!avr_isready() && connected)