Update services.c (#189)

Reset pin config before use. Some pins (like GPIO14, JTAG TMS by default) wont work without this.
This commit is contained in:
Olecorp
2022-10-20 05:48:20 +03:00
committed by GitHub
parent a2c16decee
commit e34cec1ad1

View File

@@ -111,6 +111,7 @@ void services_init(void) {
if (spi_config->mosi_io_num != -1 && spi_config->sclk_io_num != -1) {
spi_bus_initialize( spi_system_host, spi_config, 1 );
if (spi_system_dc_gpio != -1) {
gpio_reset_pin(spi_system_dc_gpio);
gpio_set_direction( spi_system_dc_gpio, GPIO_MODE_OUTPUT );
gpio_set_level( spi_system_dc_gpio, 0 );
} else {