summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
authorFranklin Wei <frankhwei536@gmail.com>2015-09-23 21:46:54 -0400
committerFranklin Wei <frankhwei536@gmail.com>2016-07-12 12:01:01 -0400
commit1b80b7ee4a5998784821e278f374c1363e95c7c1 (patch)
treeba3d783315bdd255294d7edb7550d36b671a0276 /apps/plugin.h
parent4a5f0f8793689edba980a534f94720ae81e2a5db (diff)
downloadrockbox-1b80b7ee4a5998784821e278f374c1363e95c7c1.zip
rockbox-1b80b7ee4a5998784821e278f374c1363e95c7c1.tar.gz
rockbox-1b80b7ee4a5998784821e278f374c1363e95c7c1.tar.bz2
rockbox-1b80b7ee4a5998784821e278f374c1363e95c7c1.tar.xz
[WIP] DuckyScript plugin
Allows a DAP to behave like a USB Rubber Ducky by executing DuckyScript files, which is a BASIC-like language with facilities for sending keystrokes. A "crash course" on the language can be found at http://71.71.39.6/ducky.txt This plugin also implements several extensions to vanilla DuckyScript, some of which are listed below (see source for complete documentation). - variables (multicharacter names via hash map) - control flow (JUMP/GOTO, IF) with labels - expression parsing when a number is needed - non-decimal bases - bytecode compilation (on computer only) The compiler and related tools can be found here: https://github.com/theunamedguy/ducky NOTE: Changes some entries in the HID usage tables, but doesn't break anything. TODO: - Finish up manual entry - Further documentation? - More optimization? - Arrays (how?) - TEST, TEST, TEST! - Some features have only been marginally tested and MIGHT NOT WORK CORRECTLY - FASTER TYPING!!! - Currently averages ~96 keys/sec - Theoretical maximum: 500 keys/sec - Of interest: G#1223 (http://gerrit.rockbox.org/r/1223/) Change-Id: I149ecd08ba124f8b8637a002ee2652dd54a44e58
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index 049333c..2c1131e 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -163,12 +163,12 @@ void* plugin_get_buffer(size_t *buffer_size);
#define PLUGIN_MAGIC 0x526F634B /* RocK */
/* increase this every time the api struct changes */
-#define PLUGIN_API_VERSION 235
+#define PLUGIN_API_VERSION 236
/* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any
new function which are "waiting" at the end of the function table) */
-#define PLUGIN_MIN_API_VERSION 234
+#define PLUGIN_MIN_API_VERSION 236
/* plugin return codes */
/* internal returns start at 0x100 to make exit(1..255) work */
@@ -565,7 +565,11 @@ struct plugin_api {
#ifdef USB_ENABLE_HID
void (*usb_hid_send)(usage_page_t usage_page, int id);
uint8_t (*usb_hid_leds)(void);
+#ifdef USB_FAKE_VID_PID
+ void (*usb_change_id)(uint16_t vid, uint16_t pid);
#endif
+#endif
+
#ifdef RB_PROFILE
void (*profile_thread)(void);
void (*profstop)(void);