| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This follows the pattern of other peripherals (I2C, SPI) to specify the
pins using pin objects instead of a pair of GPIO port and pin number. It
makes it easier to customise the UART pins for a particular board.
|
| |
|
|
|
|
|
|
| |
Previously, SPI was configured by a board defining MICROPY_HW_ENABLE_SPIx
to 0 or 1. Now, the board should define MICROPY_HW_SPIx_SCK, MISO, MOSI
and NSS. This makes it the same as how I2C is configured.
|
|
|
|
| |
Thanks to Dave Hylands for the patch.
|
|
|
|
| |
Thanks to Dave Hylands for the patch.
|
| |
|
| |
|
|
|
|
| |
Added some functions to Pin class to query mode, pull, and af
|
|
|
|
|
| |
Trying to move towards consistency, let's use _ exclusively in names of
source files (eg .c, .h, .csv).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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())))
```
|
|
|
|
| |
SW and X17 now both map to PB3
|
|
|
|
|
|
|
|
| |
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.
|
|
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.
|