mirror of
https://github.com/dekuNukem/USB4VC.git
synced 2025-10-31 11:26:46 -07:00
implemented protocol turning on and off
This commit is contained in:
@@ -27,16 +27,16 @@ GPIO.output(PBOARD_DFU_PIN, GPIO.LOW)
|
||||
|
||||
usb4vc_oled.print_welcome_screen(RPI_APP_VERSION_TUPLE)
|
||||
|
||||
reset_pboard()
|
||||
# usb4vc_usb_scan.set_protocol()
|
||||
# reset_pboard()
|
||||
usb4vc_usb_scan.set_protocol()
|
||||
usb4vc_usb_scan.get_pboard_info()
|
||||
|
||||
# time.sleep(5)
|
||||
# usb4vc_oled.oled_clear()
|
||||
|
||||
# usb4vc_oled.oled_queue_worker.start()
|
||||
# usb4vc_usb_scan.usb_device_scan_thread.start()
|
||||
# usb4vc_usb_scan.raw_input_event_parser_thread.start()
|
||||
usb4vc_usb_scan.usb_device_scan_thread.start()
|
||||
usb4vc_usb_scan.raw_input_event_parser_thread.start()
|
||||
|
||||
# while 1:
|
||||
# time.sleep(10)
|
||||
while 1:
|
||||
time.sleep(10)
|
||||
@@ -293,11 +293,12 @@ def get_pboard_info():
|
||||
time.sleep(0.01)
|
||||
# send an empty message to allow response to be shifted into RPi
|
||||
response = pcard_spi.xfer(list(nop_spi_msg_template))
|
||||
time.sleep(0.01)
|
||||
response = pcard_spi.xfer(list(nop_spi_msg_template))
|
||||
print(response)
|
||||
|
||||
def set_protocol():
|
||||
this_msg = list(set_protocl_spi_msg_template)
|
||||
this_msg[3] = 2
|
||||
this_msg[4] = 4
|
||||
this_msg[5] = 1
|
||||
this_msg[3] = 1 | 0x80
|
||||
this_msg[4] = 4 #| 0x80
|
||||
pcard_spi.xfer(this_msg)
|
||||
|
||||
Reference in New Issue
Block a user