summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/modpybpin.c
Commit message (Collapse)AuthorAge
* esp8266: Add mp_hal_pin_input() and mp_hal_pin_output() functions.Damien George2016-05-26
|
* esp8266/modpybpin: Make pin.irq() methods take keyword args.Damien George2016-05-03
|
* esp8266/modpybpin: Use None instead of PULL_NONE for no-pull config.Damien George2016-05-03
|
* esp8266/modpybpin: Use enum+array instead of struct for parsing args.Damien George2016-05-03
|
* py: Move call_function_*_protected() functions to py/ for reuse.Paul Sokolovsky2016-04-25
| | | | They almost certainly needed by any C code which calls Python callbacks.
* esp8266: Convert mp_hal_pin_obj_t from pin ptr to simple integer.Damien George2016-04-22
| | | | | | | | | Most pin I/O can be done just knowing the pin number as a simple integer, and it's more efficient this way (code size, speed) because it doesn't require a memory lookup to get the pin id from the pin object. If the full pin object is needed then it can be easily looked up in the pin table.
* esp8266: Add hard IRQ callbacks for pin change on GPIO0-15.Damien George2016-04-14
|
* esp8266: Add dummy entries for non-existing pins to simplify pin logic.Damien George2016-04-14
| | | | | Now pins can be easily looked up in the table using the pin number as the index and vice versa.
* esp8266: Remove pin_id field from C pin object.Damien George2016-04-14
| | | | This field is the same as phys_port and not needed.
* esp8266: Expose pin object as a public structure for use as C pin API.Damien George2016-03-24
| | | | | This is an initial attempt at making a simple C pin API for writing things like I2C drivers in C.
* esp8266/modpybpin: Add support for GPIO16.Paul Sokolovsky2016-03-05
| | | | GPIO16 is actually special-function I/O, though some boards have LED there.
* esp8266: Expose simple pin API at C level.Damien George2016-03-05
|
* esp8266: Implement Pin.__call__() and Pin.OPEN_DRAIN mode.Damien George2016-03-05
| | | | | OPEN_DRAIN is of course synthesised. All pin modes are tested and working.
* py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.Damien George2016-01-11
| | | | | | | | 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.
* esp8266: Update to SDK version 1.1.0 (MIT-licensed).Josef Gajdusek2015-05-30
| | | | | | | | | 1. Updated linker script, now user app appears to contain exception vector table and oesn't work (faults) without it. 2. Commened out support for GPIO pulldown, which was removed in this SDK version without clear explanation, but apparently because it was released without proper validation, and now turns out it doesn't work as expected, or there's a different function there.
* py: Overhaul and simplify printf/pfenv mechanism.Damien George2015-04-16
| | | | | | | | | | | | | | | | | | | | | | 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.
* esp8266: Add basic pyb.Pin class; supports output mode only.Damien George2015-02-13