aboutsummaryrefslogtreecommitdiff
path: root/stm/led.c
AgeCommit message (Collapse)Author
2014-05-21stm: Remove long-obsolete stm/ port.Damien George
2014-03-30Merge map.h into obj.h.Damien George
Pretty much everyone needs to include map.h, since it's such an integral part of the Micro Python object implementation. Thus, the definitions are now in obj.h instead. map.h is removed.
2014-03-26Remove mp_obj_type_t.methods entry and use .locals_dict instead.Damien George
Originally, .methods was used for methods in a ROM class, and locals_dict for methods in a user-created class. That distinction is unnecessary, and we can use locals_dict for ROM classes now that we have ROMable maps. This removes an entry in the bloated mp_obj_type_t struct, saving a word for each ROM object and each RAM object. ROM objects that have a methods table (now a locals_dict) need an extra word in total (removed the methods pointer (1 word), no longer need the sentinel (2 words), but now need an mp_obj_dict_t wrapper (4 words)). But RAM objects save a word because they never used the methods entry. Overall the ROM usage is down by a few hundred bytes, and RAM usage is down 1 word per user-defined type/class. There is less code (no need to check 2 tables), and now consistent with the way ROM modules have their tables initialised. Efficiency is very close to equivaluent.
2014-03-26Change mp_method_t.name from const char * to qstr.Damien George
Addresses issue #377.
2014-02-26Update LED configurationDave Hylands
2014-02-23stm: Make pendsv_nlr_jump work when debugging is enabled.Damien George
Stack layout is different when -g used, so need to handle the pendsv jump differently. Addresses Issue #315.
2014-02-15Implement proper exception type hierarchy.Damien George
Each built-in exception is now a type, with base type BaseException. C exceptions are created by passing a pointer to the exception type to make an instance of. When raising an exception from the VM, an instance is created automatically if an exception type is raised (as opposed to an exception instance). Exception matching (RT_BINARY_OP_EXCEPTION_MATCH) is now proper. Handling of parse error changed to match new exceptions. mp_const_type renamed to mp_type_type for consistency.
2014-02-15Change mp_obj_type_t.name from const char * to qstr.Damien George
Ultimately all static strings should be qstr. This entry in the type structure is only used for printing error messages (to tell the type of the bad argument), and printing objects that don't supply a .print method.
2014-02-01stm: Add support for ctrl-C to interrupt running Python.Damien George
Using PendSV interrupt at lowest priority, code can now raise an exception during an interrupt by calling pendsv_nlr_jump. The exception will be raised when all interrupts are finished. This is used to trap ctrl-C from the USB VCP to break out of running Python code.
2014-01-23stm: Remove unnecessary #includes; small other changes.Damien George
2014-01-23Move LED defs to mpconfigport.hmux
2014-01-21stm: Clean up main.c; disable libgcc by default.Damien George
f2d and d2f functions from libgcc does not work correctly, most likely due to the ABI being incorrect. libgcc disabled for now.
2014-01-21stm: Put TARGET in mpconfigport.h; support PYBv4.Damien George
2014-01-21Revamp qstrs: they now include length and hash.Damien George
Can now have null bytes in strings. Can define ROM qstrs per port using qstrdefsport.h
2014-01-15stm: Fix print methods with new kind argument.Damien George
2014-01-07Merge branch 'cplusplus' of https://github.com/ian-v/micropython into ↵Damien George
ian-v-cplusplus Conflicts: py/objcomplex.c
2014-01-06stm: Re-fix LED defines.Damien George
2014-01-06Merge branch 'master' of https://github.com/iabdalkader/micropythonDamien George
2014-01-06Revert MP_BOOL, etc. and use <stdbool.h> insteadian-v
2014-01-06Co-exist with C++ (issue #85)ian-v
2014-01-06Fix LED pin enummux
* Fix LED pin enum, first one should start at 1 * Fix LED initialization typo
2014-01-05Merge pull request #89 from pfalcon/c99-tagged-structsDamien George
Convert many object types structs to use C99 tagged initializer syntax.
2014-01-05stm: pull-up usr switch on pyboard (fixes regression).Damien George
2014-01-05Convert many object types structs to use C99 tagged initializer syntax.Paul Sokolovsky
2014-01-05Add Initial Support for STM32F4DISCOVERY Boardmux
* Add a TARGET definition to Makefile (default PYBOARD). * Add support for discovery LEDs in led module. * Add support for discovery user switch in usersw * Add EXTI interrupt handler for discovery user switch on (PA0). * Parameterize led and usrsw modules pins and port. * Issue #83
2014-01-04Convert Python types to proper Python type hierarchy.Damien George
Now much more inline with how CPython does types.
2013-12-21Change object representation from 1 big union to individual structs.Damien
A big change. Micro Python objects are allocated as individual structs with the first element being a pointer to the type information (which is itself an object). This scheme follows CPython. Much more flexible, not necessarily slower, uses same heap memory, and can allocate objects statically. Also change name prefix, from py_ to mp_ (mp for Micro Python).
2013-10-23Implement simple servo control using PWM.Damien
2013-10-19Working SysTick, code factoring, some boot-up code.Damien
2013-10-18Partially implement proper flash storage.Damien