summaryrefslogtreecommitdiff
path: root/util/pinmap/pm/pins.go
diff options
context:
space:
mode:
Diffstat (limited to 'util/pinmap/pm/pins.go')
-rw-r--r--util/pinmap/pm/pins.go35
1 files changed, 35 insertions, 0 deletions
diff --git a/util/pinmap/pm/pins.go b/util/pinmap/pm/pins.go
new file mode 100644
index 0000000000..bb48fa8b92
--- /dev/null
+++ b/util/pinmap/pm/pins.go
@@ -0,0 +1,35 @@
+// Copyright 2021 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package pm
+
+// Pin types enum constants
+const (
+ ADC = iota
+ PWM
+ PWM_INVERT
+ I2C
+ Input
+ InputPU
+ InputPD
+ Output
+ OutputOD
+ OutputODL
+)
+
+// Pin represents one EC pin.
+type Pin struct {
+ PinType int // Type of pin (from above)
+ Pin string // The reference of the physical pin.
+ Signal string // The net (circuit) name of the pin
+ Enum string // If set, the internal s/w name of the pin
+}
+
+// The accumulated pins of the EC.
+type Pins struct {
+ Adc []*Pin // Analogue to digital converters
+ I2c []*Pin // I2C busses
+ Gpio []*Pin // GPIO pins
+ Pwm []*Pin // Pwm pins
+}