drivers/usbhost/usbhost_storage.c: Correct typo "const const" to "const".
arch/arm/src/stm32/stm32_i2s.c: In debug assertions, it on a sample rate of 0, but based on other code comments this value implies disabling the i2s master clock. arch/arm/src/stm32/stm32_usbhost.h and arch/arm/src/stm32/Kconfig: Allow vbus monitoring for the OTG_HS host driver.
This commit is contained in:
parent
2a555d1165
commit
2609b0dff3
@ -9403,6 +9403,14 @@ config STM32_OTGHS_SOFINTR
|
||||
---help---
|
||||
Enable SOF interrupts. Why would you ever want to do that?
|
||||
|
||||
config STM32_OTGHS_VBUS_CONTROL
|
||||
bool "Enable VBus Control"
|
||||
default y
|
||||
---help---
|
||||
Enable VBus control. Used when the board has VBus sensing and
|
||||
a power switch for the OTG HS USB port. Disable this config
|
||||
if the board lacks this USB VBus control circuitry.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "USB Host Debug Configuration"
|
||||
|
@ -1785,7 +1785,7 @@ static uint32_t stm32_i2s_rxsamplerate(struct i2s_dev_s *dev, uint32_t rate)
|
||||
{
|
||||
#if defined(I2S_HAVE_RX) && defined(I2S_HAVE_MCK)
|
||||
struct stm32_i2s_s *priv = (struct stm32_i2s_s *)dev;
|
||||
DEBUGASSERT(priv && priv->samplerate > 0 && rate > 0);
|
||||
DEBUGASSERT(priv && priv->samplerate >= 0 && rate > 0);
|
||||
|
||||
/* Check if the receiver is driven by the MCK */
|
||||
|
||||
@ -1985,7 +1985,7 @@ static uint32_t stm32_i2s_txsamplerate(struct i2s_dev_s *dev, uint32_t rate)
|
||||
#if defined(I2S_HAVE_TX) && defined(I2S_HAVE_MCK)
|
||||
struct stm32_i2s_s *priv = (struct stm32_i2s_s *)dev;
|
||||
|
||||
DEBUGASSERT(priv && priv->samplerate > 0 && rate > 0);
|
||||
DEBUGASSERT(priv && priv->samplerate >= 0 && rate > 0);
|
||||
|
||||
/* Check if the receiver is driven by the MCK/2 */
|
||||
|
||||
@ -2182,7 +2182,7 @@ static uint32_t i2s_mckdivider(struct stm32_i2s_s *priv)
|
||||
|
||||
uint16_t pllr = 5, plln = 256, div = 12, odd = 1;
|
||||
|
||||
DEBUGASSERT(priv && priv->samplerate > 0 && priv->datalen > 0);
|
||||
DEBUGASSERT(priv && priv->samplerate >= 0 && priv->datalen > 0);
|
||||
|
||||
/* A zero sample rate means to disable the MCK/2 clock */
|
||||
|
||||
|
@ -280,7 +280,7 @@ extern "C"
|
||||
*
|
||||
***********************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_OTGFS_VBUS_CONTROL
|
||||
#if defined(CONFIG_STM32_OTGFS_VBUS_CONTROL) || defined(CONFIG_STM32_OTGHS_VBUS_CONTROL)
|
||||
void stm32_usbhost_vbusdrive(int iface, bool enable);
|
||||
#endif
|
||||
|
||||
|
@ -261,7 +261,7 @@ static int usbhost_ioctl(FAR struct inode *inode, int cmd,
|
||||
* device.
|
||||
*/
|
||||
|
||||
static const const struct usbhost_id_s g_id =
|
||||
static const struct usbhost_id_s g_id =
|
||||
{
|
||||
USB_CLASS_MASS_STORAGE, /* base */
|
||||
USBMSC_SUBCLASS_SCSI, /* subclass */
|
||||
|
Loading…
Reference in New Issue
Block a user