process extras from the list

This commit is contained in:
Owen 2024-05-01 14:36:13 +02:00
parent 7599758ce5
commit 863b0e3e72
2 changed files with 35 additions and 25 deletions

View File

@ -49,13 +49,16 @@ header = '{} (dtb name: {})\n'.format(board.name, dtname)
print('\n{}{}'.format(int((total-len(header))/2) * ' ', header))
# Output result.
# heading
for p in range(0, board.cols):
if p % 2 == 0:
print(' {}func des pin '.format(' ' * (width[p] -4)), end='')
else:
print(' pin des func{} '.format(' ' * (width[p] - 4)), end='')
print()
# gpio pins
print('\nGpio Header:'))
for l in range(0, len(board.gpio), board.cols):
for p in range(l, l + board.cols):
if board.gpio[p][2] is None:
@ -68,7 +71,12 @@ for l in range(0, len(board.gpio), board.cols):
print(' o-- {:3} {:5} {}{} '.format(str(board.gpio[p][1]), board.gpio[p][2], board.gpio[p][3], pad), end='')
print()
print()
print('Notes:')
# extras
print('\nOther pins of interest:'))
if len(board.gpio] > 40:
for p in board.gpio[29:]:
print(' o-- {:3} {:5} {}'.format(str(board.gpio[p][1]), board.gpio[p][2], board.gpio[p][3]), end='')
print('\nNotes:')
for l in board.notes:
print('- ' + l)

View File

@ -14,27 +14,29 @@
name = 'MangoPI MQ Pro GPIO header'
cols = 2
gpio = [
[None, 1, '3v3'], [None, 2, '5v'],
[ 205, 3, 'PG13'], [None, 4, '5v'],
[ 204, 5, 'PG12'], [None, 6, 'gnd'],
[ 39, 7, 'PB7'], [ 40, 8, 'PB8'],
[None, 9, 'gnd'], [ 41, 10, 'PB9'],
[ 117, 11, 'PD21'], [ 37, 12, 'PB5'],
[ 118, 13, 'PD22'], [None, 14, 'gnd'],
[ 32, 15, 'PB0'], [ 33, 16, 'PB1'],
[None, 17, '3v3'], [ 110, 18, 'PD14'],
[ 108, 19, 'PD12'], [None, 20, 'gnd'],
[ 109, 21, 'PD13'], [ 65, 22, 'PC1'],
[ 107, 23, 'PD11'], [ 106, 24, 'PD10'],
[None, 25, 'gnd'], [ 111, 26, 'PD15'],
[ 145, 27, 'PE17'], [ 144, 28, 'PE16'],
[ 42, 29, 'PB10'], [None, 30, 'gnd'],
[ 43, 31, 'PB11'], [ 64, 32, 'PC0'],
[ 44, 33, 'PB12'], [None, 34, 'gnd'],
[ 38, 35, 'PB6'], [ 34, 36, 'PB2'],
[ 113, 37, 'PD17'], [ 35, 38, 'PB3'],
[None, 39, 'gnd'], [ 36, 40, 'PB4'],
# The first 40 entries are the 40pin GPIO connector
[None, '3v3'], [None, '5v'],
[ 205, 'PG13'], [None, '5v'],
[ 204, 'PG12'], [None, 'gnd'],
[ 39, 'PB7'], [ 40, 'PB8'],
[None, 'gnd'], [ 41, 'PB9'],
[ 117, 'PD21'], [ 37, 'PB5'],
[ 118, 'PD22'], [None, 'gnd'],
[ 32, 'PB0'], [ 33, 'PB1'],
[None, '3v3'], [ 110, 'PD14'],
[ 108, 'PD12'], [None, 'gnd'],
[ 109, 'PD13'], [ 65, 'PC1'],
[ 107, 'PD11'], [ 106, 'PD10'],
[None, 'gnd'], [ 111, 'PD15'],
[ 145, 'PE17'], [ 144, 'PE16'],
[ 42, 'PB10'], [None, 'gnd'],
[ 43, 'PB11'], [ 64, 'PC0'],
[ 44, 'PB12'], [None, 'gnd'],
[ 38, 'PB6'], [ 34, 'PB2'],
[ 113, 'PD17'], [ 35, 'PB3'],
[None, 'gnd'], [ 36, 'PB4'],
# Everything after this is listed in 'extras'
[114, 'PD18: Blue Status Led'],
]
notes = ['I2C pins 2,5,27 and 28 (PG13, PG12, PE17 and PE16) have 10K pullup resistors to 3v3',
'The onboard blue status LED is on PD18 [pwm2](pinmux:114)']
notes = ['I2C pins 2,5,27 and 28 (PG13, PG12, PE17 and PE16) have 10K pullup resistors to 3v3','The Status LED (PD18) is common with the LED_PWM pin on the DSI/LVDS output']