/** * swap_buffers: Swaps the two buffers. Contents in the display * buffer is seen on the output and the display buffer becomes * the new draw buffer. */ void swap_buffers() { // While we could use XOR swap this is more reliable and // dependable and it's only called a few times per second. // Many compliers should optimise these to EXCH instructions. uint8_t *tmp; SWAP_BUFFS(tmp, disp_buffer_mask, draw_buffer_mask); SWAP_BUFFS(tmp, disp_buffer_level, draw_buffer_level); }
void mavlink_buf_swap(void) { uint8_t *tmp; SWAP_BUFFS(tmp, mavlink_buffer_proc, mavlink_buffer_recv); }