From c2dfba6e2c8baacae77eb9b900d7c8e2c9d0ea08 Mon Sep 17 00:00:00 2001 From: arhamsc Date: Tue, 16 Jul 2024 17:26:33 +0530 Subject: [PATCH] Amend: Use BIT64() instead of BIT() to accommodate PINS >= 32 --- components/hx711/hx711.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/hx711/hx711.c b/components/hx711/hx711.c index 2f46ad3d..d54203bc 100644 --- a/components/hx711/hx711.c +++ b/components/hx711/hx711.c @@ -92,15 +92,15 @@ esp_err_t hx711_init(hx711_t *dev) CHECK_ARG(dev); gpio_config_t conf = { - .pin_bit_mask = BIT(dev->dout), + .pin_bit_mask = BIT64(dev->dout), .mode = GPIO_MODE_INPUT, .pull_up_en = 0, .pull_down_en = 0, - .intr_type = GPIO_INTR_DISABLE + .intr_type = GPIO_INTR_DISABLE, }; CHECK(gpio_config(&conf)); - conf.pin_bit_mask = BIT(dev->pd_sck); + conf.pin_bit_mask = BIT64(dev->pd_sck); conf.mode = GPIO_MODE_OUTPUT; CHECK(gpio_config(&conf));