[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avrdude-dev] avrdude on Windows
From: |
E. Weddington |
Subject: |
Re: [avrdude-dev] avrdude on Windows |
Date: |
Thu, 13 Feb 2003 09:50:52 -0700 |
On 13 Feb 2003 at 11:35, Brian Dean wrote:
> On Thu, Feb 13, 2003 at 09:24:37AM -0700, E. Weddington wrote:
>
> > I suspected as much that this would be the best way to go. I'm
> > currently in the middle of writing a ppiwin.c file that provides the
> > 8 functions previously talked about. Brian, I assume that we would
> > want to have one ppi.h that provides the prototypes?
>
> Yes, here's my current copy of ppi.h:
>
> #ifndef __ppi_h__
> #define __ppi_h__
>
> #include "config.h"
>
> /*
> * PPI registers
> */
> enum {
> PPIDATA,
> PPICTRL,
> PPISTATUS
> };
>
Suggestion:
enum {
PPIDATA = 0,
PPICTRL = 1,
PPISTATUS = 2
};
>
> int ppi_getpinmask(int pin);
>
> #if !defined(ppi_claim)
> # define ppi_claim(pgm)
> #endif
>
> #if !defined(ppi_release)
> # define ppi_release(pgm)
> #endif
>
> int ppi_setpin (int fd, int pin, int value);
>
> int ppi_getpin (int fd, int pin);
>
> int ppi_set (int fd, int reg, int bit);
>
> int ppi_clr (int fd, int reg, int bit);
>
> int ppi_getall (int fd, int reg);
>
> int ppi_setall (int fd, int reg, int val);
>
> int ppi_pulsepin (int fd, int pin);
>
> #endif
>
Realize that
ppi_pulsepin
ppi_getpin
ppi_setpin
ppi_getpinmask
is going to be the same code no matter what the platform. Why
duplicate this?
I'd still rather see it contain:
ppi_open
ppi_close
ppi_set
ppi_clr
ppi_get
ppi_toggle
ppi_setall
ppi_clrall
As these are the functions that are different between platforms.
> These represent the functions and enums needed by my new 'par.c' file.
> I've got the split done and working. Shall I go ahead an commit this?
> Is it going to cause anyone too much disruption (mostly thinking of
> Ted's autoconf work)? If there are any objections, let me know soon.
>
Give Ted a couple more hours to weigh in. He's an hour behind me.
Eric
- Re: [avrdude-dev] avrdude on Windows, (continued)
- Re: [avrdude-dev] avrdude on Windows, Joerg Wunsch, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, Brian Dean, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, E. Weddington, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, Joerg Wunsch, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, Brian Dean, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, E. Weddington, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, E. Weddington, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, Theodore A. Roth, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, E. Weddington, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, Brian Dean, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows,
E. Weddington <=
- Re: [avrdude-dev] avrdude on Windows, Brian Dean, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, Joerg Wunsch, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, E. Weddington, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, Joerg Wunsch, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, E. Weddington, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, Brian Dean, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, Theodore A. Roth, 2003/02/13