Filter results by

Older Versions

Older API versions are available as a download. To view, extract the file and open the index.html file in a web browser.

artik_adc.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2017 Samsung Electronics All Rights Reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing,
12  * software distributed under the License is distributed on an
13  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14  * either express or implied. See the License for the specific
15  * language governing permissions and limitations under the License.
16  *
17  */
18 
19 #ifndef __ARTIK_ADC_H__
20 #define __ARTIK_ADC_H__
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 #include "artik_error.h"
27 #include "artik_types.h"
28 
46 #define MAX_NAME_LEN 64
47 
54 typedef void *artik_adc_handle;
55 
62 typedef struct {
66  int pin_num;
70  char *name;
74  void *user_data;
75 
77 
85 typedef struct {
96  artik_error(*request) (artik_adc_handle * handle,
97  artik_adc_config * config);
108  artik_error(*release) (artik_adc_handle handle);
121  artik_error(*get_value) (artik_adc_handle handle,
122  int *value);
124 
125 extern artik_adc_module adc_module;
126 
127 #ifdef __cplusplus
128 }
129 #endif
130 #endif /* __ARTIK_ADC_H__ */
Custom types.
int pin_num
Pin number of the ADC module.
Definition: artik_adc.h:66
int artik_error
Error type.
Definition: artik_error.h:35
ADC module operations.
Definition: artik_adc.h:85
void * user_data
Pointer to data for internal use by the API.
Definition: artik_adc.h:74
ADC configuration structure.
Definition: artik_adc.h:62
char * name
Friendly name for the ADC module.
Definition: artik_adc.h:70
Error codes.
void * artik_adc_handle
ADC handle type.
Definition: artik_adc.h:54
Last updated on: