-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshow.h
More file actions
121 lines (101 loc) · 2.6 KB
/
show.h
File metadata and controls
121 lines (101 loc) · 2.6 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/**
* @file show.h
* @brief Functions for creating, loading, saving, recording and playing a show file
*/
#ifndef SHOW_H_
#define SHOW_H_
#include <Arduino.h>
/**
* @brief Create a new show file, calls record after the file is created
*/
void newShow(void);
/**
* @brief Load a given show file from SD card
*
* @param number 0 ... 255
* @return ```true``` if show loaded and ```false``` if there was an error
*/
bool loadShow(uint8_t number);
/**
* @brief Save show file to SD card
*/
void saveShow(void);
/**
* @brief Delete show file from SD card
*/
void deleteShow(void);
/**
* @brief Play the loaded show
*/
void playShow(void);
/**
* @brief Record show
*/
void recordShow(void);
/**
* @brief Test servo function
*/
void testShow(void);
/**
* @brief Get the loaded show number
*
* @return Returns the loaded show number, 0 ... 255
*/
uint8_t getShowNumber(void);
/**
* @brief Set the show number
*
* @param number Show number, 0 ... 255
*/
void setShowNumber(uint8_t number);
/**
* @brief Get the length of the show in milliseconds
*
* @return Returns the show length in milliseconds, 0 ... 4294967295
*/
uint32_t getShowMS(void);
/**
* @brief Set the length of the show in milliseconds
*
* @param ms Show length in milliseconds, 0 ... 4294967295
*/
void setShowMS(uint32_t ms);
/**
* @brief Get the show name
*
* @return Returns the show name as a char[16]
*/
char* getShowName(void);
/**
* @brief Set the show name
*
* @param name Name of show to write to file
*/
void setShowName(char* name);
/**
* @brief Brief description
*
* @param address Address to write data to, 0x0000 ... 0xFFE0
* @param data Data to write, 0 ... 255
*/
void saveData(uint32_t address, uint8_t data);
/**
* @brief Get data from show file
*
* @param address Address to read data from, 0x0000 ... 0xFFE0
* @return Returns data from address, 0 ... 255
*/
uint8_t getData(uint32_t address);
/**
* @brief Get the current show frame
*
* @return Returns the current show frame count, 0x0000 ... 0xFFE0
*/
uint32_t getShowFrameCount(void);
/**
* @brief Get the max show frame
*
* @return Returns the max show frame, 0x0000 ... 0xFFE0
*/
uint32_t getShowMaxFrameCount(void);
#endif // SHOW_H_