summaryrefslogtreecommitdiff
path: root/atmel-samd/main.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2017-02-03 09:41:04 -0800
committerScott Shawcroft <scott.shawcroft@gmail.com>2017-02-27 15:43:58 +0100
commitd598c2a919e9d3dc550092a4ac7e7ed68dc27f86 (patch)
tree81e69f8ea90c6c1c11a772a3b9f2ae60753fae41 /atmel-samd/main.c
parent062fac1d43d42b35e0ecdaaec124c29b65db7c68 (diff)
atmel-samd: Add USB HID mouse and keyboard support.
Diffstat (limited to 'atmel-samd/main.c')
-rw-r--r--atmel-samd/main.c6
1 files changed, 6 insertions, 0 deletions
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;