7#ifndef _PICO_DIVIDER_H_
8#define _PICO_DIVIDER_H_
11#include "hardware/divider.h"
divmod_result_t hw_divider_divmod_u32(uint32_t a, uint32_t b)
Do an unsigned HW divide and wait for result.
static uint32_t to_quotient_u32(divmod_result_t r)
Efficient extraction of unsigned quotient from 32p32 fixed point.
Definition: divider.h:204
static int32_t to_quotient_s32(divmod_result_t r)
Efficient extraction of signed quotient from 32p32 fixed point.
Definition: divider.h:214
static int32_t to_remainder_s32(divmod_result_t r)
Efficient extraction of signed remainder from 32p32 fixed point.
Definition: divider.h:238
divmod_result_t hw_divider_divmod_s32(int32_t a, int32_t b)
Do a signed HW divide and wait for result.
static uint32_t to_remainder_u32(divmod_result_t r)
Efficient extraction of unsigned remainder from 32p32 fixed point.
Definition: divider.h:226
static uint32_t divmod_u32u32_rem(uint32_t a, uint32_t b, uint32_t *rem)
Integer divide of two unsigned 32-bit values, with remainder.
Definition: divider.h:87
int64_t div_s64s64(int64_t a, int64_t b)
Integer divide of two signed 64-bit values.
Definition: divider.c:66
uint32_t divmod_u32u32_rem_unsafe(uint32_t a, uint32_t b, uint32_t *rem)
Unsafe integer divide of two unsigned 32-bit values, with remainder.
Definition: divider.c:105
int32_t divmod_s32s32_rem_unsafe(int32_t a, int32_t b, int32_t *rem)
Unsafe integer divide of two signed 32-bit values, with remainder.
Definition: divider.c:101
uint64_t divmod_u64u64_unsafe(uint64_t a, uint64_t b)
Unsafe integer divide of two signed 64-bit values.
Definition: divider.c:114
uint64_t div_u64u64(uint64_t a, uint64_t b)
Integer divide of two unsigned 64-bit values.
Definition: divider.c:82
int64_t divmod_s64s64_unsafe(int64_t a, int64_t b)
Unsafe integer divide of two signed 64-bit values.
Definition: divider.c:110
uint64_t divmod_u64u64(uint64_t a, uint64_t b)
Integer divide of two signed 64-bit values.
Definition: divider.c:93
uint64_t div_u64u64_unsafe(uint64_t a, uint64_t b)
Unsafe integer divide of two unsigned 64-bit values.
Definition: divider.c:112
int32_t div_s32s32(int32_t a, int32_t b)
Integer divide of two signed 32-bit values.
Definition: divider.c:10
divmod_result_t divmod_u32u32(uint32_t a, uint32_t b)
Integer divide of two unsigned 32-bit values.
Definition: divider.c:22
int64_t divmod_s64s64_rem(int64_t a, int64_t b, int64_t *rem)
Integer divide of two signed 64-bit values, with remainder.
Definition: divider.c:71
int64_t divmod_s32s32_unsafe(int32_t a, int32_t b)
Unsafe integer divide of two unsigned 32-bit values.
Definition: divider.c:102
int32_t div_s32s32_unsafe(int32_t a, int32_t b)
Unsafe integer divide of two signed 32-bit values.
Definition: divider.c:100
int64_t divmod_s64s64(int64_t a, int64_t b)
Integer divide of two signed 64-bit values.
Definition: divider.c:77
uint64_t divmod_u64u64_rem_unsafe(uint64_t a, uint64_t b, uint64_t *rem)
Unsafe integer divide of two unsigned 64-bit values, with remainder.
Definition: divider.c:113
uint32_t div_u32u32(uint32_t a, uint32_t b)
Integer divide of two unsigned 32-bit values.
Definition: divider.c:18
static int32_t divmod_s32s32_rem(int32_t a, int32_t b, int32_t *rem)
Integer divide of two signed 32-bit values, with remainder.
Definition: divider.h:52
uint64_t divmod_u32u32_unsafe(uint32_t a, uint32_t b)
Unsafe integer divide of two unsigned 32-bit values.
Definition: divider.c:106
divmod_result_t divmod_s32s32(int32_t a, int32_t b)
Integer divide of two signed 32-bit values.
Definition: divider.c:14
int64_t divmod_s64s64_rem_unsafe(int64_t a, int64_t b, int64_t *rem)
Unsafe integer divide of two signed 64-bit values, with remainder.
Definition: divider.c:109
uint64_t divmod_u64u64_rem(uint64_t a, uint64_t b, uint64_t *rem)
Integer divide of two unsigned 64-bit values, with remainder.
Definition: divider.c:87
uint32_t div_u32u32_unsafe(uint32_t a, uint32_t b)
Unsafe integer divide of two unsigned 32-bit values.
Definition: divider.c:104
int64_t div_s64s64_unsafe(int64_t a, int64_t b)
Unsafe integer divide of two signed 64-bit values.
Definition: divider.c:108