Fast atomic load/store without IRQ-disable for AVR
A fast atomic type for 8-bit values on AVR microcontrollers. It is designed to be efficient by avoiding IRQ-disable/restore overhead.
This crate provides a simple and fast way to perform atomic load and store operations on 8-bit values:
u8, i8, bool and any other user defined type that can be converted to and from u8.
Usage
Add this to your Cargo.toml:
[]
= "1"
Example: Basic types u8, i8, bool
use AvrAtomic;
static VALUE_U8: = new;
static VALUE_I8: = new;
static VALUE_BOOL: = new;
Example: User defined type
use ;
static VALUE: = new;
License
This project is licensed under either of the following, at your option:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)