1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #13895 from gschorcht/cpu/esp32/fix_i2c_gpio_32_33

cpu/esp32: fix GPIO32 and GPIO 33 as I2C pins
This commit is contained in:
benpicco 2020-05-25 22:37:35 +02:00 committed by GitHub
commit 3a30db4029
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -228,6 +228,7 @@ static void IRAM system_clk_init (void)
rtc_select_slow_clk(RTC_SLOW_FREQ_32K_XTAL);
#else
/* set SLOW_CLK to internal low power clock of 150 kHz */
rtc_clk_32k_enable(false);
rtc_select_slow_clk(RTC_SLOW_FREQ_RTC);
#endif

View File

@ -54,8 +54,8 @@
#define I2C_CLOCK_STRETCH 200
/* gpio access macros */
#define GPIO_SET(l,h,b) if (b < 32) GPIO.l = BIT(b); else GPIO.h.val = BIT(32-b)
#define GPIO_GET(l,h,b) ((b < 32) ? GPIO.l & BIT(b) : GPIO.h.val & BIT(32-b))
#define GPIO_SET(l,h,b) if (b < 32) GPIO.l = BIT(b); else GPIO.h.val = BIT(b-32)
#define GPIO_GET(l,h,b) ((b < 32) ? GPIO.l & BIT(b) : GPIO.h.val & BIT(b-32))
#else /* MCU_ESP32 */