Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric committed Dec 11, 2024
1 parent 24aac74 commit c6bba06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ fn read_adc_all_py() -> Vec<f32> {

#[cpy_fn_c]
#[comment_c = "Reads the ADC channel values (from the ADS1115 chip)."]
fn read_adc_all_c(mut adc_array: *mut f32, length: usize) {
let mut array = unsafe {
fn read_adc_all_c(adc_array: *mut f32, length: usize) {
let array = unsafe {
assert!(!adc_array.is_null());
std::slice::from_raw_parts_mut::<f32>(adc_array, length)
};
Expand Down

0 comments on commit c6bba06

Please sign in to comment.