File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ const USB_BUF1_SHIFT = 16;
2424const USB_BUF1_OFFSET = 64 ;
2525
2626// USB Peripheral Register
27+ const ADDR_ENDP = 0x0 ;
2728const MAIN_CTRL = 0x40 ;
2829const SIE_STATUS = 0x50 ;
2930const BUFF_STATUS = 0x58 ;
@@ -104,6 +105,7 @@ class USBEndpointAlarm {
104105}
105106
106107export class RPUSBController extends BasePeripheral {
108+ private addrEndp = 0 ;
107109 private mainCtrl = 0 ;
108110 private intRaw = 0 ;
109111 private intEnable = 0 ;
@@ -162,6 +164,8 @@ export class RPUSBController extends BasePeripheral {
162164
163165 readUint32 ( offset : number ) {
164166 switch ( offset ) {
167+ case ADDR_ENDP :
168+ return this . addrEndp & 0b1111000000001111111 ;
165169 case MAIN_CTRL :
166170 return this . mainCtrl ;
167171 case SIE_STATUS :
@@ -184,6 +188,9 @@ export class RPUSBController extends BasePeripheral {
184188
185189 writeUint32 ( offset : number , value : number ) {
186190 switch ( offset ) {
191+ case ADDR_ENDP :
192+ this . addrEndp = value ;
193+ break ;
187194 case MAIN_CTRL :
188195 this . mainCtrl = value & ( SIM_TIMING | CONTROLLER_EN | HOST_NDEVICE ) ;
189196 if ( value & CONTROLLER_EN && ! ( value & HOST_NDEVICE ) ) {
You can’t perform that action at this time.
0 commit comments