Skip to content

Commit

Permalink
Merge pull request ChibiOS#358 from wlhlm/usbh-fix
Browse files Browse the repository at this point in the history
Fix USB host IRQ handler name
  • Loading branch information
fpoussin committed Jul 17, 2023
2 parents bd97c53 + 7d0dd0e commit da78eb3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 17 deletions.
4 changes: 2 additions & 2 deletions os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ static void usb_lld_serve_interrupt(USBHDriver *host) {
/*===========================================================================*/

#if STM32_USBH_USE_OTG1
OSAL_IRQ_HANDLER(STM32_OTG_FS_HANDLER) {
OSAL_IRQ_HANDLER(STM32_OTG1_HANDLER) {
OSAL_IRQ_PROLOGUE();
osalSysLockFromISR();
usb_lld_serve_interrupt(&USBHD1);
Expand All @@ -1429,7 +1429,7 @@ OSAL_IRQ_HANDLER(STM32_OTG_FS_HANDLER) {
#endif

#if STM32_USBH_USE_OTG2
OSAL_IRQ_HANDLER(STM32_OTG_HS_HANDLER) {
OSAL_IRQ_HANDLER(STM32_OTG2_HANDLER) {
OSAL_IRQ_PROLOGUE();
osalSysLockFromISR();
usb_lld_serve_interrupt(&USBHD2);
Expand Down
52 changes: 37 additions & 15 deletions testhal/STM32/STM32F4xx/USB_HOST/halconf.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
ChibiOS - Copyright (C) 2006..2023 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down Expand Up @@ -335,15 +335,18 @@
/*===========================================================================*/

/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
* This option is recommended also if the SPI driver does not
* use a DMA channel and heavily loads the CPU.
* @brief Timeout before assuming a failure while waiting for card idle.
* @note Time is in milliseconds.
*/
#if !defined(MMC_IDLE_TIMEOUT_MS) || defined(__DOXYGEN__)
#define MMC_IDLE_TIMEOUT_MS 1000
#endif

/**
* @brief Mutual exclusion on the SPI bus.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
#define MMC_NICE_WAITING TRUE
#if !defined(MMC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define MMC_USE_MUTUAL_EXCLUSION TRUE
#endif

/*===========================================================================*/
Expand Down Expand Up @@ -412,7 +415,27 @@
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE 64
#define SERIAL_BUFFERS_SIZE 16
#endif

/*===========================================================================*/
/* SIO driver related settings. */
/*===========================================================================*/

/**
* @brief Default bit rate.
* @details Configuration parameter, this is the baud rate selected for the
* default configuration.
*/
#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__)
#define SIO_DEFAULT_BITRATE 115200
#endif

/**
* @brief Support for thread synchronization API.
*/
#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__)
#define SIO_USE_SYNCHRONIZATION TRUE
#endif

/*===========================================================================*/
Expand Down Expand Up @@ -451,11 +474,10 @@
#endif

/**
* @brief Enables circular transfers APIs.
* @note Disabling this option saves both code and data space.
* @brief Inserts an assertion on function errors before returning.
*/
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
#define SPI_USE_CIRCULAR FALSE
#if !defined(SPI_USE_ASSERT_ON_ERROR) || defined(__DOXYGEN__)
#define SPI_USE_ASSERT_ON_ERROR TRUE
#endif

/**
Expand Down

0 comments on commit da78eb3

Please sign in to comment.