A optical beam breaker detector that appears to aPC as a USB keyboard, typing characters when the beam is broken

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers USBKeyboard.cpp Source File

USBKeyboard.cpp

00001 #include "USBKeyboard.h"
00002 
00003 #include "Stream.h"
00004 #include "usbhid.h"
00005 
00006 int USBKeyboard::_putc(int value) {
00007     _usbhid.keyboard(value);
00008     return value;
00009 }
00010     
00011 int USBKeyboard::_getc() {
00012     return -1;
00013 }
00014