no-OS
channel_output_example.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef __CHANNEL_OUTPUT_EXAMPLE_H__
35 #define __CHANNEL_OUTPUT_EXAMPLE_H__
36 
37 /******************************************************************************/
38 /***************************** Include Files **********************************/
39 /******************************************************************************/
40 #include "ad5460.h"
41 #include "common_data.h"
42 #include "no_os_delay.h"
43 #include "no_os_gpio.h"
44 #include "no_os_print_log.h"
45 
46 /******************************************************************************/
47 /************************ Functions Declarations ******************************/
48 /******************************************************************************/
50 
51 #endif /* __CHANNEL_OUTPUT_EXAMPLE_H__ */
ad5460.h
Header file of AD5460 Driver.
ad5460_set_therm_rst
int ad5460_set_therm_rst(struct ad5460_desc *desc, bool enable)
Enable or disable the higher thermal reset.
Definition: ad5460.c:483
channel_output_example.h
Channel output example header for eval-ad5460 project.
ad5460_set_diag
int ad5460_set_diag(struct ad5460_desc *desc, uint32_t ch, enum ad5460_diag_mode diag_code)
Set which diagnostic value to be loaded in the DIAG_RESULT register.
Definition: ad5460.c:363
ad5460_desc
AD5460 device descriptor.
Definition: ad5460.h:346
ad5460_gpio_get
int ad5460_gpio_get(struct ad5460_desc *desc, uint32_t ch, uint8_t *val)
Get the GPO value for a specific channel.
Definition: ad5460.c:409
ad5460_live_status
Used to store the live status bit fields.
Definition: ad5460.h:320
AD5460_DAC_ACTIVE
#define AD5460_DAC_ACTIVE(x)
Definition: ad5460.h:55
no_os_delay.h
Header file of Delay functions.
AD5460_DIAG_NO_DIAG
@ AD5460_DIAG_NO_DIAG
Definition: ad5460.h:272
pr_info
#define pr_info(fmt, args...)
Definition: no_os_print_log.h:115
ad5460_ip
struct ad5460_init_param ad5460_ip
Definition: common_data.c:64
AD5460_VOLTAGE_OUT
@ AD5460_VOLTAGE_OUT
Definition: ad5460.h:208
no_os_print_log.h
Print messages helpers.
AD5460_STEP_0_8_PERCENT
@ AD5460_STEP_0_8_PERCENT
Definition: ad5460.h:243
channel_output_example_main
int channel_output_example_main()
Channel output example main execution.
Definition: channel_output_example.c:54
AD5460_LIN_RATE_4KHZ8
@ AD5460_LIN_RATE_4KHZ8
Definition: ad5460.h:253
ad5460_remove
int ad5460_remove(struct ad5460_desc *desc)
Free the device descriptor.
Definition: ad5460.c:607
channel_output_example_main
int channel_output_example_main()
Channel output example main execution.
Definition: channel_output_example.c:54
AD5460_VOUT_RANGE_0_12V
@ AD5460_VOUT_RANGE_0_12V
Definition: ad5460.h:218
ad5460_channel_config::function
enum ad5460_op_mode function
Definition: ad5460.h:337
AD5460_CURRENT_OUT_HART
@ AD5460_CURRENT_OUT_HART
Definition: ad5460.h:210
ad5460_set_channel_vout_range
int ad5460_set_channel_vout_range(struct ad5460_desc *desc, uint32_t ch, enum ad5460_vout_range vout_range)
Set the voltage range for a specific channel.
Definition: ad5460.c:285
AD5460_CURRENT_OUT
@ AD5460_CURRENT_OUT
Definition: ad5460.h:209
ad5460_dac_slew_enable
int ad5460_dac_slew_enable(struct ad5460_desc *desc, uint32_t ch, enum ad5460_slew_lin_step step, enum ad5460_lin_rate rate)
Configure and enable slew rate control for a DAC on a specific channel.
Definition: ad5460.c:443
AD5460_GPIO_SEL_GPI
@ AD5460_GPIO_SEL_GPI
Definition: ad5460.h:265
ad5460_dac_current_to_code
int ad5460_dac_current_to_code(struct ad5460_desc *desc, uint32_t uamps, uint16_t *code, uint32_t ch)
Convers a microamp value in the corresponding DAC 16 bit code.
Definition: ad5460.c:103
no_os_gpio.h
Header file of GPIO Interface.
ad5460_live_status::value
uint16_t value
Definition: ad5460.h:322
ad5460_set_channel_function
int ad5460_set_channel_function(struct ad5460_desc *desc, uint32_t ch, enum ad5460_op_mode ch_func)
Set the operation mode for a specific channel.
Definition: ad5460.c:255
ad5460_set_channel_dac_code
int ad5460_set_channel_dac_code(struct ad5460_desc *desc, uint32_t ch, uint16_t dac_code)
Set and load a code for the DAC on a specific channel.
Definition: ad5460.c:350
ad5460_get_live
int ad5460_get_live(struct ad5460_desc *desc, union ad5460_live_status *status)
Read the live status bits.
Definition: ad5460.c:429
ad5460_init
int ad5460_init(struct ad5460_desc **desc, struct ad5460_init_param *init_param)
Initialize the device structure.
Definition: ad5460.c:554
ad5460_dac_voltage_to_code
int ad5460_dac_voltage_to_code(struct ad5460_desc *desc, int32_t mvolts, uint16_t *code, uint32_t ch)
Converts a millivolt value in the corresponding DAC 16 bit code.
Definition: ad5460.c:68
ad5460_set_gpio_config
int ad5460_set_gpio_config(struct ad5460_desc *desc, uint32_t ch, enum ad5460_gpio_select config)
Set the GPIO operation mode.
Definition: ad5460.c:376
ad5460_reg_read
int ad5460_reg_read(struct ad5460_desc *desc, uint32_t addr, uint16_t *val)
Read a register's value.
Definition: ad5460.c:205
ad5460_desc::channel_configs
struct ad5460_channel_config channel_configs[AD5460_N_CHANNELS]
Definition: ad5460.h:350