rust-embedded / book

Documentation on how to use the Rust Programming Language to develop firmware for bare metal (microcontroller) devices
https://docs.rust-embedded.org/book/
Apache License 2.0
1.11k stars 175 forks source link

Memory-mapped Registers: does `W` give read access to the register? #346

Open abt8601 opened 1 year ago

abt8601 commented 1 year ago

The section on writing to memory-mapped registers using a PAC says that the argument of the closure passed to the write() function gives read-write access to the various sub-fields within the register. However, the provided documentation link in the same section indicates that W gives write-only access to the register and cannot be used for reading.