Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
# Currently no unit tests
formatting:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check Formatting of Files
Expand Down
34 changes: 22 additions & 12 deletions portable/STM32F4xx/ff_sddisk.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@
#define sdARRAY_SIZE( x ) ( int ) ( sizeof( x ) / sizeof( x )[ 0 ] )
#endif

#ifndef ffconfigSDIO_DRIVER_DEFINES_SD_DETECTION_INTERRUPT_HANDLER
/* Set to 0 to remove SD detection interrupt handlers definition. */
#define ffconfigSDIO_DRIVER_DEFINES_SD_DETECTION_INTERRUPT_HANDLER 1
#endif


/*-----------------------------------------------------------*/

/*
Expand Down Expand Up @@ -1153,20 +1159,24 @@ static const char * prvSDCodePrintable( uint32_t ulCode )
#endif /* SDIO_USES_DMA != 0 */
/*-----------------------------------------------------------*/

void HAL_GPIO_EXTI_Callback( uint16_t GPIO_Pin )
{
BaseType_t xHigherPriorityTaskWoken = pdFALSE;

if( GPIO_Pin == configSD_DETECT_PIN )
#if ( ffconfigSDIO_DRIVER_DEFINES_SD_DETECTION_INTERRUPT_HANDLER != 0 )
void HAL_GPIO_EXTI_Callback( uint16_t GPIO_Pin )
{
vApplicationCardDetectChangeHookFromISR( &xHigherPriorityTaskWoken );
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
BaseType_t xHigherPriorityTaskWoken = pdFALSE;

if( GPIO_Pin == configSD_DETECT_PIN )
{
vApplicationCardDetectChangeHookFromISR( &xHigherPriorityTaskWoken );
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
}
}
#endif /* ffconfigSDIO_DRIVER_DEFINES_SD_DETECTION_INTERRUPT_HANDLER != 0*/
/*-----------------------------------------------------------*/

void EXTI15_10_IRQHandler( void )
{
HAL_GPIO_EXTI_IRQHandler( configSD_DETECT_PIN ); /* GPIO PIN H.13 */
}
#if ( ffconfigSDIO_DRIVER_DEFINES_SD_DETECTION_INTERRUPT_HANDLER != 0 )
void EXTI15_10_IRQHandler( void )
{
HAL_GPIO_EXTI_IRQHandler( configSD_DETECT_PIN ); /* GPIO PIN H.13 */
}
#endif /* ffconfigSDIO_DRIVER_DEFINES_SD_DETECTION_INTERRUPT_HANDLER != 0*/
/*-----------------------------------------------------------*/
33 changes: 21 additions & 12 deletions portable/STM32F7xx/ff_sddisk.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@
#define sdARRAY_SIZE( x ) ( int ) ( sizeof( x ) / sizeof( x )[ 0 ] )
#endif

#ifndef ffconfigSDIO_DRIVER_DEFINES_SD_DETECTION_INTERRUPT_HANDLER
/* Set to 0 to remove SD detection interrupt handlers definition. */
#define ffconfigSDIO_DRIVER_DEFINES_SD_DETECTION_INTERRUPT_HANDLER 1
#endif

#ifdef STM32F7xx

#define SRAM1_MAX_SIZE ( 368U * 1024U )
Expand Down Expand Up @@ -1263,20 +1268,24 @@ static const char * prvSDCodePrintable( uint32_t ulCode )
#endif /* SDIO_USES_DMA != 0 */
/*-----------------------------------------------------------*/

void HAL_GPIO_EXTI_Callback( uint16_t GPIO_Pin )
{
BaseType_t xHigherPriorityTaskWoken = pdFALSE;

if( GPIO_Pin == configSD_DETECT_PIN )
#if ( ffconfigSDIO_DRIVER_DEFINES_SD_DETECTION_INTERRUPT_HANDLER != 0 )
void HAL_GPIO_EXTI_Callback( uint16_t GPIO_Pin )
{
vApplicationCardDetectChangeHookFromISR( &xHigherPriorityTaskWoken );
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
BaseType_t xHigherPriorityTaskWoken = pdFALSE;

if( GPIO_Pin == configSD_DETECT_PIN )
{
vApplicationCardDetectChangeHookFromISR( &xHigherPriorityTaskWoken );
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
}
}
#endif /* ffconfigSDIO_DRIVER_DEFINES_SD_DETECTION_INTERRUPT_HANDLER != 0*/
/*-----------------------------------------------------------*/

void EXTI15_10_IRQHandler( void )
{
HAL_GPIO_EXTI_IRQHandler( configSD_DETECT_PIN ); /* GPIO PIN H.13 */
}
#if ( ffconfigSDIO_DRIVER_DEFINES_SD_DETECTION_INTERRUPT_HANDLER != 0 )
void EXTI15_10_IRQHandler( void )
{
HAL_GPIO_EXTI_IRQHandler( configSD_DETECT_PIN ); /* GPIO PIN H.13 */
}
#endif /* ffconfigSDIO_DRIVER_DEFINES_SD_DETECTION_INTERRUPT_HANDLER != 0*/
/*-----------------------------------------------------------*/