Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sol-aio.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Soletta (TM) Project
3  *
4  * Copyright (C) 2015 Intel Corporation. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #pragma once
20 
21 #include <stdbool.h>
22 #include <stdint.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
53 struct sol_aio;
54 typedef struct sol_aio sol_aio;
55 
62 struct sol_aio_pending;
64 
83 struct sol_aio *sol_aio_open_by_label(const char *label, unsigned int precision);
84 
101 struct sol_aio *sol_aio_open(int device, int pin, unsigned int precision);
102 
118 struct sol_aio *sol_aio_open_raw(int device, int pin, unsigned int precision);
119 
125 void sol_aio_close(struct sol_aio *aio);
126 
144 struct sol_aio_pending *sol_aio_get_value(struct sol_aio *aio, void (*read_cb)(void *cb_data, struct sol_aio *aio, int32_t ret), const void *cb_data);
145 
152 void sol_aio_pending_cancel(struct sol_aio *aio, struct sol_aio_pending *pending);
153 
158 #ifdef __cplusplus
159 }
160 #endif
struct sol_http_client_connection * pending
Definition: download.c:29
struct sol_aio_pending * sol_aio_get_value(struct sol_aio *aio, void(*read_cb)(void *cb_data, struct sol_aio *aio, int32_t ret), const void *cb_data)
Request an (asynchronous) read operation to take place on AIO handle aio.
void sol_aio_close(struct sol_aio *aio)
Close the given AIO handle.
void sol_aio_pending_cancel(struct sol_aio *aio, struct sol_aio_pending *pending)
Cancel a pending operation.
struct sol_aio * sol_aio_open(int device, int pin, unsigned int precision)
Open the given Analog I/O pin on device to be used.
struct sol_aio sol_aio
AIO handle structure.
Definition: sol-aio.h:54
struct sol_aio_pending sol_aio_pending
AIO pending operation handle structure.
Definition: sol-aio.h:63
struct sol_aio * sol_aio_open_by_label(const char *label, unsigned int precision)
Open the given board pin by its label to be used as Analog I/O.
struct sol_aio * sol_aio_open_raw(int device, int pin, unsigned int precision)
Open the given Analog I/O pin on device to be used.