Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
Loading...
Searching...
No Matches
thermo_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 THERMO_DRV_H
36
#define THERMO_DRV_H
37
38
#include "drv_digital_in.h"
39
#include "drv_digital_out.h"
40
#include "drv_spi_master.h"
41
42
// --------------------------------------------------------------- PUBLIC TYPES
51
typedef
struct
52
{
53
digital_out_t
cs
;
54
55
// Modules
56
57
spi_master_t
spi
;
58
pin_name_t
chip_select
;
59
60
}
thermo_t
;
61
65
typedef
struct
66
{
67
// Communication gpio pins
68
69
pin_name_t
miso
;
70
pin_name_t
mosi
;
71
pin_name_t
sck
;
72
pin_name_t
cs
;
73
74
// static variable
75
76
uint32_t
spi_speed
;
77
spi_master_mode_t
spi_mode
;
78
spi_master_chip_select_polarity_t
cs_polarity
;
79
80
}
thermo_cfg_t
;
81
// End types group
83
84
#endif
// THERMO_DRV_H
85
// End public_function group
88
89
// ------------------------------------------------------------------------- END
thermo_cfg_t
Click configuration structure definition.
Definition
thermo_drv.h:66
thermo_cfg_t::cs
pin_name_t cs
Definition
thermo_drv.h:72
thermo_cfg_t::spi_mode
spi_master_mode_t spi_mode
Definition
thermo_drv.h:77
thermo_cfg_t::miso
pin_name_t miso
Definition
thermo_drv.h:69
thermo_cfg_t::spi_speed
uint32_t spi_speed
Definition
thermo_drv.h:76
thermo_cfg_t::sck
pin_name_t sck
Definition
thermo_drv.h:71
thermo_cfg_t::cs_polarity
spi_master_chip_select_polarity_t cs_polarity
Definition
thermo_drv.h:78
thermo_cfg_t::mosi
pin_name_t mosi
Definition
thermo_drv.h:70
thermo_t
Click ctx object definition.
Definition
thermo_drv.h:52
thermo_t::chip_select
pin_name_t chip_select
Definition
thermo_drv.h:58
thermo_t::spi
spi_master_t spi
Definition
thermo_drv.h:57
thermo_t::cs
digital_out_t cs
Definition
thermo_drv.h:53
baremetal
mikrosdk-click
include
thermo_drv.h
Generated by
1.9.8