@@ -141,7 +141,9 @@ struct PinsSPI {
141
141
142
142
/* *
143
143
* @brief Default SPI pins for ESP32 Lyrat, AudioDriver etc
144
+ * CLK, MISO, MOSI, CS
144
145
*/
146
+
145
147
static PinsSPI ESP32PinsSD{PinFunction::SD, 14 , 2 , 15 , 13 , SPI};
146
148
147
149
/* *
@@ -168,7 +170,7 @@ struct PinsI2C {
168
170
GpioPin scl = -1 ;
169
171
GpioPin sda = -1 ;
170
172
bool set_active = true ;
171
- TwoWire *p_wire;
173
+ TwoWire *p_wire = &Wire ;
172
174
bool pinsAvailable () { return scl != -1 && sda != -1 && frequency != 0 ; }
173
175
operator bool () { return pinsAvailable (); }
174
176
@@ -549,26 +551,21 @@ class PinsLyrat42Class : public DriverPins {
549
551
class PinsLyratMiniClass : public DriverPins {
550
552
public:
551
553
PinsLyratMiniClass () {
552
- // sd pins
554
+ // sd pins: CLK, MISO, MOSI, CS
555
+ // addSPI(PinFunction::SD, 14, 2, 15, 13, SPI);
556
+ // addSPI(PinFunction::SD, 18, 19, 23, 5, SPI);
553
557
addSPI (ESP32PinsSD);
554
558
// add i2c codec pins: scl, sda, port, frequency
555
559
addI2C (PinFunction::CODEC, 23 , 18 );
556
560
// add i2s pins: mclk, bck, ws,data_out, data_in ,(port)
557
561
addI2S (PinFunction::CODEC, 0 , 5 , 25 , 26 , 35 , 0 );
558
562
addI2S (PinFunction::CODEC_ADC, 0 , 32 , 33 , -1 , 36 , 1 );
559
563
560
- // add other pins
561
- addPin (PinFunction::KEY, 5 , PinLogic::InputActiveLow, 1 );
562
- addPin (PinFunction::KEY, 4 , PinLogic::InputActiveLow, 2 );
563
- addPin (PinFunction::KEY, 2 , PinLogic::InputActiveLow, 3 );
564
- addPin (PinFunction::KEY, 3 , PinLogic::InputActiveLow, 4 );
565
- addPin (PinFunction::KEY, 1 , PinLogic::InputActiveLow, 5 );
566
- // addPin(PinFunction::KEY, 0, 6};
567
564
addPin (PinFunction::HEADPHONE_DETECT, 19 , PinLogic::InputActiveLow);
568
565
addPin (PinFunction::PA, 21 , PinLogic::Output);
569
566
addPin (PinFunction::LED, 22 , PinLogic::Output, 1 );
570
567
addPin (PinFunction::LED, 27 , PinLogic::Output, 2 );
571
- addPin (PinFunction::MCLK_SOURCE, 0 , PinLogic::Output );
568
+ addPin (PinFunction::MCLK_SOURCE, 0 , PinLogic::Inactive );
572
569
}
573
570
};
574
571
0 commit comments