static const char _name ## __file[] = _file; \
static const uint32_t _name ## __data[] = _data; \
static struct image _name ## __image = { \
.name = #_name, \
.
data = _name ## __file, \
.
len =
sizeof ( _name ## __file ), \
}; \
.type = _type, \
.image = & _name ## __image, \
.
data = _name ## __data, \
.
len =
sizeof ( _name ## __data ), \
.width = _width, \
.height = _height, \
};
uint8_t data[48]
Additional event data.
#define IMAGE_STATIC_NAME
Image name is statically allocated.
#define IMAGE_STATIC
Image is statically allocated.
void ref_no_free(struct refcnt *refcnt __unused)
Do not free reference-counted object.
#define REF_INIT(free_fn)
Initialise a static reference counter.
const void * data
Read-only data.
size_t len
Length of pixel data.
Define a pixel buffer test.
38#define PIX( _name, _type, _file, _width, _height, _data ) \
39 static const char _name ## __file[] = _file; \
40 static const uint32_t _name ## __data[] = _data; \
41 static struct image _name ## __image = { \
42 .refcnt = REF_INIT ( ref_no_free ), \
43 .name = #_name, \
44 .flags = ( IMAGE_STATIC | IMAGE_STATIC_NAME ), \
45 .data = _name ## __file, \
46 .len = sizeof ( _name ## __file ), \
47 }; \
48 static struct pixel_buffer_test _name = { \
49 .type = _type, \
50 .image = & _name ## __image, \
51 .data = _name ## __data, \
52 .len = sizeof ( _name ## __data ), \
53 .width = _width, \
54 .height = _height, \
55 };