PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
packet.h
Go to the documentation of this file.
1
6#ifndef __PACKET_H__
7#define __PACKET_H__
8
9#include <tamtypes.h>
10
12#define QWC_MAX 65535
13
14#define PACKET_NORMAL 0x00
15#define PACKET_UCAB 0x01
16#define PACKET_SPR 0x02
23typedef struct {
24 u32 qwords;
25 u16 qwc;
26 u16 type;
27 qword_t *data __attribute__((aligned(64)));
28} packet_t;
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
35packet_t *packet_init(int qwords, int type);
36
38void packet_reset(packet_t *packet);
39
41void packet_free(packet_t *packet);
42
44qword_t *packet_increment_qwc(packet_t *packet, int num);
45
47static inline qword_t *packet_get_qword(packet_t *packet)
48{
49 return packet->data;
50}
51
52#ifdef __cplusplus
53}
54#endif
55
56#endif /* __PACKET_H__ */
packet_t * packet_init(int qwords, int type)
Definition packet.c:8
static qword_t * packet_get_qword(packet_t *packet)
Definition packet.h:47
void packet_free(packet_t *packet)
Definition packet.c:63
qword_t * packet_increment_qwc(packet_t *packet, int num)
void packet_reset(packet_t *packet)
Definition packet.c:89