A container for one Usb packet's data. More...
#include <sifteo/usb.h>
Public Member Functions | |
| uint8_t * | bytes () |
| Return a pointer to this packet's payload bytes. | |
| void | clear () |
| Set the packet's length and type to zero. | |
| bool | empty () const |
| Is this packet's payload empty? | |
| void | resize (unsigned bytes) |
| Change the size of this packet, in bytes. | |
| void | setType (unsigned type) |
| Set a packet's 28-bit type. | |
| unsigned | size () const |
| Retrieve the size of this packet, in bytes. | |
| unsigned | type () const |
| Return the packet's 28-bit type code. | |
Static Public Member Functions | |
| static unsigned | capacity () |
| Retrieve the capacity of a packet, in bytes. (19) | |
A container for one Usb packet's data.
Each packet consists of a variable-length payload of up to 60 bytes, and a "type" word of which the low 28 bits are available for games to use.
Sifteo SDK v1.1.0 (see all versions)
Last updated Tue Dec 23 2014, by Doxygen