Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
USBHIDProtocol.h
00001 #ifndef USBHIDPROTOCOL_H_ 00002 #define USBHIDPROTOCOL_H_ 00003 /* Command list */ 00004 // Devices verifies with same CMD and optional data 00005 00006 // System commands 00007 #define CMD_SYS_CHECK 0x00 // Args: version 00008 #define CMD_SYS_RESET 0xFF // Args: bool softreset 00009 00010 // Miscellaneous 00011 #define CMD_LED_OFF 0x10 // On board led on 00012 #define CMD_LED_ON 0x11 // On board led off 00013 #define CMD_LED_BLINK 0x12 // On board led blink 00014 #define CMD_LED_BREATH 0x13 // Not implemented 00015 #define CMD_GET_BUTTON 0x14 // Returns button history word with 20 ms interval per bit 00016 00017 // SMC commands 00018 /* Motor has 3 states : 00019 Locked - Current flowing, motor is powered 00020 Brake - Motor terminals short circuit 00021 Free - Motor terminals open 00022 */ 00023 #define CMD_SMC_STEP 0x20 // Args, int number of steps, bool direction, finish this in .. (ms), bool free motor (or keep locked) 00024 #define CMD_SMC_STATE 0x21 // Returns remaining steps, negative if paused 00025 00026 #define CMD_SMC_STOP 0x22 // Aborts all motor control 00027 #define CMD_SMC_PAUSE 0x23 // Pauzes motor control, keeps locked (overheating!) 00028 #define CMD_SMC_CONTINUE 0x24 // Continues motor control 00029 00030 // Motor States (ineffective if stepping) 00031 #define CMD_SMC_FREE 0x25 // Free motor 00032 #define CMD_SMC_BRAKE 0x26 // Brake motor (different from lock) 00033 00034 // AUX channel 00035 #define CMD_AUX_OFF 0x30 // Auxilary channel ON (discards pwm) 00036 #define CMD_AUX_ON 0x31 // Auxilary channel OFF (discards pwm) 00037 #define CMD_AUX_PWM 0x32 // Auxilary channel PWM. Args: duty cycle, period, timer prescaler (from 48 MHz) 00038 00039 #endif //USBHIDPROTOCOL_H_ 00040
Generated on Mon Jul 18 2022 01:28:39 by
1.7.2