Skip to content

Commit 1052d1a

Browse files
authored
Merge pull request #39 from quartiq/feature/usb-device-bump
Updating driver to usb-device 0.3.0
2 parents 4f1e219 + 06bd4b0 commit 1052d1a

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Changed
11+
* `usb-device` version bumped to v0.3.0
12+
13+
14+
15+
[Unreleased]: https://github.com/stm32-rs/synopsys-usb-otg/compare/v0.3.2...HEAD
16+
[0.3.2]: https://github.com/stm32-rs/synopsys-usb-otg/compare/v0.3.2...v0.3.1

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ riscv = { version = "0.6.0", optional = true }
1414
cortex-m = { version = "0.7.0", optional = true }
1515
embedded-hal = "0.2.4"
1616
vcell = "0.1.0"
17-
usb-device = "0.2.3"
17+
usb-device = "0.3"
1818

1919
[package.metadata.docs.rs]
2020
features = ['cortex-m', 'fs']

src/endpoint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl EndpointIn {
8989
write_reg!(endpoint_in, regs, DIEPCTL,
9090
SNAK: 1,
9191
USBAEP: 1,
92-
EPTYP: self.descriptor.ep_type as u32,
92+
EPTYP: self.descriptor.ep_type.to_bm_attributes() as u32,
9393
SD0PID_SEVNFRM: 1,
9494
TXFNUM: self.index() as u32,
9595
MPSIZ: self.descriptor.max_packet_size as u32
@@ -183,7 +183,7 @@ impl EndpointOut {
183183
CNAK: 1,
184184
EPENA: 1,
185185
USBAEP: 1,
186-
EPTYP: self.descriptor.ep_type as u32,
186+
EPTYP: self.descriptor.ep_type.to_bm_attributes() as u32,
187187
MPSIZ: self.descriptor.max_packet_size as u32
188188
);
189189
}

0 commit comments

Comments
 (0)