Skip to content

Commit

Permalink
docs: add copyright notice to source code
Browse files Browse the repository at this point in the history
  • Loading branch information
urish committed Feb 11, 2025
1 parent 00a691f commit 1378808
Show file tree
Hide file tree
Showing 36 changed files with 105 additions and 8 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
3 changes: 3 additions & 0 deletions demo/src/compile.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

const url = 'https://hexi.wokwi.com';

export interface HexiResult {
Expand Down
3 changes: 3 additions & 0 deletions demo/src/cpu-performance.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

import { CPU } from 'avr8js';

export class CPUPerformance {
Expand Down
3 changes: 3 additions & 0 deletions demo/src/execute.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

import {
avrInstruction,
AVRTimer,
Expand Down
3 changes: 3 additions & 0 deletions demo/src/format-time.ts
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions demo/src/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 3 additions & 0 deletions demo/src/intelhex.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

/**
* Minimal Intel HEX loader
* Part of AVR8js
Expand Down
3 changes: 3 additions & 0 deletions demo/src/task-scheduler.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

export type IMicroTaskCallback = () => void;

export class MicroTaskScheduler {
Expand Down
3 changes: 3 additions & 0 deletions src/cpu/cpu.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

/**
* AVR 8 CPU data structures
* Part of AVR8js
Expand Down
5 changes: 4 additions & 1 deletion src/cpu/instruction.spec.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/cpu/instruction.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

/**
* AVR-8 Instruction Simulation
* Part of AVR8js
Expand Down
3 changes: 3 additions & 0 deletions src/cpu/interrupt.spec.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 3 additions & 0 deletions src/cpu/interrupt.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

/**
* AVR-8 Interrupt Handling
* Part of AVR8js
Expand Down
7 changes: 2 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/adc.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

/**
* AVR-8 ADC
* Part of AVR8js
Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/clock.spec.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/clock.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

/**
* AVR8 Clock
* Part of AVR8js
Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/eeprom.spec.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/eeprom.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/gpio.spec.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 4 additions & 0 deletions src/peripherals/gpio.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

/**
* AVR-8 GPIO Port implementation
* Part of AVR8js
* Reference: http://ww1.microchip.com/downloads/en/DeviceDoc/ATmega48A-PA-88A-PA-168A-PA-328-P-DS-DS40002061A.pdf
*
* Copyright (C) 2019-2023 Uri Shaked
*/

import { AVRInterruptConfig, CPU } from '../cpu/cpu';
import { u8 } from '../types';

Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/spi.spec.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/spi.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

import { AVRInterruptConfig, CPU } from '../cpu/cpu';
import { u8 } from '../types';

Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/timer.spec.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/timer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

/**
* AVR-8 Timers
* Part of AVR8js
Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/twi.spec.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/twi.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

import { AVRInterruptConfig, CPU } from '../cpu/cpu';
import { u8 } from '../types';

Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/usart.spec.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/usart.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

/**
* AVR-8 USART Peripheral
* Part of AVR8js
Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/usi.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

import { AVRInterruptConfig, CPU } from '../cpu/cpu';
import { AVRIOPort } from './gpio';

Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/watchdog.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

/**
* AVR8 Watchdog Timer Test Suite
* Part of AVR8js
Expand Down
3 changes: 3 additions & 0 deletions src/peripherals/watchdog.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

/**
* AVR8 Watchdog Timer
* Part of AVR8js
Expand Down
3 changes: 3 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/utils/assembler.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) Uri Shaked and contributors

import { describe, expect, it } from 'vitest';
import { assemble } from './assembler';

Expand Down
3 changes: 3 additions & 0 deletions src/utils/test-utils.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down

0 comments on commit 1378808

Please sign in to comment.