PIN konflikt Buttons und I2S gefixt
This commit is contained in:
parent
3ea3d26ee4
commit
2545bd45a2
2
init.sh
2
init.sh
|
|
@ -1,6 +1,6 @@
|
|||
git init
|
||||
git checkout -b main
|
||||
git add *
|
||||
git commit -m "first commit"
|
||||
git commit -m "PIN konflikt Buttons und I2S gefixt"
|
||||
git remote add origin https://git.hacker-net.de/Hacker-Software/lego-esp32s3-gameboy.git
|
||||
git push -u origin main
|
||||
|
|
|
|||
|
|
@ -72,9 +72,9 @@ extern "C" {
|
|||
#define I2S_SAMPLE_RATE 32000 // Hz (GameBoy: 32kHz)
|
||||
#define I2S_BITS_PER_SAMPLE 16
|
||||
|
||||
#define I2S_PIN_BCLK 41 // Bit Clock
|
||||
#define I2S_PIN_LRC 42 // Left/Right Clock (WS)
|
||||
#define I2S_PIN_DIN 40 // Data In (to MAX98357A)
|
||||
#define I2S_PIN_BCLK 35 // Bit Clock (moved from 41 - conflict fixed!)
|
||||
#define I2S_PIN_LRC 36 // Left/Right Clock (WS) (moved from 42 - conflict fixed!)
|
||||
#define I2S_PIN_DIN 37 // Data In (to MAX98357A) (moved from 40)
|
||||
// No MCLK needed for MAX98357A!
|
||||
|
||||
#define I2S_DMA_BUF_COUNT 8
|
||||
|
|
@ -179,11 +179,13 @@ GPIO | Function | Direction | Notes
|
|||
17 | LINK_SCLK | I/O | Link Cable
|
||||
18 | LINK_SOUT | Output | Link Cable
|
||||
21 | BTN_A | Input | Pull-up
|
||||
35 | I2S_BCLK | Output | Audio Bit Clock
|
||||
36 | I2S_LRC | Output | Audio Word Select
|
||||
37 | I2S_DIN | Output | Audio Data
|
||||
38 | LINK_SIN | Input | Link Cable
|
||||
39 | LED_STATUS | Output | Status indicator
|
||||
40 | I2S_DIN | Output | Audio
|
||||
41 | BTN_RIGHT/I2S_BCLK| I/O | Shared!
|
||||
42 | BTN_LEFT/I2S_LRC | I/O | Shared!
|
||||
41 | BTN_RIGHT | Input | Pull-up (conflict fixed!)
|
||||
42 | BTN_LEFT | Input | Pull-up (conflict fixed!)
|
||||
43 | UART_TX | Output | Debug
|
||||
44 | UART_RX | Input | Debug
|
||||
45 | BTN_SELECT | Input | Pull-up
|
||||
|
|
@ -192,10 +194,10 @@ GPIO | Function | Direction | Notes
|
|||
48 | BTN_START | Input | Pull-up
|
||||
|
||||
NOTES:
|
||||
- GPIO 41/42 are SHARED between buttons and I2S!
|
||||
→ Configure carefully or use different pins
|
||||
- PIN CONFLICTS FIXED! I2S moved to GPIO 35/36/37
|
||||
- Buttons GPIO 41/42 are now free from conflicts!
|
||||
- SPI bus is shared: Display + SD Card
|
||||
→ Use separate CS pins!
|
||||
→ Use separate CS pins!
|
||||
- I2C0: Touch controller
|
||||
- I2C1: NFC reader (separate bus!)
|
||||
- All buttons have internal pull-ups enabled
|
||||
|
|
@ -207,13 +209,6 @@ NOTES:
|
|||
#define VALIDATE_PIN(pin) ((pin) >= 0 && (pin) <= 48)
|
||||
|
||||
// Check for pin conflicts at compile time
|
||||
#if (BTN_RIGHT == I2S_PIN_BCLK)
|
||||
#warning "BTN_RIGHT and I2S_BCLK share GPIO 41!"
|
||||
#endif
|
||||
|
||||
#if (BTN_LEFT == I2S_PIN_LRC)
|
||||
#warning "BTN_LEFT and I2S_LRC share GPIO 42!"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue