6f418fc1b0
Converts generted pins to use qstrs instead of string pointers. This patch also adds the following functions: pyb.Pin.names() pyb.Pin.af_list() pyb.Pin.gpio() dir(pyb.Pin.board) and dir(pyb.Pin.cpu) also produce useful results. pyb.Pin now takes kw args. pyb.Pin.__str__ now prints more useful information about the pin configuration. I found the following functions in my boot.py to be useful: ```python def pins(): for pin_name in dir(pyb.Pin.board): pin = pyb.Pin(pin_name) print('{:10s} {:s}'.format(pin_name, str(pin))) def af(): for pin_name in dir(pyb.Pin.board): pin = pyb.Pin(pin_name) print('{:10s} {:s}'.format(pin_name, str(pin.af_list()))) ``` |
||
---|---|---|
.. | ||
core | ||
memzip_files | ||
add-memzip.sh | ||
hal_gpio.c | ||
help.c | ||
import.c | ||
lcd.c | ||
led.c | ||
led.h | ||
lexerfatfs.c | ||
lexermemzip.c | ||
lexermemzip.h | ||
main.c | ||
make-pins.py | ||
Makefile | ||
memzip.c | ||
memzip.h | ||
mk20dx256-af.csv | ||
mk20dx256-prefix.c | ||
mk20dx256.ld | ||
modpyb.c | ||
mpconfigport.h | ||
pin_defs_teensy.c | ||
pin_defs_teensy.h | ||
qstrdefsport.h | ||
README.md | ||
servo.c | ||
servo.h | ||
std.h | ||
teensy_hal.c | ||
teensy_hal.h | ||
teensy-pins.csv | ||
uart.c | ||
usb.c |
Build Instructions for Teensy 3.1
This assumes that you have TeensyDuino installed and set the ARDUINO environment variable pointing to the where Arduino with TeensyDuino is installed.
cd teensy
ARDUINO=~/arduino-1.0.5 make
To upload micropython to the Teensy 3.1.
Press the Program button on the Teensy 3.1
make upload
Currently, the python prompt is through the USB serial interface.