aboutsummaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorUri Shaked2019-12-07 22:18:00 +0200
committerUri Shaked2019-12-07 22:18:00 +0200
commit07ddaa7d22f31de5d5c3b9c6d4626c59cf25a244 (patch)
tree12a64bfbc4ea18997923f14b44725cb0e118c949 /src/cpu
parentfeat: publish both CJS and ESM to npm (diff)
downloadavr8js-07ddaa7d22f31de5d5c3b9c6d4626c59cf25a244.tar.gz
avr8js-07ddaa7d22f31de5d5c3b9c6d4626c59cf25a244.tar.bz2
avr8js-07ddaa7d22f31de5d5c3b9c6d4626c59cf25a244.zip
refactor: tslint → eslint
Diffstat (limited to '')
-rw-r--r--src/cpu.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cpu.ts b/src/cpu.ts
index ccccdd1..4288285 100644
--- a/src/cpu.ts
+++ b/src/cpu.ts
@@ -9,6 +9,7 @@ import { u16, u8 } from './types';
const registerSpace = 0x100;
+// eslint-disable-next-line @typescript-eslint/interface-name-prefix
export interface ICPU {
readonly data: Uint8Array;
readonly dataView: DataView;
@@ -21,9 +22,9 @@ export interface ICPU {
writeData(addr: u16, value: u8): void;
}
-export type ICPUMemoryHook = (value: u8, oldValue: u8, addr: u16) => boolean | void;
-export interface ICPUMemoryHooks {
- [key: number]: ICPUMemoryHook;
+export type CPUMemoryHook = (value: u8, oldValue: u8, addr: u16) => boolean | void;
+export interface CPUMemoryHooks {
+ [key: number]: CPUMemoryHook;
}
export class CPU implements ICPU {
@@ -31,7 +32,7 @@ export class CPU implements ICPU {
readonly data16 = new Uint16Array(this.data.buffer);
readonly dataView = new DataView(this.data.buffer);
readonly progBytes = new Uint8Array(this.progMem.buffer);
- readonly writeHooks: ICPUMemoryHooks = [];
+ readonly writeHooks: CPUMemoryHooks = [];
pc = 0;
cycles = 0;
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.