at24mac_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Benjamin Valentin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef AT24MAC_PARAMS_H
20 #define AT24MAC_PARAMS_H
21 
22 #include "board.h"
23 #include "at24mac.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #ifndef AT24MAC_PARAM_I2C_DEV
34 #define AT24MAC_PARAM_I2C_DEV I2C_DEV(0)
35 #endif
36 #ifndef AT24MAC_PARAM_I2C_ADDR
37 #define AT24MAC_PARAM_I2C_ADDR (0x58)
38 #endif
39 #ifndef AT24MAC_PARAM_TYPE
40 #define AT24MAC_PARAM_TYPE (AT24MAC6XX)
41 #endif
42 
43 #ifndef AT24MAC_PARAMS
44 #define AT24MAC_PARAMS { .i2c_dev = AT24MAC_PARAM_I2C_DEV, \
45  .i2c_addr = AT24MAC_PARAM_I2C_ADDR,\
46  .type = AT24MAC_PARAM_TYPE }
47 #endif
48 
54 {
55  AT24MAC_PARAMS
56 };
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
62 #endif /* AT24MAC_PARAMS_H */
63 
at24mac_params
static const at24mac_params_t at24mac_params[]
Configuration for AT24MACs.
Definition: at24mac_params.h:53
at24mac_params_t
struct holding all params needed for device communication
Definition: at24mac.h:50
at24mac.h