-
Notifications
You must be signed in to change notification settings - Fork 19
/
board.h
548 lines (477 loc) · 15.5 KB
/
board.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
////////////////////////////////////////////////////////////////////////////////
//
// Filename: ../demo-out/board.h
// {{{
// Project: AutoFPGA, a utility for composing FPGA designs from peripherals
//
// DO NOT EDIT THIS FILE!
// Computer Generated: This file is computer generated by AUTOFPGA. DO NOT EDIT.
// DO NOT EDIT THIS FILE!
//
// CmdLine: ./autofpga -d -o ../demo-out -I ../auto-data bkram.txt buserr.txt clkcounter.txt clock.txt enet.txt flash.txt global.txt gpio.txt gps.txt hdmi.txt icape.txt legalgen.txt mdio.txt pic.txt pwrcount.txt rtcdate.txt rtcgps.txt sdram.txt sdspi.txt spio.txt version.txt wbmouse.txt wboledbw.txt wbpmic.txt wbscopc.txt wbscope.txt wbubus.txt xpander.txt zipmaster.txt
//
// Creator: Dan Gisselquist, Ph.D.
// Gisselquist Technology, LLC
//
////////////////////////////////////////////////////////////////////////////////
// }}}
// Copyright (C) 2017-2021, Gisselquist Technology, LLC
// {{{
// This program is free software (firmware): you can redistribute it and/or
// modify it under the terms of the GNU General Public License as published
// by the Free Software Foundation, either version 3 of the License, or (at
// your option) any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program. (It's in the $(ROOT)/doc directory. Run make with no
// target there if the PDF file isn't present.) If not, see
// <http://www.gnu.org/licenses/> for a copy.
// }}}
// License: GPL, v3, as defined and found on www.gnu.org,
// {{{
// http://www.gnu.org/licenses/gpl.html
//
////////////////////////////////////////////////////////////////////////////////
//
// }}}
#ifndef BOARD_H
#define BOARD_H
// And, so that we can know what is and isn't defined
// from within our main.v file, let's include:
#include <design.h>
#include <design.h>
#include <cpudefs.h>
#define _HAVE_ZIPSYS
#define PIC _zip->z_pic
#ifdef INCLUDE_ZIPCPU
#ifdef INCLUDE_DMA_CONTROLLER
#define _HAVE_ZIPSYS_DMA
#endif // INCLUDE_DMA_CONTROLLER
#ifdef INCLUDE_ACCOUNTING_COUNTERS
#define _HAVE_ZIPSYS_PERFORMANCE_COUNTERS
#endif // INCLUDE_ACCOUNTING_COUNTERS
#endif // INCLUDE_ZIPCPU
#define SYSPIC(A) (1<<(A))
#define ALTPIC(A) (1<<(A))
//
// GPIO input wires
//
#define GPIO_HDMI_IN_CEC 0x000010000
#define GPIO_HDMI_OUT_CEC 0x000020000
#define GPIO_SD_DETECTED 0x000040000
#define GPIO_HDMI_OUT_DETECT 0x000080000
#define GPIO_GPS_3DF 0x000100000
#define GPIO_SYSCLK_LOCKED 0x000200000
//
// GPIO output wires
//
#define GPIO_SET(WIRE) (((WIRE)<<16)|(WIRE))
#define GPIO_CLR(WIRE) ((WIRE)<<16)
//
#define GPIO_HDMI_IN_CEC_SET 0x000010001
#define GPIO_HDMI_IN_CEC_CLR 0x000010000
#define GPIO_HDMI_OUT_CEC_SET 0x000020002
#define GPIO_HDMI_OUT_CEC_CLR 0x000020000
#define GPIO_EDID_SCL 0x000000004
#define GPIO_EDID_SDA 0x000000008
//
#define GPIO_HDMI_IN_ENB 0x000000010
#define GPIO_HDMI_IN_HPA 0x000000020
#define GPIO_SD_RESET 0x000000040
#define GPIO_HDMI_OUT_EN 0x000000080
//
#define GPIO_EDID_SCL_SET GPIO_SET(GPIO_EDID_SCL)
#define GPIO_EDID_SCL_CLR GPIO_CLR(GPIO_EDID_SCL)
#define GPIO_EDID_SDA_SET GPIO_SET(GPIO_EDID_SDA)
#define GPIO_EDID_SDA_CLR GPIO_CLR(GPIO_EDID_SDA)
#define GPIO_HDMI_IN_ENB_SET GPIO_SET(GPIO_HDMI_IN_ENB)
#define GPIO_HDMI_IN_ENB_CLR GPIO_CLR(GPIO_HDMI_IN_ENB)
#define GPIO_HDMI_IN_HPA_SET GPIO_SET(GPIO_HDMI_IN_HPA)
#define GPIO_HDMI_IN_HPA_CLR GPIO_CLR(GPIO_HDMI_IN_HPA)
#define GPIO_SD_RESET_SET GPIO_SET(GPIO_SD_RESET)
#define GPIO_SD_RESET_CLR GPIO_CLR(GPIO_SD_RESET)
#define GPIO_HDMI_OUT_EN_SET GPIO_SET(GPIO_HDMI_OUT_EN)
#define GPIO_HDMI_OUT_EN_CLR GPIO_CLR(GPIO_HDMI_OUT_EN)
#define CLKFREQHZ 100000000
#ifndef WBUART_H
#define WBUART_H
#define UART_PARITY_NONE 0
#define UART_HWFLOW_OFF 0x40000000
#define UART_PARITY_ODD 0x04000000
#define UART_PARITY_EVEN 0x05000000
#define UART_PARITY_SPACE 0x06000000
#define UART_PARITY_MARK 0x07000000
#define UART_STOP_ONEBIT 0
#define UART_STOP_TWOBITS 0x08000000
#define UART_DATA_8BITS 0
#define UART_DATA_7BITS 0x10000000
#define UART_DATA_6BITS 0x20000000
#define UART_DATA_5BITS 0x30000000
#define UART_RX_BREAK 0x0800
#define UART_RX_FRAMEERR 0x0400
#define UART_RX_PARITYERR 0x0200
#define UART_RX_NOTREADY 0x0100
#define UART_RX_ERR (-256)
#define UART_TX_BUSY 0x0100
#define UART_TX_BREAK 0x0200
typedef struct WBUART_S {
unsigned u_setup;
unsigned u_fifo;
unsigned u_rx, u_tx;
} WBUART;
#endif // WBUART_H
// Network packet interface
#define ENET_TXGO 0x004000
#define ENET_TXBUSY 0x004000
#define ENET_NOHWCRC 0x008000
#define ENET_NOHWMAC 0x010000
#define ENET_RESET 0x020000
#define ENET_NOHWIPCHK 0x040000
#define ENET_TXCMD(LEN) ((LEN)|ENET_TXGO)
#define ENET_TXCLR 0x038000
#define ENET_TXCANCEL 0x000000
#define ENET_RXAVAIL 0x004000
#define ENET_RXBUSY 0x008000
#define ENET_RXMISS 0x010000
#define ENET_RXERR 0x020000
#define ENET_RXCRC 0x040000 // Set on a CRC error
#define ENET_RXLEN rxcmd & 0x0ffff
#define ENET_RXCLR 0x004000
#define ENET_RXBROADCAST 0x080000
#define ENET_RXCLRERR 0x078000
#define ENET_TXBUFLN(NET) (1<<(NET.txcmd>>24))
#define ENET_RXBUFLN(NET) (1<<(NET.rxcmd>>24))
typedef struct ENETPACKET_S {
unsigned n_rxcmd, n_txcmd;
unsigned long n_mac;
unsigned n_rxmiss, n_rxerr, n_rxcrc, n_txcol;
} ENETPACKET;
#define SYSINT_ENETRX SYSINT(8)
#define SYSINT_ENETTX SYSINT(7)
#define BUSPIC(X) (1<<X)
typedef struct GPSTB_S {
unsigned tb_maxcount, tb_jump;
unsigned long tb_err, tb_count, tb_step;
} GPSTB;
#define SDSPI_SETAUX 0x0000ff
#define SDSPI_READAUX 0x0000bf
#define SDSPI_CMD 0x000040
#define SDSPI_ACMD (0x040+55) // CMD55
#define SDSPI_FIFO_OP 0x000800 // Read only
#define SDSPI_WRITEOP 0x000c00 // Write to the FIFO
#define SDSPI_ALTFIFO 0x001000
#define SDSPI_BUSY 0x004000
#define SDSPI_ERROR 0x008000
#define SDSPI_CLEARERR 0x008000
// #define SDSPI_CRCERR 0x010000
// #define SDSPI_ERRTOK 0x020000
#define SDSPI_REMOVED 0x040000
#define SDSPI_PRESENTN 0x080000
#define SDSPI_RESET 0x100000 // Read only
#define SDSPI_WATCHDOG 0x200000 // Read only
#define SDSPI_GO_IDLE ((SDSPI_REMOVED|SDSPI_CLEARERR|SDSPI_CMD)+0)
#define SDSPI_READ_SECTOR ((SDSPI_CMD|SDSPI_CLEARERR|SDSPI_FIFO_OP)+17)
#define SDSPI_WRITE_SECTOR ((SDSPI_CMD|SDSPI_CLEARERR|SDSPI_WRITEOP)+24)
typedef struct SDSPI_S {
unsigned sd_ctrl, sd_data, sd_fifo[2];
} SDSPI;
typedef struct HDMI_IN_S {
unsigned hin_frame_addr;
unsigned hin_origin,
hin_maxsz,
hin_unused;
unsigned hin_ctrl, hin_manual, hin_syncdata, hin_quality;
unsigned hin_pixclk;
unsigned hin_reserved[3];
short hin_htotal, hin_ncols,
hin_vtotal, hin_nrows;
short hin_hsstart, hin_ssend,
hin_vsstart, hin_vssend;
} HDMI_IN;
typedef struct GPSTRACKER_S {
unsigned g_alpha, g_beta, g_gamma, g_step;
} GPSTRACKER;
//
// The Ethernet MDIO interface
//
#define MDIO_BMCR 0x00
#define MDIO_BMSR 0x01
#define MDIO_PHYIDR1 0x02
#define MDIO_PHYIDR2 0x03
#define MDIO_ANAR 0x04
#define MDIO_ANLPAR 0x05
#define MDIO_ANER 0x06
#define MDIO_ANNPTR 0x07
#define MDIO_ANNPRR 0x08
#define MDIO_GBCR 0x09
#define MDIO_GBSR 0x0a
#define MDIO_MACR 0x0d
#define MDIO_MAADR 0x0e
#define MDIO_GBESR 0x0f
#define MDIO_PHYCR 0x10
#define MDIO_PHYSR 0x11
#define MDIO_INER 0x12
#define MDIO_INSR 0x13
#define MDIO_LDPSR 0x1b
#define MDIO_EPAGSR 0x1e
#define MDIO_PAGSEL 0x1f
#define XMDIO_PC1R 0x00
#define XMDIO_PS1R 0x01
#define XMDIO_EEECR 0x14
#define XMDIO_EEEWER 0x10
// #define XMDIO_EEEAR 0x
// #define XMDIO_EEELPAR 0x18
#define XMDIO_LACR 0x1a
#define XMDIO_LCR 0x1c
// #define XMDIO_ACCR 0x1b
typedef struct ENETMDIO_S {
unsigned e_v[32];
} ENETMDIO;
// Offsets for the ICAPE2 interface
#define CFG_CRC 0
#define CFG_FAR 1
#define CFG_FDRI 2
#define CFG_FDRO 3
#define CFG_CMD 4
#define CFG_CTL0 5
#define CFG_MASK 6
#define CFG_STAT 7
#define CFG_LOUT 8
#define CFG_COR0 9
#define CFG_MFWR 10
#define CFG_CBC 11
#define CFG_IDCODE 12
#define CFG_AXSS 13
#define CFG_COR1 14
#define CFG_WBSTAR 16
#define CFG_TIMER 17
#define CFG_BOOTSTS 22
#define CFG_CTL1 24
#define CFG_BSPI 31
typedef struct EDID_SRC_S {
unsigned o_cmd;
unsigned o_spd;
unsigned o_ignored[64-2];
unsigned o_data[64];
} EDID_SRC;
#define READ_EDID(START,LN) ((0xa1<<16)|(((START)&0x0ff)<<8)|((LN)&0x0ff))
#define EDID_SRC_BUSY 0x80000000
#define EDID_SRC_ERR 0x40000000
typedef struct RTCLIGHT_S {
unsigned r_clock, r_stopwatch, r_timer, r_alarm;
} RTCLIGHT;
#define SPIO_BTNC 0x01000
#define SPIO_BTND 0x00800
#define SPIO_BTNL 0x00400
#define SPIO_BTNR 0x00200
#define SPIO_BTNU 0x00100
// Mouse definitions
typedef struct WBMOUSE_S {
unsigned m_bus, m_raw, m_screen, m_size;
} WBMOUSE;
// Definitions to interact with the OLED device
#define OLED_LOGICEN 0x0010001
#define OLED_LOGICEN_OFF 0x0010000
#define OLED_IOPWR OLED_PMODEN
#define OLED_DPWREN 0x0020002 // Was VCC
#define OLED_DPWR_DISABLE 0x0020000
#define OLED_RESET 0x0040000
#define OLED_RESET_CLR 0x0040004
#define OLED_FULLPOWER (OLED_PMODEN|OLED_VCCEN|OLED_RESET_CLR)
#define OLED_POWER_DOWN (OLED_PMODEN_OFF|OLED_VCCEN|OLED_RESET_CLR)
#define OLED_BUSY(dev) (dev.o_ctrl & 1)
#define OLED_DISPLAYON 0x0af // To be sent over the control channel
typedef struct OLEDBW_S {
unsigned o_ctrl, o_a, o_b, o_data;
} OLEDBW;
#define WBMIC_ENABLE 0
#define WBMIC_DISABLE (1<<20)
#define WBMIC_NONEMPTY 0
#define WBMIC_HALFINT (1<<22)
#define WBMIC_RESET (1<<24)
typedef struct WBMIC_S {
unsigned m_data;
unsigned m_setup;
} WBMIC;
#ifndef WBSCOPE_H
#define WBSCOPE_H
#define WBSCOPE_NO_RESET 0x80000000u
#define WBSCOPE_STOPPED 0x40000000u
#define WBSCOPE_TRIGGERED 0x20000000u
#define WBSCOPE_PRIMED 0x10000000u
#define WBSCOPE_TRIGGER (WBSCOPE_NO_RESET|0x08000000u)
#define WBSCOPE_MANUAL (WBSCOPE_TRIGGER)
#define WBSCOPE_DISABLE 0x04000000u
typedef struct WBSCOPE_S {
unsigned s_ctrl, s_data;
} WBSCOPE;
#endif
#ifndef WBSCOPE_H
#define WBSCOPE_H
#define WBSCOPE_NO_RESET 0x80000000u
#define WBSCOPE_STOPPED 0x40000000u
#define WBSCOPE_TRIGGERED 0x20000000u
#define WBSCOPE_PRIMED 0x10000000u
#define WBSCOPE_TRIGGER (WBSCOPE_NO_RESET|0x08000000u)
#define WBSCOPE_MANUAL (WBSCOPE_TRIGGER)
#define WBSCOPE_DISABLE 0x04000000u
typedef struct WBSCOPE_S {
unsigned s_ctrl, s_data;
} WBSCOPE;
#endif
#ifdef GPIO_ACCESS
#define _BOARD_HAS_GPIO
static volatile unsigned *const _gpio = ((unsigned *)@$REGBASE);
#endif // GPIO_ACCESS
#ifdef FLASHCFG_ACCESS
#define _BOARD_HAS_FLASHCFG
static volatile unsigned * const _flashcfg = ((unsigned *)(@$[0x%08x](REGBASE)));
#endif // FLASHCFG_ACCESS
#define _BOARD_HAS_SUBSECONDS
static volatile unsigned *const _subseconds = ((unsigned *)@$[0x%08x](REGBASE));
#ifdef FLASH_ACCESS
#define _BOARD_HAS_FLASH
extern int _flash[1];
#endif // FLASH_ACCESS
#ifdef GPSUART_ACCESS
#define _BOARD_HAS_GPS_UART
static volatile WBUART *const _gpsu = ((WBUART *)(@$[0x%08x](REGBASE)));
#endif // GPSUART_ACCESS
#ifdef BKRAM_ACCESS
#define _BOARD_HAS_BKRAM
extern char _bkram[0x00100000];
#endif // BKRAM_ACCESS
#define _BOARD_HAS_BUSERR
static volatile unsigned *const _buserr = ((unsigned *)@$[0x%08x](REGBASE));
#ifdef ETHERNET_ACCESS
#define _BOARD_HAS_ENETP
static volatile ENETPACKET *const _netp = ((ENETPACKET *)@$[0x%08x](REGBASE));
#endif // ETHERNET_ACCESS
#ifdef BUSPIC_ACCESS
#define _BOARD_HAS_BUSPIC
static volatile unsigned *const _buspic = ((unsigned *)@$[0x%08x](REGBASE));
#endif // BUSPIC_ACCESS
#define _BOARD_HAS_ENETB
static volatile unsigned *const _netbrx = ((unsigned *)@$[0x%08x](REGBASE));
static volatile unsigned *const _netbtx = ((unsigned *)(@$[0x%08x](REGBASE) + (0x2000<<1)));
#define _BOARD_HAS_VERSION
static volatile unsigned *const _version = ((unsigned *)@$[0x%08x](REGBASE));
static volatile GPSTB *const _gpstb = ((GPSTB *)@$[0x%08x](REGBASE));
#ifdef SDSPI_ACCESS
#define _BOARD_HAS_SDSPI
static volatile SDSPI *const _sdcard = ((SDSPI *)@$[0x%08x](REGBASE));
#endif // SDSPI_ACCESS
#ifdef HDMIIN_ACCESS
#define _BOARD_HAS_HDMI_IN
static volatile HDMI_IN *const _hin = ((HDMI_IN *)@$.REGBASE);
#endif // HDMIIN_ACCESS
#ifdef GPSTRK_ACCESS
static volatile GPSTRACKER *const _gps = ((GPSTRACKER *)@$[0x%08x]REGBASE);
#endif // GPSTRK_ACCESS
#define _BOARD_HAS_BUILDTIME
static volatile unsigned *const _buildtime = ((unsigned *)@$[0x%08x](REGBASE));
#ifdef NETCTRL_ACCESS
#define _BOARD_HAS_NETMDIO
static volatile ENETMDIO *const _mdio = ((ENETMDIO *)335544320);
#endif // NETCTRL_ACCESS
#ifdef CFG_ACCESS
#define _BOARD_HAS_ICAPTETWO
static volatile unsigned *const _icape = ((unsigned *)0x12000000);
#endif // CFG_ACCESS
#ifdef PWRCOUNT_ACCESS
static volatile unsigned *const _pwrcount = ((unsigned *)@$[0x%08x](REGBASE));
#endif // PWRCOUNT_ACCESS
#ifdef RTCDATE_ACCESS
#define _BOARD_HAS_RTCDATE
static volatile unsigned *const _rtcdate = ((unsigned *)@$REGBASE);
#endif // RTCDATE_ACCESS
#ifdef HDMI_OUT_EDID_ACCESS
#define _BOARD_HAS_HDMI_SRC_EDID
static volatile EDID_SRC *const _edout = ((EDID_SRC *)@$.REGBASE);
#endif // HDMI_OUT_EDID_ACCESS
#ifdef RTC_ACCESS
#define _BOARD_HAS_RTC
static volatile RTCLIGHT *const _rtc = ((RTCLIGHT *)@$[0x%08x](REGBASE));
#endif // RTC_ACCESS
#ifdef SDRAM_ACCESS
#define _BOARD_HAS_SDRAM
extern char _sdram[0x20000000];
#endif // SDRAM_ACCESS
#ifdef SPIO_ACCESS
#define _BOARD_HAS_SPIO
static volatile unsigned *const _spio = ((unsigned *)@$[0x%08x](REGBASE));
#endif // SPIO_ACCESS
#ifdef MOUSE_ACCESS
#define _BOARD_HAS_WBMOUSE
static volatile WBMOUSE *const _mouse = ((WBMOUSE *)@$.REGBASE);
#endif // MOUSE_ACCESS
#ifdef OLEDBW_ACCESS
#define _BOARD_HAS_OLEDBW
static volatile OLEDBW *const _oledbw = ((OLEDBW *)@$REGBASE);
#endif // OLEDBW_ACCESS
#ifdef MICROPHONE_ACCESS
#define _BOARD_HAS_WBMIC
static volatile WBMIC *const _wbmic = ((WBMIC *)67108864);
#endif // MICROPHONE_ACCESS
#ifdef SCOPC_SCOPC
#define _BOARD_HAS_SCOPC
static volatile WBSCOPE *const _scopc = ((WBSCOPE *)@$[0x%08x](REGBASE));
#endif // SCOPC_SCOPC
#ifdef SCOPE_SCOPE
#define _BOARD_HAS_SCOPE
static volatile WBSCOPE *const _scope = ((WBSCOPE *)@$[0x%08x](REGBASE));
#endif // SCOPE_SCOPE
#ifdef HDMI_IN_EDID_ACCESS
#define _BOARD_HAS_HDMI_IN_EDID
static volatile unsigned *const _edin = ((unsigned *)@$.REGBASE);
#endif // HDMI_IN_EDID_ACCESS
//
// Interrupt assignments (3 PICs)
//
// PIC: syspic
#define SYSPIC_DMAC SYSPIC(0)
#define SYSPIC_JIFFIES SYSPIC(1)
#define SYSPIC_TMC SYSPIC(2)
#define SYSPIC_TMB SYSPIC(3)
#define SYSPIC_TMA SYSPIC(4)
#define SYSPIC_ALT SYSPIC(5)
#define SYSPIC_BUS SYSPIC(6)
#define SYSPIC_NETTX SYSPIC(7)
#define SYSPIC_NETRX SYSPIC(8)
#define SYSPIC_SDCARD SYSPIC(9)
#define SYSPIC_PPS SYSPIC(10)
#define SYSPIC_MOUSE SYSPIC(11)
#define SYSPIC_MIC SYSPIC(12)
// PIC: altpic
#define ALTPIC_UIC ALTPIC(0)
#define ALTPIC_UOC ALTPIC(1)
#define ALTPIC_UPC ALTPIC(2)
#define ALTPIC_UTC ALTPIC(3)
#define ALTPIC_MIC ALTPIC(4)
#define ALTPIC_MOC ALTPIC(5)
#define ALTPIC_MPC ALTPIC(6)
#define ALTPIC_MTC ALTPIC(7)
#define ALTPIC_GPIO ALTPIC(8)
#define ALTPIC_GPSRX ALTPIC(9)
#define ALTPIC_GPSTX ALTPIC(10)
#define ALTPIC_GPSRXF ALTPIC(11)
#define ALTPIC_GPSTXF ALTPIC(12)
#define ALTPIC_EDID ALTPIC(13)
#define ALTPIC_RTC ALTPIC(14)
// PIC: buspic
#define BUSPIC_SCOPE BUSPIC(0)
#define BUSPIC_SDCARD BUSPIC(1)
#define BUSPIC_HINSCOPE BUSPIC(2)
#define BUSPIC_SPIO BUSPIC(3)
#define BUSPIC_MOUSE BUSPIC(4)
#define SYSINT_GPSRXF ALTINT(@$(INT.GPSRXF.syspic.ID))
#define SYSINT_GPSTXF ALTINT(12)
#define SYSINT_GPSRX ALTINT(9)
#define SYSINT_GPSTX ALTINT(10)
#define SYSINT_PPS SYSINT(10)
#endif // BOARD_H