<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openmano-mpy/ports/stm32/usbdev, 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>stm32/usbdev: Fix calculation of SCSI LUN size with multiple LUNs.</title>
<updated>2020-07-24T15:12:07+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2020-07-22T13:45:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=fd2ff867a08fd174f0bbf7a03aa59547634e91ac'/>
<id>fd2ff867a08fd174f0bbf7a03aa59547634e91ac</id>
<content type='text'>
The SCSI driver calls GetCapacity to get the block size and number of
blocks of the underlying block-device/LUN.  It caches these values and uses
them later on to verify that reads/writes are within the bounds of the LUN.
But, prior to this commit, there was only one set of cached values for all
LUNs, so the bounds checking for a LUN could use incorrect values, values
from one of the other LUNs that most recently updated the cached values.
This would lead to failed SCSI requests.

This commit fixes this issue by having separate cached values for each LUN.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SCSI driver calls GetCapacity to get the block size and number of
blocks of the underlying block-device/LUN.  It caches these values and uses
them later on to verify that reads/writes are within the bounds of the LUN.
But, prior to this commit, there was only one set of cached values for all
LUNs, so the bounds checking for a LUN could use incorrect values, values
from one of the other LUNs that most recently updated the cached values.
This would lead to failed SCSI requests.

This commit fixes this issue by having separate cached values for each LUN.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>stm32/usbdev: Fix compile error if MICROPY_HW_USB_CDC_NUM is set to 2.</title>
<updated>2019-10-05T13:33:38+00:00</updated>
<author>
<name>Martin Fischer</name>
</author>
<published>2019-10-03T20:30:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=a0ce01f62e4e5f8103ab3e607f90fe931e866892'/>
<id>a0ce01f62e4e5f8103ab3e607f90fe931e866892</id>
<content type='text'>
Fixes regression introduced by 6705767da1f7dba7a04e1d16c380a650f1f1074f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes regression introduced by 6705767da1f7dba7a04e1d16c380a650f1f1074f
</pre>
</div>
</content>
</entry>
<entry>
<title>stm32/usb: Verify number of used endpoints doesn't exceed maximum.</title>
<updated>2019-09-11T05:17:38+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2019-09-11T04:59:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=bcaafa382323c5d15988f20782c2737f05a4c002'/>
<id>bcaafa382323c5d15988f20782c2737f05a4c002</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>stm32/usb: Add support for VCP+MSC+HID mode, incl 2xVCP and 3xVCP.</title>
<updated>2019-09-11T05:17:38+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2019-07-05T14:19:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=6705767da1f7dba7a04e1d16c380a650f1f1074f'/>
<id>6705767da1f7dba7a04e1d16c380a650f1f1074f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>stm32/usbd: Make USB device FIFO sizes dynamically configurable.</title>
<updated>2019-08-15T03:56:50+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2019-08-01T11:49:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=25d3509986aadb8f2a0d4d87d75b64223087512a'/>
<id>25d3509986aadb8f2a0d4d87d75b64223087512a</id>
<content type='text'>
Allows to optimise and configure the FIFO sizes depending on the USB device
configuration selected at runtime, eg VCP+MSC vs 3xVCP+MSC.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allows to optimise and configure the FIFO sizes depending on the USB device
configuration selected at runtime, eg VCP+MSC vs 3xVCP+MSC.
</pre>
</div>
</content>
</entry>
<entry>
<title>stm32/usbd_hid_interface: Rewrite USB HID interface code.</title>
<updated>2019-07-25T07:42:17+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2019-07-25T07:42:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=fa07deda9f129c1992726d2a51c6eaac168247f0'/>
<id>fa07deda9f129c1992726d2a51c6eaac168247f0</id>
<content type='text'>
The previous version did not work on MCUs that only had USB device mode
(compared to OTG) because of the handling of NAK.  And this previous
handling of NAK had a race condition where a new packet could come in
before USBD_HID_SetNAK was called (since USBD_HID_ReceivePacket clears NAK
as part of its operation).  Furthermore, the double buffering of incoming
reports was not working, only one buffer could be used at a time.

This commit rewrites the HID interface code to have a single incoming
buffer, and only calls USBD_HID_ReceivePacket after the user has read the
incoming report (similar to how the VCP does its flow control).  As such,
USBD_HID_SetNAK and USBD_HID_ClearNAK are no longer needed.

API functionality from the user's point of view should be unchanged with
this commit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous version did not work on MCUs that only had USB device mode
(compared to OTG) because of the handling of NAK.  And this previous
handling of NAK had a race condition where a new packet could come in
before USBD_HID_SetNAK was called (since USBD_HID_ReceivePacket clears NAK
as part of its operation).  Furthermore, the double buffering of incoming
reports was not working, only one buffer could be used at a time.

This commit rewrites the HID interface code to have a single incoming
buffer, and only calls USBD_HID_ReceivePacket after the user has read the
incoming report (similar to how the VCP does its flow control).  As such,
USBD_HID_SetNAK and USBD_HID_ClearNAK are no longer needed.

API functionality from the user's point of view should be unchanged with
this commit.
</pre>
</div>
</content>
</entry>
<entry>
<title>stm32/usb: Add config options to disable USB MSC and/or HID.</title>
<updated>2019-07-16T04:39:21+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2019-07-16T04:39:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=f302f784e96f0b7daa019b282bdf66c1792eec34'/>
<id>f302f784e96f0b7daa019b282bdf66c1792eec34</id>
<content type='text'>
The new configurations MICROPY_HW_USB_MSC and MICROPY_HW_USB_HID can be
used by a board to enabled or disable MSC and/or HID.  They are both
enabled by default.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new configurations MICROPY_HW_USB_MSC and MICROPY_HW_USB_HID can be
used by a board to enabled or disable MSC and/or HID.  They are both
enabled by default.
</pre>
</div>
</content>
</entry>
<entry>
<title>stm32: Update components to work with new H7xx HAL.</title>
<updated>2019-07-03T13:40:49+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2019-07-03T13:40:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=73e8b7e0e4a7c9f89094ffe7d93c6d897a86b67a'/>
<id>73e8b7e0e4a7c9f89094ffe7d93c6d897a86b67a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>stm32/usbd_msc: Provide Mode Sense response data in MSC interface.</title>
<updated>2019-06-11T05:43:59+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2019-06-11T05:35:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=38bcc99a586d7d6e5f51fcb330a12c4c42007162'/>
<id>38bcc99a586d7d6e5f51fcb330a12c4c42007162</id>
<content type='text'>
Eventually these responses could be filled in by a function to make their
contents dynamic, depending on the attached logical units.  But for now
they are fixed, and this patch fixes the MODE SENSE(6) responses so it is
the correct length with the correct header.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Eventually these responses could be filled in by a function to make their
contents dynamic, depending on the attached logical units.  But for now
they are fixed, and this patch fixes the MODE SENSE(6) responses so it is
the correct length with the correct header.
</pre>
</div>
</content>
</entry>
<entry>
<title>stm32/usbd_msc: Provide custom irquiry processing by MSC interface.</title>
<updated>2019-06-11T05:43:58+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2019-06-11T05:23:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=829aa58c5ca5dc9681b642c27c9a6906957ca643'/>
<id>829aa58c5ca5dc9681b642c27c9a6906957ca643</id>
<content type='text'>
So the MSC interface can customise the inquiry response based on the
attached logical units.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So the MSC interface can customise the inquiry response based on the
attached logical units.
</pre>
</div>
</content>
</entry>
</feed>
