arduino-audio-tools
Loading...
Searching...
No Matches
rp2040mbed.h
1#pragma once
2
3#define RP2040_MBED
4
5// install https://github.com/pschatzmann/rp2040-i2s and set USE_I2S to 1
6#ifndef USE_I2S
7# define USE_I2S 0
8#endif
9
10#define USE_PWM
11#define USE_ANALOG_ARDUINO
12#define USE_TYPETRAITS
13#define USE_TIMER
14#define USE_INT24_FROM_INT
15
16#define PIN_ANALOG_START 26
17#define PIN_PWM_START 6
18#define PIN_I2S_BCK 26
19#define PIN_I2S_WS PIN_I2S_BCK+1
20#define PIN_I2S_DATA_IN 28
21#define PIN_I2S_DATA_OUT 28
22// Default Setting: The mute pin can be switched actovated by setting it to a gpio (e.g 4). Or you could drive the LED by assigning LED_BUILTIN
23#define PIN_I2S_MUTE -1
24#define SOFT_MUTE_VALUE 0
25#define PIN_CS 1 //PIN_SPI0_SS
26
27// fix missing __sync_synchronize symbol
28#define FIX_SYNC_SYNCHRONIZE
29#define IRAM_ATTR
30
31#ifndef ANALOG_BUFFER_SIZE
32# define ANALOG_BUFFER_SIZE 1024
33#endif
34
35#ifndef ANALOG_BUFFERS
36# define ANALOG_BUFFERS 50
37#endif