3-phase PV router
Loading...
Searching...
No Matches
Macros | Functions
FastDivision.h File Reference
#include <Arduino.h>
Include dependency graph for FastDivision.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define divu1(n)   (unsigned int)((unsigned int)n)
 
#define divu2(n)   (unsigned int)((unsigned int)n >> 1)
 
#define divu4(n)   (unsigned int)((unsigned int)n >> 2)
 
#define divu8(n)   (unsigned int)((unsigned int)n >> 3)
 

Functions

void divmod10 (uint32_t in, uint32_t &div, uint8_t &mod) __attribute__((noinline))
 
unsigned int divu10 (unsigned int n) asm("divu10helper") __attribute__((noinline))
 
unsigned int divu11 (unsigned int n) __attribute__((noinline))
 
unsigned int divu12 (unsigned int n) asm("divu12helper") __attribute__((noinline))
 
unsigned int divu14 (unsigned int n) __attribute__((noinline))
 
unsigned int divu15 (unsigned int n) __attribute__((noinline))
 
unsigned int divu20 (unsigned int n) __attribute__((noinline))
 
unsigned int divu24 (unsigned int n) __attribute__((noinline))
 
unsigned int divu3 (unsigned int n) __attribute__((noinline))
 
unsigned int divu30 (unsigned int n) asm("divu30helper") __attribute__((noinline))
 
unsigned int divu5 (unsigned int n) __attribute__((noinline))
 
unsigned int divu6 (unsigned int n) asm("divu6helper") __attribute__((noinline))
 
unsigned int divu60 (unsigned int n) __attribute__((noinline))
 
unsigned int divu7 (unsigned int n) __attribute__((noinline))
 
unsigned int divu9 (unsigned int n) __attribute__((noinline))
 

Macro Definition Documentation

◆ divu1

#define divu1 (   n)    (unsigned int)((unsigned int)n)

Definition at line 25 of file FastDivision.h.

◆ divu2

#define divu2 (   n)    (unsigned int)((unsigned int)n >> 1)

Definition at line 24 of file FastDivision.h.

◆ divu4

#define divu4 (   n)    (unsigned int)((unsigned int)n >> 2)

Definition at line 22 of file FastDivision.h.

◆ divu8

#define divu8 (   n)    (unsigned int)((unsigned int)n >> 3)

Definition at line 18 of file FastDivision.h.

Function Documentation

◆ divmod10()

void divmod10 ( uint32_t  in,
uint32_t &  div,
uint8_t &  mod 
)

Definition at line 388 of file FastDivision.cpp.

◆ divu10()

unsigned int divu10 ( unsigned int  n)

Definition at line 3 of file FastDivision.cpp.

◆ divu11()

unsigned int divu11 ( unsigned int  n)

Definition at line 141 of file FastDivision.cpp.

◆ divu12()

unsigned int divu12 ( unsigned int  n)

◆ divu14()

unsigned int divu14 ( unsigned int  n)

Definition at line 191 of file FastDivision.cpp.

◆ divu15()

unsigned int divu15 ( unsigned int  n)

Definition at line 347 of file FastDivision.cpp.

◆ divu20()

unsigned int divu20 ( unsigned int  n)

Definition at line 289 of file FastDivision.cpp.

◆ divu24()

unsigned int divu24 ( unsigned int  n)

Definition at line 243 of file FastDivision.cpp.

◆ divu3()

unsigned int divu3 ( unsigned int  n)

Definition at line 265 of file FastDivision.cpp.

◆ divu30()

unsigned int divu30 ( unsigned int  n)

◆ divu5()

unsigned int divu5 ( unsigned int  n)

Definition at line 307 of file FastDivision.cpp.

◆ divu6()

unsigned int divu6 ( unsigned int  n)

◆ divu60()

unsigned int divu60 ( unsigned int  n)

Definition at line 330 of file FastDivision.cpp.

◆ divu7()

unsigned int divu7 ( unsigned int  n)

Definition at line 41 of file FastDivision.cpp.

◆ divu9()

unsigned int divu9 ( unsigned int  n)

Definition at line 91 of file FastDivision.cpp.