Created
June 21, 2019 00:52
-
-
Save goog/7bf5ec55139a3ed43e36be5b2eee318b to your computer and use it in GitHub Desktop.
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
#define EXIT_PR (*(volatile uint32_t *)0x40013C14) | |
rtems_isr EINT95_handler(rtems_vector_number vector) | |
{ | |
if(EXIT_PR & 0x200) | |
{ | |
printk("exit 9 hap\n"); | |
int pin = STM32F4_GPIO_PIN(0,9); // pa9 | |
bool val; | |
val = stm32f4_gpio_get_input(pin); | |
volatile int j = 20000; | |
for(; j > 0; j--) j = j; | |
//rtems_counter_delay_nanoseconds(5000000); | |
if(val == stm32f4_gpio_get_input(pin)) | |
{ | |
f_key_pressed = 1; | |
printk("key1\n"); | |
} | |
EXIT_PR = (1<<9); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment