summaryrefslogtreecommitdiffstatshomepage
path: root/cc3200
Commit message (Collapse)AuthorAge
* ports: Make new ports/ sub-directory and move all ports there.Damien George2017-09-06
| | | | | | This is to keep the top-level directory clean, to make it clear what is core and what is a port, and to allow the repository to grow with new ports in a sustainable way.
* cc3200: Use standard implementation of keyboard interrupt.Damien George2017-09-04
|
* cc3200: Enable micropython.kbd_intr() methodRobert HH2017-09-04
|
* all: Convert remaining "mp_uint_t n_args" to "size_t n_args".Damien George2017-08-30
| | | | This is to have consistency across the whole repository.
* all: Make static dicts use mp_rom_map_elem_t type and MP_ROM_xxx macros.Damien George2017-08-21
|
* all: Make use of $(TOP) variable in Makefiles, instead of "..".Damien George2017-08-11
| | | | | $(TOP) is defined in py/mkenv.mk and should be used to refer to the top level of this repository.
* all: Use the name MicroPython consistently in commentsAlexander Steffen2017-07-31
| | | | | There were several different spellings of MicroPython present in comments, when there should be only one.
* all: Don't include system errno.h when it's not needed.Damien George2017-07-24
|
* cc3200: Use the name MicroPython consistently in code.Alexander Steffen2017-07-21
| | | | | In a few places the cc3200 port uses the incorrect spelling Micropython instead of MicroPython.
* all: Unify header guard usage.Alexander Steffen2017-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code conventions suggest using header guards, but do not define how those should look like and instead point to existing files. However, not all existing files follow the same scheme, sometimes omitting header guards altogether, sometimes using non-standard names, making it easy to accidentally pick a "wrong" example. This commit ensures that all header files of the MicroPython project (that were not simply copied from somewhere else) follow the same pattern, that was already present in the majority of files, especially in the py folder. The rules are as follows. Naming convention: * start with the words MICROPY_INCLUDED * contain the full path to the file * replace special characters with _ In addition, there are no empty lines before #ifndef, between #ifndef and one empty line before #endif. #endif is followed by a comment containing the name of the guard macro. py/grammar.h cannot use header guards by design, since it has to be included multiple times in a single C file. Several other files also do not need header guards as they are only used internally and guaranteed to be included only once: * MICROPY_MPHALPORT_H * mpconfigboard.h * mpconfigport.h * mpthreadport.h * pin_defs_*.h * qstrdefs*.h
* cc3200/modusocket: Fix connect() when in non-blocking or timeout mode.Damien George2017-07-11
| | | | | Non-blocking connect on the CC3100 has non-POSIX behaviour and needs to be modified to match standard semantics.
* cc3200: Initialise variable to zero to prevent compiler warnings.Damien George2017-06-20
|
* cc3200: Make non-zero socket timeout work with connect/accept/send.Damien George2017-06-20
| | | | | | | The CC3100 only allows to set a timeout for receiving data, not for accept, connect or send. But it can set non-blocking for all these operations and this patch uses that feature to implement socket timeout in terms of non- blocking behaviour combined with a loop.
* stmhal: Move pybstdio.c to lib/utils/sys_stdio_mphal.c for common use.Damien George2017-06-15
| | | | | It provides sys.stdin, sys.stdout, sys.stderr for bare-metal targets based on mp_hal functions.
* cc3200/modusocket: Simplify socket.makefile() function.Damien George2017-06-14
| | | | Following how extmod/modlwip.c does it.
* ports: Convert from using stmhal's input() to core provided version.Damien George2017-06-01
|
* various: Spelling fixesVille Skyttä2017-05-29
|
* cc3200/mods/pybpin: Remove toggle() method.Paul Sokolovsky2017-05-21
| | | | | | | It's not part of MicroPython HW API and can be easily implemented on Python level in case of need. Saved 56 bytes of binary.
* ports: Add ilistdir in uos module.Damien George2017-05-10
|
* cc3200/mods/pybi2c: Make readfnom_mem_into/writeto_mem return None.Damien George2017-04-18
| | | | | | | | | | This aligns the I2C class to match the standard machine.I2C API. Note that this is a (small) breaking change to the existing cc3200 API. The original API just returned the size of the input buffer so there's no information lost by this change. To update scripts users should just use the size of the buffer passed to these functions to get the number of bytes that are read/written.
* cc3200/mods/pybi2c: Make machine.I2C constructor/init conform to HW API.Damien George2017-04-18
| | | | | | | | | | | | | This is a user-facing change to the cc3200's API, to make it conform to the new machine hardware API. The changes are: - change I2C constructor to: I2C(id=0, *, freq=100000, scl=None, sda=None) - change I2C init to: init(*, freq, scl, sda) - removal of machine.I2C.MASTER constant - I2C str/repr no longer prints I2C.MASTER To update existing code it should be enough to just remove the I2C.MASTER constant from contructor/init for I2C.
* cc3200/pybuart: Make parity specifications consistent with HW API.Paul Sokolovsky2017-04-09
| | | | parity=0 means even parity, parity=1 - odd.
* cc3200/modmachine: Return frequency value directly, like other ports.Paul Sokolovsky2017-04-05
|
* all: Move BYTES_PER_WORD definition from ports to py/mpconfig.hDamien George2017-04-01
| | | | | It can still be overwritten by a port in mpconfigport.h but for almost all cases one can use the provided default.
* all: Use full path name when including mp-readline/timeutils/netutils.Damien George2017-03-31
| | | | | | | This follows the pattern of how all other headers are now included, and makes it explicit where the header file comes from. This patch also removes -I options from Makefile's that specify the mp-readline/timeutils/ netutils directories, which are no longer needed.
* cc3200/mods/pybi2c: Raise OSError if readfrom_mem fails to write addr.Damien George2017-03-29
|
* cc3200: Update for changes to mp_obj_str_get_data.Damien George2017-03-29
|
* cc3200: Update to use size_t for tuple/list accessors.Damien George2017-03-29
|
* all/Makefile: Remove -ansi from GCC flags, its ignored anyway.Krzysztof Blazewicz2017-03-23
| | | | | | The -ansi flag is used for C dialect selection and it is equivalent to -std=c90. Because it goes right before -std=gnu99 it is ignored as for conflicting flags GCC always uses the last one.
* cc3200/mods/modutime: Use generic sleep_ms and sleep_us implementations.Damien George2017-03-22
|
* extmod/vfs_fat: Remove obsolete and unused str/len members.Damien George2017-03-10
|
* cc3200/mptask: Allocate flash VFS struct on the heap to trace root ptrs.Damien George2017-03-10
|
* cc3200/moduos: Remove uos.sep, as it's strictly optional.Paul Sokolovsky2017-02-23
| | | | | | In MicroPython, the path separator is guaranteed to be "/", extra unneeded things take precious code space (in the port which doesn't have basic things like floating-port support).
* cc3200: Remove socket.timeout class, use OSError(ETIMEDOUT) instead.Damien George2017-02-22
| | | | | | | socket.timeout is a subclass of OSError, and using the latter is more efficient than having a dedicated class. The argument of OSError is ETIMEDOUT so the error can be distinguished from other kinds of OSErrors. This follows how the esp8266 port does it.
* cc3200/mods/modusocket: Init vars to 0 to silence compiler warnings.Damien George2017-02-22
| | | | | Some compilers can't analyse the code to determine that these variables are always set before being used.
* cc3200: Enable uerrno module with short, custom list of error codes.Damien George2017-02-22
| | | | | | | Since we recently replaced the OSError string messages with simple error codes, having the uerrno module gets back some user friendly error messages. The total code size (after removing strings, replacing with uerrno module) is decreased.
* cc3200: When raising OSError's use MP_Exxx as arg instead of a string.Damien George2017-02-22
|
* cc3200: Convert to using uPy internal errno numbers.Damien George2017-02-22
|
* cc3200: Move wlan socket glue functions from modwlan to modusocket.Damien George2017-02-22
| | | | | It saves about 400 bytes of code space because the functions can now be inlined.
* cc3200: Remove remaining references to std.h.Damien George2017-02-21
|
* cc3200/mods/modwlan: Add int casts to silence compiler warnings.Damien George2017-02-21
|
* cc3200/mods/modwlan: Allow antenna diversity to be fully compiled out.Damien George2017-02-21
|
* cc3200/mods/modwlan: Make multi-threaded a proper compile-time option.Damien George2017-02-21
|
* cc3200/mods/modwlan: Remove unused header includes; simplify others.Damien George2017-02-21
|
* cc3200: Remove util/std.h, can just use stdio.h instead.Damien George2017-02-21
|
* cc3200: Use simplelink API instead of emulated BSD API.Damien George2017-02-21
| | | | | Most of cc3200 uses explicit simplelink calls anyway, and this means there are no longer any clashes with macros from the C stdlib.
* cc3200: Move stoupper to ftp.c and define in terms of unichar_toupper.Damien George2017-02-21
| | | | | | ftp.c is the only user of this function so making it static in that file allows it to be inlined. Also, reusing unichar_toupper means we no longer depend on the C stdlib for toupper, saving about 300 bytes of code space.
* py: Add iter_buf to getiter type method.Damien George2017-02-16
| | | | | | | | | | | | | | | Allows to iterate over the following without allocating on the heap: - tuple - list - string, bytes - bytearray, array - dict (not dict.keys, dict.values, dict.items) - set, frozenset Allows to call the following without heap memory: - all, any, min, max, sum TODO: still need to allocate stack memory in bytecode for iter_buf.
* cc3200: Refactor "ticks" functions to use common extmod implementation.Damien George2017-02-06
| | | | | | | | | | | | The port now uses the common mp_utime_ticks_{ms,us,cpu,add,diff} functions from extmod/utime_mphal.c. The mp_utime_sleep_XXX functions are still cc3200-specific because they handle the GIL differently to the ones in extmod. The files misc/mpsystick.[ch] have been removed because they contain 2 unused functions, and the other remaining function is renamed to mp_hal_ticks_us and moved to hal/cc3200_hal.c.
* extmod: Merge old fsusermount.h header into vfs.h and vfs_fat.h.Damien George2017-01-30
| | | | | vfs.h is for generic VFS declarations, and vfs_fat.h is for VfsFat specific things.