-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUART.cpp
32 lines (27 loc) · 911 Bytes
/
UART.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
// Created by Allen on 2/11/2020.
//
#include <cstdio>
#include "UART.h"
#include "metadata.h"
#include "animator.h"
void UART_sendAnimation(struct SpriteSendable sendable) {
uint8_t animation_charIndex = sendable.charIndex;
uint8_t animation_animationIndex = sendable.animationIndex;
int16_t x = sendable.x;
int16_t y = sendable.y;
uint8_t frame = sendable.frame;
uint8_t persistent = sendable.persistent;
uint8_t layer = sendable.layer;
uint8_t continuous = sendable.continuous;
uint8_t framePeriod = sendable.framePeriod;
uint8_t mirrored = sendable.mirrored;
animator_animate(animation_charIndex, animation_animationIndex,
x, y, frame, layer, persistent, continuous, framePeriod, mirrored);
}
void UART_readCharacterSDCard(uint8_t charIndex) {
animator_readCharacterSDCard(charIndex);
}
void UART_commandUpdate() {
animator_update();
}