summaryrefslogtreecommitdiffstatshomepage
path: root/extmod
Commit message (Collapse)AuthorAge
* extmod/modubinascii: Don't post-increment variable that won't be used.Damien George2017-08-21
|
* extmod,unix: For uos.stat interpret st_size member as an unsigned int.Damien George2017-08-21
| | | | | This prevents large files (eg larger than 2gb on a 32-bit arch) from showing up as having a negative size. Fixes issue #3227.
* extmod/modubinascii: Rewrite mod_binascii_a2b_base64.Alex Robbins2017-08-17
| | | | | | This implementation ignores invalid characters in the input. This allows it to decode the output of b2a_base64, and also mimics the behavior of CPython.
* extmod/modussl_mbedtls.c: Add ussl.getpeercert() method.Eric Poulsen2017-08-16
| | | | | Behaviour is as per CPython but only the binary form is implemented here. A test is included.
* all: Raise exceptions via mp_raise_XXXJavier Candeira2017-08-13
| | | | | | | | - Changed: ValueError, TypeError, NotImplementedError - OSError invocations unchanged, because the corresponding utility function takes ints, not strings like the long form invocation. - OverflowError, IndexError and RuntimeError etc. not changed for now until we decide whether to add new utility functions.
* py,extmod,stmhal: Use "static inline" for funcs that should be inline.Damien George2017-08-02
| | | | | "STATIC inline" can expand to "inline" if STATIC is defined to nothing, and this case can lead to link errors.
* extmod/modlwip: Implement setsockopt(IP_ADD_MEMBERSHIP).Paul Sokolovsky2017-07-31
| | | | Allows to join multicast groups.
* 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.
* extmod: Use MP_ROM_INT for int values in an mp_rom_map_elem_t.Damien George2017-07-31
|
* extmod/mod{lwip,onewire,webrepl}: Convert to mp_rom_map_elem_t.Paul Sokolovsky2017-07-29
|
* extmod/modframebuf: Use correct initialization for .locals_dict.Paul Sokolovsky2017-07-29
|
* extmod/machine_signal: Fix parsing of invert arg when Pin is first arg.Damien George2017-07-26
|
* extmod/modussl_mbedtls: Implement non-blocking SSL sockets.Eric Poulsen2017-07-26
|
* extmod/modframebuf: Consistently use "col" as name for colour variables.Damien George2017-07-25
| | | | Thanks to @kamikaze, aka Oleg Korsak, for the original idea and patch.
* extmod/modussl_mbedtls: Make socket.close() free all TLS resources.Damien George2017-07-25
| | | | Also, use mp_stream_close() helper to close the underlying socket.
* extmod/modframebuf: Fix invalid stride for odd widths in GS4_HMSB fmt.Radomir Dopieralski2017-07-25
| | | | | | Since the stride is specified in pixels, in a 4-bit horizontal format it has to always be even, otherwise the computation is wrong and we can write outside of the buffer sometimes.
* extmod/modussl_mbedtls: When reading and peer wants to close, return 0.Damien George2017-07-25
| | | | | If this particular code is returned then there's no more data, it's not really an error.
* all: Don't include system errno.h when it's not needed.Damien George2017-07-24
|
* extmod/modussl_mbedtls: Support server_side mode.Damien George2017-07-24
| | | | | To use server_side mode one must pass valid values in the "key" and "cert" parameters.
* extmod/modussl_axtls: Allow to close ssl stream multiple times.Paul Sokolovsky2017-07-20
| | | | | Make sure that 2nd close has no effect and operations on closed streams are handled properly.
* all: Remove trailing spaces, per coding conventions.Damien George2017-07-19
|
* 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
* py,extmod: Some casts and minor refactors to quiet compiler warnings.Tom Collins2017-07-07
|
* extmod/modujson: Properly initialise temporary StringIO object.Damien George2017-07-05
|
* extmod/modubinascii: Add check for empty buffer passed to hexlify.Damien George2017-07-03
| | | | | Previous to this patch hexlify(b'', b':') would lead to a bad crash due to the computed length of the result being -1=0xffffffff.
* extmod/modure: If input string is bytes, return bytes results too.Paul Sokolovsky2017-07-01
| | | | | | This applies to match.group() and split(). For ARM Thumb2, this increased code size by 12 bytes.
* extmod/moduzlib: decompress: Remove stale "(void)n_args".Paul Sokolovsky2017-06-24
| | | | n_args is now actually used in this function.
* extmmod/modonewire: Rename public module to mp_module_onewire.Damien George2017-06-22
| | | | This follows naming scheme of other modules in extmod.
* extmod: Move modonewire.c from esp8266 to extmod directory.Damien George2017-06-22
| | | | It's now generic enough to be used by any port.
* all: Make more use of mp_raise_{msg,TypeError,ValueError} helpers.Damien George2017-06-15
|
* extmod/modussl_axtls: Implement server_hostname arg to wrap_socket().Paul Sokolovsky2017-06-14
| | | | As enabled by SNI support in axTLS v2+.
* extmod/modussl_axtls: Update for axTLS 2.1.3.Paul Sokolovsky2017-06-13
| | | | ssl_client_new() accepts new SSL_EXTENSIONS* argument.
* extmod/modframebuf: Fix signed/unsigned comparison pendantic warning.Paul Sokolovsky2017-06-10
| | | | Happened with 32-bit gcc 4.8.4.
* extmod/vfs: Allow "buffering" and "encoding" args to VFS's open().Damien George2017-06-07
| | | | | These args are currently ignored but are parsed to make it easier to write portable scripts between CPython and MicroPython.
* extmod/vfs: Allow to statvfs the root directory.Damien George2017-06-07
|
* extmod/modlwip: accept: Fix error code for non-blocking mode.Paul Sokolovsky2017-06-04
| | | | | In non-blocking mode, if no pending connection available, should return EAGAIN, not ETIMEDOUT.
* extmod/modlwip: Fix error codes for duplicate calls to connect().Paul Sokolovsky2017-06-04
| | | | | | | | If socket is already connected, POSIX requires returning EISCONN. If connection was requested, but not yet complete (for non-blocking socket), error code is EALREADY. http://pubs.opengroup.org/onlinepubs/7908799/xns/connect.html
* extmod/modlwip: connect: For non-blocking mode, return EINPROGRESS.Paul Sokolovsky2017-06-03
| | | | | Instead of ETIMEDOUT. This is consistent with POSIX: http://pubs.opengroup.org/onlinepubs/7908799/xns/connect.html
* various: Spelling fixesVille Skyttä2017-05-29
|
* extmod/vfs_fat_misc: Remove dot-dirs filter since FatFS already does it.Damien George2017-05-13
|
* extmod/vfs: Use MP_S_IFDIR, MP_S_IFREG consts instead of magic numbers.Damien George2017-05-10
|
* extmod/vfs_fat: Replace listdir() with implementation of ilistdir().Damien George2017-05-10
| | | | | | VfsFat no longer has the listdir() method. Rather, if listdir() functionality is needed then one should use uos.listdir() which will call VfsFat.ilistdir().
* extmod/vfs: Implement mp_vfs_ilistdir().Damien George2017-05-10
| | | | | uos.ilistdir() is the core function, returning an iterator that yields 3-tuples. uos.listdir() is implemented in terms of ilistdir().
* extmod/vfs: Allow a VFS to be mounted at the root dir.Damien George2017-05-05
| | | | | | | This patch allows mounting of VFS objects right at the root directory, eg os.mount(vfs, '/'). It still allows VFS's to be mounted at a path within the root, eg os.mount(vfs, '/flash'), and such mount points will override any paths within a VFS that is mounted at the root.
* extmod/modlwip: ioctl POLL: Fix handling of peer closed socket.Paul Sokolovsky2017-05-01
| | | | | | | | | | Peer-closed socket is both readable and writable: read will return EOF, write - error. Without this poll will hang on such socket. Note that we don't return POLLHUP, based on argumentation in http://www.greenend.org.uk/rjk/tech/poll.html that it should apply to deeper disconnects, for example for networking, that would be link layer disconnect (e.g. WiFi went down).
* extmod/modlwip: getaddrinfo: Allow to accept all 6 standard params.Paul Sokolovsky2017-04-29
| | | | But warn if anything else but host/port is passed.
* extmod/moduselect: Implement ipoll() method for alloc-free polling.Paul Sokolovsky2017-04-29
| | | | Similar to the implementation added to unix port module previously.
* extmod/moduselect: Refactor towards introduction of poll.ipoll().Paul Sokolovsky2017-04-29
| | | | This follows previous refactor made to unix/moduselect.
* extmod/moduselect: Convert to MP_ROM_QSTR and friends.Paul Sokolovsky2017-04-29
|
* extmod/crypto-algorithms/sha256: Remove non-standard memory.h header.Paul Sokolovsky2017-04-27
|