You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change is a companion change for the usbhs driver of ch32-hal.
It mainly contains the following changes:
- renmae usb_v3hs to usbhs_v3
- remove endpoint DMA register field definition
- fix the stride of `UEPn_T_LEN`, `UEPn_TX_CTRL` and `UEPn_RX_CTRL`
description: "enable USB host mode: 0=device mode, 1=host mode."
220
216
bit_offset: 7
@@ -331,6 +327,7 @@ fieldset/INT_ST:
331
327
description: RO, bit mask of current token PID code received for USB device mode.
332
328
bit_offset: 4
333
329
bit_size: 2
330
+
enum: USB_TOKEN
334
331
- name: TOG_OK
335
332
description: RO, indicate current USB transfer toggle is OK.
336
333
bit_offset: 6
@@ -383,6 +380,7 @@ fieldset/SPEED_TYPE:
383
380
description: in host mode, it indicates the speed type of the currently connected device; in device mode, it indicates the speed type of the current device.
384
381
bit_offset: 0
385
382
bit_size: 2
383
+
enum: SPEED_TYPE
386
384
fieldset/SUSPEND:
387
385
description: indicate USB suspend status.
388
386
bit_size: 8
@@ -428,13 +426,15 @@ fieldset/EP_TYPE:
428
426
description: Endpoint 1 to 15 receive type, 1 means synchronous transmission
429
427
bit_offset: 17
430
428
bit_size: 1
429
+
enum: ENDPOINT_TYPE
431
430
array:
432
431
len: 15
433
432
stride: 1
434
433
- name: T_TYPE
435
434
description: Endpoint 1 to 15 transmit type, 1 means synchronous transmission
436
435
bit_offset: 1
437
436
bit_size: 1
437
+
enum: ENDPOINT_TYPE
438
438
array:
439
439
len: 15
440
440
stride: 1
@@ -468,10 +468,12 @@ fieldset/EP_TX_CTRL:
468
468
description: MASK_UEP_T_TOG
469
469
bit_offset: 3
470
470
bit_size: 2
471
+
enum: EP_TOG
471
472
- name: MASK_UEP_T_RES
472
473
description: MASK_UEP_T_RES
473
474
bit_offset: 0
474
475
bit_size: 2
476
+
enum: EP_TX_RESPONSE
475
477
fieldset/EP_RX_CTRL:
476
478
description: endpoint n receive control.
477
479
bit_size: 8
@@ -484,10 +486,12 @@ fieldset/EP_RX_CTRL:
484
486
description: MASK_UEP_R_TOG
485
487
bit_offset: 3
486
488
bit_size: 2
489
+
enum: EP_TOG
487
490
- name: MASK_UEP_R_RES
488
491
description: MASK_UEP_R_RES
489
492
bit_offset: 0
490
493
bit_size: 2
494
+
enum: EP_RX_RESPONSE
491
495
492
496
# --------
493
497
# UH
@@ -617,14 +621,6 @@ fieldset/UH_SPLIT_DATA:
617
621
bit_size: 12
618
622
619
623
# shared
620
-
fieldset/EP_DMA:
621
-
description: USB endpoint DMA buffer address.
622
-
bit_size: 32
623
-
fields:
624
-
- name: ADDR
625
-
description: USB endpoint DMA buffer address. 4byte aligned.
626
-
bit_offset: 0
627
-
bit_size: 17
628
624
fieldset/EP_LEN:
629
625
description: endpoint n acceptable length.
630
626
bit_size: 16
@@ -633,3 +629,83 @@ fieldset/EP_LEN:
633
629
description: endpoint n acceptable length.
634
630
bit_offset: 0
635
631
bit_size: 11
632
+
633
+
enum/SPEED_TYPE:
634
+
bit_size: 2
635
+
variants:
636
+
- name: FullSpeed
637
+
description: USB Full Speed (12Mbps)
638
+
value: 0
639
+
- name: HighSpeed
640
+
description: USB High Speed (480Mbps)
641
+
value: 1
642
+
- name: LowSpeed
643
+
description: USB Low Speed (1.5Mbps)
644
+
value: 2
645
+
646
+
enum/USB_TOKEN:
647
+
bit_size: 2
648
+
variants:
649
+
- name: OUT
650
+
description: OUT Packet
651
+
value: 0
652
+
- name: SOF
653
+
description: Start of Frame
654
+
value: 1
655
+
- name: IN
656
+
description: IN Packet
657
+
value: 2
658
+
- name: SETUP
659
+
description: SETUP Packet
660
+
value: 3
661
+
662
+
enum/ENDPOINT_TYPE:
663
+
bit_size: 1
664
+
variants:
665
+
- name: NISO
666
+
description: Non Isochronous (Interrupt/Bulk)
667
+
value: 0
668
+
- name: ISO
669
+
description: Isochronous Transfer
670
+
value: 1
671
+
672
+
enum/EP_TOG:
673
+
bit_size: 2
674
+
variants:
675
+
- name: DATA0
676
+
value: 0
677
+
- name: DATA1
678
+
value: 1
679
+
- name: DATA2
680
+
value: 2
681
+
- name: MDATA
682
+
value: 3
683
+
684
+
enum/EP_TX_RESPONSE:
685
+
bit_size: 2
686
+
variants:
687
+
- name: ACK
688
+
description: Respond with DATA0/DATA1 and expect ACK
0 commit comments