library

Dependencies:   HIDScope USBDevice

Fork of HIDScope by Tom Tom

Files at this revision

API Documentation at this revision

Comitter:
tomlankhorst
Date:
Mon Sep 08 09:38:36 2014 +0000
Parent:
0:79e3f3072f3b
Child:
2:9f55d4fb48ea
Commit message:
Updated documentation

Changed in this revision

HIDScope.h Show annotated file Show diff for this revision Revisions of this file
--- a/HIDScope.h	Mon Sep 08 09:26:53 2014 +0000
+++ b/HIDScope.h	Mon Sep 08 09:38:36 2014 +0000
@@ -4,10 +4,34 @@
 #include "mbed.h"
 #include "USBHID.h"
 
-/**A simple HID (Human Interface Device) scope
-- Up to 6 channels of float data is transmitted in a single HID message (64 byte)
-- Theoretical maximum samplerate of 1kHz
-- Data can be parsed using a client-side server like NodeJS
+/** A simple HID (Human Interface Device) scope
+ * - Up to 6 channels of float data is transmitted in a single HID message (64 byte)
+ * - Theoretical maximum samplerate of 1kHz
+ * - Data can be parsed using a client-side server like NodeJS
+ * 
+ * Example:
+ * @code
+ * #include "mbed.h"
+ * #include "HIDScope.h"
+ *
+ * HIDScope    scope(2);
+ * Ticker      scopeTimer;
+ * 
+ * AnalogIn    a0(A0);
+ * 
+ * int main()
+ * {
+ *   
+ *   scopeTimer.attach_us(&scope, &HIDScope::send, 1e4); // Send data at 100 Hz
+ *   
+ *   while(1){  // Generate some data
+ *       scope.set(0, a0.read());
+ *       scope.set(1, a0.read());
+ *       wait_us(1000);
+ *   };    
+ *   
+ * }
+ * @endcode
 */
 class HIDScope {
     public: