hub is handled by systemd gpio service (#2172)

old-commit-hash: 855f52c3e0
commatwo_master
Willem Melching 5 years ago committed by GitHub
parent 47b5b1516d
commit 291d150a3c
  1. 4
      selfdrive/boardd/panda.cc
  2. 2
      selfdrive/pandad.py

@ -14,12 +14,8 @@ void panda_set_power(bool power){
int err = 0;
err += gpio_init(GPIO_STM_RST_N, true);
err += gpio_init(GPIO_STM_BOOT0, true);
err += gpio_init(GPIO_HUB_RST_N, true);
err += gpio_set(GPIO_STM_RST_N, false);
// TODO: set hub somewhere else
err += gpio_set(GPIO_HUB_RST_N, true);
err += gpio_set(GPIO_STM_BOOT0, false);
usleep(100*1000); // 100 ms

@ -15,11 +15,9 @@ def set_panda_power(power=True):
gpio_init(GPIO_STM_RST_N, True)
gpio_init(GPIO_STM_BOOT0, True)
gpio_init(GPIO_HUB_RST_N, True)
gpio_set(GPIO_STM_RST_N, False)
gpio_set(GPIO_HUB_RST_N, True)
gpio_set(GPIO_STM_BOOT0, False)
time.sleep(0.1)

Loading…
Cancel
Save