| Crates.io | avr-int24 |
| lib.rs | avr-int24 |
| version | 1.1.0 |
| created_at | 2025-10-25 19:11:40.752014+00 |
| updated_at | 2025-10-29 18:16:23.030996+00 |
| description | 24 bit integer arithmetic for AVR |
| homepage | https://bues.ch/ |
| repository | https://github.com/mbuesch/avr-int24 |
| max_upload_size | |
| id | 1900534 |
| size | 73,401 |
This library provides a 24-bit signed integer type, Int24, for Rust.
It is designed for use on AVR microcontrollers.
Int24)i16 and i32const or have a const variantTo use the Int24 type, add avr-int24 as a dependency to your Cargo.toml
[dependencies]
avr-int24 = "1"
and then use it in your code:
use avr_int24::Int24;
let a = Int24::from_i16(30000);
let b = Int24::from_i16(10000);
let c = a + b;
assert_eq!(c.to_i32(), 40000);
AVR inline assembly is not yet stabilized.
Therefore, a nightly Rust compiler is required.