Skip to content

Commit

Permalink
Merge pull request #39 from quartiq/feature/usb-device-bump
Browse files Browse the repository at this point in the history
Updating driver to usb-device 0.3.0
  • Loading branch information
Disasm authored Nov 18, 2023
2 parents 4f1e219 + 06bd4b0 commit 1052d1a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed
* `usb-device` version bumped to v0.3.0



[Unreleased]: https://github.com/stm32-rs/synopsys-usb-otg/compare/v0.3.2...HEAD
[0.3.2]: https://github.com/stm32-rs/synopsys-usb-otg/compare/v0.3.2...v0.3.1
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ riscv = { version = "0.6.0", optional = true }
cortex-m = { version = "0.7.0", optional = true }
embedded-hal = "0.2.4"
vcell = "0.1.0"
usb-device = "0.2.3"
usb-device = "0.3"

[package.metadata.docs.rs]
features = ['cortex-m', 'fs']
Expand Down
4 changes: 2 additions & 2 deletions src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl EndpointIn {
write_reg!(endpoint_in, regs, DIEPCTL,
SNAK: 1,
USBAEP: 1,
EPTYP: self.descriptor.ep_type as u32,
EPTYP: self.descriptor.ep_type.to_bm_attributes() as u32,
SD0PID_SEVNFRM: 1,
TXFNUM: self.index() as u32,
MPSIZ: self.descriptor.max_packet_size as u32
Expand Down Expand Up @@ -183,7 +183,7 @@ impl EndpointOut {
CNAK: 1,
EPENA: 1,
USBAEP: 1,
EPTYP: self.descriptor.ep_type as u32,
EPTYP: self.descriptor.ep_type.to_bm_attributes() as u32,
MPSIZ: self.descriptor.max_packet_size as u32
);
}
Expand Down

0 comments on commit 1052d1a

Please sign in to comment.