- 14 Jun, 2014 1 commit
-
-
Damien George authored
Still some method names to iron out, and funtionality to add, but this will do for the first, basic version.
-
- 11 Jun, 2014 1 commit
-
-
Damien George authored
Also now returns correct POSIX errno when an IO operation fails. Addresses issues #516 and #676.
-
- 18 May, 2014 1 commit
-
-
Sven Wegener authored
Signed-off-by:
Sven Wegener <sven.wegener@stealer.net>
-
- 08 May, 2014 1 commit
-
-
Damien George authored
time.time: returns seconds since 1/1/2000, as an integer. time.localtime: Returns 8-tuple: (year, month, date, hour, minute, second, weekday, yearday).
-
- 03 May, 2014 1 commit
-
-
Damien George authored
Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
-
- 21 Apr, 2014 6 commits
-
-
Damien George authored
Instead of pyb.switch() as a function, it's more consistent (with respect to all the other modules and peripherals) to have pyb.Switch() create a switch object. This then generalises to having multiple switches. Call the object to get its state. Use sw.callback to set the callback function for when the switch is pressed.
-
Damien George authored
It should be a noun, since it supports getting and setting depending on the number of arguments given.
-
Damien George authored
Simple but functional timer control. More sophistication will eventually be added, or for now just use direct register access :) Also added pyb.freq() function to get MCU clock frequencies.
-
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
-