blob: 146582745e4e6b905f40929a7530abee2d7ff0ec (
plain)
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
|
// +build !windows
/* SPDX-License-Identifier: MIT
*
* Copyright (C) 2020 jet tsang zeon-git. All Rights Reserved.
*/
package servo
//go:generate stringer -type=InstName
type InstName int
type InstByte byte
type Access bool
type InstructionMap map[InstName]*Instruction
type Instruction struct {
//
InstByte byte
Length int
Access Access
// Min int
// Max int
}
const (
MoveTimeWrite InstName = iota
MoveTimeRead
MoveTimeWaitWrite
MoveTimeWaitRead
MoveStart
MoveStop
IDWrite
IDRead
AngleOffsetAdjust
AngleOffsetWrite
AngleOffsetRead
AngleLimitWrite
AngleLimitRead
VoltageLimitWrite
VoltageLimitRead
TemperatureMaxLimitWrite
TemperatureMaxLimitRead
TemperatureRead
VoltageRead
PositionRead
MotorModeWrite
MotorModeRead
LoadOrUnloadWrite
LoadOrUnloadRead
LEDControlWrite
LEDControlRead
LEDErrorWrite
LEDErrorRead
RO Access = false
RW Access = true
)
|