aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--LICENSE2
-rw-r--r--README.md2
-rw-r--r--demo/src/compile.ts3
-rw-r--r--demo/src/cpu-performance.ts3
-rw-r--r--demo/src/execute.ts3
-rw-r--r--demo/src/format-time.ts3
-rw-r--r--demo/src/index.ts3
-rw-r--r--demo/src/intelhex.ts3
-rw-r--r--demo/src/task-scheduler.ts3
-rw-r--r--src/cpu/cpu.ts3
-rw-r--r--src/cpu/instruction.spec.ts5
-rw-r--r--src/cpu/instruction.ts3
-rw-r--r--src/cpu/interrupt.spec.ts3
-rw-r--r--src/cpu/interrupt.ts3
-rw-r--r--src/index.ts7
-rw-r--r--src/peripherals/adc.ts3
-rw-r--r--src/peripherals/clock.spec.ts3
-rw-r--r--src/peripherals/clock.ts3
-rw-r--r--src/peripherals/eeprom.spec.ts3
-rw-r--r--src/peripherals/eeprom.ts3
-rw-r--r--src/peripherals/gpio.spec.ts3
-rw-r--r--src/peripherals/gpio.ts4
-rw-r--r--src/peripherals/spi.spec.ts3
-rw-r--r--src/peripherals/spi.ts3
-rw-r--r--src/peripherals/timer.spec.ts3
-rw-r--r--src/peripherals/timer.ts3
-rw-r--r--src/peripherals/twi.spec.ts3
-rw-r--r--src/peripherals/twi.ts3
-rw-r--r--src/peripherals/usart.spec.ts3
-rw-r--r--src/peripherals/usart.ts3
-rw-r--r--src/peripherals/usi.ts3
-rw-r--r--src/peripherals/watchdog.spec.ts3
-rw-r--r--src/peripherals/watchdog.ts3
-rw-r--r--src/types.ts3
-rw-r--r--src/utils/assembler.spec.ts3
-rw-r--r--src/utils/test-utils.ts3
36 files changed, 105 insertions, 8 deletions
diff --git a/LICENSE b/LICENSE
index 85b5d70..267bdc6 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2019-2023 Uri Shaked
+Copyright (c) 2019-2025 Uri Shaked
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index 3b8343b..38c7d3d 100644
--- a/README.md
+++ b/README.md
@@ -91,4 +91,4 @@ For more information, please check the [Contributing Guide](CONTRIBUTING.md).
## License
-Copyright (C) 2019-2023 Uri Shaked. The code is released under the terms of the MIT license.
+Copyright (C) 2019-2025 Uri Shaked. The code is released under the terms of the MIT license.
diff --git a/demo/src/compile.ts b/demo/src/compile.ts
index fa846b1..fda2416 100644
--- a/demo/src/compile.ts
+++ b/demo/src/compile.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
const url = 'https://hexi.wokwi.com';
export interface HexiResult {
diff --git a/demo/src/cpu-performance.ts b/demo/src/cpu-performance.ts
index 1b1261e..88f9326 100644
--- a/demo/src/cpu-performance.ts
+++ b/demo/src/cpu-performance.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { CPU } from 'avr8js';
export class CPUPerformance {
diff --git a/demo/src/execute.ts b/demo/src/execute.ts
index 5d5c6b4..805ce9a 100644
--- a/demo/src/execute.ts
+++ b/demo/src/execute.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import {
avrInstruction,
AVRTimer,
diff --git a/demo/src/format-time.ts b/demo/src/format-time.ts
index a82b3b0..2afdcbf 100644
--- a/demo/src/format-time.ts
+++ b/demo/src/format-time.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
function zeroPad(value: number, length: number) {
let sval = value.toString();
while (sval.length < length) {
diff --git a/demo/src/index.ts b/demo/src/index.ts
index a76d1fe..2d35403 100644
--- a/demo/src/index.ts
+++ b/demo/src/index.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import '@wokwi/elements';
import { LEDElement } from '@wokwi/elements';
import { PinState } from 'avr8js';
diff --git a/demo/src/intelhex.ts b/demo/src/intelhex.ts
index ba5d6c8..446a5c1 100644
--- a/demo/src/intelhex.ts
+++ b/demo/src/intelhex.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
/**
* Minimal Intel HEX loader
* Part of AVR8js
diff --git a/demo/src/task-scheduler.ts b/demo/src/task-scheduler.ts
index 46413ef..d7e3c23 100644
--- a/demo/src/task-scheduler.ts
+++ b/demo/src/task-scheduler.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
export type IMicroTaskCallback = () => void;
export class MicroTaskScheduler {
diff --git a/src/cpu/cpu.ts b/src/cpu/cpu.ts
index cd9e3e4..62ff40a 100644
--- a/src/cpu/cpu.ts
+++ b/src/cpu/cpu.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
/**
* AVR 8 CPU data structures
* Part of AVR8js
diff --git a/src/cpu/instruction.spec.ts b/src/cpu/instruction.spec.ts
index cf3e547..aa01876 100644
--- a/src/cpu/instruction.spec.ts
+++ b/src/cpu/instruction.spec.ts
@@ -1,7 +1,10 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { CPU } from './cpu';
import { avrInstruction } from './instruction';
import { assemble } from '../utils/assembler';
-import { describe, it, expect, vi } from 'vitest';
+import { describe, it, expect, vi, beforeEach } from 'vitest';
const r0 = 0;
const r1 = 1;
diff --git a/src/cpu/instruction.ts b/src/cpu/instruction.ts
index d29bfb8..d815733 100644
--- a/src/cpu/instruction.ts
+++ b/src/cpu/instruction.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
/**
* AVR-8 Instruction Simulation
* Part of AVR8js
diff --git a/src/cpu/interrupt.spec.ts b/src/cpu/interrupt.spec.ts
index 944dbb9..fbf2ebe 100644
--- a/src/cpu/interrupt.spec.ts
+++ b/src/cpu/interrupt.spec.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { describe, expect, it } from 'vitest';
import { CPU } from './cpu';
import { avrInterrupt } from './interrupt';
diff --git a/src/cpu/interrupt.ts b/src/cpu/interrupt.ts
index 2e4ceb9..73b56ee 100644
--- a/src/cpu/interrupt.ts
+++ b/src/cpu/interrupt.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
/**
* AVR-8 Interrupt Handling
* Part of AVR8js
diff --git a/src/index.ts b/src/index.ts
index e529bb6..51ca120 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,8 +1,5 @@
-/**
- * AVR8js
- *
- * Copyright (C) 2019, 2020, Uri Shaked
- */
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
export { CPU } from './cpu/cpu';
export type { CPUMemoryHook, CPUMemoryHooks } from './cpu/cpu';
diff --git a/src/peripherals/adc.ts b/src/peripherals/adc.ts
index 16ccdba..a601b09 100644
--- a/src/peripherals/adc.ts
+++ b/src/peripherals/adc.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
/**
* AVR-8 ADC
* Part of AVR8js
diff --git a/src/peripherals/clock.spec.ts b/src/peripherals/clock.spec.ts
index cb45a14..091dfe5 100644
--- a/src/peripherals/clock.spec.ts
+++ b/src/peripherals/clock.spec.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { describe, expect, it } from 'vitest';
import { CPU } from '../cpu/cpu';
import { AVRClock, clockConfig } from './clock';
diff --git a/src/peripherals/clock.ts b/src/peripherals/clock.ts
index bf49ac9..05afda1 100644
--- a/src/peripherals/clock.ts
+++ b/src/peripherals/clock.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
/**
* AVR8 Clock
* Part of AVR8js
diff --git a/src/peripherals/eeprom.spec.ts b/src/peripherals/eeprom.spec.ts
index a9cab9b..2b97a39 100644
--- a/src/peripherals/eeprom.spec.ts
+++ b/src/peripherals/eeprom.spec.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { describe, expect, it } from 'vitest';
import { CPU } from '../cpu/cpu';
import { asmProgram, TestProgramRunner } from '../utils/test-utils';
diff --git a/src/peripherals/eeprom.ts b/src/peripherals/eeprom.ts
index 98c2cc6..186bdcc 100644
--- a/src/peripherals/eeprom.ts
+++ b/src/peripherals/eeprom.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { AVRInterruptConfig, CPU } from '../cpu/cpu';
import { u16, u32, u8 } from '../types';
diff --git a/src/peripherals/gpio.spec.ts b/src/peripherals/gpio.spec.ts
index 046f196..40d4660 100644
--- a/src/peripherals/gpio.spec.ts
+++ b/src/peripherals/gpio.spec.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { CPU } from '../cpu/cpu';
import { asmProgram, TestProgramRunner } from '../utils/test-utils';
import { AVRIOPort, portBConfig, PinState, portDConfig, PinOverrideMode } from './gpio';
diff --git a/src/peripherals/gpio.ts b/src/peripherals/gpio.ts
index 92435b9..69db9b1 100644
--- a/src/peripherals/gpio.ts
+++ b/src/peripherals/gpio.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
/**
* AVR-8 GPIO Port implementation
* Part of AVR8js
@@ -5,6 +8,7 @@
*
* Copyright (C) 2019-2023 Uri Shaked
*/
+
import { AVRInterruptConfig, CPU } from '../cpu/cpu';
import { u8 } from '../types';
diff --git a/src/peripherals/spi.spec.ts b/src/peripherals/spi.spec.ts
index 72884c5..582770a 100644
--- a/src/peripherals/spi.spec.ts
+++ b/src/peripherals/spi.spec.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { describe, expect, it, vi } from 'vitest';
import { CPU } from '../cpu/cpu';
import { asmProgram, TestProgramRunner } from '../utils/test-utils';
diff --git a/src/peripherals/spi.ts b/src/peripherals/spi.ts
index 824b13a..b6d414e 100644
--- a/src/peripherals/spi.ts
+++ b/src/peripherals/spi.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { AVRInterruptConfig, CPU } from '../cpu/cpu';
import { u8 } from '../types';
diff --git a/src/peripherals/timer.spec.ts b/src/peripherals/timer.spec.ts
index cb874c6..6af8215 100644
--- a/src/peripherals/timer.spec.ts
+++ b/src/peripherals/timer.spec.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { describe, expect, it, vi } from 'vitest';
import { CPU } from '../cpu/cpu';
import { asmProgram, TestProgramRunner } from '../utils/test-utils';
diff --git a/src/peripherals/timer.ts b/src/peripherals/timer.ts
index dfbba35..0c18071 100644
--- a/src/peripherals/timer.ts
+++ b/src/peripherals/timer.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
/**
* AVR-8 Timers
* Part of AVR8js
diff --git a/src/peripherals/twi.spec.ts b/src/peripherals/twi.spec.ts
index 5ddace5..49d06e5 100644
--- a/src/peripherals/twi.spec.ts
+++ b/src/peripherals/twi.spec.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { describe, expect, it, vi } from 'vitest';
import { CPU } from '../cpu/cpu';
import { asmProgram, TestProgramRunner } from '../utils/test-utils';
diff --git a/src/peripherals/twi.ts b/src/peripherals/twi.ts
index 3d0275c..654da33 100644
--- a/src/peripherals/twi.ts
+++ b/src/peripherals/twi.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { AVRInterruptConfig, CPU } from '../cpu/cpu';
import { u8 } from '../types';
diff --git a/src/peripherals/usart.spec.ts b/src/peripherals/usart.spec.ts
index fcbeec1..eb5cbe1 100644
--- a/src/peripherals/usart.spec.ts
+++ b/src/peripherals/usart.spec.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { describe, expect, it, vi } from 'vitest';
import { CPU } from '../cpu/cpu';
import { AVRUSART, usart0Config } from './usart';
diff --git a/src/peripherals/usart.ts b/src/peripherals/usart.ts
index 9babe16..c64ec6f 100644
--- a/src/peripherals/usart.ts
+++ b/src/peripherals/usart.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
/**
* AVR-8 USART Peripheral
* Part of AVR8js
diff --git a/src/peripherals/usi.ts b/src/peripherals/usi.ts
index c9e09e7..928e24a 100644
--- a/src/peripherals/usi.ts
+++ b/src/peripherals/usi.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { AVRInterruptConfig, CPU } from '../cpu/cpu';
import { AVRIOPort } from './gpio';
diff --git a/src/peripherals/watchdog.spec.ts b/src/peripherals/watchdog.spec.ts
index df72148..2cc748d 100644
--- a/src/peripherals/watchdog.spec.ts
+++ b/src/peripherals/watchdog.spec.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
/**
* AVR8 Watchdog Timer Test Suite
* Part of AVR8js
diff --git a/src/peripherals/watchdog.ts b/src/peripherals/watchdog.ts
index 979151f..c4803ed 100644
--- a/src/peripherals/watchdog.ts
+++ b/src/peripherals/watchdog.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
/**
* AVR8 Watchdog Timer
* Part of AVR8js
diff --git a/src/types.ts b/src/types.ts
index 850cd6b..1139251 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
export type u8 = number;
export type u16 = number;
export type i16 = number;
diff --git a/src/utils/assembler.spec.ts b/src/utils/assembler.spec.ts
index 9f66009..26aa7c5 100644
--- a/src/utils/assembler.spec.ts
+++ b/src/utils/assembler.spec.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { describe, expect, it } from 'vitest';
import { assemble } from './assembler';
diff --git a/src/utils/test-utils.ts b/src/utils/test-utils.ts
index 90558d5..8083790 100644
--- a/src/utils/test-utils.ts
+++ b/src/utils/test-utils.ts
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) Uri Shaked and contributors
+
import { CPU } from '../cpu/cpu';
import { assemble } from './assembler';
import { avrInstruction } from '../cpu/instruction';
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.