forked from len0rd/rockbox
Add a PACK_DESCRIPTOR macro to make the class drivers a bit more readable (FS#10145 by Tomer Shalev)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20733 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8b6b46f3c4
commit
ab09322b7a
4 changed files with 23 additions and 24 deletions
|
@ -85,4 +85,10 @@ struct usb_class_driver {
|
|||
#endif
|
||||
};
|
||||
|
||||
#define PACK_DESCRIPTOR(dest, descriptor) \
|
||||
do { \
|
||||
memcpy(dest, &(descriptor), sizeof(descriptor)); \
|
||||
dest += sizeof(descriptor); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue