<feed xmlns='http://www.w3.org/2005/Atom'>
<title>feurig/libmaplemidi-cma/wirish/usb_serial.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>2013-01-17T20:23:37+00:00</updated>
<entry>
<title>Check if the last packet sent was the full endpoint size, in this case flush the host buffers by sending a 0 byte packet</title>
<updated>2013-01-17T20:23:37+00:00</updated>
<author>
<name>Manuel Odendahl</name>
<email>wesen@ruinwesen.com</email>
</author>
<published>2013-01-17T16:42:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=cea8158e97f21bde96f3561baade15400fafdfd2'/>
<id>urn:sha1:cea8158e97f21bde96f3561baade15400fafdfd2</id>
<content type='text'>
Signed-off-by: Manuel Odendahl &lt;wesen@ruinwesen.com&gt;
</content>
</entry>
<entry>
<title>usb_serial.cpp: Hackishly silence spurious warnings on VLDiscovery.</title>
<updated>2012-08-27T20:50:57+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2012-08-27T20:47:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=2022b933bef4b9ff448e6681f51a5c0c4510bd1c'/>
<id>urn:sha1:2022b933bef4b9ff448e6681f51a5c0c4510bd1c</id>
<content type='text'>
Guard hooks with BOARD_HAVE_SERIALUSB to keep GCC quiet.

Signed-off-by: Marti Bolivar &lt;mbolivar@leaflabs.com&gt;
</content>
</entry>
<entry>
<title>usb_serial.cpp: Neaten up reset signal RX hook.</title>
<updated>2012-08-22T17:26:43+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2012-08-22T17:26:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=64e8a234bfbfbf0569fc8522576f58f4c41d6b16'/>
<id>urn:sha1:64e8a234bfbfbf0569fc8522576f58f4c41d6b16</id>
<content type='text'>
Move magic bytes from stack to Flash. De-magic-number sizeof magic
byte buffer. Use uintptr_t instead of unsigned int when casting
address of wait_reset().

Based on a patch by Michael Hope.

Signed-off-by: Marti Bolivar &lt;mbolivar@leaflabs.com&gt;
</content>
</entry>
<entry>
<title>Move bootloader reset signal detection to Wirish.</title>
<updated>2012-07-31T19:04:49+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2012-07-31T19:00:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=365f45679b99a6bcb1da7eb7eaa62738332515f4'/>
<id>urn:sha1:365f45679b99a6bcb1da7eb7eaa62738332515f4</id>
<content type='text'>
Use usb_cdcacm hooks to move the DTR edge and "1EAF" magic packet
detection to usb_serial.cpp. We'll later be able to extend this system
to support Leonardo-style reset signalling.

Signed-off-by: Marti Bolivar &lt;mbolivar@leaflabs.com&gt;
</content>
</entry>
<entry>
<title>usb_serial.cpp: Minor tweak.</title>
<updated>2012-07-25T21:19:41+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2012-07-25T21:19:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=77efc209f9b4cb38374ebc2af42380a9275a7cbd'/>
<id>urn:sha1:77efc209f9b4cb38374ebc2af42380a9275a7cbd</id>
<content type='text'>
Signed-off-by: Marti Bolivar &lt;mbolivar@leaflabs.com&gt;
</content>
</entry>
<entry>
<title>Slightly improve and generify the USB infrastructure.</title>
<updated>2012-06-04T02:40:39+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2012-06-03T10:00:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=8796a81efc61a7406625ee278125a52c62e626f4'/>
<id>urn:sha1:8796a81efc61a7406625ee278125a52c62e626f4</id>
<content type='text'>
The good news is that &lt;libmaple/usb.h&gt; and &lt;libmaple/usb_cdcacm.h&gt; did
turn out generic enough in what they specify to go on unchanged.

However, we can't just go on assuming that there's USB just because
we're on an F1. Now that there's value line in the tree, we need to be
more careful (value line F1s don't have USB peripherals). To that end,
make all the F1 board-includes/*.mk files specify what line their MCU
is with an MCU_F1_LINE variable. Use that to hack
libmaple/usb/rules.mk so we only try to build the USB module under
appropriate circumstances.

While we're at it, add a vector_symbols.inc for value line MCUs under
support/ld/. We need this to get the target-config.mk modifications
implied by the addition of MCU_F1_LINE. We'll fix up some other
performance-line-isms under libmaple/stm32f1 in a separate commit.

Also in libmaple/usb/:

- Move everything into a new stm32f1 directory. Due to aforementioned
  rules.mk hacks, there is no immediate need for an stm32f2
  directory (USB support doesn't exist there).

- Update the README for style and content.

Signed-off-by: Marti Bolivar &lt;mbolivar@leaflabs.com&gt;
</content>
</entry>
<entry>
<title>Make USB its own submodule.</title>
<updated>2012-04-11T20:56:51+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-11-16T18:26:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=04760fa17b1d816f0cfd47cd75003400c93e037e'/>
<id>urn:sha1:04760fa17b1d816f0cfd47cd75003400c93e037e</id>
<content type='text'>
Add libmaple/usb/rules.mk, which compiles the USB FS device firmware
submodule. Move the logic for compiling the USB stack from
libmaple/rules.mk into libmaple/usb/rules.mk.

Move libmaple/usb/usb_cdacm.h to libmaple/include/libmaple/. Its API
is sufficiently general that we'll be able to port it over to USB
OTG (either FS or HS) eventually, and that lets us include it from
Wirish using the new style for libmaple headers.

Fix the includes for public libmaple headers within libmaple/usb.

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>USB: API cleanups.</title>
<updated>2011-10-21T22:13:05+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-10-21T21:55:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=9be44ebd8602d7f13cc4b69fd4b6d695ddbc3865'/>
<id>urn:sha1:9be44ebd8602d7f13cc4b69fd4b6d695ddbc3865</id>
<content type='text'>
Modify usb.h functions (changing their names in some cases) to also
take a usblib_dev* argument, to fit in better with the rest of
libmaple.

Store an rcc_clk_id in struct usblib_dev for the same reason.

Signed-off-by: Marti Bolivar &lt;mbolivar@leaflabs.com&gt;
</content>
</entry>
<entry>
<title>usb: Disentangle CDC ACM functionality.</title>
<updated>2011-10-18T17:30:18+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-09-23T21:56:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=494f05b23607438c8e23efb736046d34ceac3bed'/>
<id>urn:sha1:494f05b23607438c8e23efb736046d34ceac3bed</id>
<content type='text'>
Add new usb_cdcacm.h, which provides the virtual serial port API.
This file (and new usb_cdcacm.c) consolidate the VCOM support, which
was previously distributed through descriptors.[hc], usb.[hc],
usb_callbacks.[hc], and usb_config.h.

Add usb_init_usblib() to usb.h, as a way of initializing the USB
peripheral in terms of the data structures required by usb_lib.  This
is used by the new usb_cdcacm_enable().

Create new usb_lib_globals.h, with declarations for the usb_lib global
state which is most used throughout the rest of the libmaple USB stack.

Remove descriptors.c and usb_callbacks.[hc]; they are no longer
necessary.

Update the USB README accordingly.

Signed-off-by: Marti Bolivar &lt;mbolivar@leaflabs.com&gt;
</content>
</entry>
</feed>
