precision-converters-firmware
Loading...
Searching...
No Matches
Macros | Enumerations | Functions
ad4692_support.h File Reference

Support header file for AD4692. More...

#include "no_os_gpio.h"
#include "ad4692.h"
Include dependency graph for ad4692_support.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define AD4692_MAX_SLOTS_AS   128
 

Enumerations

enum  ad4692_sequencer_modes {
  STANDARD_SEQUENCER ,
  ADVANCED_SEQUENCER
}
 AD4692 sequencer modes. More...
 

Functions

int ad4692_toggle_cnv (struct no_os_gpio_desc *gpio_cnv)
 Toggle CNV GPIO.
 
int ad4692_configure_channel_priorities (uint8_t *chn_priorities, uint8_t *channel_sequence, uint8_t *num_as_slots, uint8_t *acc_count)
 Configure the advanced sequencer slots.
 
int ad4692_configure_acc_mask (uint16_t channel_mask, enum ad4692_sequencer_modes sequencer, uint8_t *chn_priorities)
 Configure the accumulator mask.
 

Detailed Description

Support header file for AD4692.

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.

Macro Definition Documentation

◆ AD4692_MAX_SLOTS_AS

#define AD4692_MAX_SLOTS_AS   128

Enumeration Type Documentation

◆ ad4692_sequencer_modes

AD4692 sequencer modes.

Enumerator
STANDARD_SEQUENCER 
ADVANCED_SEQUENCER 

Function Documentation

◆ ad4692_configure_acc_mask()

int ad4692_configure_acc_mask ( uint16_t  channel_mask,
enum ad4692_sequencer_modes  sequencer,
uint8_t *  chn_priorities 
)

Configure the accumulator mask.

Parameters
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)
Returns
0 in case of success, negative error code otherwise.
Here is the caller graph for this function:

◆ ad4692_configure_channel_priorities()

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.

Parameters
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
Returns
0 in case of success, negative error code otherwise.

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

Here is the caller graph for this function:

◆ ad4692_toggle_cnv()

int ad4692_toggle_cnv ( struct no_os_gpio_desc *  gpio_cnv)

Toggle CNV GPIO.

Parameters
gpio_cnv[in,out]- GPIO CNV Descriptor
Returns
0 in case of success, negative error code otherwise.