Skip to content
/ u8bits Public

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

License

Notifications You must be signed in to change notification settings

freylax/u8bits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages