Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating driver to usb-device 0.3.0 #39

Merged
merged 3 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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