upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
ppd42ns.h
Go to the documentation of this file.
1 /*
2  * Author: Jon Trulson <jtrulson@ics.com>
3  * Copyright (c) 2016 Intel Corporation.
4  *
5  * Based on original C++ driver written by:
6  * Author: Zion Orent <sorent@ics.com>
7  * Copyright (c) 2014 Intel Corporation.
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining
10  * a copy of this software and associated documentation files (the
11  * "Software"), to deal in the Software without restriction, including
12  * without limitation the rights to use, copy, modify, merge, publish,
13  * distribute, sublicense, and/or sell copies of the Software, and to
14  * permit persons to whom the Software is furnished to do so, subject to
15  * the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be
18  * included in all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27  */
28 #pragma once
29 
30 #include <stdlib.h>
31 #include <stdio.h>
32 #include <upm.h>
33 
34 #include <mraa/gpio.h>
35 #include "ppd42ns_data.h"
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
52  typedef struct _ppd42ns_context {
53  mraa_gpio_context gpio;
54 
55  } *ppd42ns_context;
56 
64 
71 
79 
80 #ifdef __cplusplus
81 }
82 #endif
void ppd42ns_close(ppd42ns_context dev)
Definition: ppd42ns.c:79
Definition: ppd42ns_data.h:37
Definition: ppd42ns.h:52
ppd42ns_dust_data ppd42ns_get_data(const ppd42ns_context dev)
Definition: ppd42ns.c:89
ppd42ns_context ppd42ns_init(int pin)
Definition: ppd42ns.c:46
struct _ppd42ns_context * ppd42ns_context