<feed xmlns='http://www.w3.org/2005/Atom'>
<title>feurig/libmaplemidi-cma/examples/test-session.cpp, branch master</title>
<subtitle>C and C++ library for STM32 ARM Cortex-M3 development boards.</subtitle>
<id>https://git.suspectdevices.com/feurig/libmaplemidi-cma/atom?h=master</id>
<link rel='self' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/'/>
<updated>2012-08-04T02:53:31+00:00</updated>
<entry>
<title>test session: Add SerialUSB benchmark to 'U' command.</title>
<updated>2012-08-04T02:53:31+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2012-08-04T02:52:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=cac3fd3b964cd01e3fc6fd1d908006b7c01847cc'/>
<id>urn:sha1:cac3fd3b964cd01e3fc6fd1d908006b7c01847cc</id>
<content type='text'>
I'm currently measuring over 500 KB/sec with screen as my serial
monitor. If I don't display the output at all, I get over 600
KB/sec. Nice!

Signed-off-by: Marti Bolivar &lt;mbolivar@leaflabs.com&gt;
</content>
</entry>
<entry>
<title>Move public headers to include directories; related cleanups.</title>
<updated>2012-04-11T20:56:50+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-11-15T17:45:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=954f9e5065b39fe4c683f4d216b54326d876f51b'/>
<id>urn:sha1:954f9e5065b39fe4c683f4d216b54326d876f51b</id>
<content type='text'>
Move libmaple/*.h to (new) libmaple/include/libmaple/. The new
accepted way to include a libmaple header foo.h is with:

    #include &lt;libmaple/foo.h&gt;

This is more polite in terms of the include namespace. It also allows
us to e.g. implement the Arduino SPI library at all (which has header
SPI.h; providing it was previously impossible on case-insensitive
filesystems due to libmaple's spi.h).

Similarly for Wirish.

The old include style (#include "header.h") is now deprecated.

libmaple/*.h:

- Change include guard #defines from _FOO_H_ to _LIBMAPLE_FOO_H_.
- Add license headers where they're missing
- Add conditional extern "C" { ... } blocks where they're missing
  (they aren't always necessary, but we might was well do it against
  the future, while we're at it.).
- Change includes from #include "foo.h" to #include &lt;libmaple/foo.h&gt;.
- Move includes after extern "C".
- Remove extra trailing newlines

Note that this doesn't include the headers under libmaple/usb/ or
libmaple/usb/usb_lib. These will get fixed later.

libmaple/*.c:

- Change includes from #include "foo.h" to #include &lt;libmaple/foo.h&gt;.

Makefile:

- Add I$(LIBMAPLE_PATH)/include/libmaple to GLOBAL_FLAGS.  This allows
  for users (including Wirish) to migrate their code, but should go
  away ASAP, since it slows down compilation.

Wirish:

- Move wirish/**/*.h to (new) wirish/include/wirish/.  This ignores
  the USB headers, which, as usual, are getting handled after
  everything else.

- Similarly generify wirish/boards/ structure. For each supported
  board "foo", move wirish/boards/foo.h and wirish/boards/foo.cpp to
  wirish/boards/foo/include/board/board.h and
  wirish/boards/foo/board.cpp, respectively. Also remove the #ifdef
  hacks around the .cpp files.

- wirish/rules.mk: put wirish/boards/foo/include in the include path
  (and add wirish/boards/foo/board.cpp to the list of sources to be
  compiled). This allows saying:

      #include &lt;board/board.h&gt;

  instead of the hack currently in place. We can allow the user to
  override this setting later to make adding custom board definitions
  easier.

- Disable -Werror in libmaple/rules.mk, as the current USB warnings
  don't let the olimex_stm32_h103 board compile. We can re-enable
  -Werror once we've moved the board-specific bits out of libmaple
  proper.

libraries, examples:

- Update includes accordingly.
- Miscellaneous cosmetic fixups.

Signed-off-by: Marti Bolivar &lt;mbolivar@leaflabs.com&gt;
</content>
</entry>
<entry>
<title>test-session: Add test case for disabling USB.</title>
<updated>2011-09-24T20:01:47+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-06-15T20:59:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=20ba449984bf4b5468b192a947f86b30ce222b23'/>
<id>urn:sha1:20ba449984bf4b5468b192a947f86b30ce222b23</id>
<content type='text'>
This replaces the previously undocumented 'd' option, which tested the
pin mode INPUT_PULLDOWN.

