Skip to content

Latest commit

 

History

History
114 lines (81 loc) · 4.17 KB

File metadata and controls

114 lines (81 loc) · 4.17 KB

Changelog

0.3.0

Breaking changes

  • Take self rather than &mut self for UniqueMmioPointer::split. The old behaviour can be achieved by calling reborrow first.
  • Take self rather than &self for SharedMmioPointer::split. SharedMmioPointer is Copy so this should make no difference in most cases.

Improvements

  • Added modify and modify_mut methods to UniqueMmioPointer<ReadWrite<T>> and UniqueMmioPointer<ReadPureWrite<T>>.
  • Added get_range() methods to UniqueMmioPointer<[T]>, UniqueMmioPointer<[T; LEN]>, SharedMmioPointer<[T]>, SharedMmioPointer<[T; LEN]>. These methods return a pointer to the subset of elements, specified by a Range.
  • Added iter() methods to UniqueMmioPointer<[T]>, UniqueMmioPointer<[T; LEN]>, SharedMmioPointer<[T]>, SharedMmioPointer<[T; LEN]>. These methods return an iterator to the items of the pointer slices or arrays.

0.2.7

Improvements

  • Added UniqueMmioPointer::split_some for arrays and slices.

0.2.6

Improvements

  • Optimised implementation of From<UniqueMmioPointer<[T; LEN]>> for [UniqueMmioPointer<T>; LEN].

0.2.5

Improvements

  • Added UniqueMmioPointer::take for arrays and slices, similar to get but taking ownership of the original pointer rather than borrowing it.
  • Added implementation of From to convert from pointer to array to array of pointers.
  • Implemented Copy for SharedMmioPointer.
  • Extended lifetimes of values returned from SharedMmioPointer::as_slice, SharedMmioPointer::get, SharedMmioPointer::split and field_shared!. They are now tied only to the lifetime parameter of the original SharedMmioPointer, not the lifetime of the reference.

0.2.4

Improvements

  • Added UniqueMmioPointer::as_mut_slice and SharedMmioPointer::as_slice to convert from array pointer to slice pointer.
  • Added implementations of From to convert from array pointers to slice pointers.
  • Added implementations of From to convert from pointers to T to pointers to [T; 1] or [T].
  • Added split_fields! macro to split a UniqueMmioPointer to a struct into several UniqueMmioPointers to its fields.

0.2.3

Improvements

  • Made many methods const, in particular:
    • PhysicalInstance::new
    • PhysicalInstance::pa
    • SharedMmioPointer::child
    • SharedMmioPointer::get
    • SharedMmioPointer::new
    • SharedMmioPointer::ptr
    • UniqueMmioPointer::child
    • UniqueMmioPointer::get
    • UniqueMmioPointer::new
    • UniqueMmioPointer::ptr_mut
    • UniqueMmioPointer::ptr_nonnull
  • Fixed field! and field_shared! to allow getting unsized fields (e.g. slices) of structs.
  • Added UniqueMmioPointer::reborrow.

0.2.2

Bugfixes

  • Implemented KnownLayout for ReadPureWrite. This was missed accidentally before.

0.2.1

New features

  • Added get method to UniqueMmioPointer<[T; N]> and SharedMmioPointer<[T; N]>.

0.2.0

Breaking changes

  • Renamed OwnedMmioPointer to UniqueMmioPointer.

New features

  • Added SharedMmioPointer for an MMIO pointer that is not necessarily unique. Unlike a UniqueMmioPointer, a SharedMmioPointer can be cloned. UniqueMmioPointer derefs to SharedMmioPointer and can also be converted to it.
  • Added get and split methods on UniqueMmioPointer<[T]> and UniqueMmioPointer<[T; _]> respectively, to go from a pointer to a slice or field to pointers to the individual elements.
  • Added field! and field_shared! macros to go from a pointer to a struct to a pointer to an individual field.
  • Added write_unsafe and read_unsafe methods on UniqueMmioPointer and SharedMmioPointer. These call write_volatile and read_volatile on most platforms, but on aarch64 are implemented with inline assembly instead to work around a bug with how volatile writes and reads are implemented.
  • Added wrapper types ReadOnly, ReadPure, WriteOnly, ReadWrite and ReadPureWrite to indicate whether a field can safely be written or read (with or without side-effects). Added safe write and read methods on UniqueMmioPointer or SharedMmioPointer for these.

0.1.0

Initial release.