no-OS
Loading...
Searching...
No Matches
admfm2000.c File Reference

Implementation of admfm2000 Driver. More...

#include "admfm2000.h"
#include "no_os_alloc.h"
#include "no_os_error.h"
#include "no_os_print_log.h"
Include dependency graph for admfm2000.c:

Functions

int admfm2000_get_dsa_raw (struct admfm2000_dev *dev, uint8_t chan, int32_t *dsa_raw)
 Get the value of the dsa pins of the device.
 
int admfm2000_set_dsa_raw (struct admfm2000_dev *dev, uint8_t chan, int32_t dsa_raw)
 Set the DSA GPIOs of the device.
 
int admfm2000_set_channel_config (struct admfm2000_dev *dev, uint8_t config)
 Set the channel configuration.
 
int admfm2000_init (struct admfm2000_dev **device, struct admfm2000_init_param *init_param)
 Initialize the admfm2000 device.
 
int admfm2000_remove (struct admfm2000_dev *dev)
 Free the resources allocated by admfm2000_init().
 

Detailed Description

Implementation of admfm2000 Driver.

Author
Ramona Nechita (ramon.nosp@m.a.ne.nosp@m.chita.nosp@m.@ana.nosp@m.log.c.nosp@m.om)

Copyright 2025(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Function Documentation

◆ admfm2000_get_dsa_raw()

int admfm2000_get_dsa_raw ( struct admfm2000_dev * dev,
uint8_t chan,
int32_t * dsa_raw )

Get the value of the dsa pins of the device.

Parameters
dev- The device structure.
chan- The channel for which the value is read.
dsa_raw- The raw value from DSA gpios.
Returns
Returns 0 in case of success or negative error code otherwise.

◆ admfm2000_init()

int admfm2000_init ( struct admfm2000_dev ** device,
struct admfm2000_init_param * init_param )

Initialize the admfm2000 device.

Parameters
device- The device structure.
init_param- The structure that contains the device initial parameters.
Returns
Returns 0 in case of success or negative error code otherwise.

◆ admfm2000_remove()

int admfm2000_remove ( struct admfm2000_dev * dev)

Free the resources allocated by admfm2000_init().

Parameters
dev- The device structure.
Returns
ret - Result of the remove procedure.

◆ admfm2000_set_channel_config()

int admfm2000_set_channel_config ( struct admfm2000_dev * dev,
uint8_t config )

Set the channel configuration.

Parameters
dev- The device structure.
config- The config
Returns
Returns 0 in case of success or negative error code otherwise.

◆ admfm2000_set_dsa_raw()

int admfm2000_set_dsa_raw ( struct admfm2000_dev * dev,
uint8_t chan,
int32_t dsa_raw )

Set the DSA GPIOs of the device.

Parameters
dev- The device structure.
chan- The channel for which the value is set.
dsa_raw- The raw value for GPIOs.
Returns
Returns 0 in case of success or negative error code otherwise.