Commit Graph

10 Commits

Author SHA1 Message Date
Damien George
751485fe6b stmhal: Add support for USART1 and conditional pins in make-pins.py.
Thanks to Dave Hylands for the patch.
2015-08-03 00:23:47 +01:00
Damien George
c0e39864c6 stmhal: Fix make-pins.py to allow Port K.
Thanks to Dave Hylands for the patch.
2015-08-03 00:18:40 +01:00
Dave Hylands
11115e4d23 stmhal: Add I2S support to make-pins.py 2015-07-07 10:15:37 +01:00
Damien George
50ea86fe8b stmhal: For pins, define macros mapping board names to cpu names. 2015-04-18 21:40:58 +01:00
Dave Hylands
3d945559d4 Added python script to map AF to a pin name
Added some functions to Pin class to query mode, pull, and af
2014-08-24 18:21:08 +01:00
Damien George
284efa89ae stmhal/teensy: Use _ instead of - in source file names.
Trying to move towards consistency, let's use _ exclusively in names of
source files (eg .c, .h, .csv).
2014-08-08 22:34:06 +01:00
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
Dave Hylands
3bbceeaaf7 Fix make-pins.py to support having multiple names for a pin.
SW and X17 now both map to PB3
2014-04-08 15:45:47 -07:00
Dave Hylands
1403298a65 stmhal - fixed up adc stuff
Added support for the ADC channels and mappings to make_pins.py

I'm not sure if the hal properly deals with the channel 16/18 differences
between the 40x and 42x. It seems to deal with it partially. This particular
aspect will need testing on a 42x or 43x.
2014-03-24 11:16:35 -07:00
Dave Hylands
dd38d90724 Initial checkin with STM HAL
This compiles and links, but hasn't been tested on a board
yet and even if it was run, it doesn't currently do anything.
2014-03-11 23:55:41 -07:00