chore: formatting

This commit is contained in:
beerpsi 2023-12-29 00:04:22 +07:00
parent 3387be15dc
commit eb579f932f
2 changed files with 12 additions and 14 deletions

View File

@ -58,13 +58,11 @@ pub fn read_pressure_data(_input: &[u8]) -> [u8; 32] {
[0u8; 32]
}
/// Do some one-time initialization to the USB out buffer
/// Do some one-time initialization to the USB out buffer
/// (e.g. set magic bytes).
#[cfg(any(chuni, chusanapp))]
#[inline(always)]
pub fn init_output_buffer(_output: &mut [u8]) {
}
pub fn init_output_buffer(_output: &mut [u8]) {}
/// Update the RGB lighting on the slider. A slice `rgb` is provided, alternating
/// between 16 touch pad pixels and 15 divider pixels, going from right to left.

View File

@ -299,9 +299,9 @@ pub extern "C" fn chuni_io_slider_set_leds(_rgb: *const u8) {}
#[cfg(any(chuni, chusanapp))]
pub extern "C" fn chuni_io_led_init() -> HRESULT {
let mut output = SLIDER_OUTPUT.write();
con_impl::init_output_buffer(output.as_mut_slice());
S_OK
}
@ -354,14 +354,14 @@ fn device_init() -> Result<()> {
fn input_thread_proc() {
info!("Input thread started");
let mut shmem =
match create_shared_memory(INPUT_SHMEM_OS_ID, con_impl::INPUT_MEMORY_SIZE, true) {
Ok(s) => s,
Err(e) => {
error!("Could not obtain shared memory for controller input: {e:#?}");
return;
}
};
let mut shmem = match create_shared_memory(INPUT_SHMEM_OS_ID, con_impl::INPUT_MEMORY_SIZE, true)
{
Ok(s) => s,
Err(e) => {
error!("Could not obtain shared memory for controller input: {e:#?}");
return;
}
};
let usb_in = unsafe { shmem.as_slice_mut() };
let device = DEVICE.get().unwrap();