Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
Loading...
Searching...
No Matches
fan_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 FAN_DRV_H
36#define FAN_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 digital_in_t int_pin;
54 i2c_master_t i2c;
55 uint8_t slave_address;
56} fan_t;
57
61typedef struct
62{
63 pin_name_t scl;
64 pin_name_t sda;
65 pin_name_t int_pin;
66 uint32_t i2c_speed;
67 uint8_t i2c_address;
68} fan_cfg_t;
69
70#endif // FAN_DRV_H
71
// End public_function group
74
75// ------------------------------------------------------------------------- END
Click configuration structure definition.
Definition fan_drv.h:62
pin_name_t scl
Module clock pin name.
Definition fan_drv.h:63
uint8_t i2c_address
Device slave address.
Definition fan_drv.h:67
pin_name_t int_pin
Interrupt event pin name.
Definition fan_drv.h:65
uint32_t i2c_speed
Module speed.
Definition fan_drv.h:66
pin_name_t sda
Module data pin name.
Definition fan_drv.h:64
Click context object definition.
Definition fan_drv.h:52
digital_in_t int_pin
Interrupt event pin object.
Definition fan_drv.h:53
i2c_master_t i2c
Communication module object.
Definition fan_drv.h:54
uint8_t slave_address
Device slave address.
Definition fan_drv.h:55