-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboard.h
74 lines (52 loc) · 890 Bytes
/
board.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
* board.h
*
* Created on: Dec 8, 2021
* Author: Danylo Ulianych
*/
#ifndef MAIN_INCLUDE_BOARD_H_
#define MAIN_INCLUDE_BOARD_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#ifndef BSP_LOGI
#define BSP_LOGI ESP_LOGI
#endif
#ifndef BSP_LOGW
#define BSP_LOGW ESP_LOGW
#endif
#ifndef BSP_LOGE
#define BSP_LOGE ESP_LOGE
#endif
typedef struct {
int miso;
int mosi;
int clk;
int cs;
} sd_spi_gpio_t;
typedef struct {
uint8_t i2c_addr;
int sda;
int scl;
int irq;
} sdp_gpio_t;
typedef struct {
int sda;
int scl;
} bmp_gpio_t;
typedef struct {
uint64_t mac;
sd_spi_gpio_t spi_gpio;
sdp_gpio_t sdp_gpio;
bmp_gpio_t bmp_gpio;
void (*led_init)();
void (*led_set_error)();
void (*led_clear_error)();
} Board_t;
void board_init();
const Board_t* board_get();
#ifdef __cplusplus
}
#endif
#endif /* MAIN_INCLUDE_BOARD_H_ */