Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
d1ba8b76
Commit
d1ba8b76
authored
Mar 12, 2015
by
danicampora
Browse files
cc3200: Correct WiPy's pinout and the pin generation script.
parent
6ae9383f
Changes
4
Hide whitespace changes
Inline
Side-by-side
cc3200/boards/WIPY/pins.csv
View file @
d1ba8b76
P12,58
P13,4
P14,3
P15,61
P16,59
P17,5
P18,62
P19,1
P110,2
P33,57
P34,60
P37,63
P38,53
P39,64
P310,50
P49,16
P410,17
P22,18
P23,8
P24,45
P26,7
P27,6
P28,21
P29,55
P210,15
\ No newline at end of file
L2,GPIO2
L3,GPIO1
L4,GPIO23
L5,GPIO24
L6,GPIO11
L7,GPIO12
L8,GPIO13
L9,GPIO14
L10,GPIO15
L11,GPIO16
L12,GPIO17
L13,GPIO22
L14,GPIO28
R4,GPIO10
R5,GPIO9
R6,GPIO8
R7,GPIO7
R8,GPIO6
R9,GPIO30
R10,GPIO31
R11,GPIO3
R12,GPIO0
R13,GPIO4
R14,GPIO5
cc3200/boards/WIPY_SD/mpconfigboard.h
View file @
d1ba8b76
...
...
@@ -30,7 +30,7 @@
#define MICROPY_HW_BOARD_NAME "WiPy_SD"
#define MICROPY_HW_MCU_NAME "CC3200"
#define MICROPY_HW_HAS_SDCARD (
0
)
#define MICROPY_HW_HAS_SDCARD (
1
)
#define MICROPY_HW_ENABLE_RNG (1)
#define MICROPY_HW_ENABLE_RTC (1)
...
...
cc3200/boards/WIPY_SD/pins.csv
View file @
d1ba8b76
P12,58
P13,4
P14,3
P15,61
P16,59
P17,5
P18,62
P19,1
P110,2
P33,57
P34,60
P37,63
P38,53
P39,64
P310,50
P49,16
P410,17
P22,18
P23,8
P24,45
P26,7
P27,6
P28,21
P29,55
P210,15
\ No newline at end of file
L2,GPIO2
L3,GPIO1
L4,GPIO23
L5,GPIO24
L6,GPIO11
L7,GPIO12
L8,GPIO13
L9,GPIO14
L10,GPIO15
L11,GPIO16
L12,GPIO17
L13,GPIO22
L14,GPIO28
R4,GPIO10
R5,GPIO9
R6,GPIO8
R7,GPIO7
R8,GPIO6
R9,GPIO30
R10,GPIO31
R11,GPIO3
R12,GPIO0
R13,GPIO4
R14,GPIO5
cc3200/boards/make-pins.py
View file @
d1ba8b76
...
...
@@ -38,7 +38,7 @@ class Pin(object):
def
set_is_board_pin
(
self
):
self
.
board_pin
=
True
def
print
(
self
):
print
(
'pin_obj_t pin_{:6s} = PIN({:6s}, {:1d}, {:3d}, {:2d});'
.
format
(
self
.
name
,
self
.
name
,
self
.
port
,
self
.
gpio_bit
,
self
.
pin_num
))
...
...
@@ -56,12 +56,17 @@ class Pins(object):
for
pin
in
self
.
cpu_pins
:
if
pin
.
port
==
port
and
pin
.
gpio_bit
==
gpio_bit
:
return
pin
def
find_pin_by_num
(
self
,
pin_num
):
for
pin
in
self
.
cpu_pins
:
if
pin
.
pin_num
==
pin_num
:
return
pin
def
find_pin_by_name
(
self
,
name
):
for
pin
in
self
.
cpu_pins
:
if
pin
.
name
==
name
:
return
pin
def
parse_af_file
(
self
,
filename
,
pin_col
,
pinname_col
):
with
open
(
filename
,
'r'
)
as
csvfile
:
rows
=
csv
.
reader
(
csvfile
)
...
...
@@ -76,13 +81,16 @@ class Pins(object):
pin_num
=
int
(
row
[
pin_col
])
-
1
;
pin
=
Pin
(
row
[
pinname_col
],
port_num
,
gpio_bit
,
pin_num
)
self
.
cpu_pins
.
append
(
pin
)
def
parse_board_file
(
self
,
filename
,
cpu_pin_
num_
col
):
def
parse_board_file
(
self
,
filename
,
cpu_pin_col
):
with
open
(
filename
,
'r'
)
as
csvfile
:
rows
=
csv
.
reader
(
csvfile
)
for
row
in
rows
:
# Pin numbers must start from 0 when used with the TI API
pin
=
self
.
find_pin_by_num
(
int
(
row
[
cpu_pin_num_col
])
-
1
)
if
row
[
cpu_pin_col
].
isdigit
():
pin
=
self
.
find_pin_by_num
(
int
(
row
[
cpu_pin_col
])
-
1
)
else
:
pin
=
self
.
find_pin_by_name
(
row
[
cpu_pin_col
])
if
pin
:
pin
.
set_is_board_pin
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment