u8bits 0.1.0

This crate provides a macro to generate accessors for parts of newtype byte arrays.
Documentation

u8bits

rust macro to generate setters and getters for bits / bit ranges of u8 arrays

Build Status

This macro invocation:

struct Bytes( [u8;2]);
impl Bytes {
	u8bits! {
		/// foo is bit 4 of byte 0
		foo: rw 0,4;
		/// bar are bits 0..3 of byte 1
		u8, bar: rw 1,0,3;
	}
}

will generate get_ and set_ for foo and bar.