Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Access of GPIO > 31 #18

Open
tcfkat opened this issue Feb 22, 2021 · 0 comments
Open

Access of GPIO > 31 #18

tcfkat opened this issue Feb 22, 2021 · 0 comments

Comments

@tcfkat
Copy link

tcfkat commented Feb 22, 2021

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

schreibfaul1 added a commit that referenced this issue Jul 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant