Dave Hylands
6f418fc1b0
Add support for selecting pin alternate functions from python.
...
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())))
```
2014-08-07 23:15:41 -07:00
..
2014-08-07 23:15:41 -07:00
2014-05-11 12:09:13 +01:00
2014-08-06 22:33:31 +01:00
2014-07-31 23:44:04 +01:00
2014-08-06 22:33:31 +01:00
2014-04-16 23:17:29 +01:00
2014-03-11 23:55:41 -07:00
2014-05-03 18:26:03 +01:00
2014-07-31 10:39:52 +01:00
2014-05-03 23:27:38 +01:00
2014-06-29 21:34:58 +03:00
2014-05-03 23:27:38 +01:00
2014-05-02 23:03:23 +01:00
2014-06-28 23:32:03 +03:00
2014-05-03 23:27:38 +01:00
2014-08-06 22:33:31 +01:00
2014-05-03 23:27:38 +01:00
2014-06-28 23:32:03 +03:00
2014-05-03 23:27:38 +01:00
2014-08-04 11:09:51 +01:00
2014-08-04 11:09:51 +01:00
2014-07-31 23:44:04 +01:00
2014-07-31 23:44:04 +01:00
2014-07-31 10:49:14 +01:00
2014-07-19 16:39:13 +01:00
2014-05-03 23:27:38 +01:00
2014-05-03 23:27:38 +01:00
2014-05-03 23:27:38 +01:00
2014-07-03 13:25:24 +01:00
2014-05-08 23:04:49 +01:00
2014-03-12 18:15:55 -07:00
2014-05-03 23:27:38 +01:00
2014-07-21 22:45:04 -04:00
2014-05-03 23:27:38 +01:00
2014-06-28 23:32:03 +03:00
2014-05-25 22:27:57 +01:00
2014-08-02 14:35:38 +01:00
2014-06-15 00:41:47 +01:00
2014-07-03 13:25:24 +01:00
2014-05-03 23:27:38 +01:00
2014-07-30 11:46:05 +01:00
2014-05-03 23:27:38 +01:00
2014-08-04 11:09:51 +01:00
2014-04-19 00:32:25 +01:00
2014-08-07 23:15:41 -07:00
2014-08-05 14:13:05 +00:00
2014-05-03 23:27:38 +01:00
2014-08-06 19:02:34 +01:00
2014-07-31 23:44:04 +01:00
2014-06-19 18:54:34 +02:00
2014-04-19 00:32:25 +01:00
2014-07-19 16:39:13 +01:00
2014-07-25 14:00:06 -07:00
2014-08-07 23:15:41 -07:00
2014-06-28 23:32:03 +03:00
2014-05-03 23:27:38 +01:00
2014-08-07 23:15:41 -07:00
2014-06-15 22:48:05 -07:00
2014-08-07 23:15:41 -07:00
2014-08-07 23:15:41 -07:00
2014-08-07 23:15:41 -07:00
2014-07-19 16:39:13 +01:00
2014-07-20 13:57:43 +01:00
2014-04-16 02:41:26 +01:00
2014-07-31 10:30:42 +01:00
2014-07-20 13:57:43 +01:00
2014-05-11 12:09:13 +01:00
2014-05-03 23:27:38 +01:00
2014-07-20 13:57:43 +01:00
2014-05-03 23:27:38 +01:00
2014-08-07 23:15:41 -07:00
2014-08-04 11:09:51 +01:00
2014-08-04 11:09:51 +01:00
2014-06-28 23:32:03 +03:00
2014-05-03 23:27:38 +01:00
2014-07-03 13:25:24 +01:00
2014-05-03 23:27:38 +01:00
2014-07-07 07:29:06 +01:00
2014-05-03 23:27:38 +01:00
2014-07-03 13:25:24 +01:00
2014-05-03 23:27:38 +01:00
2014-07-03 13:25:24 +01:00
2014-05-03 23:27:38 +01:00
2014-03-11 23:55:41 -07:00
2014-05-03 23:27:38 +01:00
2014-06-28 23:32:03 +03:00
2014-06-28 23:32:03 +03:00
2014-05-03 23:27:38 +01:00
2014-03-11 23:55:41 -07:00
2014-06-28 23:32:03 +03:00
2014-05-03 23:27:38 +01:00
2014-05-03 23:27:38 +01:00
2014-08-06 22:33:31 +01:00
2014-06-28 23:32:03 +03:00
2014-05-03 23:27:38 +01:00
2014-07-03 13:25:24 +01:00
2014-06-30 08:07:38 -07:00
2014-07-20 13:57:43 +01:00
2014-07-20 13:57:43 +01:00
2014-08-04 11:09:51 +01:00
2014-08-04 11:09:51 +01:00
2014-07-31 10:30:42 +01:00
2014-07-31 10:30:42 +01:00
2014-06-02 21:43:02 +02:00
2014-05-03 23:27:38 +01:00
2014-05-03 23:27:38 +01:00
2014-05-03 23:27:38 +01:00
2014-05-03 23:27:38 +01:00
2014-05-03 23:27:38 +01:00
2014-06-28 23:32:03 +03:00
2014-05-03 23:27:38 +01:00