|
SmartSnippets DA1459x SDK
|
GPADC adapter API. More...
Go to the source code of this file.
Data Structures | |
| struct | ad_gpadc_io_conf |
| GPADC I/O configuration. More... | |
| struct | ad_gpadc_controller_conf |
| GPADC controller configuration. More... | |
Macros | |
| #define | CONFIG_GPADC_USE_ASYNC_TRANSACTIONS (1) |
| Controls whether GPADC asynchronous transaction API will be used. More... | |
| #define | CONFIG_GPADC_USE_SYNC_TRANSACTIONS (1) |
| Controls whether GPADC synchronous transaction API will be used. More... | |
| #define | HW_GPADC_1 ((void *)GPADC_BASE) |
| GPADC controller instance. | |
Typedefs | |
| typedef struct ad_gpadc_io_conf | ad_gpadc_io_conf_t |
| GPADC I/O configuration. More... | |
| typedef hw_gpadc_config_t | ad_gpadc_driver_conf_t |
| GPADC driver configuration. More... | |
| typedef struct ad_gpadc_controller_conf | ad_gpadc_controller_conf_t |
| GPADC controller configuration. More... | |
| typedef void * | ad_gpadc_handle_t |
| GPADC Handle returned by ad_gpadc_open() | |
| typedef void(* | ad_gpadc_user_cb) (void *user_data, int value) |
| GPADC adapter callback function. More... | |
Enumerations | |
| enum | AD_GPADC_ERROR |
| enum with return values of API calls | |
Functions | |
| void | ad_gpadc_init (void) |
| Initialize GPADC adapter and some required variables. More... | |
| int | ad_gpadc_read_nof_conv (const ad_gpadc_handle_t handle, int nof_conv, uint16_t *outbuf) |
| Read synchronously nof_conv conversions from the selected source. More... | |
| int | ad_gpadc_read_nof_conv_async (const ad_gpadc_handle_t handle, int nof_conv, uint16_t *outbuf, ad_gpadc_user_cb read_async_cb, void *user_data) |
| Read asynchronously nof_conv conversions from the selected source. More... | |
| uint16_t | ad_gpadc_get_source_max (const ad_gpadc_driver_conf_t *drv) |
| Return maximum value that can be read for ADC source. More... | |
| ad_gpadc_handle_t | ad_gpadc_open (const ad_gpadc_controller_conf_t *conf) |
| Open GPADC controller. More... | |
| int | ad_gpadc_reconfig (const ad_gpadc_handle_t p, const ad_gpadc_driver_conf_t *drv) |
| Reconfigure GPADC controller. More... | |
| int | ad_gpadc_io_config (const HW_GPADC_ID id, const ad_gpadc_io_conf_t *io, AD_IO_CONF_STATE state) |
| Initialize controller pins to on / off io configuration. More... | |
| int | ad_gpadc_close (ad_gpadc_handle_t p, bool force) |
| Close GPADC controller. More... | |
| __STATIC_FORCEINLINE int | ad_gpadc_conv_to_temp_x100 (const ad_gpadc_driver_conf_t *drv, uint16_t raw_value) |
| Convert raw value read from GPADC to temperature value in hundredths of degree Celsius. More... | |
| uint16_t | ad_gpadc_conv_raw_to_batt_mvolt (const ad_gpadc_driver_conf_t *drv, uint32_t raw_value) |
| Convert raw value read from GPADC to battery voltage in mV. The same configuration which was used to obtain the adc_value is needed for the conversion. More... | |
| int | ad_gpadc_conv_to_mvolt (const ad_gpadc_driver_conf_t *drv, uint32_t raw_value) |
| Convert raw value read from GPADC to voltage in mV. The same configuration which was used to obtain the adc_value is needed for the conversion. More... | |
GPADC adapter API.
Copyright (C) 2015-2023 Renesas Electronics Corporation and/or its affiliates. All rights reserved. Confidential Information.
This software ("Software") is supplied by Renesas Electronics Corporation and/or its affiliates ("Renesas"). Renesas grants you a personal, non-exclusive, non-transferable, revocable, non-sub-licensable right and license to use the Software, solely if used in or together with Renesas products. You may make copies of this Software, provided this copyright notice and disclaimer ("Notice") is included in all such copies. Renesas reserves the right to change or discontinue the Software at any time without notice.
THE SOFTWARE IS PROVIDED "AS IS". RENESAS DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. TO THE MAXIMUM EXTENT PERMITTED UNDER LAW, IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE, EVEN IF RENESAS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. USE OF THIS SOFTWARE MAY BE SUBJECT TO TERMS AND CONDITIONS CONTAINED IN AN ADDITIONAL AGREEMENT BETWEEN YOU AND RENESAS. IN CASE OF CONFLICT BETWEEN THE TERMS OF THIS NOTICE AND ANY SUCH ADDITIONAL LICENSE AGREEMENT, THE TERMS OF THE AGREEMENT SHALL TAKE PRECEDENCE. BY CONTINUING TO USE THIS SOFTWARE, YOU AGREE TO THE TERMS OF THIS NOTICE.IF YOU DO NOT AGREE TO THESE TERMS, YOU ARE NOT PERMITTED TO USE THIS SOFTWARE.
1.8.16