diff options
| author | Damien George <damien.p.george@gmail.com> | 2014-04-18 22:48:59 +0100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2014-04-18 22:48:59 +0100 |
| commit | a8f5d15fc6f2ee988e028ce8a5fc9f50c17309f4 (patch) | |
| tree | bc474c5487557aa1dd369c9e7828ae52b688eb5d /stmhal/pin.c | |
| parent | c66d86c5ce068e860ceb550ad75bf4da5211276b (diff) | |
stmhal: Update help and comments re gpio changing to Pin.
Diffstat (limited to 'stmhal/pin.c')
| -rw-r--r-- | stmhal/pin.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/stmhal/pin.c b/stmhal/pin.c index ed5865d79..ce66a7ad6 100644 --- a/stmhal/pin.c +++ b/stmhal/pin.c @@ -18,7 +18,7 @@ // // x1_pin = pyb.Pin.board.X1 // -// g = pyb.gpio(pyb.Pin.board.X1, 0) +// g = pyb.Pin(pyb.Pin.board.X1, pyb.Pin.IN) // // CPU pins which correspond to the board pins are available // as pyb.cpu.Name. For the CPU pins, the names are the port letter @@ -27,16 +27,16 @@ // // You can also use strings: // -// g = pyb.gpio('X1', 0) +// g = pyb.Pin('X1', pyb.Pin.OUT_PP) // // Users can add their own names: // -// pyb.Pin("LeftMotorDir", pyb.Pin.cpu.C12) -// g = pyb.gpio("LeftMotorDir", 0) +// pyb.Pin.dict["LeftMotorDir"] = pyb.Pin.cpu.C12 +// g = pyb.Pin("LeftMotorDir", pyb.Pin.OUT_OD) // // and can query mappings // -// pin = pyb.Pin("LeftMotorDir"); +// pin = pyb.Pin("LeftMotorDir") // // Users can also add their own mapping function: // @@ -46,7 +46,7 @@ // // pyb.Pin.mapper(MyMapper) // -// So, if you were to call: pyb.gpio("LeftMotorDir", 0) +// So, if you were to call: pyb.Pin("LeftMotorDir", pyb.Pin.OUT_PP) // then "LeftMotorDir" is passed directly to the mapper function. // // To summarize, the following order determines how things get mapped into |
