Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
ambient8_drv.h
Go to the documentation of this file.
1 /*
2  * MikroSDK - MikroE Software Development Kit
3  * Copyright© 2020 MikroElektronika d.o.o.
4  *
5  * Permission is hereby granted, free of charge, to any person
6  * obtaining a copy of this software and associated documentation
7  * files (the "Software"), to deal in the Software without restriction,
8  * including without limitation the rights to use, copy, modify, merge,
9  * publish, distribute, sublicense, and/or sell copies of the Software,
10  * and to permit persons to whom the Software is furnished to do so,
11  * subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be
14  * included in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
22  * OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 
33 // ----------------------------------------------------------------------------
34 
35 #ifndef AMBIENT8_DRV_H
36 #define AMBIENT8_DRV_H
37 
38 #include "drv_digital_in.h"
39 #include "drv_digital_out.h"
40 #include "drv_i2c_master.h"
41 
42 // --------------------------------------------------------------- PUBLIC TYPES
51 typedef struct
52 {
53  // Modules
54 
55  i2c_master_t i2c;
56 
57  // ctx variable
58 
59  uint8_t slave_address;
60 
61 } ambient8_t;
62 
66 typedef struct
67 {
68  // Communication gpio pins
69 
70  pin_name_t scl;
71  pin_name_t sda;
72 
73  // static variable
74 
75  uint32_t i2c_speed;
76  uint8_t i2c_address;
77 
79 
80 #endif // AMBIENT8_DRV_H
81  // End public_function group
84 
85 // ------------------------------------------------------------------------- END
Click configuration structure definition.
Definition: ambient8_drv.h:67
uint32_t i2c_speed
Definition: ambient8_drv.h:75
uint8_t i2c_address
Definition: ambient8_drv.h:76
pin_name_t sda
Definition: ambient8_drv.h:71
pin_name_t scl
Definition: ambient8_drv.h:70
Click ctx object definition.
Definition: ambient8_drv.h:52
i2c_master_t i2c
Definition: ambient8_drv.h:55
uint8_t slave_address
Definition: ambient8_drv.h:59