https://github.com/cjhdev/avr_bits
Useful firmware components for use with avr-libc
https://github.com/cjhdev/avr_bits
atmega328p avr-gcc avr-libc
Last synced: 4 months ago
JSON representation
Useful firmware components for use with avr-libc
- Host: GitHub
- URL: https://github.com/cjhdev/avr_bits
- Owner: cjhdev
- License: mit
- Created: 2018-11-16T15:53:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-02T15:05:56.000Z (over 6 years ago)
- Last Synced: 2025-01-21T03:42:35.997Z (5 months ago)
- Topics: atmega328p, avr-gcc, avr-libc
- Language: C
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
AVRBits
=======A collection of useful things in C to complement existing avr-libc features.
The style will appeal to people that prefer:
- standard types
- enum instead of macros where appropriate
- code that works correctly between mainloop and interrupt
- code that works correctly with system clock prescaler## Supported Targets
- ATMEGA328p
## Modules
Some modules depend on others (e.g. uart uses fifo).
### pin
- read and write pins using Arduino pin naming conventions
- set/clear pin change interrupt handlers### fifo
- byte oriented FIFO
- variable buffer size set at initialisation time
- works between interrupt and mainloop### semaphore
- non-blocking semaphores (i.e. flags)
- works between interrupt and mainloop### spi
- master mode only
- bit rate and mode settings
- configures pins as requiredcompile options:
- F_CPU (system clock in Hz)
### uart
- baud rate setting
- buffered tx and rx
- put/get from interrupt and mainloop
- tx_empty/rx_ready handlers
- depends on fifocompile options:
- F_CPU (system clock in Hz)
- UART_TX_SIZE (tx buffer size)
- UART_RX_SIZE (rx buffer size)### rccal
- hardware dependent RC oscillator calibration
- uses TC2 (32768Hz async mode) to calibrate RC using TC0 (io clock)## License
AVRBits has an MIT license.