Skip to content

Commit dfb92ba

Browse files
committed
usb: disambiguate set_config from the device_instance public API
Signed-off-by: Benedek Kupper <kupper.benedek@gmail.com>
1 parent f789b98 commit dfb92ba

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

c2usb/usb/df/device.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void device::on_power_state_change(usb::power::state new_state)
1616
{
1717
if ((new_state == usb::power::state::L3_OFF) and configured())
1818
{
19-
set_config({}, event::POWER_STATE_CHANGE);
19+
set_configuration({}, event::POWER_STATE_CHANGE);
2020
}
2121
else
2222
{
@@ -28,7 +28,7 @@ void device::on_bus_reset(event ev)
2828
{
2929
if (configured())
3030
{
31-
set_config({}, ev);
31+
set_configuration({}, ev);
3232
}
3333
else if (ev != event::NONE)
3434
{
@@ -123,7 +123,7 @@ void device::set_address(message& msg) const
123123
return msg.reject();
124124
}
125125

126-
void device::set_config(config::view config, event ev)
126+
void device::set_configuration(config::view config, event ev)
127127
{
128128
// effective change in configuration
129129
if (config != mac_.active_config())
@@ -163,7 +163,7 @@ void device::set_configuration(message& msg)
163163
}
164164
}
165165

166-
set_config(config);
166+
set_configuration(config);
167167

168168
return msg.confirm();
169169
}

c2usb/usb/df/device.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class device : public polymorphic
166166
void get_device_descriptor(message& msg);
167167
void get_bos_descriptor(message& msg);
168168
void set_address(message& msg) const;
169-
void set_config(config::view config, event ev = event::CONFIGURATION_CHANGE);
169+
void set_configuration(config::view config, event ev = event::CONFIGURATION_CHANGE);
170170
void set_configuration(message& msg);
171171
void get_configuration(message& msg);
172172
void get_status(message& msg) { return msg.send_value(mac_.std_status()); }

0 commit comments

Comments
 (0)