diff options
| author | Nick Moore <nicholasvmoore@gmail.com> | 2026-04-22 07:42:03 -0500 |
|---|---|---|
| committer | Nick Moore <nicholasvmoore@gmail.com> | 2026-04-22 07:42:03 -0500 |
| commit | 7fc0485f8e5bdcaf069d0cb833c51b010b9e0816 (patch) | |
| tree | e7030b32025f88d2a62bb137dd3593df8600bf2a /components/sign_logic/include | |
| parent | 8f5ed4b452deddfc285a9e3e5bd5ce2ccce6c74b (diff) | |
Diffstat (limited to 'components/sign_logic/include')
| -rw-r--r-- | components/sign_logic/include/sign_logic.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/components/sign_logic/include/sign_logic.h b/components/sign_logic/include/sign_logic.h new file mode 100644 index 0000000..ca296cb --- /dev/null +++ b/components/sign_logic/include/sign_logic.h @@ -0,0 +1,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 |
