STM32 HUB: Fix more compilation errors when hub support is enabled
This commit is contained in:
parent
2f7682f7df
commit
a4455d07c1
5 changed files with 21 additions and 12 deletions
|
|
@ -193,6 +193,7 @@ config EFM32_OTGFS
|
|||
bool "USB Full-Speed OTG"
|
||||
default n
|
||||
depends on EFM32_HAVE_OTGFS && EXPERIMENTAL
|
||||
select USBHOST_HAVE_ASYNCH if USBHOST
|
||||
|
||||
config EFM32_TIMER0
|
||||
bool "TIMER0"
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@ struct efm32_chan_s
|
|||
sem_t waitsem; /* Channel wait semaphore */
|
||||
volatile uint8_t result; /* The result of the transfer */
|
||||
volatile uint8_t chreason; /* Channel halt reason. See enum efm32_chreason_e */
|
||||
uint8_t chidx; /* Channel index */
|
||||
uint8_t epno; /* Device endpoint number (0-127) */
|
||||
uint8_t eptype; /* See EFM32_USB_EPTYPE_* definitions */
|
||||
uint8_t funcaddr; /* Device function address */
|
||||
|
|
@ -1031,7 +1032,7 @@ static int efm32_chan_waitsetup(FAR struct efm32_usbhost_s *priv,
|
|||
|
||||
#ifdef CONFIG_USBHOST_ASYNCH
|
||||
static int efm32_chan_asynchsetup(FAR struct efm32_usbhost_s *priv,
|
||||
FAR struct efm32_chan_s *chan.
|
||||
FAR struct efm32_chan_s *chan,
|
||||
usbhost_asynch_t callback, FAR void *arg)
|
||||
{
|
||||
irqstate_t flags = irqsave();
|
||||
|
|
@ -1159,7 +1160,7 @@ static void efm32_chan_wakeup(FAR struct efm32_usbhost_s *priv,
|
|||
{
|
||||
/* Handle continuation of IN/OUT pipes */
|
||||
|
||||
if (priv->in)
|
||||
if (chan->in)
|
||||
{
|
||||
efm32_in_next(priv, chan);
|
||||
}
|
||||
|
|
@ -1911,7 +1912,7 @@ static void efm32_in_next(FAR struct efm32_usbhost_s *priv,
|
|||
* endpoint type
|
||||
*/
|
||||
|
||||
ret = efm32_in_setup(priv, chidx);
|
||||
ret = efm32_in_setup(priv, chan->chidx);
|
||||
if (ret >= 0)
|
||||
{
|
||||
return;
|
||||
|
|
@ -2182,7 +2183,7 @@ static void efm32_out_next(FAR struct efm32_usbhost_s *priv,
|
|||
* endpoint type
|
||||
*/
|
||||
|
||||
ret = efm32_out_setup(priv, chidx);
|
||||
ret = efm32_out_setup(priv, chan->chidx);
|
||||
if (ret >= 0)
|
||||
{
|
||||
return;
|
||||
|
|
@ -4962,6 +4963,7 @@ static inline void efm32_sw_initialize(FAR struct efm32_usbhost_s *priv)
|
|||
for (i = 0; i < EFM32_MAX_TX_FIFOS; i++)
|
||||
{
|
||||
FAR struct efm32_chan_s *chan = &priv->chan[i];
|
||||
chan->chidx = i;
|
||||
sem_init(&chan->waitsem, 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1393,11 +1393,13 @@ config STM32_OTGFS
|
|||
bool "OTG FS"
|
||||
default n
|
||||
depends on STM32_HAVE_OTGFS
|
||||
select USBHOST_HAVE_ASYNCH if USBHOST
|
||||
|
||||
config STM32_OTGHS
|
||||
bool "OTG HS"
|
||||
default n
|
||||
depends on STM32_STM32F207 || STM32_STM32F40XX || STM32_STM32F429
|
||||
select USBHOST_HAVE_ASYNCH if USBHOST
|
||||
|
||||
config STM32_PWR
|
||||
bool "PWR"
|
||||
|
|
|
|||
|
|
@ -206,6 +206,7 @@ struct stm32_chan_s
|
|||
sem_t waitsem; /* Channel wait semaphore */
|
||||
volatile uint8_t result; /* The result of the transfer */
|
||||
volatile uint8_t chreason; /* Channel halt reason. See enum stm32_chreason_e */
|
||||
uint8_t chidx; /* Channel index */
|
||||
uint8_t epno; /* Device endpoint number (0-127) */
|
||||
uint8_t eptype; /* See OTGFS_EPTYPE_* definitions */
|
||||
uint8_t funcaddr; /* Device function address */
|
||||
|
|
@ -1036,7 +1037,7 @@ static int stm32_chan_waitsetup(FAR struct stm32_usbhost_s *priv,
|
|||
|
||||
#ifdef CONFIG_USBHOST_ASYNCH
|
||||
static int stm32_chan_asynchsetup(FAR struct stm32_usbhost_s *priv,
|
||||
FAR struct stm32_chan_s *chan.
|
||||
FAR struct stm32_chan_s *chan,
|
||||
usbhost_asynch_t callback, FAR void *arg)
|
||||
{
|
||||
irqstate_t flags = irqsave();
|
||||
|
|
@ -1164,7 +1165,7 @@ static void stm32_chan_wakeup(FAR struct stm32_usbhost_s *priv,
|
|||
{
|
||||
/* Handle continuation of IN/OUT pipes */
|
||||
|
||||
if (priv->in)
|
||||
if (chan->in)
|
||||
{
|
||||
stm32_in_next(priv, chan);
|
||||
}
|
||||
|
|
@ -1916,7 +1917,7 @@ static void stm32_in_next(FAR struct stm32_usbhost_s *priv,
|
|||
* endpoint type
|
||||
*/
|
||||
|
||||
ret = stm32_in_setup(priv, chidx);
|
||||
ret = stm32_in_setup(priv, chan->chidx);
|
||||
if (ret >= 0)
|
||||
{
|
||||
return;
|
||||
|
|
@ -2187,7 +2188,7 @@ static void stm32_out_next(FAR struct stm32_usbhost_s *priv,
|
|||
* endpoint type
|
||||
*/
|
||||
|
||||
ret = stm32_out_setup(priv, chidx);
|
||||
ret = stm32_out_setup(priv, chan->chidx);
|
||||
if (ret >= 0)
|
||||
{
|
||||
return;
|
||||
|
|
@ -5007,6 +5008,7 @@ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv)
|
|||
for (i = 0; i < STM32_MAX_TX_FIFOS; i++)
|
||||
{
|
||||
FAR struct stm32_chan_s *chan = &priv->chan[i];
|
||||
chan->chidx = i;
|
||||
sem_init(&chan->waitsem, 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -206,6 +206,7 @@ struct stm32_chan_s
|
|||
sem_t waitsem; /* Channel wait semaphore */
|
||||
volatile uint8_t result; /* The result of the transfer */
|
||||
volatile uint8_t chreason; /* Channel halt reason. See enum stm32_chreason_e */
|
||||
uint8_t chidx; /* Channel index */
|
||||
uint8_t epno; /* Device endpoint number (0-127) */
|
||||
uint8_t eptype; /* See OTGHS_EPTYPE_* definitions */
|
||||
uint8_t funcaddr; /* Device function address */
|
||||
|
|
@ -1036,7 +1037,7 @@ static int stm32_chan_waitsetup(FAR struct stm32_usbhost_s *priv,
|
|||
|
||||
#ifdef CONFIG_USBHOST_ASYNCH
|
||||
static int stm32_chan_asynchsetup(FAR struct stm32_usbhost_s *priv,
|
||||
FAR struct stm32_chan_s *chan.
|
||||
FAR struct stm32_chan_s *chan,
|
||||
usbhost_asynch_t callback, FAR void *arg)
|
||||
{
|
||||
irqstate_t flags = irqsave();
|
||||
|
|
@ -1164,7 +1165,7 @@ static void stm32_chan_wakeup(FAR struct stm32_usbhost_s *priv,
|
|||
{
|
||||
/* Handle continuation of IN/OUT pipes */
|
||||
|
||||
if (priv->in)
|
||||
if (chan->in)
|
||||
{
|
||||
stm32_in_next(priv, chan);
|
||||
}
|
||||
|
|
@ -1916,7 +1917,7 @@ static void stm32_in_next(FAR struct stm32_usbhost_s *priv,
|
|||
* endpoint type
|
||||
*/
|
||||
|
||||
ret = stm32_in_setup(priv, chidx);
|
||||
ret = stm32_in_setup(priv, chan->chidx);
|
||||
if (ret >= 0)
|
||||
{
|
||||
return;
|
||||
|
|
@ -2187,7 +2188,7 @@ static void stm32_out_next(FAR struct stm32_usbhost_s *priv,
|
|||
* endpoint type
|
||||
*/
|
||||
|
||||
ret = stm32_out_setup(priv, chidx);
|
||||
ret = stm32_out_setup(priv, chan->chidx);
|
||||
if (ret >= 0)
|
||||
{
|
||||
return;
|
||||
|
|
@ -5007,6 +5008,7 @@ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv)
|
|||
for (i = 0; i < STM32_MAX_TX_FIFOS; i++)
|
||||
{
|
||||
FAR struct stm32_chan_s *chan = &priv->chan[i];
|
||||
chan->chidx = i;
|
||||
sem_init(&chan->waitsem, 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue