With this library You can easily build a WebRadio with a ESP32 board and a mp3-module. See: https://www.youtube.com/watch?v=u4u9NvZvWRk
GNU General Public License v3.0
106
stars
29
forks
source link
Access of GPIO > 31 #18
Open
tcfkat opened 3 years ago
You said that accessing GPIO > 31 for (D)CS is not possible ... yes, it is. I changed the lines in vs1053_ext.h:
`protected: // Expandend beyond GPIO32. tcfkat 20210222
inline void DCS_HIGH() {(dcs_pin&0x20)?(GPIO.out1_w1ts.data=1<<(dcs_pin-32)):(GPIO.out_w1ts=1<<dcs_pin);}
inline void DCS_LOW() {(dcs_pin&0x20)?(GPIO.out1_w1tc.data=1<<(dcs_pin-32)):(GPIO.out_w1tc=1<<dcs_pin);}
inline void CS_HIGH() {(cs_pin&0x20)?(GPIO.out1_w1ts.data=1<<(cs_pin-32)):(GPIO.out_w1ts=1<<cs_pin);}
inline void CS_LOW() {(cs_pin&0x20)?(GPIO.out1_w1tc.data=1<<(cs_pin-32)):(GPIO.out_w1tc=1<<cs_pin);}`
And in vs1053_ext.cpp:
`void VS1053::begin(){
pinMode(dreq_pin, INPUT); // DREQ is an input
pinMode(cs_pin, OUTPUT); // The SCI and SDI signals
pinMode(dcs_pin, OUTPUT);
DCS_HIGH(); //Does not work for me: digitalWrite(dcs_pin, HIGH); tcfkat 20210221
CS_HIGH(); //Does not work for me: digitalWrite(cs_pin, HIGH); tcfkat 20210221`
Best regards