[][src]Function wooting_analog_sdk_sys::wooting_read_full_buffer

pub unsafe extern "C" fn wooting_read_full_buffer(
    data: *mut u8,
    length: c_uint
) -> c_int

@brief Get the full analog buffer.

This function can be used to get a buffer of all the keys that are pressed up to a maximum of 16 keys. The maximum size of the buffer is 32 bytes (2 bytes * 16 keys) The data is ordered as [scan_code0, analog_value0, scan_code1, analog_value1, .... , scan_code15, analog_value15] The keyboard matrix with scan code indexing can be found in the resources folder.

It is not necessary to initialize the keyboard before reading. If the keyboard is not connected this function will return -1.

@ingroup API @param data A buffer to put the read data into (2 - 32 bytes). @param items Length of the data buffer in bytes

@returns This function returns items written and -1 on error.