summaryrefslogtreecommitdiffstats
path: root/utils/hwstub/stub/target.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-02-04 00:10:41 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2014-02-10 23:14:24 +0100
commitc17d30f20466861a244c603665c580feb7758abf (patch)
treec5044f599f89d89de0b1419bd40e92211f8c8b8a /utils/hwstub/stub/target.h
parent6d64111b3c2f772cfc3539bb13851f78d4b55870 (diff)
downloadrockbox-c17d30f20466861a244c603665c580feb7758abf.tar.gz
rockbox-c17d30f20466861a244c603665c580feb7758abf.tar.bz2
rockbox-c17d30f20466861a244c603665c580feb7758abf.zip
utils/hwstub: completely rework the protocol, drop unused features
The protocol has evolved a lot during the 2.x.y lifetime, bringing more features which later got unused. This commit removes all the unused stuff and simplifies everything: - drop the feature mask: everything is mandatory or stalled on error - remove the info request and put all static information in standard USB descriptors which are part of the configuration descriptor (and can be retrieved using the standard GetDescriptor request). - remove the USB interface, we had only one anyway - remove all endpoint descriptors - remove the exit/atexit stuff, it never worked as intended anyway - update the hwstub library and make it able to handle any device - update the tools (mostly renaming and removing of code) Change-Id: I1872bba7f4177fc3891180e8f944aab88f5bde31
Diffstat (limited to 'utils/hwstub/stub/target.h')
-rw-r--r--utils/hwstub/stub/target.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/utils/hwstub/stub/target.h b/utils/hwstub/stub/target.h
index 43151e9a34..cb17401a9c 100644
--- a/utils/hwstub/stub/target.h
+++ b/utils/hwstub/stub/target.h
@@ -25,15 +25,16 @@
/* do target specific init */
void target_init(void);
-/* exit, performing the atexit action (default is target specific) */
-void target_exit(void);
-/* get information, return actual size or -1 if error */
-int target_get_info(int info, void **buffer);
-/* set atexit action or return -1 on error */
-int target_atexit(int action);
+/* get descriptor, set buffer to NULL on error */
+void target_get_desc(int desc, void **buffer);
+/* pack all descriptors for config desc */
+void target_get_config_desc(void *buffer, int *size);
/* Wait a very short time (us<=1000) */
void target_udelay(int us);
/* Wait for a short time (ms <= 1000) */
void target_mdelay(int ms);
+/* mandatory for all targets */
+extern struct hwstub_target_desc_t target_descriptor;
+
#endif /* __TARGET_H__ */