Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
Loading...
Searching...
No Matches
expand13_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 EXPAND13_DRV_H
36#define EXPAND13_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
51typedef struct
52{
53 // Output pins
54 digital_out_t rst;
55
56 // Input pins
57
58 digital_in_t int_pin;
59
60 // Modules
61
62 i2c_master_t i2c;
63
64 // I2C slave address
65
67
69
73typedef struct
74{
75 // Communication gpio pins
76
77 pin_name_t scl;
78 pin_name_t sda;
79
80 // Additional gpio pins
81
82 pin_name_t rst;
83 pin_name_t int_pin;
85 // static variable
86
87 uint32_t i2c_speed;
88 uint8_t i2c_address;
89
91
// End types group
93
94#endif // EXPAND13_DRV_H
95
// End public_function group
98
99// ------------------------------------------------------------------------- END
Click configuration structure definition.
Definition expand13_drv.h:74
pin_name_t sda
Definition expand13_drv.h:78
pin_name_t int_pin
Interrupt pin.
Definition expand13_drv.h:83
pin_name_t rst
Reset pin.
Definition expand13_drv.h:82
pin_name_t scl
Definition expand13_drv.h:77
uint8_t i2c_address
Definition expand13_drv.h:88
uint32_t i2c_speed
Definition expand13_drv.h:87
Click ctx object definition.
Definition expand13_drv.h:52
uint8_t slave_address
Definition expand13_drv.h:66
digital_in_t int_pin
Definition expand13_drv.h:58
digital_out_t rst
Definition expand13_drv.h:54
i2c_master_t i2c
Definition expand13_drv.h:62