Skip to content

Commit eaeb430

Browse files
committed
lpc17xx fixed a comment + variable name in usb driver
1 parent 42e91fb commit eaeb430

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

targets/core/nxp/lpc17xx/usb.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ namespace klib::core::lpc17xx::io {
5151
// amount of endpoints supported by the lpc1756
5252
constexpr static uint8_t endpoint_count = 16;
5353

54-
// max size in a single endpoint
55-
constexpr static uint8_t max_endpoint_size = 64;
54+
// max size in a control endpoint
55+
constexpr static uint8_t max_control_endpoint_size = 64;
5656

5757
// type to use in device functions
5858
using usb_type = usb<Usb, Device>;
@@ -178,9 +178,9 @@ namespace klib::core::lpc17xx::io {
178178

179179
static void reset() {
180180
Usb::port->EPIND = 0;
181-
Usb::port->MAXPSIZE = max_endpoint_size;
181+
Usb::port->MAXPSIZE = max_control_endpoint_size;
182182
Usb::port->EPIND = 1;
183-
Usb::port->MAXPSIZE = max_endpoint_size;
183+
Usb::port->MAXPSIZE = max_control_endpoint_size;
184184

185185
while ((Usb::port->DEVINTST & 0x100) == 0) {
186186
// do nothing
@@ -733,7 +733,7 @@ namespace klib::core::lpc17xx::io {
733733
for (uint32_t i = 0; i < endpoint_count; i++) {
734734
// set the endpoint to a known state
735735
state[i].is_busy = false;
736-
state[i].max_size = static_cast<uint8_t>((i == 0) ? max_endpoint_size : 0);
736+
state[i].max_size = static_cast<uint8_t>((i == 0) ? max_control_endpoint_size : 0);
737737
state[i].data = nullptr;
738738
state[i].requested_size = 0;
739739
state[i].transferred_size = 0;

0 commit comments

Comments
 (0)