From d598c2a919e9d3dc550092a4ac7e7ed68dc27f86 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 3 Feb 2017 09:41:04 -0800 Subject: atmel-samd: Add USB HID mouse and keyboard support. --- atmel-samd/main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'atmel-samd/main.c') diff --git a/atmel-samd/main.c b/atmel-samd/main.c index 44c0e6494..5f99292ec 100644 --- a/atmel-samd/main.c +++ b/atmel-samd/main.c @@ -25,6 +25,7 @@ #include "common-hal/nativeio/AnalogIn.h" #include "common-hal/nativeio/PWMOut.h" +#include "common-hal/usb_hid/__init__.h" #ifdef EXPRESS_BOARD #include "common-hal/nativeio/types.h" @@ -183,6 +184,8 @@ void reset_samd21(void) { pwmout_reset(); + usb_hid_reset(); + #ifdef CALIBRATE_CRYSTALLESS // If we are on USB lets double check our fine calibration for the clock and // save the new value if its different enough. @@ -515,11 +518,14 @@ int main(void) { // as current dir. init_flash_fs(); + usb_hid_init(); + // Start USB after getting everything going. #ifdef USB_REPL udc_start(); #endif + // Main script is finished, so now go into REPL mode. // The REPL mode can change, or it can request a soft reset. int exit_code = PYEXEC_FORCED_EXIT; -- cgit v1.2.3