blob: ca296cbb7be5a91b049635d8fcb0721bcbd446de (
plain)
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
|
#pragma once
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#define SIGN_BRIGHTNESS_MIN 0u
#define SIGN_BRIGHTNESS_MAX 100u
#define SIGN_BRIGHTNESS_DEFAULT 75u
typedef struct {
bool is_on_air;
uint8_t brightness;
} sign_state_t;
typedef enum {
SIGN_OK = 0,
SIGN_ERR_NULL = 1,
SIGN_ERR_RANGE = 2,
} sign_result_t;
sign_result_t sign_set_on_air(sign_state_t *state, bool on_air);
sign_result_t sign_set_brightness(sign_state_t *state, uint8_t brightness);
#ifdef __cplusplus
}
#endif
|