avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] A sugestion for avr-libc


From: Craig Rodgers
Subject: [avr-libc-dev] A sugestion for avr-libc
Date: Fri, 22 Aug 2003 01:38:43 +1000

First of all I'd like to thank the developers of avr-libc, you've done a
fantastic job thus far.

I haven't been using avr-libc for all that long now (about 2 months) but one
of the more useful features that appears to be missing is the ability to
assign and test individual bits in IO registers. Ie PA0=1; or if (DDRA == 1)

Whilst some of this functionality is provided by current releases using the
sbi, and cbi functions, I believe adding the capability to read and write
bits without requiring the use of these instructions would enhance avr-libc.

I have attached a cut down IO header (myIO.h) and a simple test program
(main.c) that demonstrate how this functionality would be implemented into
the current avr-libc and used in programs.

I think you'll agree that it provides a much simpler means of accessing bits
in the IO registers than the current mechanisms. This method of access also
seems to be relatively common across other compilers/libraries I have come
across (Mitsubishi M16C, some 8051 compilers etc).

I have found avr-libc useful so if the general concessus is that this would
be a useful addition I am happy enough to implement it. I would however like
to make sure that I am not duplicating someone else's effort, if someone
else out there is already working on this I would like to offer them my
assistance.

P.S. Could anyone replying to this email please send me a copy
(craig_AT_student.usyd.edu.au) as I'm having some difficulty joining the
mailing list.

Regards

Craig Rodgers

Attachment: myIO.h
Description: Binary data

Attachment: main.c
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]