-
-
Notifications
You must be signed in to change notification settings - Fork 440
/
Copy pathboards.ts
53 lines (50 loc) · 1.37 KB
/
boards.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import type {
Board,
BoardsConfig,
BoardsPackage,
Port,
} from '../../../common/protocol';
export const aBoard: Board = {
fqbn: 'some:board:fqbn',
name: 'Some Arduino Board',
};
const aPort: Port = {
address: '/lol/port1234',
addressLabel: '/lol/port1234',
protocol: 'serial',
protocolLabel: 'Serial Port (USB)',
};
export const aBoardsConfig: BoardsConfig = {
selectedBoard: { name: aBoard.name, fqbn: aBoard.fqbn },
selectedPort: aPort,
};
export const anotherBoard: Board = {
fqbn: 'another:board:fqbn',
name: 'Another Arduino Board',
};
export const anotherPort: Port = {
address: '/kek/port5678',
addressLabel: '/kek/port5678',
protocol: 'serial',
protocolLabel: 'Serial Port (USB)',
};
export const anotherBoardsConfig: BoardsConfig = {
selectedBoard: { name: anotherBoard.name, fqbn: anotherBoard.fqbn },
selectedPort: anotherPort,
};
export const aPackage: BoardsPackage = {
author: 'someAuthor',
availableVersions: ['some.ver.sion', 'some.other.version'],
boards: [aBoard],
deprecated: false,
description: 'Some Arduino Board, Some Other Arduino Board',
id: 'some:arduinoCoreId',
moreInfoLink: 'http://www.some-url.lol/',
name: 'Some Arduino Package',
summary: 'Boards included in this package:',
types: ['Arduino'],
};
export const anInstalledPackage: BoardsPackage = {
...aPackage,
installedVersion: 'some.ver.sion',
};