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;
24
24
const USB_BUF1_OFFSET = 64 ;
25
25
26
26
// USB Peripheral Register
27
+ const ADDR_ENDP = 0x0 ;
27
28
const MAIN_CTRL = 0x40 ;
28
29
const SIE_STATUS = 0x50 ;
29
30
const BUFF_STATUS = 0x58 ;
@@ -104,6 +105,7 @@ class USBEndpointAlarm {
104
105
}
105
106
106
107
export class RPUSBController extends BasePeripheral {
108
+ private addrEndp = 0 ;
107
109
private mainCtrl = 0 ;
108
110
private intRaw = 0 ;
109
111
private intEnable = 0 ;
@@ -162,6 +164,8 @@ export class RPUSBController extends BasePeripheral {
162
164
163
165
readUint32 ( offset : number ) {
164
166
switch ( offset ) {
167
+ case ADDR_ENDP :
168
+ return this . addrEndp & 0b1111000000001111111 ;
165
169
case MAIN_CTRL :
166
170
return this . mainCtrl ;
167
171
case SIE_STATUS :
@@ -184,6 +188,9 @@ export class RPUSBController extends BasePeripheral {
184
188
185
189
writeUint32 ( offset : number , value : number ) {
186
190
switch ( offset ) {
191
+ case ADDR_ENDP :
192
+ this . addrEndp = value ;
193
+ break ;
187
194
case MAIN_CTRL :
188
195
this . mainCtrl = value & ( SIM_TIMING | CONTROLLER_EN | HOST_NDEVICE ) ;
189
196
if ( value & CONTROLLER_EN && ! ( value & HOST_NDEVICE ) ) {
You can’t perform that action at this time.
0 commit comments