<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openmano-mpy/examples, branch master</title>
<subtitle>MicroPython source and hardware configuration for OpenMano</subtitle>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/'/>
<entry>
<title>rp2/rp2_pio: Add fifo_join support for PIO.</title>
<updated>2021-04-16T14:45:38+00:00</updated>
<author>
<name>Tim Radvan</name>
</author>
<published>2021-04-02T18:35:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=f842a40df4d26bd74b92a3903096fc6b1709222d'/>
<id>f842a40df4d26bd74b92a3903096fc6b1709222d</id>
<content type='text'>
The PIO state machines on the RP2040 have 4 word deep TX and RX FIFOs.  If
you only need one direction, you can "merge" them into either a single 8
word deep TX or RX FIFO.

We simply add constants to the PIO object, and set the appropriate bits in
`shiftctrl`.

Resolves #6854.

Signed-off-by: Tim Radvan &lt;tim@tjvr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The PIO state machines on the RP2040 have 4 word deep TX and RX FIFOs.  If
you only need one direction, you can "merge" them into either a single 8
word deep TX or RX FIFO.

We simply add constants to the PIO object, and set the appropriate bits in
`shiftctrl`.

Resolves #6854.

Signed-off-by: Tim Radvan &lt;tim@tjvr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>examples/embedding: Fix example so it compiles again.</title>
<updated>2021-04-09T05:47:54+00:00</updated>
<author>
<name>Santeri Paavolainen</name>
</author>
<published>2021-02-24T08:33:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=42035e5eded531d41319ffde999fa5a97478c872'/>
<id>42035e5eded531d41319ffde999fa5a97478c872</id>
<content type='text'>
There were a few changes that had broken this example, specifically
2cdf1d25f59409b6130c0e8b6cf50300aed2d7e6 removed file.c from ports/unix.
And (at least for MacOS) mp_state_ctx must be placed in the BSS with
-fno-common so it is visible to the linker.

Signed-off-by: Santeri Paavolainen &lt;santtu@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There were a few changes that had broken this example, specifically
2cdf1d25f59409b6130c0e8b6cf50300aed2d7e6 removed file.c from ports/unix.
And (at least for MacOS) mp_state_ctx must be placed in the BSS with
-fno-common so it is visible to the linker.

Signed-off-by: Santeri Paavolainen &lt;santtu@iki.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>examples/usercmodules: Simplify user C module enabling.</title>
<updated>2021-04-01T05:27:38+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-03-30T13:45:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=d87f42b0e53829052f17955ba1e17f938ae486fb'/>
<id>d87f42b0e53829052f17955ba1e17f938ae486fb</id>
<content type='text'>
It's a bit of a pitfall with user C modules that including them in the
build does not automatically enable them.  This commit changes the docs and
examples for user C modules to encourage writers of user C modules to
enable them unconditionally.  This makes things simpler and covers most use
cases.

See discussion in issue #6960, and also #7086.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's a bit of a pitfall with user C modules that including them in the
build does not automatically enable them.  This commit changes the docs and
examples for user C modules to encourage writers of user C modules to
enable them unconditionally.  This makes things simpler and covers most use
cases.

See discussion in issue #6960, and also #7086.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>examples/usercmodule: Add micropython.cmake to the C and CPP examples.</title>
<updated>2021-03-30T13:27:46+00:00</updated>
<author>
<name>Phil Howard</name>
</author>
<published>2021-02-23T23:06:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=cc497d4c6a7bbf491fbc57b9447632bddff8d566'/>
<id>cc497d4c6a7bbf491fbc57b9447632bddff8d566</id>
<content type='text'>
examples/usercmodule/micropython.cmake:

Root micropython.cmake file is responsible for including modules.

examples/usercmodule/cexample/micropython.cmake:
examples/usercmodule/cppexample/micropython.cmake:

Module micropython.cmake files define the target and link it to usermod.

Signed-off-by: Phil Howard &lt;phil@pimoroni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
examples/usercmodule/micropython.cmake:

Root micropython.cmake file is responsible for including modules.

examples/usercmodule/cexample/micropython.cmake:
examples/usercmodule/cppexample/micropython.cmake:

Module micropython.cmake files define the target and link it to usermod.

Signed-off-by: Phil Howard &lt;phil@pimoroni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>all: Rename BYTES_PER_WORD to MP_BYTES_PER_OBJ_WORD.</title>
<updated>2021-02-04T11:46:42+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-02-04T05:39:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=ad4656b861f94277bed9647ca176e662ce5119e3'/>
<id>ad4656b861f94277bed9647ca176e662ce5119e3</id>
<content type='text'>
The "word" referred to by BYTES_PER_WORD is actually the size of mp_obj_t
which is not always the same as the size of a pointer on the target
architecture.  So rename this config value to better reflect what it
measures, and also prefix it with MP_.

