Analog Devices / platform_drivers

Dependents:   EVAL-CN0535-FMCZ EVAL-CN0535-FMCZ EVAL-AD568x-AD569x EVAL-AD7606 ... more

Embed: (wiki syntax)

« Back to documentation index

ain.cpp File Reference

ain.cpp File Reference

Implementation of mbed specific analog input functionality. More...

Go to the source code of this file.

Functions

int32_t ain_get_voltage (struct ain_desc *desc, float *value)
 Read voltage from analog input pin.
int32_t ain_init (struct ain_desc **desc, const struct ain_init_param *param)
 Initialize the Analog Input Pin.
int32_t ain_remove (struct ain_desc *desc)
 Deallocate resources allocated by ain_init()

Variables

struct ain_platform_ops mbed_ain_ops
 Mbed specific analog input platform ops structure.

Detailed Description

Implementation of mbed specific analog input functionality.

Copyright (c) 2021 Analog Devices, Inc. All rights reserved.

This software is proprietary to Analog Devices, Inc. and its licensors. By using this software you agree to the terms of the associated Analog Devices Software License Agreement.

Definition in file ain.cpp.


Function Documentation

int32_t ain_get_voltage ( struct ain_desc desc,
float *  value 
)

Read voltage from analog input pin.

Parameters:
desc[in]- Analog input descriptor
value[out]- Buffer to pass analog reading.
Returns:
SUCCESS in case of success, FAILURE otherwise

Definition at line 44 of file ain.cpp.

int32_t ain_init ( struct ain_desc **  desc,
const struct ain_init_param param 
)

Initialize the Analog Input Pin.

Parameters:
desc[in,out]- Analog input descriptor structure
param[in]- Structure that contains analog input initialization parameters
Returns:
SUCCESS in case of success, FAILURE otherwise

Definition at line 66 of file ain.cpp.

int32_t ain_remove ( struct ain_desc desc )

Deallocate resources allocated by ain_init()

Parameters:
desc[in,out]- Analog input descriptor
Returns:
SUCCESS in case of success, FAILURE otherwise.

Definition at line 125 of file ain.cpp.


Variable Documentation

Initial value:
 {
    .init = &ain_init,
    .read = &ain_get_voltage,
    .remove = &ain_remove
}

Mbed specific analog input platform ops structure.

mbed specific analog input platform ops structure

Definition at line 158 of file ain.cpp.