aboutsummaryrefslogtreecommitdiff
path: root/stmhal/can.c
AgeCommit message (Collapse)Author
2017-09-06ports: Make new ports/ sub-directory and move all ports there.Damien George
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.
2017-08-30all: Convert remaining "mp_uint_t n_args" to "size_t n_args".Damien George
This is to have consistency across the whole repository.
2017-08-29stmhal: Update to new STM Cube HAL library.Damien George
This upgrades the HAL to the versions: - F4 V1.16.0 - F7 V1.7.0 - L4 V1.8.1 The main changes were in the SD card driver. The vendor changed the SD read/write functions to accept block number intead of byte address, so there is no longer any need for a custom patch for this in stm32lib. The CardType values also changed, so pyb.SDCard().info() will return different values for the 3rd element of the tuple, but this function was never documented.
2017-07-31all: Use the name MicroPython consistently in commentsAlexander Steffen
There were several different spellings of MicroPython present in comments, when there should be only one.
2017-06-15stmhal: Make error messages more consistent across peripherals.Damien George
2017-06-15all: Make more use of mp_raise_{msg,TypeError,ValueError} helpers.Damien George
2017-05-06stmhal: Convert all module and method tables to use MP_ROM macros.Damien George
2017-03-29stmhal: Update to use size_t for tuple/list accessors.Damien George
2017-03-20stmhal: Enable micropython.schedule().Damien George
ExtInt, Timer and CAN IRQ callbacks are made to work with the scheduler. They are still hard IRQs by default, but one can now call micropython.schedule within the hard IRQ to schedule a soft callback.
2017-01-04all: Consistently update signatures of .make_new and .call methods.Paul Sokolovsky
Otherwise, they serve reoccurring source of copy-paste mistakes and breaking nanbox build.
2016-12-02py/stream: Move ad-hoc ioctl constants to stream.h and rename them.Damien George
The constants MP_IOCTL_POLL_xxx, which were stmhal-specific, are moved from stmhal/pybioctl.h (now deleted) to py/stream.h. And they are renamed to MP_STREAM_POLL_xxx to be consistent with other such constants. All uses of these constants have been updated.
2016-11-16stmhal/can: clear FIFO flags in IRQ handlerKrzysztof Blazewicz
HAL Driver before v1.4.2 had a bug which caused clearing all pending flags in MSR, TSR, RF0R and RF1R instead of only the requested one. This is why micropython got away without explicitly clearing flags in IRQ handler.
2016-06-18all: Rename mp_obj_type_t::stream_p to protocol.Paul Sokolovsky
It's now used for more than just stream protocol (e.g. pin protocol), so don't use false names.
2016-05-10stmhal: Convert to use internal errno symbols; enable uerrno module.Damien George
2016-05-08stmhal/can: Allow to get existing CAN obj if constructed without args.Henrik Sölver
Initialisation of CAN objects should now behave as other peripheral objects. Fixes issue #2001.
2016-01-11py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.Damien George
The first argument to the type.make_new method is naturally a uPy type, and all uses of this argument cast it directly to a pointer to a type structure. So it makes sense to just have it a pointer to a type from the very beginning (and a const pointer at that). This patch makes such a change, and removes all unnecessary casting to/from mp_obj_t.
2015-11-02stmhal/can: Fix a bug in filter handling.Henrik Sölver
Reported here: http://forum.micropython.org/viewtopic.php?f=2&t=845
2015-11-01stmhal: Add symbolic #defines for interrupt levels in irq.h.Dave Curtis
2015-10-31all: Add py/mphal.h and use it in all ports.Damien George
py/mphal.h contains declarations for generic mp_hal_XXX functions, such as stdio and delay/ticks, which ports should provide definitions for. A port will also provide mphalport.h with further HAL declarations.
2015-05-27stmhal: Remove PYBVxx defines and use config vars for UART/CAN names.Damien George
Now all stmhal-based boards can name their peripherals (if they want) to any string.
2015-04-18stmhal: Add support for sending and receiving CAN RTR messages.Henrik
2015-04-16stmhal: Allow sending CAN messages with timeout=0.Damien George
Thanks to Henrik Sölver for this patch.
2015-04-16stmhal: Use new %q format to print qstr's in a few more places.blmorris
Saves 68 bytes.
2015-04-16py: Overhaul and simplify printf/pfenv mechanism.Damien George
Previous to this patch the printing mechanism was a bit of a tangled mess. This patch attempts to consolidate printing into one interface. All (non-debug) printing now uses the mp_print* family of functions, mainly mp_printf. All these functions take an mp_print_t structure as their first argument, and this structure defines the printing backend through the "print_strn" function of said structure. Printing from the uPy core can reach the platform-defined print code via two paths: either through mp_sys_stdout_obj (defined pert port) in conjunction with mp_stream_write; or through the mp_plat_print structure which uses the MP_PLAT_PRINT_STRN macro to define how string are printed on the platform. The former is only used when MICROPY_PY_IO is defined. With this new scheme printing is generally more efficient (less layers to go through, less arguments to pass), and, given an mp_print_t* structure, one can call mp_print_str for efficiency instead of mp_printf("%s", ...). Code size is also reduced by around 200 bytes on Thumb2 archs.
2015-02-15stmhal: Add support for CAN rx callbacks.Henrik Sölver
2015-01-21py: Remove mp_obj_str_builder and use vstr instead.Damien George
With this patch str/bytes construction is streamlined. Always use a vstr to build a str/bytes object. If the size is known beforehand then use vstr_init_len to allocate only required memory. Otherwise use vstr_init and the vstr will grow as needed. Then use mp_obj_new_str_from_vstr to create a str/bytes object using the vstr memory. Saves code ROM: 68 bytes on stmhal, 108 bytes on bare-arm, and 336 bytes on unix x64.
2015-01-01stmhal: Prefix includes with py/; remove need for -I../py.Damien George
2014-11-26Adding CAN filter managementHenrik Sölver
2014-11-17stream: Convert .ioctl() to take fixed number of args.Paul Sokolovsky
This is more efficient, as allows to use register calling convention. If needed, a structure pointer can be passed as argument to pass more data.
2014-11-15stmhal: Improve CAN init so that it can take sjw, bs1, bs2 args.Damien George
Also update docs to explain how CAN baudrate is determined.
2014-10-31stmhal: Update some inlined docs for network and CAN.Damien George
2014-10-30stmhal: Improve CAN print function.Damien George
2014-10-30stmhal: Added support for extended CAN frames.Henrik Sölver
2014-10-23stmhal: Use OSError with POSIX error code for HAL errors.Damien George
Addresses issue #921.
2014-10-05stmhal: Add config option to disable/enable CAN driver.Damien George
2014-10-02stmhal: Add basic CAN bus support.Damien George