fix: write double buffering
When writing twice within a pulse
- the buffer was swapped back to the original buffer and the FW does not see the update
- the buffer was written while the FW could switch, resulting in a broken table
The fixed implementation is waiting for the swap before writing to the buffer again.