mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
Allow GPIO 9 and 10 for waveform generation (#5055)
* Allow GPIO 9 and 10 for waveform generation While most ESP8266 modules use quad-io mode for their SPI flash ROM, there are some which only use dual-io mode. Allow the unused pins (GPIO 9 and 10) to have waveforms generated on them. Should the user try this on a quad-io mode board, expect very bad things to happen. * Add variant for 8285 to init GPIO 9/10 The 8285 only has 2-bit flash IO, so the other two pins can be used as inputs (9/10). Set them to input to mirror the way other pins are set up. * Update waveform gen to only allow 9/10 on 8285 Update the common.h in both generic (remove TODO, it's done!) and the 8285 variant to make isFlashInterfacePin macro correct. Use that macro to disable pins 9 and 10 in the common, non-8285 case.
This commit is contained in:
committed by
Develo
parent
cd43337f4f
commit
bc2d4ec18b
10
variants/esp8285/initD9D10Pins.cpp
Normal file
10
variants/esp8285/initD9D10Pins.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include "Arduino.h"
|
||||
|
||||
// The 8285 allows the use of GPIO pins 9 and 10, so set them to inputs
|
||||
// on startup just like the other pins. This allows their use for interrupts
|
||||
// as well
|
||||
void initVariant() {
|
||||
pinMode(9, INPUT);
|
||||
pinMode(10, INPUT);
|
||||
}
|
||||
|
Reference in New Issue
Block a user