Change port value from lpt1alt to lpt3. Other formatting changes.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@229 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
ae9b29da6a
commit
d75941adc7
9
ppiwin.c
9
ppiwin.c
|
@ -49,7 +49,7 @@ extern char *progname;
|
||||||
|
|
||||||
#define DEVICE_LPT1 "lpt1"
|
#define DEVICE_LPT1 "lpt1"
|
||||||
#define DEVICE_LPT2 "lpt2"
|
#define DEVICE_LPT2 "lpt2"
|
||||||
#define DEVICE_LPT1ALT "lpt1alt"
|
#define DEVICE_LPT3 "lpt3"
|
||||||
|
|
||||||
#define DEVICE_MAX 3
|
#define DEVICE_MAX 3
|
||||||
|
|
||||||
|
@ -63,8 +63,7 @@ static const winpp winports[DEVICE_MAX] =
|
||||||
{
|
{
|
||||||
{DEVICE_LPT1, 0x378},
|
{DEVICE_LPT1, 0x378},
|
||||||
{DEVICE_LPT2, 0x278},
|
{DEVICE_LPT2, 0x278},
|
||||||
{DEVICE_LPT1ALT, 0x3BC},
|
{DEVICE_LPT3, 0x3BC},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -297,9 +296,11 @@ static unsigned char reg2offset(int reg)
|
||||||
static unsigned char inb(unsigned short port)
|
static unsigned char inb(unsigned short port)
|
||||||
{
|
{
|
||||||
unsigned char t;
|
unsigned char t;
|
||||||
|
|
||||||
asm volatile ("in %1, %0"
|
asm volatile ("in %1, %0"
|
||||||
: "=a" (t)
|
: "=a" (t)
|
||||||
: "d" (port));
|
: "d" (port));
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,6 +311,8 @@ static void outb(unsigned char value, unsigned short port)
|
||||||
asm volatile ("out %1, %0"
|
asm volatile ("out %1, %0"
|
||||||
:
|
:
|
||||||
: "d" (port), "a" (value) );
|
: "d" (port), "a" (value) );
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue