TM STM32Fxxx HAL Libraries  v1.0.0 Libraries for STM32Fxxx (F0, F4 and F7 series) devices based on HAL drivers from ST from Tilen Majerle

External interrupts library for STM32Fxxx devices - http://stm32f4-discovery.com/2015/07/hal-library-4-exti-for-stm32fxxx/. More...

## Modules

TM_EXTI_Macros
Library defines.

TM_EXTI_Typedefs
Library Typedefs.

TM_EXTI_Functions
Library Functions.

## Detailed Description

External interrupts library for STM32Fxxx devices - http://stm32f4-discovery.com/2015/07/hal-library-4-exti-for-stm32fxxx/.

This library allows you to easy enable external interrupt on specific pin.

You only need to specify GPIOx, pin and interrupt trigger you want to use and you are ready to use. There are predefined function names that you use to handle this interrupts.

There are 16 external interrupts possible, GPIO lines 0 to 15. Each GPIO_PIN_x from all GPIOx is connected to one line. In other words, PC0, PA0, PB0, PJ0,... are all connected to line 0, and so on. But you can use only one pin for one line at a time. So only PA0 at one time, or PD0 or PC0, but one a time.

You can still use more lines at the same time. So let's say PA0 is line0 and PC13 is line13. This 2 interrupts can be used simultaneously without problems.

Handling interrupts

Next step is handling interrupts. There are 16 interrupt lines, but only 7 interrupt handlers. Lines0 to 4 have each own handler, then lines 5 to 9 have one common and lines 10 to 15 have one common.

I write these functions in my library and use my own to handle specific line for you for easly. Sometimes there is need for use default handler names in your own, but 2 functions with same name can not be used, so I made some settings.

If you open defines.h file and add any of lines below, you will disable handler line for interrupts. By default, all handlers for lines are enabled. Disabled then with adding lines below in defines.h file:

//These works for STM32F4xx and STM32F7xx series
//Disable EXTI0_IRQHandler function
#define EXTI_DISABLE_DEFAULT_HANDLER_0
//Disable EXTI1_IRQHandler function
#define EXTI_DISABLE_DEFAULT_HANDLER_1
//Disable EXTI2_IRQHandler function
#define EXTI_DISABLE_DEFAULT_HANDLER_2
//Disable EXTI3_IRQHandler function
#define EXTI_DISABLE_DEFAULT_HANDLER_3
//Disable EXTI4_IRQHandler function
#define EXTI_DISABLE_DEFAULT_HANDLER_4
//Disable EXTI9_5_IRQHandler function
#define EXTI_DISABLE_DEFAULT_HANDLER_9_5
//Disable EXTI15_10_IRQHandler function
#define EXTI_DISABLE_DEFAULT_HANDLER_15_10
//These works for STM32F0xx series
//Disable EXTI0_1_IRQHandler function
#define EXTI_DISABLE_DEFAULT_HANDLER_0_1
//Disable EXTI2_3_IRQHandler function
#define EXTI_DISABLE_DEFAULT_HANDLER_2_3
//Disable EXTI4_15_IRQHandler function
#define EXTI_DISABLE_DEFAULT_HANDLER_4_15

If you need higher priority for external interrupts in NVIC, add lines below in defines.h file and edit them

//Set custom NVIC priority
#define EXTI_NVIC_PRIORITY 0x04
Changelog
 Version 1.0
- First release

Dependencies
 - STM32Fxxx HAL
- defines.h
- attributes.h
- TM GPIO