mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-28 06:55:27 +00:00
Rearrange the pinout for the programmer to be a little more logical.
Provide hooks to support a buffered programmer, pin 6 is now used to enable a buffer that can be used to isolate the target system from the parallel port pins. This is important when programming the target in-system. Totally change the way the pin definitions are defined. Actually set/clear pins based on the way more intuitive pin number, instead of PPI data register, bit number combination. A table of pin data is used so that any hardware inversion done by the parallel port is accounted for, what you set is actually what appears at the pin. Retain the old method for handling Vcc, however, because the hold method is much easier to use when setting / retrieving multiple pins simultaneously. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@49 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
34
avr.h
34
avr.h
@@ -34,14 +34,18 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* bit definitions for AVR device connections
|
||||
*/
|
||||
#define AVR_POWER 0xf1 /* bit 0 and 4...7 of data register */
|
||||
#define AVR_CLOCK 0x02 /* bit 1 of data register */
|
||||
#define AVR_INSTR 0x04 /* bit 2 of data register */
|
||||
#define AVR_RESET 0x08 /* bit 3 of data register */
|
||||
#define AVR_DATA 0x40 /* bit 6 of status register */
|
||||
|
||||
#define PPI_AVR_VCC 0x0f /* ppi pins 2-5, data reg bits 0-3 */
|
||||
#define PIN_AVR_BUFF 6
|
||||
#define PIN_AVR_RESET 7
|
||||
#define PIN_AVR_SCK 8
|
||||
#define PIN_AVR_MOSI 9
|
||||
#define PIN_AVR_MISO 10
|
||||
#define PIN_LED_ERR 1
|
||||
#define PIN_LED_RDY 14
|
||||
#define PIN_LED_PGM 16
|
||||
#define PIN_LED_VFY 17
|
||||
|
||||
|
||||
|
||||
/*
|
||||
@@ -61,7 +65,7 @@ struct avrmem {
|
||||
AVRMEM memtype;
|
||||
int startaddr;
|
||||
int size;
|
||||
unsigned char buf;
|
||||
unsigned char * buf;
|
||||
struct avrmem * next;
|
||||
};
|
||||
#endif
|
||||
@@ -72,20 +76,14 @@ struct avrpart {
|
||||
int memsize[AVR_MAXMEMTYPES]; /* sizes for eeprom,
|
||||
flash, etc, indexed by
|
||||
AVR_EEPROM or AVR_FLASH */
|
||||
#if 0
|
||||
int flash_size; /* size in bytes of flash */
|
||||
int eeprom_size; /* size in bytes of eeprom */
|
||||
#endif
|
||||
unsigned char f_readback; /* flash write polled readback value */
|
||||
unsigned char e_readback[2]; /* eeprom write polled readback values */
|
||||
int min_write_delay; /* microseconds */
|
||||
int max_write_delay; /* microseconds */
|
||||
int chip_erase_delay; /* microseconds */
|
||||
unsigned char * mem[AVR_MAXMEMTYPES];
|
||||
#if 0
|
||||
unsigned char * flash;
|
||||
unsigned char * eeprom;
|
||||
#endif
|
||||
unsigned char * mem[AVR_MAXMEMTYPES]; /* pointers to avr memory
|
||||
buffers, indexed by
|
||||
AVR_EEPROM or AVR_FLASH */
|
||||
};
|
||||
|
||||
extern struct avrpart parts[];
|
||||
|
Reference in New Issue
Block a user