<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/extmod/machine_signal.c, branch 2.2.4</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=2.2.4</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=2.2.4'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-07-26T02:51:46+00:00</updated>
<entry>
<title>extmod/machine_signal: Fix parsing of invert arg when Pin is first arg.</title>
<updated>2017-07-26T02:51:46+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-07-26T02:51:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=653a0c2d71100998a9cce0b7e2eb29ce54014aab'/>
<id>urn:sha1:653a0c2d71100998a9cce0b7e2eb29ce54014aab</id>
<content type='text'>
</content>
</entry>
<entry>
<title>extmod/machine_signal: Rename "inverted" arg to "invert", it's shorter.</title>
<updated>2017-04-15T18:01:47+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-04-12T03:00:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=61616e84ce41e1b1a0fad62704488d79b87cfbe2'/>
<id>urn:sha1:61616e84ce41e1b1a0fad62704488d79b87cfbe2</id>
<content type='text'>
A shorter name takes less code size, less room in scripts and is faster to
type at the REPL.

Tests and HW-API examples are updated to reflect the change.
</content>
</entry>
<entry>
<title>extmod/machine_signal: Support all Pin's arguments to the constructor.</title>
<updated>2017-04-10T21:12:20+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-04-10T21:12:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=605ff91efdeb3cd7e4948c0398c839a9ae06044a'/>
<id>urn:sha1:605ff91efdeb3cd7e4948c0398c839a9ae06044a</id>
<content type='text'>
This implements the orginal idea is that Signal is a subclass of Pin, and
thus can accept all the same argument as Pin, and additionally, "inverted"
param. On the practical side, it allows to avoid many enclosed parenses for
a typical declararion, e.g. for Zephyr:

Signal(Pin(("GPIO_0", 1))).

Of course, passing a Pin to Signal constructor is still supported and is the
most generic form (e.g. Unix port will only support such form, as it doesn't
have "builtin" Pins), what's introduces here is just practical readability
optimization.

"value" kwarg is treated as applying to a Signal (i.e. accounts for possible
inversion).
</content>
</entry>
<entry>
<title>extmod/machine_signal: Implement Signal .on() and .off() methods.</title>
<updated>2017-02-08T08:14:23+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-02-08T08:14:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=181f7d145002731e5baec0f2c43ac57818447f8b'/>
<id>urn:sha1:181f7d145002731e5baec0f2c43ac57818447f8b</id>
<content type='text'>
Each method asserts and deasserts signal respectively. They are equivalent
to .value(1) and .value(0) but conceptually simpler (and may help to avoid
confusion with inverted signals, where "asserted" state means logical 0
output).
</content>
</entry>
<entry>
<title>extmod/machine_signal: Implement "signal" abstraction for machine module.</title>
<updated>2017-01-29T15:57:36+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-01-01T16:09:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7a7516d40ddc00b051dd8dcf8ab38b5f845dcec4'/>
<id>urn:sha1:7a7516d40ddc00b051dd8dcf8ab38b5f845dcec4</id>
<content type='text'>
A signal is like a pin, but ca also be inverted (active low). As such, it
abstracts properties of various physical devices, like LEDs, buttons,
relays, buzzers, etc. To instantiate a Signal:

pin = machine.Pin(...)
signal = machine.Signal(pin, inverted=True)

signal has the same .value() and __call__() methods as a pin.
</content>
</entry>
</feed>
