Changed from ESP8266 to ESP32. Works much better.
HTTP server is disabled (for now).
This commit is contained in:
@ -48,41 +48,41 @@
|
||||
#define VS1053_SLEEP_DELAY 5000
|
||||
#define MQTT_REPORT_INTERVAL 10000
|
||||
|
||||
#define PIN_SD_CS(x) (_mcp->digitalWrite(GPB3, x))
|
||||
#define PIN_SD_CS_SETUP() (_mcp->pinMode(GPB3, OUTPUT))
|
||||
#define PIN_SD_CS(x) (digitalWrite(16, x))
|
||||
#define PIN_SD_CS_SETUP() (pinMode(16, OUTPUT))
|
||||
|
||||
#define PIN_VS1053_XCS(x) (digitalWrite(D8, x))
|
||||
#define PIN_VS1053_XCS_SETUP() (pinMode(D8, OUTPUT))
|
||||
#define PIN_VS1053_XCS(x) (digitalWrite(4, x))
|
||||
#define PIN_VS1053_XCS_SETUP() (pinMode(4, OUTPUT))
|
||||
|
||||
#define PIN_VS1053_XRESET(x) (_mcp->digitalWrite(GPB7, x))
|
||||
#define PIN_VS1053_XRESET_SETUP() (_mcp->pinMode(GPB7, OUTPUT))
|
||||
#define PIN_VS1053_XRESET(x) (digitalWrite(0, x))
|
||||
#define PIN_VS1053_XRESET_SETUP() (pinMode(0, OUTPUT))
|
||||
|
||||
#define PIN_VS1053_XDCS(x) (digitalWrite(D3, x))
|
||||
#define PIN_VS1053_XDCS_SETUP() (pinMode(D3, OUTPUT))
|
||||
#define PIN_VS1053_XDCS(x) (digitalWrite(2, x))
|
||||
#define PIN_VS1053_XDCS_SETUP() (pinMode(2, OUTPUT))
|
||||
|
||||
#define PIN_VS1053_DREQ() (_mcp->digitalRead(GPB2))
|
||||
#define PIN_VS1053_DREQ_SETUP() (_mcp->pinMode(GPB2, INPUT))
|
||||
#define PIN_VS1053_DREQ() (digitalRead(15))
|
||||
#define PIN_VS1053_DREQ_SETUP() (pinMode(15, INPUT))
|
||||
|
||||
#define PIN_RC522_CS(x) (digitalWrite(D0, x))
|
||||
#define PIN_RC522_CS_SETUP() (pinMode(D0, OUTPUT))
|
||||
#define PIN_RC522_CS(x) (digitalWrite(17, x))
|
||||
#define PIN_RC522_CS_SETUP() (pinMode(17, OUTPUT))
|
||||
|
||||
#define PIN_SPEAKER_L(x) (_mcp->digitalWrite(GPB5, x))
|
||||
#define PIN_SPEAKER_L_SETUP() (_mcp->pinMode(GPB5, OUTPUT))
|
||||
#define PIN_SPEAKER_L(x) (digitalWrite(27, x))
|
||||
#define PIN_SPEAKER_L_SETUP() (pinMode(27, OUTPUT))
|
||||
|
||||
#define PIN_SPEAKER_R(x) (_mcp->digitalWrite(GPB6, x))
|
||||
#define PIN_SPEAKER_R_SETUP() (_mcp->pinMode(GPB6, OUTPUT))
|
||||
#define PIN_SPEAKER_R(x) (digitalWrite(26, x))
|
||||
#define PIN_SPEAKER_R_SETUP() (pinMode(26, OUTPUT))
|
||||
|
||||
#define BTN_PREV() ( ! _mcp->digitalRead(GPA0))
|
||||
#define BTN_PREV_SETUP() {_mcp->pinMode(GPA0, INPUT); _mcp->pullUp(GPA0, HIGH);}
|
||||
#define BTN_PREV() ( ! digitalRead(22))
|
||||
#define BTN_PREV_SETUP() (pinMode(22, INPUT_PULLUP))
|
||||
|
||||
#define BTN_VOL_UP() ( ! _mcp->digitalRead(GPA1))
|
||||
#define BTN_VOL_UP_SETUP() {_mcp->pinMode(GPA1, INPUT); _mcp->pullUp(GPA1, HIGH);}
|
||||
#define BTN_VOL_UP() ( ! digitalRead(21))
|
||||
#define BTN_VOL_UP_SETUP() (pinMode(21, INPUT_PULLUP))
|
||||
|
||||
#define BTN_VOL_DOWN() ( ! _mcp->digitalRead(GPA2))
|
||||
#define BTN_VOL_DOWN_SETUP() {_mcp->pinMode(GPA2, INPUT); _mcp->pullUp(GPA2, HIGH);}
|
||||
#define BTN_VOL_DOWN() ( ! digitalRead(32))
|
||||
#define BTN_VOL_DOWN_SETUP() (pinMode(32, INPUT_PULLUP))
|
||||
|
||||
#define BTN_NEXT() ( ! _mcp->digitalRead(GPA3))
|
||||
#define BTN_NEXT_SETUP() {_mcp->pinMode(GPA3, INPUT); _mcp->pullUp(GPA3, HIGH);}
|
||||
#define BTN_NEXT() ( ! digitalRead(33))
|
||||
#define BTN_NEXT_SETUP() (pinMode(33, INPUT_PULLUP))
|
||||
|
||||
|
||||
#define MCP_I2C_ADDR 7
|
||||
|
Reference in New Issue
Block a user