Skip to content

Commit

Permalink
fix: reset gpio before use in hx711
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleRus committed Mar 8, 2024
1 parent 853f704 commit 7b8bb43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/hx711/hx711.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ esp_err_t hx711_init(hx711_t *dev)
{
CHECK_ARG(dev);

CHECK(gpio_reset_pin(dev->dout));
CHECK(gpio_reset_pin(dev->pd_sck));
CHECK(gpio_set_direction(dev->dout, GPIO_MODE_INPUT));
CHECK(gpio_set_direction(dev->pd_sck, GPIO_MODE_OUTPUT));

Expand Down

0 comments on commit 7b8bb43

Please sign in to comment.