diff options
author | Uros Majstorovic <majstor@majstor.org> | 2020-08-05 03:39:22 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2020-08-05 03:39:22 +0200 |
commit | cf7c06297d04bade9cd04c056f9ed510e64dd7bd (patch) | |
tree | a3b8cc23574b98e10874b51d33c9fe1bfc012663 /fw/fe310/eos/eve/eve_track.h | |
parent | 5cd610a07468137066ea4daa5176c3e7045113b0 (diff) |
code -> fw
Diffstat (limited to 'fw/fe310/eos/eve/eve_track.h')
-rw-r--r-- | fw/fe310/eos/eve/eve_track.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/fw/fe310/eos/eve/eve_track.h b/fw/fe310/eos/eve/eve_track.h new file mode 100644 index 0000000..a5fd113 --- /dev/null +++ b/fw/fe310/eos/eve/eve_track.h @@ -0,0 +1,22 @@ +#include <stdint.h> + +#define EVE_TRACK_TYPE_INERT 1 +#define EVE_TRACK_TYPE_OSC 2 +#define EVE_TRACK_FRICTION 500 + +typedef struct EVETrackOsc { + int x; + int y; + double f; + double d; + double a; + uint32_t t_max; +} EVETrackOsc; + +void eve_track_init(void); +void eve_track_set(uint8_t type, void *param); + +void eve_track_inert_init(EVETouchTimer *timer, EVETouch *touch); +int eve_track_inert_tick(EVETouchTimer *timer, EVETouch *touch); +void eve_track_osc_init(EVETrackOsc *p, int x, int y, uint32_t T, double d, uint32_t t_max); +int eve_track_osc_tick(EVETouchTimer *timer, EVETouch *touch); |