Yet Another AVR library
- Generate needed files using
make init
- run
./configure.sh
- It uses Auto-make-rules => use
make file.elf
to compile and link the c-filemake ifile.elf
to flash your program on the avr- use the includes
<pins.h>
& co
- atmega168: fully supported
- atmega8: partially supported ( many librarys should be compatible)
- as auto-rules are used, you will have to reconfigure the project using
./configure.sh
to change the linked libs - to save flash space unused libarys shouldn't be linked
- to save ram you can use usart in no interrupt mode and do not link some librarys
- You will have to define device specific preprocessor macros for
<pins.h>
: - on m8:
__DEV_M8_
- on m168:
__DEV_M168_
- The most part is configured by
configure.sh
File | Function | Usage |
---|---|---|
lib/<device>/digital.c |
write_pin(char pin) |
write pin digital, pin is the PDIP pinnumber |
lib/<device>/digital.c |
read_pin(char pin) |
read pin digital, pin is the PDIP pinnumber |
lib/<device>/analog.c |
analog_write(char pin) |
write pin analog (PWM)(if supported), pin is the PDIP pinnumber |
lib/<device>/analog.c |
analog_read(char pin) |
read pin analog (if supported), pin is the PDIP pinnumber |
lib/pins.c |
analog_get(char pin) |
read pin analog with average (if supported), pin is the PDIP pinnumber |
lib/pins.c |
get_pin(char pin) |
read pin digital with polling, pin is the PDIP pinnumber |
... | ... | ... |
To be finished: read the files include/*.h . |