Revision 3dadaff458ad42fefe97d349471f39675c1ab56e authored by a1ex on 27 February 2014, 06:40:51 UTC, committed by a1ex on 27 February 2014, 06:40:51 UTC
1 parent 9a5baab
Raw File
ptpbuf.h
#ifndef _ptpbuf_h_
#define _ptpbuf_h_

#define UNCACHEABLE(x)   ((void*)(((uint32_t)(x)) | 0x40000000))
#define PTPBUF_BUFS      16
#define PTPBUF_BUFSIZE   256
#define PTPBUF_MAGIC     0xEAEA3388

typedef struct
{
    uint32_t bytes_used;
    uint8_t data[PTPBUF_BUFSIZE];
} ptpbuf_buffer_t;

typedef struct
{
    uint32_t type;
    uint32_t length;
} ptpbuf_packet_t;

typedef struct
{
    uint32_t magic;
    uint32_t commit;
    uint32_t buffer_count;
    uint32_t buffer_size;
    uint32_t current_buffer;
    uint32_t overflow;
    ptpbuf_buffer_t *buffers;
    uint32_t *fetchable;
} ptpbuf_t;

#endif // _ptpbuf_h_
back to top