forked from paulocode/picostation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
values.h
75 lines (66 loc) · 1.21 KB
/
values.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
#pragma once
#include "pico/stdlib.h"
// GPIO pinouts
namespace Pin
{
enum : uint
{
XLAT = 0,
SQCK = 1,
LMTSW = 2,
SCEX_DATA = 4,
DOOR = 6,
RESET = 7,
SENS = 14,
DA15 = 15,
DA16 = 16,
LRCK = 17,
SCOR = 18,
SQSO = 19,
CLK = 21,
CMD_DATA = 26,
CMD_CK = 27
};
};
// C2PO, WFCK is always GND
namespace SENS
{
enum : uint
{
FZC = 0x0,
AS = 0x1,
TZC = 0x2,
XBUSY = 0x4,
FOK = 0x5,
GFS = 0xa,
COMP = 0xb,
COUT = 0xc,
OV64 = 0xe
};
}
namespace SledMove
{
enum : int
{
REVERSE = -1,
STOP = 0,
FORWARD = 1
};
}
namespace SM
{
// PIO0
constexpr uint I2SDATA = 0;
constexpr uint SUBQ = 1;
// PIO1
constexpr uint SCOR = 0;
constexpr uint MECHACON = 1;
constexpr uint SOCT = 2;
}
constexpr int NUM_IMAGES = 1;
constexpr int c_leadIn = 4500;
constexpr int c_preGap = 150;
constexpr uint c_trackMax = 20892; // 73:59:58
constexpr int c_sectorMax = 333000; // 74:00:00
constexpr size_t c_cdSamples = 588;
constexpr size_t c_cdSamplesBytes = c_cdSamples * 2 * 2; // 2352