ucause.rs 410 B

1234567891011121314151617181920212223
  1. //! ucause register
  2. /// ucause register
  3. #[derive(Clone, Copy, Debug)]
  4. pub struct Ucause {
  5. bits: usize,
  6. }
  7. impl Ucause {
  8. /// Returns the contents of the register as raw bits
  9. #[inline]
  10. pub fn bits(&self) -> usize {
  11. self.bits
  12. }
  13. }
  14. read_csr_as!(Ucause, 0x042, __read_ucause);
  15. write_csr!(0x042, __write_ucause);
  16. /// Writes the CSR
  17. pub unsafe fn write(bits: usize) {
  18. _write(bits)
  19. }