Skip to content

rp235x_hal::rom_data: inconsistent usage of usize/u32 #938

@jf-uu

Description

@jf-uu

rp235x_hal::rom_data inconsistently accepts a u32 or a usize for size arguments:

unsafe fn explicit_buy(buffer: *mut u8, buffer_size: u32) -> i32 {

unsafe fn get_uf2_target_partition(workarea_base: *mut u8, workarea_size: usize, family_id: u32, partition_out: *mut u32) -> i32 {

The first 2 arguments to both of these are used as work area for the boot ROM. Is there a reason for this? The RP2350 datasheet just lists them as u32. I'm happy to open a PR to change them all to use usize (which is more convenient when passing a buffer's length as thing.len()).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions