arduino-audio-tools
Loading...
Searching...
No Matches
rp2040hower.h
Go to the documentation of this file.
1#pragma once
2#include "Arduino.h"
3#define RP2040_HOWER
4#define RP2040
5#define USE_SD_NO_NS
6#define USE_I2S
7#define USE_PWM
8#define USE_ANALOG_ARDUINO
9#define USE_TYPETRAITS
10#define USE_TIMER
11#define USE_INT24_FROM_INT
12
13#define PIN_ANALOG_START 26
14#define PIN_PWM_START 6
15#define PIN_I2S_BCK 26
16#define PIN_I2S_WS PIN_I2S_BCK+1
17#define PIN_I2S_DATA_IN 28
18#define PIN_I2S_DATA_OUT 28
19#define PIN_I2S_MCK -1
20// 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
21#define PIN_I2S_MUTE -1
22#define SOFT_MUTE_VALUE 0
23#define PIN_CS PIN_SPI0_SS
24#define USE_SERVER_ACCEPT true
25
26// fix missing __sync_synchronize symbol
27//#define FIX_SYNC_SYNCHRONIZE
28#define IRAM_ATTR
29
30#ifndef ANALOG_BUFFER_SIZE
31#define ANALOG_BUFFER_SIZE 256
32#endif
33
34#ifndef ANALOG_BUFFERS
35#define ANALOG_BUFFERS 100
36#endif
37
38#define USE_SD_SUPPORTS_SPI
39
40// Use fixed point operations for RP2040 only
41#if defined(PICO_RP2350)
42# define PREFER_FIXEDPOINT false
43#else
44# define PREFER_FIXEDPOINT true
45#endif
46
47// default pins for VS1053 shield
48#define VS1053_CS 17
49#define VS1053_DCS 9
50#define VS1053_DREQ 10
51#define VS1053_CS_SD -1
52#define VS1053_RESET 11
53#define VS1053_DEFINED
54
55// The Pico W has WIFI support: but platformio is messing up, so we support NO_WIFI
56#if (LWIP_IPV4==1 || LWIP_IPV6==1) &&!defined(NO_WIFI)
57# include <WiFi.h>
58# define USE_WIFI
59# define USE_WIFI_CLIENT_SECURE
60# define USE_URL_ARDUINO
61# define USE_AUDIO_SERVER
62using WiFiServerSecure = BearSSL::WiFiServerSecure;
63#endif
64
65// psram support
66#ifdef RP2350_PSRAM_CS
67#define USE_PSRAM
68#define ps_malloc(size) pmalloc(size)
69#define ps_calloc(num, size) pcalloc(num, size)
70#define ps_realloc(ptr, size) realloc(ptr, size)
71#endif
72
73// FreeRTOS support
74#ifdef __FREERTOS
75#define USE_CONCURRENCY
76#endif
If you want to use the framework w/o Arduino you need to provide the implementation of a couple of cl...