]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/tests/usb/device/raw_hid/main.cpp
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / tests / usb / device / raw_hid / main.cpp
1 #include "mbed.h"
2 #include "USBHID.h"
3
4 //We declare a USBHID device
5 USBHID hid;
6
7 //This report will contain data to be sent
8 HID_REPORT send_report;
9
10 Ticker tic;
11
12 void tic_handler();
13 void tic_handler() {
14     hid.send(&send_report);
15 }
16
17 int main(void) {
18     //Fill the report
19     for(int i = 0; i < 64; i++)
20         send_report.data[i] = i;
21     send_report.length = 64;
22
23     tic.attach(tic_handler, 1);
24
25     while (1);
26 }