mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +00:00
chore: fix trailing whitespaces
i'm not sure how this merged, the merge checks were all clean on the previous PR...???
This commit is contained in:
parent
b63156e652
commit
3ed7736fa6
1 changed files with 11 additions and 12 deletions
|
|
@ -385,15 +385,15 @@ impl UsbHid {
|
||||||
/// It cannot be longer than 1024 bytes.
|
/// It cannot be longer than 1024 bytes.
|
||||||
pub fn connect_hid_app(&self, descriptor: Vec<u8>) -> Result<(), xous::Error> {
|
pub fn connect_hid_app(&self, descriptor: Vec<u8>) -> Result<(), xous::Error> {
|
||||||
if descriptor.len() > MAX_HID_REPORT_DESCRIPTOR_LEN {
|
if descriptor.len() > MAX_HID_REPORT_DESCRIPTOR_LEN {
|
||||||
return Err(xous::Error::OutOfMemory)
|
return Err(xous::Error::OutOfMemory);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut container = HIDReportDescriptorMessage{
|
let mut container = HIDReportDescriptorMessage {
|
||||||
descriptor: [0u8; MAX_HID_REPORT_DESCRIPTOR_LEN],
|
descriptor: [0u8; MAX_HID_REPORT_DESCRIPTOR_LEN],
|
||||||
len: descriptor.len(),
|
len: descriptor.len(),
|
||||||
};
|
};
|
||||||
|
|
||||||
for (place, element) in container.descriptor.iter_mut().zip(descriptor.iter()) {
|
for (place, element) in container.descriptor.iter_mut().zip(descriptor.iter()) {
|
||||||
*place = *element;
|
*place = *element;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -406,9 +406,9 @@ impl UsbHid {
|
||||||
/// Unset the userland application HID device descriptor and discards the cached
|
/// Unset the userland application HID device descriptor and discards the cached
|
||||||
/// reports.
|
/// reports.
|
||||||
pub fn disconnect_hid_app(&self) -> Result<(), xous::Error> {
|
pub fn disconnect_hid_app(&self) -> Result<(), xous::Error> {
|
||||||
match send_message(self.conn, Message::new_blocking_scalar(
|
match send_message(
|
||||||
Opcode::HIDUnsetDescriptor.to_usize().unwrap(),
|
self.conn,
|
||||||
0, 0, 0, 0)
|
Message::new_blocking_scalar(Opcode::HIDUnsetDescriptor.to_usize().unwrap(), 0, 0, 0, 0),
|
||||||
) {
|
) {
|
||||||
Ok(_) => Ok(()),
|
Ok(_) => Ok(()),
|
||||||
Err(err) => Err(err),
|
Err(err) => Err(err),
|
||||||
|
|
@ -433,8 +433,7 @@ impl UsbHid {
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(ret)
|
Ok(ret)
|
||||||
|
}
|
||||||
},
|
|
||||||
rkyv::core_impl::ArchivedOption::None => Err(xous::Error::UnknownError),
|
rkyv::core_impl::ArchivedOption::None => Err(xous::Error::UnknownError),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue