aboutsummaryrefslogtreecommitdiff
path: root/software/animation.h
blob: aba955f789e201dd7eae94a92b318fa8111d1cf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#pragma once

#include "consts.h"

/** @brief round time to nearest frame */
unsigned long clamp_time(unsigned long unclamped_time);

/** @brief 'zigzag' value between 0 and `size - 1`, like modulo (`%`) operator */
unsigned int zigzag(unsigned int size, int index);

/** @brief color leds on plane perpendicular to `direction` with `offset` */
void fill_plane(unsigned int direction, unsigned int offset);