Skip to content

Commit a4894aa

Browse files
committed
mcux: don't assert on presetaddress as it isn't uniformly supported (#11)
Signed-off-by: Benedek Kupper <kupper.benedek@gmail.com>
1 parent 946a46e commit a4894aa

2 files changed

Lines changed: 4 additions & 26 deletions

File tree

c2usb/port/nxp/mcux_mac.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
/// @file
2-
///
3-
/// @author Benedek Kupper
4-
/// @date 2025
5-
///
6-
/// @copyright
7-
/// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
8-
/// If a copy of the MPL was not distributed with this file, You can obtain one at
9-
/// https://mozilla.org/MPL/2.0/.
10-
///
1+
// SPDX-License-Identifier: MPL-2.0
112
#include "port/nxp/mcux_mac.hpp"
123
#include "usb/standard/requests.hpp"
134
#include <usb_device.h>
@@ -166,7 +157,7 @@ void mcux_mac::set_address_early()
166157
{
167158
[[maybe_unused]] auto status = driver_.device_control(
168159
handle(), kUSB_DeviceControlPreSetDeviceAddress, &request().wValue.low_byte());
169-
assert(status == kStatus_USB_Success);
160+
// status may be error if the device doesn't support early address setting
170161
}
171162

172163
void mcux_mac::set_address_timely()

c2usb/port/nxp/mcux_mac.hpp

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
1-
/// @file
2-
///
3-
/// @author Benedek Kupper
4-
/// @date 2025
5-
///
6-
/// @copyright
7-
/// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
8-
/// If a copy of the MPL was not distributed with this file, You can obtain one at
9-
/// https://mozilla.org/MPL/2.0/.
10-
///
11-
#ifndef __USB_DF_PORT_NXP_MCUX_MAC_HPP_
12-
#define __USB_DF_PORT_NXP_MCUX_MAC_HPP_
13-
1+
// SPDX-License-Identifier: MPL-2.0
2+
#pragma once
143
#include "usb/df/ep_flags.hpp"
154
#include "usb/df/mac.hpp"
165
#include <usb_device_config.h>
@@ -101,5 +90,3 @@ class mcux_mac : public df::address_handle_mac
10190
};
10291

10392
} // namespace usb::df::nxp
104-
105-
#endif // __USB_DF_PORT_NXP_MCUX_MAC_HPP_

0 commit comments

Comments
 (0)