Damien George
d862a7b811
cc3200: Remove obsolete singleton heart-beat object.
8 years ago
Colin Hogben
104aa26271
cc3200, stmhal, teensy: Use pyhelp_print_obj function.
Update the help() implementations in the cc3200, stmhal and teensy
ports to use the pyhelp_print_obj function.
9 years ago
danicampora
73c9f85b4c
cc3200: Simplify the Timer API and correct the documents.
Make the PWM duty cycle configurable from 0.00 to 100.00 by
accepting values from 0 to 10000.
Add automatic Pin assignment when operating in PWM mode.
9 years ago
danicampora
056cb288d9
cc3200: Remove includes of rom.h (must be included via rom_map.h).
9 years ago
Damien George
731f359292
all: Add py/mphal.h and use it in all ports.
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.
9 years ago
Paul Sokolovsky
9b12bc788f
cc3200: Switch from HAL_GetTick() to mp_hal_ticks_ms().
9 years ago
danicampora
1f2daf4304
cc3200: Correct ticks_cpu and ticks_us functions in time module.
9 years ago
danicampora
d8137178bb
cc3200: Create wipy module, remove HeartBeat class.
The heartbeat is now controllable via a single function within the
wipy module.
9 years ago
Damien George
0334058fa4
Rename "Micro Python" to "MicroPython" in REPL, help, readme's and misc.
9 years ago
Daniel Campora
dbdcb58d64
cc3200: New irq API, affects all classes that provide the irq method.
9 years ago
Daniel Campora
dffa9f6da6
cc3200: New SD and RTC API plus os and time modules' extensions.
9 years ago
Daniel Campora
c69642a460
cc3200: Increase error led blynk period to 100ms
9 years ago
Daniel Campora
f91f212d9f
cc3200: New UART API plus related test.
9 years ago
Daniel Campora
36821d095a
cc3200: Add alternate functions list to Pin object.
Also remove pin.high() and pin.low() methods.
9 years ago
Daniel Campora
598aad2140
cc3200: Fix bug in pybsleep remove.
9 years ago
Daniel Campora
e3f8777ee8
cc3200: Implement new Pin API.
9 years ago
Daniel Campora
aa8e8acb7d
cc3200: Change HeartBeat period from 5 to 4 seconds.
9 years ago
Daniel Campora
9249242119
cc3200: Remove unneeded loops in the FreeRTOS hooks.
9 years ago
Daniel Campora
ea5061e409
cc3200: Improve callback API.
Rename "wakes" param to "wake_from" and make "value" an object
instead of an integer.
9 years ago
Daniel Campora
2673374d18
cc3200: Refactor PRCM special user bits implementation.
9 years ago
Daniel Campora
d18ced9cdd
cc3200: Use alternative HAL_Delay also when interrupts are disabled.
9 years ago
Daniel Campora
fa655ce196
cc3200: Improve interrupt handling and fix bug in HAL_Delay().
9 years ago
Daniel Campora
813b581127
cc3200: Add `Pin.name()` method.
10 years ago
Daniel Campora
330e21c986
cc3200: Use the pull up/down resistors on the antenna selection pins.
10 years ago
Daniel Campora
f960d753e4
cc3200: Fix bootloader build error.
10 years ago
Daniel Campora
6148f8b7d2
cc3200: Add contructor to the HeartBeat class.
10 years ago
Daniel Campora
491c321720
cc3200: Re-config antenna selection when waking from suspended mode.
10 years ago
Daniel Campora
b4a41a8f70
cc3200: Add missing antenna diversity source files.
10 years ago
Daniel Campora
a3acaa000c
cc3200: Add antenna selection feature to WLAN.
10 years ago
Daniel Campora
a3cf4ea2f6
cc3200: Do not kick the watchdog inside the idle task.
10 years ago
Daniel Campora
90d7c4ef3d
cc3200: Make HeartBeat.disable() thread safe.
10 years ago
Daniel Campora
c27dc38e85
cc3200: Re-name 'intmode' to 'mode' in the callback API.
10 years ago
Daniel Campora
8e611e8414
cc3200: Add Timer module. Supports free running, PWM and capture modes.
10 years ago
Daniel Campora
8c8d7f3c60
cc3200: Clean up pyb.Pin
Remove unused and unneeded functions, also create Pin.get_config() that
returns the whole configuration of the pin.
This reduces code size by ~500 bytes.
10 years ago
Damien George
259eaab9a9
cc3200: Clean up and reduce use/include of std.h.
10 years ago
Daniel Campora
c1a77a0c9f
cc3200: Use new %q format to print qstr's where appropiate.
10 years ago
Damien George
7f9d1d6ab9
py: Overhaul and simplify printf/pfenv mechanism.
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.
10 years ago
Daniel Campora
4be44014ab
cc3200: Reenable active interrupts when waking from suspended mode.
10 years ago
Daniel Campora
2d717ad97a
cc3200: Add callback support to the UART for RX interrupts.
10 years ago
Daniel Campora
26d230419c
cc3200: Add GPIO25 to the pins list of the WiPy and the WiPy-SD.
This allows to properly initialize the system led and add it
to the sleep module so that it can be restored when resuming
from suspended mode.
10 years ago
danicampora
c1c23e2f6a
cc3200: Remove superfluous code in pybsleep.
10 years ago
danicampora
c45e641c1d
cc3200: Re-name pybsystick to mpsystick.
10 years ago
danicampora
b2cb75efb7
cc3200: Remove double administration of callback objects.
10 years ago
danicampora
2c103d5200
cc3200: Rewrite the PRCM RTC functionality methods.
This allows to use the On-Chip retention registers for both the
RTC and to share notification flags between the bootloader and the
application. The two flags being shared right now are the "safe boot"
request and the WDT reset cause. we still have 2 more bits free for
future use.
10 years ago
danicampora
09721e2314
cc3200: Increase heartbeat period from 3 to 5 seconds.
10 years ago
danicampora
04749e677f
cc3200: Allow separate selection of the power mode in Pin callbacks.
10 years ago
danicampora
9e44383e3f
cc3200: Add power management framework. Add mpcallback class.
Supports suspend and hibernate modes. Waking is possible throug GPIO
and WLAN.
The mpcallback class is generic and can be reused by other classes.
10 years ago
danicampora
73aee8da54
cc3200: Merge ExtInt class into Pin class.
Also add another method to change the pin's interrupt mode
on the fly.
10 years ago
danicampora
0475de1350
cc3200: Make WDT and HeartBeat constant objects on their own right.
10 years ago
danicampora
d01060241a
cc3200: Add heartbeat signal on system led.
10 years ago