-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nvic): partial interrupt implementation
code still doesn't compile, since we're missing a few bits. But we'll do them next week! Also, pay attention to this excerpt of BXWritePC(): if CurrentMode == Mode_Handler && address<31:28> == ‘1111’ then ExceptionReturn(address<27:0>);
- Loading branch information
Showing
3 changed files
with
228 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { LoggingPeripheral, Peripheral } from './peripheral'; | ||
|
||
const PROC0_NMI_MASK = 0; | ||
const PROC1_NMI_MASK = 4; | ||
|
||
export class RP2040SysCfg extends LoggingPeripheral implements Peripheral { | ||
readUint32(offset: number) { | ||
switch (offset) { | ||
case PROC0_NMI_MASK: | ||
return this.rp2040.interruptNMIMask; | ||
} | ||
return super.readUint32(offset); | ||
} | ||
|
||
writeUint32(offset: number, value: number) { | ||
switch (offset) { | ||
case PROC0_NMI_MASK: | ||
this.rp2040.interruptNMIMask = value; | ||
break; | ||
|
||
default: | ||
super.writeUint32(offset, value); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters