forked from ruuvi/ruuvi.gateway_esp.c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruuvi_gateway.h
50 lines (38 loc) · 895 Bytes
/
ruuvi_gateway.h
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
/**
* @file ruuvi_gateway.h
* @author Jukka Saari
* @date 2019-11-27
* @copyright Ruuvi Innovations Ltd, license BSD-3-Clause.
*/
#ifndef RUUVI_GATEWAY_H
#define RUUVI_GATEWAY_H
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include <stdbool.h>
#include <stdint.h>
#include "mac_addr.h"
#include "cjson_wrap.h"
#include "settings.h"
#ifdef __cplusplus
extern "C" {
#endif
#define ADV_POST_INTERVAL 10000
#define WIFI_CONNECTED_BIT (1U << 0U)
#define MQTT_CONNECTED_BIT (1U << 1U)
#define ETH_CONNECTED_BIT (1U << 4U)
typedef enum nrf_command_e
{
NRF_COMMAND_SET_FILTER = 0,
NRF_COMMAND_CLEAR_FILTER = 1,
} nrf_command_e;
extern EventGroupHandle_t status_bits;
void
settings_clear_in_flash(void);
void
ruuvi_send_nrf_settings(const ruuvi_gateway_config_t *p_config);
void
start_services(void);
#ifdef __cplusplus
}
#endif
#endif // RUUVI_GATEWAY_H