precision-converters-firmware
Functions
cn0586_support.c File Reference

CN0586 support module. More...

#include <stdbool.h>
#include "app_config.h"
#include "cn0586_support.h"
#include "no_os_util.h"
#include "no_os_error.h"
#include "no_os_gpio.h"
#include "no_os_alloc.h"
Include dependency graph for cn0586_support.c:

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_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...
 
int32_t cn0586_set_hvout_range (struct cn0586_dev *dev, enum cn0586_range range)
 Set HVOUT range for the CFTL. More...
 

Detailed Description

CN0586 support module.

This module performs the system configurations for CN0586

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.

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.