For uses of BYTES_PER_WORD in setting the stack limit this has been
changed to sizeof(void *), because the stack usually grows with
machine-word sized values (eg an nlr_buf_t has many machine words in it).

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "word" referred to by BYTES_PER_WORD is actually the size of mp_obj_t
which is not always the same as the size of a pointer on the target
architecture.  So rename this config value to better reflect what it
measures, and also prefix it with MP_.

For uses of BYTES_PER_WORD in setting the stack limit this has been
changed to sizeof(void *), because the stack usually grows with
machine-word sized values (eg an nlr_buf_t has many machine words in it).

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>examples/rp2: Add pio_uart_rx.py example.</title>
<updated>2021-02-02T00:33:51+00:00</updated>
<author>
<name>Tim Radvan</name>
</author>
<published>2021-02-01T20:07:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=3ea05e499d52beaecf4c9c54a67510ac031fe27b'/>
<id>3ea05e499d52beaecf4c9c54a67510ac031fe27b</id>
<content type='text'>
This was adapted from the `pio/uart_rx` example from the `pico-examples`
repository:
https://github.com/raspberrypi/pico-examples/blob/master/pio/uart_rx/uart_rx.pio

It demonstrates the `jmp_pin` feature in action.

Signed-off-by: Tim Radvan &lt;tim@tjvr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was adapted from the `pio/uart_rx` example from the `pico-examples`
repository:
https://github.com/raspberrypi/pico-examples/blob/master/pio/uart_rx/uart_rx.pio

It demonstrates the `jmp_pin` feature in action.

Signed-off-by: Tim Radvan &lt;tim@tjvr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rp2: Add new port to Raspberry Pi RP2 microcontroller.</title>
<updated>2021-01-29T13:42:29+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-01-20T13:34:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=469345e7285128739e2934e7934e107ffda79fc1'/>
<id>469345e7285128739e2934e7934e107ffda79fc1</id>
<content type='text'>
This commit adds a new port "rp2" which targets the new Raspberry Pi RP2040
microcontroller.

The build system uses pure cmake (with a small Makefile wrapper for
convenience).  The USB driver is TinyUSB, and there is a machine module
with most of the standard classes implemented.  Some examples are provided
in the examples/rp2/ directory.

Work done in collaboration with Graham Sanderson.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds a new port "rp2" which targets the new Raspberry Pi RP2040
microcontroller.

The build system uses pure cmake (with a small Makefile wrapper for
convenience).  The USB driver is TinyUSB, and there is a machine module
with most of the standard classes implemented.  Some examples are provided
in the examples/rp2/ directory.

Work done in collaboration with Graham Sanderson.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>examples/bluetooth: Add bonding/passkey demo.</title>
<updated>2020-12-02T03:44:00+00:00</updated>
<author>
<name>Jim Mussared</name>
</author>
<published>2020-11-26T12:54:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=f6fd46c4024c28c827ccffd13dbe02b9ea74cfb8'/>
<id>f6fd46c4024c28c827ccffd13dbe02b9ea74cfb8</id>
<content type='text'>
Signed-off-by: Jim Mussared &lt;jim.mussared@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jim Mussared &lt;jim.mussared@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>extmod/modbluetooth: Allow setting char/desc enc/auth options.</title>
<updated>2020-12-02T03:36:50+00:00</updated>
<author>
<name>Andrew Leech</name>
</author>
<published>2020-08-26T23:13:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=1697ff335db523ff0809051d42871beb9c86012d'/>
<id>1697ff335db523ff0809051d42871beb9c86012d</id>
<content type='text'>
This widens the characteristic/descriptor flags to 16-bit, to allow setting
encryption/authentication requirements.

Sets the required flags for NimBLE and btstack implementations.

The BLE.FLAG_* constants will eventually be deprecated in favour of copy
and paste Python constants (like the IRQs).

Signed-off-by: Jim Mussared &lt;jim.mussared@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This widens the characteristic/descriptor flags to 16-bit, to allow setting
encryption/authentication requirements.

Sets the required flags for NimBLE and btstack implementations.

The BLE.FLAG_* constants will eventually be deprecated in favour of copy
and paste Python constants (like the IRQs).

Signed-off-by: Jim Mussared &lt;jim.mussared@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>examples: Add example code for user C modules, both C and C++.</title>
<updated>2020-10-29T04:30:42+00:00</updated>
<author>
<name>stijn</name>
</author>
<published>2020-10-21T09:13:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=25c4563f26c2270cde01b01dca0e8b801c9c8282'/>
<id>25c4563f26c2270cde01b01dca0e8b801c9c8282</id>
<content type='text'>
Add working example code to provide a starting point for users with files
that they can just copy, and include the modules in the coverage test to
verify the complete user C module build functionality.  The cexample module
uses the code originally found in cmodules.rst, which has been updated to
reflect this and partially rewritten with more complete information.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add working example code to provide a starting point for users with files
that they can just copy, and include the modules in the coverage test to
verify the complete user C module build functionality.  The cexample module
uses the code originally found in cmodules.rst, which has been updated to
reflect this and partially rewritten with more complete information.
</pre>
</div>
</content>
</entry>
</feed>
