<feed xmlns='http://www.w3.org/2005/Atom'>
<title>feurig/libmaplemidi-cma/libmaple/usb/usb.h, 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>2011-10-21T22:13:06+00:00</updated>
<entry>
<title>usb.h: Move to libmaple/.</title>
<updated>2011-10-21T22:13:06+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-10-21T22:11:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=061fae7206039e7b427f7a2fbbd47512217e8faf'/>
<id>urn:sha1:061fae7206039e7b427f7a2fbbd47512217e8faf</id>
<content type='text'>
Apart from having an unstable API, usb.h is now a fairly good citizen
of libmaple, so move it to live with the rest of the libmaple headers.

Its device struct is still "struct usblib_dev".  Leave that there; the
asymmetry with the rest of the library is a good reminder that the API
isn't really on equal footing with the rest of the library.

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: 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:50:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=d21d68fd36ba0ab1192f2707fbffdd6c778a4d9a'/>
<id>urn:sha1:d21d68fd36ba0ab1192f2707fbffdd6c778a4d9a</id>
<content type='text'>
Remove usbSuspend(), usbResumeInit(), usbResume(), the USB
low-priority IRQ, and usbWaitReset() from usb.h.  Also remove
RESUME_STATE since it was only there for usbResume().

These functions don't need to be seen by anybody except for usb.c and
usb_cdcacm.c, so move them there (altering their names to fit with
libmaple style guidelines) and mark them static.

Clean up includes in usb.c while we're there.

Signed-off-by: Marti Bolivar &lt;mbolivar@leaflabs.com&gt;
</content>
</entry>
<entry>
<title>usb.h: Mark API unstable.</title>
<updated>2011-10-21T22:13:00+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-10-21T21:36:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=ef5efb025b1dc762d5a0d7ed1c46e97c6b7f8319'/>
<id>urn:sha1:ef5efb025b1dc762d5a0d7ed1c46e97c6b7f8319</id>
<content type='text'>
The USB API is heavily reliant on the ST stack, and additionally
assumes that all USB is the USB FS peripheral.  As such, it's going to
have to change as we go forward.

Signed-off-by: Marti Bolivar &lt;mbolivar@leaflabs.com&gt;
</content>
</entry>
<entry>
<title>usb.h, usb.c: Cleanups</title>
<updated>2011-10-18T17:30:18+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-08-11T16:42:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=6dba382743b6ab4079914f39ec5979f326199669'/>
<id>urn:sha1:6dba382743b6ab4079914f39ec5979f326199669</id>
<content type='text'>
Remove wIstr. This cleans up the control flow. wIstr is still declared
in usb_lib/usb_regs.h, but it's unused throughout the code base.

Remove bIntPackSOF.  Only written, never read.

Signed-off-by: Marti Bolivar &lt;mbolivar@leaflabs.com&gt;
</content>
</entry>
<entry>
<title>usb: Clean up some globals with new struct usblib_dev.</title>
<updated>2011-10-18T17:30:18+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-08-10T21:13:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=1418bb4ff1269d9427846d94f42b0aa7383a002d'/>
<id>urn:sha1:1418bb4ff1269d9427846d94f42b0aa7383a002d</id>
<content type='text'>
Add struct usblib_dev (and USBLIB, a pointer to the singleton) to
usb.h.  USBLIB contains the global state which is used by
functionality imported from usb_lib/.

Consolidating global state into USBLIB will make it easier to remove
later.

Initial fields in struct usblib_dev are endpoint interrupt callbacks,
a mask for what to handle in the low-priority USB interrupt, and
device state.  These replace pEpInt_IN, pEpInt_OUT; wInterrupt_Mask;
and bDeviceState, respectively from usb_lib/, so remove their
declarations from usb_lib_globals.h accordingly.  Also remove unused
SaveState declaration from usblib_globals.h. Move bDeviceState into
'state' field in usblib_dev.  Device state type changes from
DEVICE_STATE to usb_dev_state, volatile gets dropped, and enumerators
get a 'USB_' prefix, but it's otherwise the same.

usb_lib/ expects pInformation to point to   Device_Info,
                 pUser_Standard_Requests -&gt; User_Standard_Requests, and
                 pProperty               -&gt; Device_Property.

Alter usb_init_usblib() to reflect these assumptions.  Reorganize
usb_lib_globals.h to make these assumptions more apparent to the
reader.

Modify usb_init_usblib() to take endpoint callbacks as arguments;
update its caller in usb_cdcacm.c.

usb_lib/ defines pInformation, pProperty, and pUser_Standard_Requests
itself (in usb_init.c), but we have our own definitions (in usb.c).
Remove the duplicates from usb.c.  Also remove EPindex and Device_Info
definitions from usb.c. Unused, and anyways already defined in
usb_lib/usb_init.c.

Signed-off-by: Marti Bolivar &lt;mbolivar@leaflabs.com&gt;
</content>
</entry>
<entry>
<title>Remove usb_config.h.</title>
<updated>2011-10-18T17:30:18+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-08-10T19:45:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=d7afdbe6b41a77938863854a1e719398e6c35094'/>
<id>urn:sha1:d7afdbe6b41a77938863854a1e719398e6c35094</id>
<content type='text'>
Move its defines into usb_cdcacm.c and usb.[hc] as appropriate.

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>
<entry>
<title>usb: Remove usbPowerOff(), move usbPowerOn() to usb_callbacks.c.</title>
<updated>2011-10-18T17:30:17+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-09-23T21:42:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=07bc0c7001da263a0095e8d52e9828672d85210b'/>
<id>urn:sha1:07bc0c7001da263a0095e8d52e9828672d85210b</id>
<content type='text'>
Remove usbPowerOn(), usbPowerOff() prototypes from usb.h.  These
aren't used outside of the USB subsystem, so they don't belong here.

Move usbPowerOn() from usb.c to usb_callbacks.c.  This is the only
place where it's used.  Remove the unused usbPowerOff() (from usb.c)
altogether.

Signed-off-by: Marti Bolivar &lt;mbolivar@leaflabs.com&gt;
</content>
</entry>
<entry>
<title>usb: Prepare for moving some files to usb_reg_map.h.</title>
<updated>2011-10-18T17:30:17+00:00</updated>
<author>
<name>Marti Bolivar</name>
<email>mbolivar@leaflabs.com</email>
</author>
<published>2011-09-23T21:31:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/feurig/libmaplemidi-cma/commit/?id=51a2d9793b5df67ae453f1f825345493c2c88784'/>
<id>urn:sha1:51a2d9793b5df67ae453f1f825345493c2c88784</id>
<content type='text'>
usb_config.h: Remove usb_regs.h dependency; fix includes; add license.

usb_callbacks.h: Change includes to the pieces of usb_lib/ it uses,
which doesn't include usb_regs.h.

descriptors.h: Remove unused usb_lib.h include.

usb.h: Remove unused usb_lib.h include.  Some cosmetic commenting.

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