Arduino VS1053
Loading...
Searching...
No Matches
VS1053Ext.h
1#pragma once
2#ifndef ARDUINO
3#include <stdlib.h>
4#include <string.h>
5
6#ifndef min
7# define min(a,b) a<b?a:b
8#endif
9
10#ifndef may
11# define max(a,b) a>b?a:b
12#endif
13
14#ifndef HIGH
15# define HIGH 1
16#endif
17
18#ifndef LOW
19# define LOW 0
20#endif
21
22#ifndef INPUT
23# define INPUT 0x01
24# define OUTPUT 0x02
25# define INPUT_PULLUP 0x05
26#endif
27
28#ifndef PROGMEM
29#define PROGMEM
30#endif
31
32namespace arduino_vs1053 {
33
34// If you want to use the project outside of Arduino you need to implement the following
35// methods:
36
37void delay(int);
38void yield();
39void digitalWrite(uint8_t, uint8_t);
40int digitalRead(uint8_t);
41void pinMode(uint8_t, uint8_t);
42long map(long x, long in_min, long in_max, long out_min, long out_max) {
43 return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
44}
45
46}
47
48#endif