1
0
Fork 0
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:
Frank Gevaerts 2009-04-18 20:04:52 +00:00
parent 8b6b46f3c4
commit ab09322b7a
4 changed files with 23 additions and 24 deletions

View file

@ -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