summaryrefslogtreecommitdiff
path: root/include/badge/ble.h
blob: 27b4749f83e3b8bcc9afdc52d582467073a3662f (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
#pragma once

#include "indicator.h"
#include <stdint.h>

namespace de::uvok::badge
{
    enum class BleActionType
    {
        None,
        Template,
        Indicator
    };

    typedef struct
    {
        BleActionType action_type;
        union {
            uint8_t new_template;
            DisplayIndicator new_indicator;
        };
    } ble_poll_result_t;

    void ble_init(void);
    void ble_advertise(void);
    bool ble_is_active(void);
    ble_poll_result_t ble_poll(void);
    void ble_set_image(uint8_t image);
} // namespace de::uvok::badge