|
precision-converters-firmware
|
Support file for AD4692 device. More...
#include "ad4692_support.h"#include "no_os_error.h"#include "no_os_delay.h"#include "app_config.h"#include "ad4692_iio.h"#include "string.h"
Functions | |
| int | ad4692_toggle_cnv (struct no_os_gpio_desc *gpio_cnv) |
| Toggle CNV GPIO. | |
| int | ad4692_configure_acc_mask (uint16_t channel_mask, enum ad4692_sequencer_modes sequencer, uint8_t *chn_priorities) |
| Configure the accumulator mask. | |
| int | ad4692_configure_channel_priorities (uint8_t *chn_priorities, uint8_t *channel_sequence, uint8_t *num_of_as_slots, uint8_t *acc_count) |
| Configure the advanced sequencer slots. | |
Support file for AD4692 device.
Copyright (c) 2024 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.
| int ad4692_configure_acc_mask | ( | uint16_t | channel_mask, |
| enum ad4692_sequencer_modes | sequencer, | ||
| uint8_t * | chn_priorities | ||
| ) |
Configure the accumulator mask.
| channel_mask[in] | - Channel mask (Applicable in case of standard sequencer) |
| sequencer[in] | - Sequencer mode |
| chn_priorities[in] | - Channel priority (Applicable in case of advanced sequencer) |

| int ad4692_configure_channel_priorities | ( | uint8_t * | chn_priorities, |
| uint8_t * | channel_sequence, | ||
| uint8_t * | num_of_as_slots, | ||
| uint8_t * | acc_count | ||
| ) |
Configure the advanced sequencer slots.
| chn_priorities[in] | - channel priorities to be configured |
| channel_sequence[out] | - Channel sequence as configured in the AS Slots |
| num_of_as_slots[out] | - Number of slots in the advanced sequencer |
| acc_count[in] | - Accumulator count limit |
This function configures the advanced sequencer slots based on the priorities assigned to each channel(max 2 priorities are allowed in the application). Example: If the user configures the following channels as P1 (highest priority): Ch0,Ch1,Ch2 and the following as P2 (Least priority): Ch3,Ch4 Then the advanced sequencer configurations would look like: Ch0-Ch1-Ch2-Ch3-Ch0-Ch1-Ch2-Ch4

| int ad4692_toggle_cnv | ( | struct no_os_gpio_desc * | gpio_cnv | ) |
Toggle CNV GPIO.
| gpio_cnv[in,out] | - GPIO CNV Descriptor |