- 21 Apr, 2014 3 commits
-
-
Damien George authored
-
Damien George authored
It's really a UART because there is no external clock line (and hence no synchronous ability, at least in the implementation of this module). USART should be reserved for a module that has "S"ynchronous capabilities. Also, UART is shorter and easier to type :)
-
Damien George authored
The three classes I2C, SPI and USART now have a fairly uniform (Python) API. All are constructed, initialised and deinitialised in the same way. They can have most of their parameters set, using keyword arguments. All have send and recv (although slightly different with I2C requiring an address in master mode). recv can do inplace receiving (ie store the data in a previously-created bytearray). It's just polling mode at the moment, but interrupt and DMA would be nice to add.
-
- 20 Apr, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
-
- 19 Apr, 2014 5 commits
-
-
Damien George authored
-
Damien George authored
Also some updates to compile with latest changes to core py.
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
- 18 Apr, 2014 4 commits
-
-
Damien George authored
It's Light Emitting Diode, so should be LED.
-
Damien George authored
-
Damien George authored
-
Damien George authored
This is an attempt to clean up the Micro Python API on the pyboard. Gpio functionality is now in the Pin object, which seems more natural. Constants for MODE and PULL are now in pyb.Pin. Names of some classes have been adjusted to conform to CamelCase. Other miscellaneous changes and clean up here and there.
-
- 16 Apr, 2014 1 commit
-
-
Damien George authored
-
- 15 Apr, 2014 2 commits
-
-
Damien George authored
Reads ADC values into a bytearray (or similar) at a fixed rate. Needs a better name and improved API. Also fix up DAC dma function (which also needs a better name and API).
-
Damien George authored
Simple way to find the address of an attached I2C device.
-
- 14 Apr, 2014 1 commit
-
-
Damien George authored
-
- 10 Apr, 2014 1 commit
-
-
Damien George authored
Also contains raw memory read/write functions, read8, read16, read32, write8, write16, write32. Can now do: stm.write16(stm.GPIOA + stm.GPIO_BSRRL, 1 << 13) This turns on the red LED. With the new constant folding, the above constants for the GPIO address are actually compiled to constants (and the addition done) at compile time. For viper code and inline assembler, this optimisation will make a big difference. In the inline assembler, using these constants would not be possible without this constant folding.
-
- 08 Apr, 2014 2 commits
-
-
Damien George authored
Can now calibrate, set pulse width, angle and speed.
-
Paul Sokolovsky authored
They correspond to io.FileIO in io module hierarchy (with small caveat that io.FileIO is raw file and works with bytes, not strings).
-
- 05 Apr, 2014 1 commit
-
-
Damien George authored
This is to reduce ROM usage. stream_p is used in file and socket types only (at the moment), so seems a good idea to make the protocol functions a pointer instead of the actual structure. It saves 308 bytes of ROM in the stmhal/ port, 928 in unix/.
-
- 03 Apr, 2014 1 commit
-
-
Paul Sokolovsky authored
This adds readline(), readall(), etc. methods. Also other fixes to make Python API compliant and "with" support.
-
- 30 Mar, 2014 1 commit
-
-
Damien George authored
Can now choose at boot up whether the USB device is CDC+MSC or CDC+HID. Choice is made by an option in boot.py, with default being CDC+MSC. HID+MSC is not currently supported, but should be easy to implement. Boot up now has ability to change the reset mode: hold down USR switch while booting and LEDs will count from 1 to 7 to indicate the boot mode. Release USR when correct mode is selected. Current modes are 1 (normal boot), 2 (safe mode), 3 (reset FS mode).
-
- 26 Mar, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
Addresses issue #377.
-
- 24 Mar, 2014 1 commit
-
-
Damien George authored
-
- 23 Mar, 2014 1 commit
-
-
Damien George authored
-
- 22 Mar, 2014 4 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
- 13 Mar, 2014 1 commit
-
-
Dave Hylands authored
-
- 08 Mar, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
-
- 23 Feb, 2014 1 commit
-
-
Dave Hylands authored
Revamp usrsw to use new exti code. Add user switch callback function.
-
- 18 Feb, 2014 1 commit
-
-
Dave Hylands authored
This commit also introduces board directories and moves board specific config into the appropriate board directory. boards/stm32f4xx-af.csv was extracted from the STM32F4xx datasheet and hand-tweaked. make-pins.py takes boards/stm32f4xx-af.csv, boards/stm32f4xx-prefix.c, and boards/BOARD-NAME/pins.csv as input and generates the file build/pins_BOARD_NAME.c The generated pin file for PYBOARD4 looks like this: https://gist.github.com/dhylands/9063231 The generated pins file includes all of the supported alternate functions, and includes upsupported alternate functions as comments. See the commnet block at the top of stm/pin_map.c for details on how to use the pin mapper. I also went ahead and modified stm/gpio.c to use the pin mapper.
-
- 17 Feb, 2014 1 commit
-
-
Paul Sokolovsky authored
This is compatible with what search path was before sys.path refactor, with addition of module library path ("0:/lib").
-
- 16 Feb, 2014 2 commits
-
-
Damien George authored
GPIO functions are crude, and need to be replaced with better ones!
-
Damien George authored
-