-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from slpbaby/user-irq
platform: implement user-irq feature for STM32F103 and STMF429
- Loading branch information
Showing
15 changed files
with
1,218 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef PLATFORM_STM32F1_EXTI_H_ | ||
#define PLATFORM_STM32F1_EXTI_H_ | ||
|
||
#include <platform/stm32f1/registers.h> | ||
#include <platform/stm32f1/gpio.h> | ||
|
||
/* EXTI mode */ | ||
#define EXTI_INTERRUPT_MODE 0x0 | ||
#define EXTI_EVENT_MODE 0x4 | ||
|
||
/* EXTI trigger type */ | ||
#define EXTI_RISING_TRIGGER 0x8 | ||
#define EXTI_FALLING_TRIGGER 0xc | ||
#define EXTI_RISING_FALLING_TRIGGER 0x10 | ||
|
||
#define EXTI_LINE(x) ((uint32_t)0x1 << x) | ||
|
||
struct exti_regs { | ||
volatile uint32_t IMR; | ||
volatile uint32_t EMR; | ||
volatile uint32_t RTSR; | ||
volatile uint32_t FTSR; | ||
volatile uint32_t SWIER; | ||
volatile uint32_t PR; | ||
}; | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.