Add defninitions of EXTI use for FST-01SZ.

This commit is contained in:
NIIBE Yutaka
2018-09-25 16:17:26 +09:00
parent 951afbad3a
commit 7ad7527e81
2 changed files with 13 additions and 1 deletions

View File

@@ -22,7 +22,7 @@
* Port A setup.
* PA0 - input with pull-up: AN0 for NeuG
* PA1 - input with pull-up: AN1 for NeuG
* PA3 - input with pull-up: Hall sensor output
* PA3 - input with pull-up: Hall effect sensor output
* PA8 - Push pull output 10MHz 0 default (LED 1:ON 0:OFF)
* PA11 - Push Pull output 10MHz 0 default (until USB enabled) (USBDM)
* PA12 - Push Pull output 10MHz 0 default (until USB enabled) (USBDP)
@@ -35,3 +35,13 @@
#define RCC_ENR_IOP_EN RCC_APB2ENR_IOPAEN
#define RCC_RSTR_IOP_RST RCC_APB2RSTR_IOPARST
#if 0 /* For PA, AFIO setting is not needed. */
#define AFIO_EXTICR_INDEX 0
#define AFIO_EXTICR1_EXTIx_Py AFIO_EXTICR1_EXTI3_PA
#endif
#define EXTI_PR EXTI_PR_PR3
#define EXTI_IMR EXTI_IMR_MR3
#define EXTI_RTSR_TR EXTI_RTSR_TR3
#define INTR_REQ_EXTI EXTI3_IRQ

View File

@@ -574,6 +574,8 @@ static struct EXTI *const EXTI = (struct EXTI *)EXTI_BASE;
#define EXTI0_IRQ 6
#define EXTI1_IRQ 7
#define EXTI2_IRQ 8
#define EXTI3_IRQ 9
#define EXTI4_IRQ 10
#define EXTI9_5_IRQ 23
#define TIM2_IRQ 28
#define TIM3_IRQ 29