diff options
| author | Uri Shaked | 2020-03-22 21:12:03 +0200 |
|---|---|---|
| committer | GitHub | 2020-03-22 21:12:03 +0200 |
| commit | b3dc0329a8a7bfb8350ddc71719d4348dd4ed66c (patch) | |
| tree | e85d52944ce76ac604e276f25859a26d38a0afd0 /src | |
| parent | Merge pull request #25 from LironHazan/AVR8JS-24-editor-user-history (diff) | |
| parent | refactor: added peripherals and cpu feature folders (diff) | |
| download | avr8js-b3dc0329a8a7bfb8350ddc71719d4348dd4ed66c.tar.gz avr8js-b3dc0329a8a7bfb8350ddc71719d4348dd4ed66c.tar.bz2 avr8js-b3dc0329a8a7bfb8350ddc71719d4348dd4ed66c.zip | |
Merge pull request #22 from LironHazan/AVR8JS-21-restructure-project
refactor: add peripherals and cpu feature folders
Diffstat (limited to 'src')
| -rw-r--r-- | src/cpu/cpu.spec.ts (renamed from src/cpu.spec.ts) | 0 | ||||
| -rw-r--r-- | src/cpu/cpu.ts (renamed from src/cpu.ts) | 2 | ||||
| -rw-r--r-- | src/cpu/instruction.spec.ts (renamed from src/instruction.spec.ts) | 0 | ||||
| -rw-r--r-- | src/cpu/instruction.ts (renamed from src/instruction.ts) | 2 | ||||
| -rw-r--r-- | src/cpu/interrupt.spec.ts (renamed from src/interrupt.spec.ts) | 0 | ||||
| -rw-r--r-- | src/cpu/interrupt.ts (renamed from src/interrupt.ts) | 0 | ||||
| -rw-r--r-- | src/index.ts | 14 | ||||
| -rw-r--r-- | src/peripherals/gpio.spec.ts (renamed from src/gpio.spec.ts) | 2 | ||||
| -rw-r--r-- | src/peripherals/gpio.ts (renamed from src/gpio.ts) | 4 | ||||
| -rw-r--r-- | src/peripherals/timer.spec.ts (renamed from src/timer.spec.ts) | 2 | ||||
| -rw-r--r-- | src/peripherals/timer.ts (renamed from src/timer.ts) | 4 | ||||
| -rw-r--r-- | src/peripherals/twi.spec.ts (renamed from src/twi.spec.ts) | 6 | ||||
| -rw-r--r-- | src/peripherals/twi.ts (renamed from src/twi.ts) | 6 | ||||
| -rw-r--r-- | src/peripherals/usart.spec.ts (renamed from src/usart.spec.ts) | 2 | ||||
| -rw-r--r-- | src/peripherals/usart.ts (renamed from src/usart.ts) | 6 |
15 files changed, 25 insertions, 25 deletions
diff --git a/src/cpu.spec.ts b/src/cpu/cpu.spec.ts index 92df7ee..92df7ee 100644 --- a/src/cpu.spec.ts +++ b/src/cpu/cpu.spec.ts diff --git a/src/cpu.ts b/src/cpu/cpu.ts index 4288285..93f79d0 100644 --- a/src/cpu.ts +++ b/src/cpu/cpu.ts @@ -5,7 +5,7 @@ * Copyright (C) 2019, Uri Shaked */ -import { u16, u8 } from './types'; +import { u16, u8 } from '../types'; const registerSpace = 0x100; diff --git a/src/instruction.spec.ts b/src/cpu/instruction.spec.ts index 2c5244e..2c5244e 100644 --- a/src/instruction.spec.ts +++ b/src/cpu/instruction.spec.ts diff --git a/src/instruction.ts b/src/cpu/instruction.ts index 9ee52de..7e14aad 100644 --- a/src/instruction.ts +++ b/src/cpu/instruction.ts @@ -7,7 +7,7 @@ */ import { ICPU } from './cpu'; -import { u16 } from './types'; +import { u16 } from '../types'; function isTwoWordInstruction(opcode: u16) { return ( diff --git a/src/interrupt.spec.ts b/src/cpu/interrupt.spec.ts index cc54e3c..cc54e3c 100644 --- a/src/interrupt.spec.ts +++ b/src/cpu/interrupt.spec.ts diff --git a/src/interrupt.ts b/src/cpu/interrupt.ts index 1c7d835..1c7d835 100644 --- a/src/interrupt.ts +++ b/src/cpu/interrupt.ts diff --git a/src/index.ts b/src/index.ts index ef0b514..58afde3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,10 +4,10 @@ * Copyright (C) 2019, 2020, Uri Shaked */ -export { CPU, ICPU, CPUMemoryHook, CPUMemoryHooks } from './cpu'; -export { avrInstruction } from './instruction'; -export { avrInterrupt } from './interrupt'; -export { AVRTimer, timer0Config, timer1Config, timer2Config } from './timer'; +export { CPU, ICPU, CPUMemoryHook, CPUMemoryHooks } from './cpu/cpu'; +export { avrInstruction } from './cpu/instruction'; +export { avrInterrupt } from './cpu/interrupt'; +export { AVRTimer, timer0Config, timer1Config, timer2Config } from './peripherals/timer'; export { AVRIOPort, GPIOListener, @@ -24,6 +24,6 @@ export { portKConfig, portLConfig, PinState -} from './gpio'; -export { AVRUSART, usart0Config } from './usart'; -export * from './twi'; +} from './peripherals/gpio'; +export { AVRUSART, usart0Config } from './peripherals/usart'; +export * from './peripherals/twi'; diff --git a/src/gpio.spec.ts b/src/peripherals/gpio.spec.ts index 2fa866d..5a282e6 100644 --- a/src/gpio.spec.ts +++ b/src/peripherals/gpio.spec.ts @@ -1,4 +1,4 @@ -import { CPU } from './cpu'; +import { CPU } from '../cpu/cpu'; import { AVRIOPort, portBConfig, PinState } from './gpio'; describe('GPIO', () => { diff --git a/src/gpio.ts b/src/peripherals/gpio.ts index d0df06d..a667967 100644 --- a/src/gpio.ts +++ b/src/peripherals/gpio.ts @@ -5,8 +5,8 @@ * * Copyright (C) 2019, 2020, Uri Shaked */ -import { CPU } from './cpu'; -import { u8 } from './types'; +import { CPU } from '../cpu/cpu'; +import { u8 } from '../types'; export interface AVRPortConfig { // Register addresses diff --git a/src/timer.spec.ts b/src/peripherals/timer.spec.ts index 4d631a7..adcef04 100644 --- a/src/timer.spec.ts +++ b/src/peripherals/timer.spec.ts @@ -1,4 +1,4 @@ -import { CPU } from './cpu'; +import { CPU } from '../cpu/cpu'; import { AVRTimer, timer0Config, timer2Config } from './timer'; describe('timer', () => { diff --git a/src/timer.ts b/src/peripherals/timer.ts index 4a120e7..7e563c2 100644 --- a/src/timer.ts +++ b/src/peripherals/timer.ts @@ -6,8 +6,8 @@ * Copyright (C) 2019, Uri Shaked */ -import { CPU } from './cpu'; -import { avrInterrupt } from './interrupt'; +import { CPU } from '../cpu/cpu'; +import { avrInterrupt } from '../cpu/interrupt'; const timer01Dividers = { 0: 0, diff --git a/src/twi.spec.ts b/src/peripherals/twi.spec.ts index 369f22a..542cf2a 100644 --- a/src/twi.spec.ts +++ b/src/peripherals/twi.spec.ts @@ -1,7 +1,7 @@ -import { CPU } from './cpu'; +import { CPU } from '../cpu/cpu'; import { AVRTWI, twiConfig } from './twi'; -import { assemble } from './utils/assembler'; -import { avrInstruction } from './instruction'; +import { assemble } from '../utils/assembler'; +import { avrInstruction } from '../cpu/instruction'; const FREQ_16MHZ = 16e6; diff --git a/src/twi.ts b/src/peripherals/twi.ts index fd0645b..ec0a206 100644 --- a/src/twi.ts +++ b/src/peripherals/twi.ts @@ -1,6 +1,6 @@ -import { CPU } from './cpu'; -import { avrInterrupt } from './interrupt'; -import { u8 } from './types'; +import { CPU } from '../cpu/cpu'; +import { avrInterrupt } from '../cpu/interrupt'; +import { u8 } from '../types'; export interface TWIEventHandler { start(repeated: boolean): void; diff --git a/src/usart.spec.ts b/src/peripherals/usart.spec.ts index 222017c..d9843dc 100644 --- a/src/usart.spec.ts +++ b/src/peripherals/usart.spec.ts @@ -1,4 +1,4 @@ -import { CPU } from './cpu'; +import { CPU } from '../cpu/cpu'; import { AVRUSART, usart0Config } from './usart'; const FREQ_16MHZ = 16e6; diff --git a/src/usart.ts b/src/peripherals/usart.ts index 6838736..b93c0ea 100644 --- a/src/usart.ts +++ b/src/peripherals/usart.ts @@ -1,6 +1,6 @@ -import { CPU } from './cpu'; -import { avrInterrupt } from './interrupt'; -import { u8 } from './types'; +import { CPU } from '../cpu/cpu'; +import { avrInterrupt } from '../cpu/interrupt'; +import { u8 } from '../types'; export interface USARTConfig { rxCompleteInterrupt: u8; |
