chore: formatting
This commit is contained in:
parent
3387be15dc
commit
eb579f932f
@ -58,13 +58,11 @@ pub fn read_pressure_data(_input: &[u8]) -> [u8; 32] {
|
|||||||
[0u8; 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).
|
/// (e.g. set magic bytes).
|
||||||
#[cfg(any(chuni, chusanapp))]
|
#[cfg(any(chuni, chusanapp))]
|
||||||
#[inline(always)]
|
#[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
|
/// 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.
|
/// between 16 touch pad pixels and 15 divider pixels, going from right to left.
|
||||||
|
20
src/lib.rs
20
src/lib.rs
@ -299,9 +299,9 @@ pub extern "C" fn chuni_io_slider_set_leds(_rgb: *const u8) {}
|
|||||||
#[cfg(any(chuni, chusanapp))]
|
#[cfg(any(chuni, chusanapp))]
|
||||||
pub extern "C" fn chuni_io_led_init() -> HRESULT {
|
pub extern "C" fn chuni_io_led_init() -> HRESULT {
|
||||||
let mut output = SLIDER_OUTPUT.write();
|
let mut output = SLIDER_OUTPUT.write();
|
||||||
|
|
||||||
con_impl::init_output_buffer(output.as_mut_slice());
|
con_impl::init_output_buffer(output.as_mut_slice());
|
||||||
|
|
||||||
S_OK
|
S_OK
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -354,14 +354,14 @@ fn device_init() -> Result<()> {
|
|||||||
fn input_thread_proc() {
|
fn input_thread_proc() {
|
||||||
info!("Input thread started");
|
info!("Input thread started");
|
||||||
|
|
||||||
let mut shmem =
|
let mut shmem = match create_shared_memory(INPUT_SHMEM_OS_ID, con_impl::INPUT_MEMORY_SIZE, true)
|
||||||
match create_shared_memory(INPUT_SHMEM_OS_ID, con_impl::INPUT_MEMORY_SIZE, true) {
|
{
|
||||||
Ok(s) => s,
|
Ok(s) => s,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
error!("Could not obtain shared memory for controller input: {e:#?}");
|
error!("Could not obtain shared memory for controller input: {e:#?}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let usb_in = unsafe { shmem.as_slice_mut() };
|
let usb_in = unsafe { shmem.as_slice_mut() };
|
||||||
let device = DEVICE.get().unwrap();
|
let device = DEVICE.get().unwrap();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user