Skip to content

Emulated hardware division hw_divider_divmod_u/s32_start discards result #2287

@DDoS

Description

@DDoS

Title says it all. In fact only hw_divider_restore_state ever writes to the emulated hw_divider_results, so all the async functions are broken.

static inline void hw_divider_divmod_u32_start(uint32_t a, uint32_t b) {
#if !PICO_EMULATE_DIVIDER
    ...
#else
    hw_divider_divmod_u32(a, b); // <- this returns a divmod_result_t but discards it
#endif
}

https://github.com/raspberrypi/pico-sdk/blob/2.1.0/src/rp2_common/hardware_divider/include/hardware/divider.h#L113

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions