IceCube display
LED display to show IceCube event data
All Data Structures Files Functions Variables Enumerations Enumerator Macros Modules Pages
frame_timer.h File Reference

Frame draw timing. More...

Include dependency graph for frame_timer.h:

Go to the source code of this file.

Data Structures

struct  display_frame_usb_phase_t
 Display frame counter and USB frame counter values at frame draw time. More...
 

Macros

#define MS_PER_FRAME   (1000/DEVICE_FPS)
 Time interval between frame displays expressed in milliseconds.
 

Functions

Frame timing tracking
void new_sof_received (const uint16_t usb_frame_counter)
 Function to be called upon receival of a USB SOF token with the new USB frame counter value.
 
bool get_display_frame_usb_phase (struct display_frame_usb_phase_t *usb_phase)
 Latest display frame counter phase. More...
 
bool correct_display_frame_counter (const int16_t frame_diff)
 Correct the display frame counter. More...
 
void correct_display_frame_phase (const int8_t ms_shift)
 Shift the frame display phase with respect to the USB frame counter. More...
 
Frame draw triggering
void init_frame_timer ()
 Initialise the frame timer.
 
bool should_draw_frame ()
 Whether a new frame should be displayed or if the device is allowed to idle.
 
void clear_draw_frame ()
 Acknowledge that a frame has been drawn.
 

Detailed Description

Frame draw timing.

Timer to trigger drawing of a new frame DEVICE_FPS times per second.

See also
led_display_timing
Author
Sander Vanheule (Universiteit Gent)