-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpcb.h
49 lines (38 loc) · 1.29 KB
/
pcb.h
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
//
// SprintTrace: PCB representation
// Copyright 2022, Laminoid.com (Muessig & Muessig GbR).
// Licensed under the terms and conditions of the GPLv3.
//
#ifndef SPRINTTRACE_PCB_H
#define SPRINTTRACE_PCB_H
#include "primitives.h"
#include "elements.h"
#include "grid.h"
#include "output.h"
#include "errors.h"
#include <stdbool.h>
typedef enum sprint_pcb_flags {
// Ground plane enabled on the top copper layer.
SPRINT_PCB_FLAG_PLANE_TOP = 1 << 0,
// Ground plane enabled on the bottom copper layer.
SPRINT_PCB_FLAG_PLANE_BOTTOM = 1 << 1,
// Ground plane enabled on the first inner copper layer.
SPRINT_PCB_FLAG_PLANE_INNER1 = 1 << 2,
// Ground plane enabled on the second inner copper layer.
SPRINT_PCB_FLAG_PLANE_INNER2 = 1 << 3,
// The board has four instead of two layers.
SPRINT_PCB_FLAG_MULTILAYER = 1 << 4
} sprint_pcb_flags;
extern const char* SPRINT_PCB_FLAG_NAMES[];
typedef struct sprint_pcb {
sprint_dist width;
sprint_dist height;
sprint_grid grid;
sprint_pcb_flags flags;
bool salvaged;
int num_elements;
sprint_element* elements;
} sprint_pcb;
sprint_error sprint_pcb_flags_output(sprint_pcb_flags flags, sprint_output* output);
sprint_error sprint_pcb_output(sprint_pcb* pcb, sprint_output* output);
#endif //SPRINTTRACE_PCB_H