diff --git a/main/espd.c b/main/espd.c index 37d9880..d0a818c 100644 --- a/main/espd.c +++ b/main/espd.c @@ -177,17 +177,17 @@ static void initdacs( void) get_i2s_pins(I2S_NUM_0, (board_i2s_pin_t *)(&i2s_pin_cfg)); #else /* PD_LYRAT */ i2s_pin_config_t i2s_pin_cfg = { -#if 1 /* generic board 1 - edit this as needed */ +#if 0 /* generic board 1 - edit this as needed */ .bck_io_num = 13, /* bit clock */ .ws_io_num = 33, /* Word select, aka left right clock */ .data_out_num = 32, /* Data out from ESP32, to DIN on 38357A */ .data_in_num = 35 /* data from ADC */ #endif -#if 0 /* complex arts sensorboard */ +#if 1 /* complex arts sensorboard */ .bck_io_num = 33, /* bit clock */ .ws_io_num = 25, /* Word select, aka left right clock */ .data_out_num = 32, /* Data out from ESP32, to DIN on 38357A */ - .data_in_num = I2S_PIN_NO_CHANGE /* no ADC */ + .data_in_num = 26 /* ADC */ #endif }; #endif /* PD_LYRAT */ diff --git a/main/espd.h b/main/espd.h index 38b34bb..d09c323 100644 --- a/main/espd.h +++ b/main/espd.h @@ -3,7 +3,7 @@ #define PD_USE_CONSOLE /* messages to Pd over "console" (USB serial) */ /* #define PD_INCLUDEPATCH */ /* load the patch defined in "testpatch.c" */ /* #define PD_LYRAT */ /* using LyraT or LyraT mini board */ - #define USEADC /* enable audio input (output always enabled) */ +#define USEADC /* enable audio input (output always enabled) */ #define IOCHANS 2 #define OBSOLETEAPI 0 @@ -42,3 +42,10 @@ void net_sendudp(void *msg, int len, int port); /* send whatev */ void net_sendtcp(void *msg, int len); extern char wifi_ipaddr[]; #endif + +#ifndef PIN_BIT_CLOCK /* fallback pin locations for I2S audio I/O */ +#define PIN_BIT_CLOCK 13 /* bit clock */ +#define PIN_WORD_SELECT 33 /* word select */ +#define PIN_DATA_OUT 32 /* data out from ESP32 to DAC */ +#define PIN_DATA_IN 35 /* data in from ADC to ESP32 */ +#endif /* PIN_BIT_CLOCK */