[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gEDA: Re: "FREE" CPLD fitter tools
graham@belegost.mit.edu said:
> The reader and other stuff is in:
Ah, great.
I have comments. Do you mind?
First, I think it would be good if the jedec_read function return a cookie
that holds the data from the jedec file, instead of using globals. This
allows for multiple open images, and is also well suited for libraries that
get turned into DLLs. An opaque cookie can be declared like so (in a public
header file):
typedef struct jedec_data *jedec_data_t;
The actual definition of ``struct jedec_data'' can be burried in j_priv.h
or some other private header file.
Accessor functions can be provided to return information about the file:
extern const char* jedec_spec(jedec_data_t jed);
extern unsigned jedec_fuse_count(jedec_data_t jed);
extern int jedec_get_fuse_state(jedec_data_t, unsigned idx);
[...]
and so on.
--
Steve Williams "The woods are lovely, dark and deep.
steve@icarus.com But I have promises to keep,
steve@picturel.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."