16 #define reg_spictrl (*(volatile uint32_t*)0x02000000)
17 #define reg_uart_clkdiv (*(volatile uint32_t*)0x02000004)
18 #define reg_uart_data (*(volatile uint32_t*)0x02000008)
19 #define reg_outp (*(volatile uint32_t*)0x03000000) // contains reg_leds also
21 #define reg_inp (*(volatile uint32_t*)0x05000000)
24 #define F_CPU 12000000 // 12MHz
26 #define clk_div_s (F_CPU) // 1s
27 #define clk_div_ms (F_CPU/1000) // 1ms
28 #define clk_div_us (F_CPU/1000000) // 1us
35 #define INPUT_PULLUP 0x2
37 #define PI 3.1415926535897932384626433832795
38 #define HALF_PI 1.5707963267948966192313216916398
39 #define TWO_PI 6.283185307179586476925286766559
40 #define DEG_TO_RAD 0.017453292519943295769236907684886
41 #define RAD_TO_DEG 57.295779513082320876798154814105
42 #define EULER 2.718281828459045235360287471352
82 #define min(a,b) ((a)<(b)?(a):(b))
83 #define max(a,b) ((a)>(b)?(a):(b))
84 #define abs(x) ((x)>0?(x):-(x))
85 #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
86 #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
87 #define radians(deg) ((deg)*DEG_TO_RAD)
88 #define degrees(rad) ((rad)*RAD_TO_DEG)
89 #define sq(x) ((x)*(x))
94 #define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )
125 void pinMode(uint8_t, uint8_t);
132 unsigned long millis(
void);
133 unsigned long micros(
void);
134 void delay(
unsigned long);
171 #if defined(ASSERT_NOT_IMPLEMENTED)
172 #warning ASSERT_NOT_IMPLEMENTED enabled. Check serial output for assertions. Baudrate is the one choosen or 115200 per default.
173 void assert(
const bool,
const char *);
257 #if defined(HAVE_HWSERIAL0) && defined(HAVE_CDCSERIAL)
258 #error "Targets with both UART0 and CDC serial not supported"
276 long map(
long,
long,
long,
long,
long);
void pinMode(uint8_t, uint8_t)
Definition: main.cpp:278
void loop(void)
Definition: Due_AS7265X_Spectrometer.ino:127
uint8_t byte
Definition: Arduino.h:123
unsigned long micros(void)
Definition: main.cpp:258
void analogWrite(uint8_t, int)
Definition: main.cpp:351
void setup(void)
Definition: Due_AS7265X_Spectrometer.ino:55
void delay(unsigned long)
Definition: main.cpp:265
unsigned long millis(void)
Definition: main.cpp:251
int digitalRead(uint8_t)
Definition: main.cpp:323
long map(long x, long in_min, long in_max, long out_min, long out_max)
Definition: WMath.cpp:52
void digitalWrite(uint8_t, uint8_t)
Definition: main.cpp:298
int analogRead(uint8_t)
Definition: main.cpp:339