mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-25 16:02:14 +08:00
hub is handled by systemd gpio service (#2172)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user