Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
thermo_click.h
Go to the documentation of this file.
1 
5 /*
6  * Copyright (c) 2022, Cascoda Ltd.
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions are met:
11  * 1. Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in the
15  * documentation and/or other materials provided with the distribution.
16  * 3. Neither the name of the copyright holder nor the
17  * names of its contributors may be used to endorse or promote products
18  * derived from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  */
32 /*
33  * Example click interface driver
34 */
35 
36 #ifndef THERMO_CLICK_H
37 #define THERMO_CLICK_H
38 
39 #include <stdint.h>
40 
41 /* data acquisition status */
43 {
44  THERMO_ST_OK = 0, /* read values ok */
45  THERMO_ST_FAIL = 1 /* acquisition failed */
46 };
47 
48 /* timing parameters [ms] */
49 #define THERMO_T_POWERUP 200 /* max31855 200 ms power-up time */
50 
51 /* new functions */
52 uint8_t MIKROSDK_THERMO_get_thermo_temperature(uint16_t *temperature);
53 uint8_t MIKROSDK_THERMO_get_junction_temperature(uint16_t *temperature);
54 uint8_t MIKROSDK_THERMO_get_all_temperatures(uint16_t *thermo_temperature, uint16_t *junction_temperature);
55 uint8_t MIKROSDK_THERMO_Initialise(void);
56 uint8_t MIKROSDK_THERMO_Reinitialise(void);
57 uint8_t MIKROSDK_THERMO_Acquire(uint16_t *thermo_temperature, uint16_t *junction_temperature);
58 
59 #endif // THERMO_CLICK_H
uint8_t MIKROSDK_THERMO_Initialise(void)
Definition: thermo.c:187
uint8_t MIKROSDK_THERMO_get_junction_temperature(uint16_t *temperature)
Definition: thermo.c:140
thermo_status
Definition: thermo_click.h:43
@ THERMO_ST_OK
Definition: thermo_click.h:44
@ THERMO_ST_FAIL
Definition: thermo_click.h:45
uint8_t MIKROSDK_THERMO_get_thermo_temperature(uint16_t *temperature)
Definition: thermo.c:120
uint8_t MIKROSDK_THERMO_Reinitialise(void)
Definition: thermo.c:205
uint8_t MIKROSDK_THERMO_get_all_temperatures(uint16_t *thermo_temperature, uint16_t *junction_temperature)
Definition: thermo.c:161
uint8_t MIKROSDK_THERMO_Acquire(uint16_t *thermo_temperature, uint16_t *junction_temperature)
Definition: thermo.c:222