1
0
This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
tmk_keyboard_custom/tmk_core/tool/mbed/mbed-sdk/libraries/tests/usb/device/raw_hid/main.cpp

27 lines
418 B
C++

#include "mbed.h"
#include "USBHID.h"
//We declare a USBHID device
USBHID hid;
//This report will contain data to be sent
HID_REPORT send_report;
Ticker tic;
void tic_handler();
void tic_handler() {
hid.send(&send_report);
}
int main(void) {
//Fill the report
for(int i = 0; i < 64; i++)
send_report.data[i] = i;
send_report.length = 64;
tic.attach(tic_handler, 1);
while (1);
}