summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/help.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-18 22:48:59 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-18 22:48:59 +0100
commita8f5d15fc6f2ee988e028ce8a5fc9f50c17309f4 (patch)
treebc474c5487557aa1dd369c9e7828ae52b688eb5d /stmhal/help.c
parentc66d86c5ce068e860ceb550ad75bf4da5211276b (diff)
downloadmicropython-a8f5d15fc6f2ee988e028ce8a5fc9f50c17309f4.tar.gz
micropython-a8f5d15fc6f2ee988e028ce8a5fc9f50c17309f4.zip
stmhal: Update help and comments re gpio changing to Pin.
Diffstat (limited to 'stmhal/help.c')
-rw-r--r--stmhal/help.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/stmhal/help.c b/stmhal/help.c
index 76dcb2f4ee..1dabd9cc83 100644
--- a/stmhal/help.c
+++ b/stmhal/help.c
@@ -21,21 +21,20 @@ STATIC const char *help_text =
" pyb.switch(f) -- call the given function when the switch is pressed\n"
" pyb.Led(n) -- create Led object for LED n (n=1,2,3,4)\n"
" Led methods: on(), off(), toggle(), intensity(<n>)\n"
+" pyb.Pin(pin) -- get a pin\n"
+" pyb.Pin(pin, m, [p]) -- get a pin and configure it for IO mode m, pull mode p\n"
+" Pin methods: value([v]), high(), low()\n"
" pyb.Servo(n) -- create Servo object for servo n (n=1,2,3,4)\n"
" Servo methods: calibrate(...), pulse_width([p]), angle([x, [t]]), speed([x, [t]])\n"
" pyb.Accel() -- create an Accelerometer object\n"
" Accelerometer methods: x(), y(), z(), tilt(), filtered_xyz()\n"
" pyb.rng() -- get a 30-bit hardware random number\n"
-" pyb.gpio_in(port, [m]) -- set IO port to input, mode m\n"
-" pyb.gpio_out(port, [m]) -- set IO port to output, mode m\n"
-" pyb.gpio(port) -- get digital port value\n"
-" pyb.gpio(port, val) -- set digital port value, True or False, 1 or 0\n"
" pyb.ADC(port) -- make an analog port object\n"
" ADC methods: read()\n"
"\n"
"Ports are numbered X1-X12, X17-X22, Y1-Y12, or by their MCU name\n"
-"Port input modes are: pyb.PULL_NONE, pyb.PULL_UP, pyb.PULL_DOWN\n"
-"Port output modes are: pyb.PUSH_PULL, pyb.OPEN_DRAIN\n"
+"Port IO modes are: pyb.Pin.IN, pyb.Pin.OUT_PP, pyb.Pin.OUT_OD\n"
+"Port pull modes are: pyb.Pin.PULL_NONE, pyb.Pin.PULL_UP, pyb.Pin.PULL_DOWN\n"
"\n"
"Control commands:\n"
" CTRL-A -- on a blank line, enter raw REPL mode\n"