Damien George
13c19c57a0
stmhal: Only init RNG if it's used.
2014-04-20 00:45:59 +01:00
Damien George
0a6e9f562f
stmhal: Update ExtInt to allow keyword arguments in constructor.
2014-04-20 00:38:50 +01:00
Damien George
57e415859a
stmhal: Tidy up and improve consistency across modules.
2014-04-20 00:30:09 +01:00
Damien George
d689430e79
stmhal: Add SPI class.
...
Also some updates to compile with latest changes to core py.
2014-04-20 00:16:30 +01:00
Damien George
c7c4a84397
stm: Update to compile with latest changes to core py.
2014-04-20 00:15:35 +01:00
Damien George
a3f94e0030
py: Add arg checking helper functions.
...
These are to assist in writing native C functions that take positional
and keyword arguments. mp_arg_check_num is for just checking the
number of arguments is correct. mp_arg_parse_all is for parsing
positional and keyword arguments with default values.
2014-04-20 00:13:22 +01:00
Damien George
27dd471098
Merge branch 'master' of github.com:micropython/micropython
2014-04-19 02:18:19 +01:00
Damien George
3d19137442
stmhal: Add pyb.Pin.init method to re-init GPIO pin mode.
2014-04-19 02:17:57 +01:00
Damien George
6e44381cce
stmhal: Improve RTC class; make fatfs use RTC for time stamping files.
2014-04-19 02:17:30 +01:00
Damien George
ed5117f6a8
stmhal: Add pyb.unique_id, to get unique id of MCU.
2014-04-19 01:28:18 +01:00
Paul Sokolovsky
206dd2a905
stmhal: Update for mp_binary_get_size() refactor.
2014-04-19 03:27:37 +03:00
Paul Sokolovsky
6204460461
modstruct: Initial implementation of struct.pack().
2014-04-19 03:22:08 +03:00
Paul Sokolovsky
504e23388c
objstr: Init hash in mp_obj_str_builder_start() to 0.
2014-04-19 03:21:06 +03:00
Paul Sokolovsky
4602b9a79f
obj.h: Typo fix in comment.
2014-04-19 03:21:06 +03:00
Paul Sokolovsky
1355cf42f2
modstruct: Fix .calcsize() to account for struct type/alignment.
2014-04-19 03:21:06 +03:00
Paul Sokolovsky
5695e07256
modstruct: Support 'q' & 'Q' type codes.
2014-04-19 03:18:14 +03:00
Paul Sokolovsky
752d2080b7
modffi: Mark 'p' type spec deprecated, replace with 'P'.
...
'p' in struct module is "pascal string". 'P' is void*.
2014-04-19 03:18:14 +03:00
Damien George
44ee42de50
stmhal: Rename pyb.Led to pyb.LED to conform to naming rules.
...
It's Light Emitting Diode, so should be LED.
2014-04-19 00:54:33 +01:00
Damien George
8cf08a58a1
stmhal: Remove pyb.input (use sys.stdio.read(1) instead).
2014-04-19 00:50:50 +01:00
Damien George
f20e093b9b
stmhal: Add lots of constants to stm module.
2014-04-19 00:32:25 +01:00
Damien George
561f83c9cf
Merge branch 'master' of github.com:micropython/micropython
2014-04-18 23:35:24 +01:00
Damien George
38ae014e42
stmhal: Update ADC, DAC and I2C objects to use new buffer protocol.
...
Main reason for expanding buffer protocol API was to support writes to a
buffer in ADC module (see read_timed). With this change you can now
create an array of arbitrary type and ADC.read_timed will store into
that array in the correct format (byte, int, float). I wonder though if
all these changes were really worth it to support just this function.
Hopefully this enhanced buffer protocol API (with typecode specified)
will be used elsewhere.
2014-04-18 23:28:56 +01:00
Damien George
71e9bfa20d
py: Add mp_binary_set_val_array_from_int, to store an int directly.
2014-04-18 23:28:12 +01:00
Damien George
b11b85adaa
py: Allow to pass buffer protocol flags to get_buffer helper funcs.
2014-04-18 22:59:24 +01:00
Damien George
a8f5d15fc6
stmhal: Update help and comments re gpio changing to Pin.
2014-04-18 22:48:59 +01:00