Skip to content

Commit 73f9180

Browse files
committed
feature structure 🔨
1 parent 3b7a122 commit 73f9180

17 files changed

+28
-27
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
node_modules
33
dist
44
*.log
5+
.idea

benchmark/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { CPU, ICPU } from '../src/cpu';
2-
import { avrInstruction } from '../src/instruction';
1+
import { CPU, ICPU } from '../src/cpu/cpu';
2+
import { avrInstruction } from '../src/cpu/instruction';
33
import { createBenchmark } from './benchmark';
44
import { permutations } from './permutations';
55
import { instructions, executeInstruction } from './instruction-fn';
File renamed without changes.

src/cpu.ts renamed to src/cpu/cpu.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Copyright (C) 2019, Uri Shaked
66
*/
77

8-
import { u16, u8 } from './types';
8+
import { u16, u8 } from '../types';
99

1010
const registerSpace = 0x100;
1111

File renamed without changes.

src/instruction.ts renamed to src/cpu/instruction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import { ICPU } from './cpu';
10-
import { u16 } from './types';
10+
import { u16 } from '../types';
1111

1212
function isTwoWordInstruction(opcode: u16) {
1313
return (
File renamed without changes.
File renamed without changes.

src/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
* Copyright (C) 2019, 2020, Uri Shaked
55
*/
66

7-
export { CPU, ICPU, CPUMemoryHook, CPUMemoryHooks } from './cpu';
8-
export { avrInstruction } from './instruction';
9-
export { avrInterrupt } from './interrupt';
10-
export { AVRTimer, timer0Config, timer1Config, timer2Config } from './timer';
7+
export { CPU, ICPU, CPUMemoryHook, CPUMemoryHooks } from './cpu/cpu';
8+
export { avrInstruction } from './cpu/instruction';
9+
export { avrInterrupt } from './cpu/interrupt';
10+
export { AVRTimer, timer0Config, timer1Config, timer2Config } from './peripherals/timer';
1111
export {
1212
AVRIOPort,
1313
GPIOListener,
@@ -24,6 +24,6 @@ export {
2424
portKConfig,
2525
portLConfig,
2626
PinState
27-
} from './gpio';
28-
export { AVRUSART, usart0Config } from './usart';
29-
export * from './twi';
27+
} from './peripherals/gpio';
28+
export { AVRUSART, usart0Config } from './peripherals/usart';
29+
export * from './peripherals/twi';

src/gpio.spec.ts renamed to src/peripherals/gpio.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CPU } from './cpu';
1+
import { CPU } from '../cpu/cpu';
22
import { AVRIOPort, portBConfig, PinState } from './gpio';
33

44
describe('GPIO', () => {

0 commit comments

Comments
 (0)