Signed-off-by: Marti Bolivar &lt;mbolivar@leaflabs.com&gt;
</content>
</entry>
<entry>
<title>test-session.cpp: Fix 'd' command.</title>
<updated>2011-09-06T22:46:27+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-09-06T22:43:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=4fe0c9ffdad61c832d99d04debcb4d6e2ad91770'/>
<id>urn:sha1:4fe0c9ffdad61c832d99d04debcb4d6e2ad91770</id>
<content type='text'>
Actually read a character each time we ask for one.  Put pin 22 back
into OUTPUT mode when we're done.
</content>
</entry>
<entry>
<title>test-session.cpp: Tweak output.</title>
<updated>2011-08-31T19:00:37+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-08-31T19:00:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=23f1f96bcac430580dbe86a7e846a3e578d3382e'/>
<id>urn:sha1:23f1f96bcac430580dbe86a7e846a3e578d3382e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>test-session.cpp: Measure ADC noise sequentially.</title>
<updated>2011-08-31T17:06:07+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-08-31T16:35:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=a38b67d2d50f054f9b45647d5545ec95b2c61a02'/>
<id>urn:sha1:a38b67d2d50f054f9b45647d5545ec95b2c61a02</id>
<content type='text'>
Measure pins one at a time.
</content>
</entry>
<entry>
<title>test-session.cpp: Multiple ADC noise measurements by default.</title>
<updated>2011-08-31T17:06:07+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-08-31T15:35:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=b4e37dcde139653783949862f681f3f891b116d9'/>
<id>urn:sha1:b4e37dcde139653783949862f681f3f891b116d9</id>
<content type='text'>
Each call to measure_adc_noise() now does
N_ADC_NOISE_MEASUREMENTS (currently 40) samples, instead of just 1.
</content>
</entry>
<entry>
<title>test-session.cpp: Better analog noise readings.</title>
<updated>2011-08-31T17:06:07+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-08-31T15:26:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=46d51a687bfa129e7eff55e619ca3fc5abe2c0fe'/>
<id>urn:sha1:46d51a687bfa129e7eff55e619ca3fc5abe2c0fe</id>
<content type='text'>
Update measure_adc_noise() to actually use the Welford online
algorithm, instead of accumulating data in an array on the stack.
This allows us to increase the number of samples (to 1000).

Revised algorithm tested on host PC and compared (in Python) against
numpy with a list of 100 values in [0, 1) drawn using random.random().

Results (Python):

    &gt;&gt;&gt; r = [random.random() for i in xrange(100)]
    &gt;&gt;&gt; numpy.mean(r)
    0.50073064742634854
    &gt;&gt;&gt; numpy.var(r)
    0.083726090293309297

Results (C++, x86 host PC):

     n: 100	mean: 0.500731	variance: 0.084572

So this algorithm for variance has some inaccuracies, but it appears
to be good to a couple of significant figures.
</content>
</entry>
<entry>
<title>test-session.cpp: Tweak output.</title>
<updated>2011-08-30T22:37:01+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-08-30T22:37:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=4de92fe0d5f965fc6990adbb2b175e59b32bb3bb'/>
<id>urn:sha1:4de92fe0d5f965fc6990adbb2b175e59b32bb3bb</id>
<content type='text'>
Print input as if it were an ASCII character, not a number.
</content>
</entry>
<entry>
<title>Keep it 80-column clean.</title>
<updated>2011-06-07T18:44:39+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-06-07T18:44:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=450e1c6e17329525639670855043bb169740702d'/>
<id>urn:sha1:450e1c6e17329525639670855043bb169740702d</id>
<content type='text'>
Go through overlong source code lines and convert as many of them as
appropriate to be 80-column clean.  This mostly affects license
headers.  Overlong lines are determined by running following from the
libmaple base directory:

$ ack-grep --nocolor --nogroup --cpp --cc --ignore-dir=usb -- '.{80}'

Note that this excludes libmaple's usb subdirectory, which is still
full of ST code that doesn't follow the libmaple source code
guidelines.

Contents of ~/.ackrc (these won't matter, but are included for
completeness):

--ignore-dir=docs
--ignore-dir=build
--type-set
ld=.ld
--type-set
rst=.rst
--type-set
txt=.txt
--type-set
mk=.mk
</content>
</entry>
</feed>
