浏览代码

Update services.c (#189)

Reset pin config before use. Some pins (like GPIO14, JTAG TMS by default) wont work without this.
Olecorp 2 年之前
父节点
当前提交
e34cec1ad1
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      components/services/services.c

+ 1 - 0
components/services/services.c

@@ -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 {