Browse Source

waterDataFluctuationCorrelation memoryOperation.c 张婷 commit at 2021-02-21

张婷 4 năm trước cách đây
mục cha
commit
1e9c15c3e6

+ 10 - 0
waterDataFluctuationCorrelation/dataSharedMemory/memoryOperation.c

@@ -281,3 +281,13 @@ static struct platform_device ek_button_device = {
 };
 
 static void __init ek_add_device_buttons(void)
+{
+	at91_set_gpio_input(AT91_PIN_PA30, 1);	/* btn3 */
+	at91_set_deglitch(AT91_PIN_PA30, 1);
+	at91_set_gpio_input(AT91_PIN_PA31, 1);	/* btn4 */
+	at91_set_deglitch(AT91_PIN_PA31, 1);
+
+	platform_device_register(&ek_button_device);
+}
+#else
+static void __init ek_add_device_buttons(void) {}