<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/teensy/timer.c, branch v1.6</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.6</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.6'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-01-11T00:49:27+00:00</updated>
<entry>
<title>py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.</title>
<updated>2016-01-11T00:49:27+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-03T15:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5b3f0b7f39bd67cc9182993c288f09f67a0890df'/>
<id>urn:sha1:5b3f0b7f39bd67cc9182993c288f09f67a0890df</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>all: Add py/mphal.h and use it in all ports.</title>
<updated>2015-10-31T16:14:30+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-10-30T23:03:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=731f359292c0e2630873df1a19c5baac7287024f'/>
<id>urn:sha1:731f359292c0e2630873df1a19c5baac7287024f</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>py: Overhaul and simplify printf/pfenv mechanism.</title>
<updated>2015-04-16T14:30:16+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-04-09T22:56:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7f9d1d6ab923096582622b700bedb6a571518eac'/>
<id>urn:sha1:7f9d1d6ab923096582622b700bedb6a571518eac</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>teensy: Prefix includes with py/; remove need for -I../py.</title>
<updated>2015-01-01T21:13:30+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-01T21:13:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b68d98d61cc013da2df98e5d77d7bf3598d0dd4d'/>
<id>urn:sha1:b68d98d61cc013da2df98e5d77d7bf3598d0dd4d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>modsys: Add sys.print_exception(exc, file=sys.stdout) function.</title>
<updated>2014-12-08T20:25:49+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2014-12-06T12:29:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=46c3ab20049af16e97863e90e5761fae329f872a'/>
<id>urn:sha1:46c3ab20049af16e97863e90e5761fae329f872a</id>
<content type='text'>
The function is modeled after traceback.print_exception(), but unbloated,
and put into existing module to save overhead on adding another module.
Compliant traceback.print_exception() is intended to be implemented in
micropython-lib in terms of sys.print_exception().

This change required refactoring mp_obj_print_exception() to take pfenv_t
interface arguments.

Addresses #751.
</content>
</entry>
<entry>
<title>stmhal: Fix edge case for timer PWM of 100%.</title>
<updated>2014-09-29T13:15:01+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-09-29T13:15:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f042d7a4d7197d87798bc9727e9df094a3edd7c1'/>
<id>urn:sha1:f042d7a4d7197d87798bc9727e9df094a3edd7c1</id>
<content type='text'>
Also improve precision of calculating PWM percent in integer mode.
Also update teensy with edge case fix.
</content>
</entry>
<entry>
<title>Fix timer overflow code.</title>
<updated>2014-09-28T02:40:37+00:00</updated>
<author>
<name>Dave Hylands</name>
<email>dhylands@gmail.com</email>
</author>
<published>2014-09-26T16:04:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=39296b40d49b4b6b9373a80de67e017e540f1408'/>
<id>urn:sha1:39296b40d49b4b6b9373a80de67e017e540f1408</id>
<content type='text'>
Teensy doesn't need to worry about overflows since all of
its timers are only 16-bit.

For PWM, the pulse width needs to be able to vary from 0..period+1
(pulse-width == period+1 corresponds to 100% PWM)

I couldn't test the 0xffffffff cases since we can't currently get a
period that big in python. With a prescaler of 0, that corresponds
to a freq of 0.039 (i.e. cycle every 25.56 seconds), and we can't
set that using freq or period.

I also tested both stmhal and teensy with floats disabled, which
required a few other code changes to compile.
</content>
</entry>
<entry>
<title>stmhal, timer: Factor code to compute PWM percent; improve 32bit case.</title>
<updated>2014-09-25T14:44:10+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-09-25T14:44:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e8ea0724da1b2fd6f6eb1cc99154072159fc2c8d'/>
<id>urn:sha1:e8ea0724da1b2fd6f6eb1cc99154072159fc2c8d</id>
<content type='text'>
Also do the same for teensy timer code.
</content>
</entry>
<entry>
<title>Add pulse_width_percent to teensy.</title>
<updated>2014-09-24T06:19:36+00:00</updated>
<author>
<name>Dave Hylands</name>
<email>dhylands@gmail.com</email>
</author>
<published>2014-09-22T05:40:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=53d5fa641f322739ca372adcd1d4b53d5e2c0357'/>
<id>urn:sha1:53d5fa641f322739ca372adcd1d4b53d5e2c0357</id>
<content type='text'>
Fix stmhal and teensy print routines to report actual prescaler an period.
Fix teensy build to use soft-float
Add USE_ARDUINO_TOOLCHAIN option to teensy build
</content>
</entry>
<entry>
<title>Add Timer support (PWM, OC, IC) for stmhal and teensy</title>
<updated>2014-09-19T16:26:13+00:00</updated>
<author>
<name>Dave Hylands</name>
<email>dhylands@gmail.com</email>
</author>
<published>2014-08-20T20:21:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=becbc87fd73c98664b472b4a06c2b54558dd5669'/>
<id>urn:sha1:becbc87fd73c98664b472b4a06c2b54558dd5669</id>
<content type='text'>
</content>
</entry>
</feed>
