Root/cntr/fw/common/io.h

1/*
2 * common/io.h - I/O pin assignment
3 *
4 * Written 2010 by Werner Almesberger
5 * Copyright 2010 Werner Almesberger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13
14#ifndef IO_H
15#define IO_H
16
17/* Diagnostic LED */
18
19#define LEDv1 P1_3
20#define LEDv2 P2_2
21
22/* Probe input */
23
24#define PROBE_T0 P1_0
25#define PROBE_ECI P1_1
26#define PROBE_INT0 P0_7
27
28/*
29 * Probe termination
30 *
31 * - v1: 100 kOhm termination (not very useful)
32 * - v2: pull-up for input amplifier
33 * - v3: 330 Ohm termination
34 */
35
36#define PROBE_TERM P1_2
37
38/*
39 * Version ID
40 *
41 * In version 1, P2_1 is used to provide ground to the input side. In version
42 * 2, we use a ground place for this and P2_1 is unconnected. We can therefore
43 * use it to identify the hardware version.
44 *
45 * In version 3, P2_0 is connected to ground. In all other versions, it is
46 * unconnected.
47 *
48 * Board VERSION_ID1
49 * | VERSION_ID2
50 * | |
51 * v1 0 Z
52 * v2 Z Z
53 * v3 Z 0
54 *
55 */
56
57#define VERSION_ID1 P2_1
58#define VERSION_ID2 P2_0
59
60#endif /* !IO_H */
61

Archive Download this file



interactive