precision-converters-firmware
Classes | Enumerations | Functions
cn0586_support.h File Reference

Header file for CN0586 supporting APIs. More...

#include <stdint.h>
#include "app_config.h"
Include dependency graph for cn0586_support.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cn0586_dev
 cn0586 CFTL structure. More...
 

Enumerations

enum  cn0586_range {
  HVOUT_0V_100V ,
  HVOUT_M100V_100V ,
  HVOUT_M50V_50V ,
  HVOUT_0V_200V ,
  NUM_OF_HVOUT_RANGES
}
 CN0586 HVOUT Range options. More...
 
enum  cn0586_hvout_state {
  HVOUT_DISABLED ,
  HVOUT_ENABLED ,
  NUM_OF_HVOUT_STATES
}
 CN0586 HVOUT State options. More...
 

Functions

int32_t cn0586_init (struct cn0586_dev **dev, struct ad5754r_dev *ad5754r_device)
 Initialize the CFTL. Power up channels A, B, D. More...
 
int32_t cn0586_set_hvout_range (struct cn0586_dev *dev, enum cn0586_range range)
 Set HVOUT range for the CFTL. More...
 
int32_t cn0586_set_hvout_volts (struct cn0586_dev *dev, float volts)
 Set HVOUT volts for the CFTL. More...
 
int32_t cn0586_get_hvout_volts (struct cn0586_dev *dev)
 Get HVOUT volts for the CFTL. More...
 

Detailed Description

Header file for CN0586 supporting APIs.

Copyright (c) 2024 Analog Devices, Inc.

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.

Enumeration Type Documentation

◆ cn0586_hvout_state

CN0586 HVOUT State options.

Enumerator
HVOUT_DISABLED 
HVOUT_ENABLED 
NUM_OF_HVOUT_STATES 

◆ cn0586_range

CN0586 HVOUT Range options.

Enumerator
HVOUT_0V_100V 
HVOUT_M100V_100V 
HVOUT_M50V_50V 
HVOUT_0V_200V 
NUM_OF_HVOUT_RANGES 

Function Documentation

◆ cn0586_get_hvout_volts()

int32_t cn0586_get_hvout_volts ( struct cn0586_dev dev)

Get HVOUT volts for the CFTL.

Parameters
dev[in,out]- The CFTL device structure.
Returns
0 in case of success, negative error code otherwise.

◆ cn0586_init()

int32_t cn0586_init ( struct cn0586_dev **  dev,
struct ad5754r_dev *  ad5754r_device 
)

Initialize the CFTL. Power up channels A, B, D.

Parameters
dev[in,out]- cn0586 device structure.
ad5754r_device[in,out]- Pointer to ad5754r device structure
Returns
0 in case of success, negative error code otherwise.

◆ cn0586_set_hvout_range()

int32_t cn0586_set_hvout_range ( struct cn0586_dev dev,
enum cn0586_range  range 
)

Set HVOUT range for the CFTL.

Parameters
dev[in,out]- cn0586 device structure.
range[in]- hvout range to be applied
Returns
0 in case of success, negative error code otherwise.
Here is the caller graph for this function:

◆ cn0586_set_hvout_volts()

int32_t cn0586_set_hvout_volts ( struct cn0586_dev dev,
float  volts 
)

Set HVOUT volts for the CFTL.

Parameters
dev[in,out]- The CFTL device structure.
volts[in]- Volts to appear at hvout when enabled.
Returns
0 in case of success, negative error code otherwise.