Skip to content

Commit 20748be

Browse files
committed
Removed underscores from start of device driver filenames.
1 parent c141504 commit 20748be

14 files changed

Lines changed: 119 additions & 119 deletions
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import pyControl.hardware as _h
2-
3-
class LED_driver(_h.Digital_output):
4-
def __init__(self, port):
1+
import pyControl.hardware as _h
2+
3+
class LED_driver(_h.Digital_output):
4+
def __init__(self, port):
55
super().__init__(port.DIO_A)
File renamed without changes.
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import pyb
2-
import pyControl.audio as _a
3-
4-
class Audio_board(_a.Audio_output):
5-
6-
def __init__(self, port):
7-
assert port.DAC is not None, '! Audio board needs port with DAC.'
8-
assert port.I2C is not None, '! Audio board needs port with I2C.'
9-
self.I2C = pyb.I2C(port.I2C)
10-
self.I2C.init(pyb.I2C.MASTER)
11-
super().__init__(port.DAC)
12-
13-
def set_volume(self, V): # Set volume of audio output, range 0 - 127
1+
import pyb
2+
import pyControl.audio as _a
3+
4+
class Audio_board(_a.Audio_output):
5+
6+
def __init__(self, port):
7+
assert port.DAC is not None, '! Audio board needs port with DAC.'
8+
assert port.I2C is not None, '! Audio board needs port with I2C.'
9+
self.I2C = pyb.I2C(port.I2C)
10+
self.I2C.init(pyb.I2C.MASTER)
11+
super().__init__(port.DAC)
12+
13+
def set_volume(self, V): # Set volume of audio output, range 0 - 127
1414
self.I2C.mem_write(int(V), 46, 0)
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import pyControl.hardware as _h
2-
3-
class Breakout_1_2():
4-
def __init__(self):
5-
# Inputs and outputs.
6-
self.port_1 = _h.Port(DIO_A='X1', DIO_B='X2' , POW_A='Y7' , POW_B='Y8' , POW_C='Y11', UART=4)
7-
self.port_2 = _h.Port(DIO_A='Y3', DIO_B='Y4' , POW_A='X4' , POW_B='X18', POW_C='Y12')
8-
self.port_3 = _h.Port(DIO_A='X9', DIO_B='X10', POW_A='X7' , POW_B='X19',
9-
DIO_C='X5', DAC=1 , I2C=1, UART=1)
10-
self.port_4 = _h.Port(DIO_A='Y9', DIO_B='Y10', POW_A='X8' , POW_B='X20',
11-
DIO_C='X6', DAC=2 , I2C=2, UART=3)
12-
self.port_5 = _h.Port(DIO_A='Y5', DIO_B='Y6' , POW_A='X21', POW_B='X22')
13-
self.port_6 = _h.Port(DIO_A='X3', DIO_B='X11' , POW_A='Y1' , POW_B='Y2')
14-
self.BNC_1 = 'X12'
15-
self.BNC_2 = 'X11'
16-
self.DAC_1 = 'X5'
17-
self.DAC_2 = 'X6'
1+
import pyControl.hardware as _h
2+
3+
class Breakout_1_2():
4+
def __init__(self):
5+
# Inputs and outputs.
6+
self.port_1 = _h.Port(DIO_A='X1', DIO_B='X2' , POW_A='Y7' , POW_B='Y8' , POW_C='Y11', UART=4)
7+
self.port_2 = _h.Port(DIO_A='Y3', DIO_B='Y4' , POW_A='X4' , POW_B='X18', POW_C='Y12')
8+
self.port_3 = _h.Port(DIO_A='X9', DIO_B='X10', POW_A='X7' , POW_B='X19',
9+
DIO_C='X5', DAC=1 , I2C=1, UART=1)
10+
self.port_4 = _h.Port(DIO_A='Y9', DIO_B='Y10', POW_A='X8' , POW_B='X20',
11+
DIO_C='X6', DAC=2 , I2C=2, UART=3)
12+
self.port_5 = _h.Port(DIO_A='Y5', DIO_B='Y6' , POW_A='X21', POW_B='X22')
13+
self.port_6 = _h.Port(DIO_A='X3', DIO_B='X11' , POW_A='Y1' , POW_B='Y2')
14+
self.BNC_1 = 'X12'
15+
self.BNC_2 = 'X11'
16+
self.DAC_1 = 'X5'
17+
self.DAC_2 = 'X6'
1818
self.button = 'X17'

0 commit comments

Comments
 (0)