Skip to content

Commit

Permalink
Add CHANGELOG entry and fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pdh11 committed Apr 15, 2024
1 parent d34ef05 commit fd6d254
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed an issue where internal function names were conflicting with trait names by [@ryan-summers](https://github.com/ryan-summers) ([#36](https://github.com/kellerkindt/w5500/issues/36))
- Add `RetryTime` and `RetryCount` common register methods to `Device` and `UninitializedDevice` by [@elpiel](https://github.com/elpiel) ([#54][PR54])
- Add `Udp::get_port` and `Udp::set_port` by [@elpiel](https://github.com/elpiel) ([#57](https://github.com/kellerkindt/w5500/pull/57))
- Add `RawDevice::enable_interrupts` (and `clear_interrupts`, `disable_interrupts`) for interrupt-driven MACRAW mode by [@pdh11](https://github.com/pdh11) ([#60](https://github.com/kellerkindt/w5000/pull/60))

### Fixed

Expand Down
6 changes: 3 additions & 3 deletions src/raw_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl<SpiBus: Bus> RawDevice<SpiBus> {
/// For instance, pass `Interrupt::Receive` to get interrupts
/// on packet reception only.
///
pub fn enable_interrupt(&mut self, which: u8) -> Result<(), SpiBus::Error> {
pub fn enable_interrupts(&mut self, which: u8) -> Result<(), SpiBus::Error> {
self.raw_socket.set_interrupt_mask(&mut self.bus, which)?;
self.bus.write_frame(
register::COMMON,
Expand All @@ -64,14 +64,14 @@ impl<SpiBus: Bus> RawDevice<SpiBus> {
/// can mask the interrupt *at microcontroller level* in the
/// interrupt handler, then call this from thread mode before
/// unmasking again.
pub fn clear_interrupt(&mut self) -> Result<(), SpiBus::Error> {
pub fn clear_interrupts(&mut self) -> Result<(), SpiBus::Error> {
self.raw_socket
.reset_interrupt(&mut self.bus, register::socketn::Interrupt::All)
}

/// Disable all interrupts
///
pub fn disable_interrupt(&mut self) -> Result<(), SpiBus::Error> {
pub fn disable_interrupts(&mut self) -> Result<(), SpiBus::Error> {
self.bus.write_frame(
register::COMMON,
register::common::SOCKET_INTERRUPT_MASK,
Expand Down

0 comments on commit fd6d254

Please sign in to comment.