Bind
C++ UI toolkit for Arduino
 
Loading...
Searching...
No Matches
BindUtils.hpp
1#ifndef __BINDUTILS_H
2#define __BINDUTILS_H
3#include <stdint.h>
4#include <stddef.h>
5#include <string.h>
6#include "BindView.hpp"
7
8#define RGB(r, g, b) ((int32_t)((uint8_t)(b)) | ((int32_t)(g) << 8) | (((int32_t)(uint8_t)(r)) << 16) | 0xFF000000)
9#define RGBA(r, g, b, a) ((int32_t)((uint8_t)(b)) | ((int32_t)(g) << 8) | (((int32_t)(uint8_t)(r)) << 16) | ((int32_t)((uint8_t)(a)) << 24))
10
11#define BIND_ID_SETUP_CMD 5
12#define BIND_ID_BUTTON 6
13#define BIND_ID_LABEL 7
14#define BIND_ID_GAUGE1 8
15#define BIND_ID_GAUGE2 9
16#define BIND_ID_KNOB 10
17#define BIND_ID_MAP_VIEW 11
18#define BIND_ID_MAP_MARKER 12
19#define BIND_ID_TOGGLE_SWITCH 13
20#define BIND_ID_SEEK_BAR 14
21#define BIND_ID_ATTITUDE_INDICATOR 15
22#define BIND_ID_HEADING_INDICATOR 16
23#define BIND_ID_JOYSTICK 17
24#define BIND_ID_GAUGE_SIMPLE 18
25#define BIND_ID_COLOR_PICKER 19
26#define BIND_ID_CHART 20
27#define BIND_ID_CHART_DATA 21
28#define BIND_ID_RECTANGLE 22
29#define BIND_ID_TERMINAL 23
30#define BIND_ID_TERMINAL_DATA 24
31#define BIND_ID_SETTINGS 25
32
33#define MARKER_PIN_RED 0
34#define MARKER_PIN_GREEN 1
35#define MARKER_PIN_BLUE 2
36#define MARKER_PIN_YELLOW 3
37#define MARKER_CAR_RED 4
38#define MARKER_CAR_GREEN 5
39#define MARKER_CAR_BLUE 6
40#define MARKER_CAR_YELLOW 7
41#define MARKER_PLANE_RED 8
42#define MARKER_PLANE_GREEN 9
43#define MARKER_PLANE_BLUE 10
44#define MARKER_PLANE_YELLOW 11
45
46/*
47 @brief TBA
48*/
49void copyAndOffset(uint8_t *out, uint16_t *offset, const void *source, size_t num);
50
51#endif /* __BINDUTILS_H */