Skip to content

Commit f56bed0

Browse files
committed
Add possibility to redefine irq handlers at application level
1 parent 5d67968 commit f56bed0

3 files changed

Lines changed: 14 additions & 0 deletions

File tree

include/FreeRTOSFATConfigDefaults.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,4 +521,10 @@
521521
#define FF_CreateIOManger FF_CreateIOManager
522522
#endif /* ffconfigENABLE_BACKWARD_COMPATIBILITY */
523523

524+
#ifndef ffconfigSDIO_DRIVER_DEFINES_INTERRUPT_HANDLER
525+
526+
/* Set to 0 if MCU interrupt handlers are defined at application level */
527+
#define ffconfigSDIO_DRIVER_DEFINES_INTERRUPT_HANDLER 1
528+
#endif
529+
524530
#endif /* ifndef FF_DEFAULTCONFIG_H */

portable/STM32F4xx/ff_sddisk.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,7 @@ static const char * prvSDCodePrintable( uint32_t ulCode )
11531153
#endif /* SDIO_USES_DMA != 0 */
11541154
/*-----------------------------------------------------------*/
11551155

1156+
#if ( ffconfigSDIO_DRIVER_DEFINES_INTERRUPT_HANDLER != 0 )
11561157
void HAL_GPIO_EXTI_Callback( uint16_t GPIO_Pin )
11571158
{
11581159
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
@@ -1163,10 +1164,13 @@ void HAL_GPIO_EXTI_Callback( uint16_t GPIO_Pin )
11631164
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
11641165
}
11651166
}
1167+
#endif
11661168
/*-----------------------------------------------------------*/
11671169

1170+
#if ( ffconfigSDIO_DRIVER_DEFINES_INTERRUPT_HANDLER != 0 )
11681171
void EXTI15_10_IRQHandler( void )
11691172
{
11701173
HAL_GPIO_EXTI_IRQHandler( configSD_DETECT_PIN ); /* GPIO PIN H.13 */
11711174
}
1175+
#endif
11721176
/*-----------------------------------------------------------*/

portable/STM32F7xx/ff_sddisk.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,7 @@ static const char * prvSDCodePrintable( uint32_t ulCode )
12631263
#endif /* SDIO_USES_DMA != 0 */
12641264
/*-----------------------------------------------------------*/
12651265

1266+
#if ( ffconfigSDIO_DRIVER_DEFINES_INTERRUPT_HANDLER != 0 )
12661267
void HAL_GPIO_EXTI_Callback( uint16_t GPIO_Pin )
12671268
{
12681269
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
@@ -1273,10 +1274,13 @@ void HAL_GPIO_EXTI_Callback( uint16_t GPIO_Pin )
12731274
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
12741275
}
12751276
}
1277+
#endif
12761278
/*-----------------------------------------------------------*/
12771279

1280+
#if ( ffconfigSDIO_DRIVER_DEFINES_INTERRUPT_HANDLER != 0 )
12781281
void EXTI15_10_IRQHandler( void )
12791282
{
12801283
HAL_GPIO_EXTI_IRQHandler( configSD_DETECT_PIN ); /* GPIO PIN H.13 */
12811284
}
1285+
#endif
12821286
/*-----------------------------------------------------------*/

0 commit comments

Comments
 (0)