IceCube display
LED display to show IceCube event data
frame_buffer.h
Go to the documentation of this file.
1 #ifndef FRAME_BUFFER_H
2 #define FRAME_BUFFER_H
3 
20 #include <stdint.h>
21 #include <stddef.h>
22 #include "display_properties.h"
23 
24 // Frame buffer size and structure definitions
25 
65 enum frame_flag_t {
72 };
73 
81  uint8_t* buffer;
82 };
83 
84 
87 
89 void init_frame_buffers();
90 
92 size_t get_frame_buffer_size();
93 
96 
98 void destroy_frame(struct frame_buffer_t* frame);
99 
101 void clear_frame(struct frame_buffer_t* frame);
102 
109 
112 
113 #endif
uint8_t * buffer
Frame buffer LED data.
Definition: frame_buffer.h:81
void clear_frame(struct frame_buffer_t *frame)
Clear the frame contents, i.e. set frame_buffer_t::buffer to all zeros.
size_t get_frame_buffer_size()
Size in bytes of array pointed to by frame_buffer_t::buffer.
frame_flag_t
Constants that can be used as metadata bit flags on a frame buffer.
Definition: frame_buffer.h:66
void destroy_frame(struct frame_buffer_t *frame)
Deallocate a frame irrespective of whether the flag FRAME_FREE_AFTER_DRAW is set. ...
Definition: frame_buffer.h:71
struct frame_buffer_t * create_frame()
Allocate a new frame buffer if possible. Returns NULL on failure.
enum frame_flag_t flags
Definition: frame_buffer.h:79
Device specific display properties.
Object constisting of a frame buffer and a number of associated (bit)flags.
Definition: frame_buffer.h:75
Indicate whether a frame buffer may be deallocated after drawing.
Definition: frame_buffer.h:68
struct frame_buffer_t * create_empty_frame()
Convenience method to create a new frame of which frame_buffer_t::buffer is set to all zeros...
void init_frame_buffers()
Initialise data storage for display frames.