waterdetect3 2.1.0.0
waterdetect3.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 WATERDETECT3_H
29#define WATERDETECT3_H
30
31#ifdef __cplusplus
32extern "C"{
33#endif
34
35#include "drv_digital_out.h"
36#include "drv_digital_in.h"
37
53#define WATERDETECT3_PIN_STATE_HIGH 0x01
54#define WATERDETECT3_PIN_STATE_LOW 0x00
55 // waterdetect3_set
57
72#define WATERDETECT3_MAP_MIKROBUS( cfg, mikrobus ) \
73 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
74 // waterdetect3_map // waterdetect3
77
82typedef struct
83{
84 //digital_out_t an; /**< Description. */
85 //digital_out_t rst; /**< Description. */
86 //digital_out_t cs; /**< Description. */
87 //digital_out_t pwm; /**< Description. */
88 //digital_out_t int_pin; /**< Description. */
89
90 //digital_in_t an; /**< Description. */
91 //digital_in_t rst; /**< Description. */
92 //digital_in_t cs; /**< Description. */
93 //digital_in_t pwm; /**< Description. */
94 digital_in_t int_pin;
97
102typedef struct
103{
104 //pin_name_t an; /**< Description. */
105 //pin_name_t rst; /**< Description. */
106 //pin_name_t cs; /**< Description. */
107 //pin_name_t pwm; /**< Description. */
108 pin_name_t int_pin;
111
116typedef enum
117{
120
122
139
154
166
167#ifdef __cplusplus
168}
169#endif
170#endif // WATERDETECT3_H
171 // waterdetect3
173
174// ------------------------------------------------------------------------ END
uint8_t waterdetect3_get_int(waterdetect3_t *ctx)
Water Detect 3 interrupt pin reading function.
void waterdetect3_cfg_setup(waterdetect3_cfg_t *cfg)
Water Detect 3 configuration object setup function.
err_t waterdetect3_init(waterdetect3_t *ctx, waterdetect3_cfg_t *cfg)
Water Detect 3 initialization function.
Water Detect 3 Click configuration object.
Definition: waterdetect3.h:103
pin_name_t int_pin
Definition: waterdetect3.h:108
Water Detect 3 Click context object.
Definition: waterdetect3.h:83
digital_in_t int_pin
Definition: waterdetect3.h:94
waterdetect3_return_value_t
Water Detect 3 Click return value data.
Definition: waterdetect3.h:117
@ WATERDETECT3_ERROR
Definition: waterdetect3.h:119
@ WATERDETECT3_OK
Definition: waterdetect3.h:118