circuitpython/stmhal
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
..
boards Add support for selecting pin alternate functions from python. 2014-08-07 23:15:41 -07:00
cc3k stmhal: Update CC3000 driver to newer version. 2014-05-11 12:09:13 +01:00
cmsis stmhal: Update STM32Cube F4 HAL driver to V1.3.0. 2014-08-06 22:33:31 +01:00
fatfs stmhal: Change 0:/ and 1:/ to /flash and /sd; add CWD support. 2014-07-31 23:44:04 +01:00
hal stmhal: Update STM32Cube F4 HAL driver to V1.3.0. 2014-08-06 22:33:31 +01:00
usbdev stmhal: Replace magic number 3 with CDC_IN_EP define. 2014-04-16 23:17:29 +01:00
usbhost Initial checkin with STM HAL 2014-03-11 23:55:41 -07:00
.gitignore stmhal: Add .gitignore to ignore the new build dir names. 2014-05-03 18:26:03 +01:00
accel.c stmhal, accel: Increase start-up times to 30ms; add extra 30ms delay. 2014-07-31 10:39:52 +01:00
accel.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
adc.c stmhal: pyb.adc: Clarify that buffer with elements of any size can be used. 2014-06-29 21:34:58 +03:00
adc.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
autoflash Add device ID to autoflash script. 2014-05-02 23:03:23 +01:00
bufhelper.c stmhal: Include mpconfig.h before all other includes. 2014-06-28 23:32:03 +03:00
bufhelper.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
dac.c stmhal: Update STM32Cube F4 HAL driver to V1.3.0. 2014-08-06 22:33:31 +01:00
dac.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
diskio.c stmhal: Include mpconfig.h before all other includes. 2014-06-28 23:32:03 +03:00
diskio.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
extint.c stmhal: Clean up reset/soft-reset code; fix bug init'ing VCP exc. 2014-08-04 11:09:51 +01:00
extint.h stmhal: Clean up reset/soft-reset code; fix bug init'ing VCP exc. 2014-08-04 11:09:51 +01:00
ffconf.c stmhal: Change 0:/ and 1:/ to /flash and /sd; add CWD support. 2014-07-31 23:44:04 +01:00
ffconf.h stmhal: Change 0:/ and 1:/ to /flash and /sd; add CWD support. 2014-07-31 23:44:04 +01:00
file.c py: Make MP_OBJ_NEW_SMALL_INT cast arg to mp_int_t itself. 2014-07-31 10:49:14 +01:00
file.h stmhal: Add file.flush and os.stat. 2014-07-19 16:39:13 +01:00
flash.c Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
flash.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
font_petme128_8x8.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
gccollect.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
gccollect.h Add gc.enable, gc.disable; remove pyb.gc. 2014-05-08 23:04:49 +01:00
gchelper.s REPl working on UART6 with STMHAL 2014-03-12 18:15:55 -07:00
help.c Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
i2c.c Change boolean 'use_16bit_addr' to int 'addr_size', can be either 8 or 16 bits, default value is 8 2014-07-21 22:45:04 -04:00
i2c.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
import.c stmhal: Include mpconfig.h before all other includes. 2014-06-28 23:32:03 +03:00
input.c Change const byte* to const char* where sensible. 2014-05-25 22:27:57 +01:00
lcd.c stmhal: Add documentation for LCD; update docs for USB_VCP. 2014-08-02 14:35:38 +01:00
lcd.h stmhal: Update and improve LCD driver. 2014-06-15 00:41:47 +01:00
led.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
led.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
lexerfatfs.c py: Change lexer stream API to return bytes not chars. 2014-07-30 11:46:05 +01:00
lexerfatfs.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
main.c stmhal: Clean up reset/soft-reset code; fix bug init'ing VCP exc. 2014-08-04 11:09:51 +01:00
make-stmconst.py stmhal: Add lots of constants to stm module. 2014-04-19 00:32:25 +01:00
Makefile Add support for selecting pin alternate functions from python. 2014-08-07 23:15:41 -07:00
math.c stmhal, math: Define _M_LN2 if not already defined. 2014-08-05 14:13:05 +00:00
mathsincos.c Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
modos.c stmhal: Ability to stat /flash and /sd. 2014-08-06 19:02:34 +01:00
modpyb.c stmhal: Change 0:/ and 1:/ to /flash and /sd; add CWD support. 2014-07-31 23:44:04 +01:00
modstm.c Prefix ARRAY_SIZE with micropython prefix MP_ 2014-06-19 18:54:34 +02:00
modstmconst.gen.c stmhal: Add lots of constants to stm module. 2014-04-19 00:32:25 +01:00
modtime.c stmhal: Add file.flush and os.stat. 2014-07-19 16:39:13 +01:00
mpconfigport.h Add support for storing args during an exception raised by an irq. 2014-07-25 14:00:06 -07:00
mphal.h Add support for selecting pin alternate functions from python. 2014-08-07 23:15:41 -07:00
pendsv.c stmhal: Include mpconfig.h before all other includes. 2014-06-28 23:32:03 +03:00
pendsv.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
pin_defs_stmhal.c Add support for selecting pin alternate functions from python. 2014-08-07 23:15:41 -07:00
pin_defs_stmhal.h Updated teensy to build. 2014-06-15 22:48:05 -07:00
pin_named_pins.c Add support for selecting pin alternate functions from python. 2014-08-07 23:15:41 -07:00
pin.c Add support for selecting pin alternate functions from python. 2014-08-07 23:15:41 -07:00
pin.h Add support for selecting pin alternate functions from python. 2014-08-07 23:15:41 -07:00
portmodules.h stmhal: Add file.flush and os.stat. 2014-07-19 16:39:13 +01:00
printf.c stmhal: Fix REPL printing by cooking output sent to stdout_obj. 2014-07-20 13:57:43 +01:00
pybcdc.inf_template Auto-generate the stmhal/pybcdc_inf header file from static files 2014-04-16 02:41:26 +01:00
pybstdio.c stmhal: Add USB_VCP class/object, for direct USB VCP control. 2014-07-31 10:30:42 +01:00
pybstdio.h stmhal: Fix REPL printing by cooking output sent to stdout_obj. 2014-07-20 13:57:43 +01:00
pybwlan.c stmhal: Update CC3000 driver to newer version. 2014-05-11 12:09:13 +01:00
pybwlan.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
pyexec.c stmhal: Fix REPL printing by cooking output sent to stdout_obj. 2014-07-20 13:57:43 +01:00
pyexec.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
qstrdefsport.h Add support for selecting pin alternate functions from python. 2014-08-07 23:15:41 -07:00
readline.c stmhal: Clean up reset/soft-reset code; fix bug init'ing VCP exc. 2014-08-04 11:09:51 +01:00
readline.h stmhal: Clean up reset/soft-reset code; fix bug init'ing VCP exc. 2014-08-04 11:09:51 +01:00
rng.c stmhal: Include mpconfig.h before all other includes. 2014-06-28 23:32:03 +03:00
rng.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
rtc.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
rtc.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
sdcard.c stmhal: Protect SD_WriteBlocks by IRQ disable/enable pair. 2014-07-07 07:29:06 +01:00
sdcard.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
servo.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
servo.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
spi.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
spi.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
startup_stm32f40xx.s Initial checkin with STM HAL 2014-03-11 23:55:41 -07:00
std.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
stm32f4xx_hal_msp.c stmhal: Include mpconfig.h before all other includes. 2014-06-28 23:32:03 +03:00
stm32f4xx_it.c stmhal: Include mpconfig.h before all other includes. 2014-06-28 23:32:03 +03:00
stm32f4xx_it.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
stm32f405.ld Initial checkin with STM HAL 2014-03-11 23:55:41 -07:00
storage.c stmhal: Include mpconfig.h before all other includes. 2014-06-28 23:32:03 +03:00
storage.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
string0.c Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
system_stm32f4xx.c stmhal: Update STM32Cube F4 HAL driver to V1.3.0. 2014-08-06 22:33:31 +01:00
systick.c stmhal: Include mpconfig.h before all other includes. 2014-06-28 23:32:03 +03:00
systick.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
timer.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
timer.h Add timer_deinit and call it just before doing a soft-restart 2014-06-30 08:07:38 -07:00
uart.c stmhal: Fix REPL printing by cooking output sent to stdout_obj. 2014-07-20 13:57:43 +01:00
uart.h stmhal: Fix REPL printing by cooking output sent to stdout_obj. 2014-07-20 13:57:43 +01:00
usb.c stmhal: Clean up reset/soft-reset code; fix bug init'ing VCP exc. 2014-08-04 11:09:51 +01:00
usb.h stmhal: Clean up reset/soft-reset code; fix bug init'ing VCP exc. 2014-08-04 11:09:51 +01:00
usbd_cdc_interface.c stmhal: Add USB_VCP class/object, for direct USB VCP control. 2014-07-31 10:30:42 +01:00
usbd_cdc_interface.h stmhal: Add USB_VCP class/object, for direct USB VCP control. 2014-07-31 10:30:42 +01:00
usbd_conf.c micropython port for HydraBus 2014-06-02 21:43:02 +02:00
usbd_conf.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
usbd_desc_cdc_msc.c Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
usbd_desc.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
usbd_msc_storage.c Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
usbd_msc_storage.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
usrsw.c stmhal: Include mpconfig.h before all other includes. 2014-06-28 23:32:03 +03:00
usrsw.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00