29
29
try :
30
30
from micropython import const
31
31
except ImportError :
32
+
32
33
def const (x ):
33
34
return x
34
35
36
+
35
37
__version__ = "0.0.0-auto.0"
36
38
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_seesaw.git"
37
39
@@ -40,20 +42,20 @@ def const(x):
40
42
# The ordering here reflects the seesaw firmware (mm1_hat) pinmap for Robo HAT MM1,
41
43
# not logical ordering of the HAT terminals.
42
44
43
- _MM1_D0 = const (55 ) # (RX to RPI_TX)
44
- _MM1_D1 = const (54 ) # (TX to RPI_RX)
45
- _MM1_D2 = const (34 ) # ADC (GPS_TX)
46
- _MM1_D3 = const (35 ) # ADC (GPS_RX)
47
- _MM1_D4 = const (0 ) # (GPS_SDA)
48
- _MM1_D5 = const (1 ) # (GPS_SCL)
49
- _MM1_D6 = const (28 ) # (POWER_ENABLE)
50
- _MM1_D7 = const (2 ) # (BATTERY)
51
- _MM1_D8 = const (20 ) # (NEOPIXEL)
52
- _MM1_D9 = const (43 ) # PWM (SPI_SCK)
53
- _MM1_D10 = const (41 ) # PWM (SPI_SS)
54
- _MM1_D11 = const (42 ) # PWM (SPI_MOSI)
55
- _MM1_D12 = const (40 ) # PWM (SPI_MISO)
56
- _MM1_D13 = const (21 ) # LED
45
+ _MM1_D0 = const (55 ) # (RX to RPI_TX)
46
+ _MM1_D1 = const (54 ) # (TX to RPI_RX)
47
+ _MM1_D2 = const (34 ) # ADC (GPS_TX)
48
+ _MM1_D3 = const (35 ) # ADC (GPS_RX)
49
+ _MM1_D4 = const (0 ) # (GPS_SDA)
50
+ _MM1_D5 = const (1 ) # (GPS_SCL)
51
+ _MM1_D6 = const (28 ) # (POWER_ENABLE)
52
+ _MM1_D7 = const (2 ) # (BATTERY)
53
+ _MM1_D8 = const (20 ) # (NEOPIXEL)
54
+ _MM1_D9 = const (43 ) # PWM (SPI_SCK)
55
+ _MM1_D10 = const (41 ) # PWM (SPI_SS)
56
+ _MM1_D11 = const (42 ) # PWM (SPI_MOSI)
57
+ _MM1_D12 = const (40 ) # PWM (SPI_MISO)
58
+ _MM1_D13 = const (21 ) # LED
57
59
_MM1_D14 = const (3 ) # (POWER_OFF)
58
60
59
61
_MM1_SERVO8 = const (8 )
@@ -81,11 +83,13 @@ def const(x):
81
83
# PA<nn> pins are nn
82
84
# PB<nn> pins are 32+nn
83
85
86
+
84
87
class MM1_Pinmap :
85
88
"""This class is automatically used by `adafruit_seesaw.seesaw.Seesaw` when
86
89
a RoboHAT board is detected.
87
90
88
91
It is also a reference for the capabilities of each pin."""
92
+
89
93
# seesaw firmware (mm1_hat) analog pin map:
90
94
# analog[0]:47 analog[1]:48 analog[2]: analog[3]:
91
95
# analog[4]: analog[5]: analog[6]: analog[7]:
@@ -101,9 +105,20 @@ class MM1_Pinmap:
101
105
# pwm[6]:9 pwm[7]:8 pwm[8]:40 pwm[9]:41 pwm[10]:42 pwm[11]:43
102
106
#
103
107
#: The pins capable of PWM output
104
- pwm_pins = (_MM1_SERVO1 , _MM1_SERVO2 , _MM1_SERVO3 , _MM1_SERVO4 ,
105
- _MM1_SERVO5 , _MM1_SERVO6 , _MM1_SERVO7 , _MM1_SERVO8 ,
106
- _MM1_D12 , _MM1_D10 , _MM1_D11 , _MM1_D9 )
108
+ pwm_pins = (
109
+ _MM1_SERVO1 ,
110
+ _MM1_SERVO2 ,
111
+ _MM1_SERVO3 ,
112
+ _MM1_SERVO4 ,
113
+ _MM1_SERVO5 ,
114
+ _MM1_SERVO6 ,
115
+ _MM1_SERVO7 ,
116
+ _MM1_SERVO8 ,
117
+ _MM1_D12 ,
118
+ _MM1_D10 ,
119
+ _MM1_D11 ,
120
+ _MM1_D9 ,
121
+ )
107
122
108
123
# seesaw firmware touch pin map:
109
124
# touch[0]: 7 touch[1]: 6 touch[2]: 5 touch[3]: 4
0 commit comments