Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
Loading...
Searching...
No Matches
hvac_drv.h
Go to the documentation of this file.
1/****************************************************************************
2** Copyright (C) 2020 MikroElektronika d.o.o.
3** Contact: https://www.mikroe.com/contact
4**
5** Permission is hereby granted, free of charge, to any person obtaining a copy
6** of this software and associated documentation files (the "Software"), to deal
7** in the Software without restriction, including without limitation the rights
8** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9** copies of the Software, and to permit persons to whom the Software is
10** furnished to do so, subject to the following conditions:
11** The above copyright notice and this permission notice shall be
12** included in all copies or substantial portions of the Software.
13**
14** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
16** OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18** DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
19** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20** USE OR OTHER DEALINGS IN THE SOFTWARE.
21****************************************************************************/
22
28#ifndef HVAC_DRV_H
29#define HVAC_DRV_H
30
31#include "drv_digital_in.h"
32#include "drv_digital_out.h"
33#include "drv_i2c_master.h"
34
40#define HVAC_SPS30_SLAVE_ADDR 0x69
41#define HVAC_SCD40_SLAVE_ADDR 0x62
42
47typedef struct
48{
49 // Modules
50 i2c_master_t i2c;
51 // MODIFIED: excluded uart
52 // uart_t uart; /**< UART driver object. */
53
54 // I2C slave address
55 uint8_t slave_address;
57} hvac_t;
58
63typedef struct
64{
65 pin_name_t scl;
66 pin_name_t sda;
68 uint32_t i2c_speed;
69 uint8_t i2c_address;
72
73#endif // HVAC_DRV_H
74
// hvac
76
77// ------------------------------------------------------------------------ END
HVAC Click configuration object.
Definition hvac_drv.h:64
uint32_t i2c_speed
I2C serial speed.
Definition hvac_drv.h:68
uint8_t i2c_address
I2C slave address.
Definition hvac_drv.h:69
pin_name_t scl
Clock pin descriptor for I2C driver.
Definition hvac_drv.h:65
pin_name_t sda
Bidirectional data pin descriptor for I2C driver.
Definition hvac_drv.h:66
HVAC Click context object.
Definition hvac_drv.h:48
uint8_t slave_address
Device slave address (used for I2C driver).
Definition hvac_drv.h:55
i2c_master_t i2c
I2C driver object.
Definition hvac_drv.h:50