Sean Cross
4aa4eae649
lib: rustfmt
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-09-27 12:06:20 +08:00
Sean Cross
5de52c0809
lib: rename accessors to reflect register-or-field
...
Some accessors work on fields, whereas others work on the whole
register. Rename the functions to reflect what works where.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-09-27 12:05:30 +08:00
Sean Cross
fe68f64446
lib: fix accessors so they actually work
...
We were taking an address of the address, rather than transmuting the
address itself.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-09-27 11:51:17 +08:00
Sean Cross
03bfd901f8
lib: fix `no_std` compiling
...
Add a conditional check to enable `no_std` if the target_os is "none".
Signed-off-by: Sean Cross <sean@xobs.io>
2020-09-27 11:49:02 +08:00
Sean Cross
9a96cbbf4f
lib: bring `register` into the field definition
...
By doing this, we prevent a mismatch between registers and fields. The
compiler ought to optimize away the `Register` field.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-09-27 11:44:31 +08:00
Sean Cross
30a9171031
lib: replae `usize` with `Register`
...
This ensures we can't write to random values in memory.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-09-27 11:31:59 +08:00
Sean Cross
02bb380848
initial commit
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-09-27 11:27:18 +08:00