tweak usb reset wait time, fix test script with IAR server

This commit is contained in:
hathach 2023-12-13 19:18:08 +07:00
parent b343ac6d0f
commit 31c33ca853
No known key found for this signature in database
GPG Key ID: F5D50C6D51D17CBA
3 changed files with 10 additions and 7 deletions

View File

@ -96,9 +96,9 @@ jobs:
run: |
for port in $(lspci | grep USB | cut -d' ' -f1); do
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
sleep 1;
sleep 0.5;
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
sleep 1;
sleep 3;
done
- name: Test on actual hardware

View File

@ -148,9 +148,9 @@ jobs:
run: |
for port in $(lspci | grep USB | cut -d' ' -f1); do
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
sleep 1;
sleep 0.5;
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
sleep 1;
sleep 3;
done
- name: Test on actual hardware

View File

@ -34,8 +34,11 @@ import subprocess
import json
import glob
# for RPI double reset: install sudo apt install python3-gpiozero or sudo pip install gpiozero
from gpiozero import LED
# for RPI double reset
try:
import gpiozero
except ImportError:
pass
ENUM_TIMEOUT = 10
@ -141,7 +144,7 @@ def flash_esptool(board, firmware):
def doublereset_with_rpi_gpio(board):
# Off = 0 = Reset
led = LED(board["flasher_reset_pin"])
led = gpiozero.LED(board["flasher_reset_pin"])
led.off()
time.sleep(0.1)