Header file for admfm2000 Driver. More...
Go to the source code of this file.
Classes | |
struct | admfm2000_init_param |
struct | admfm2000_dev |
Macros | |
#define | ADMFM2000_MIXER_MODE 0 |
#define | ADMFM2000_DIRECT_IF_MODE 1 |
#define | ADMFM2000_DSA_GPIOS 5 |
#define | ADMFM2000_MODE_GPIOS 2 |
#define | ADMFM2000_MAX_GAIN 0 |
#define | ADMFM2000_MIN_GAIN -31000 |
#define | ADMFM2000_MAX_GAIN_RAW 31 |
#define | ADMFM2000_MIN_GAIN_RAW 0 |
#define | ADMFM2000_DEFAULT_GAIN -0x20 |
#define | ADMFM2000_NUM_CHANNELS 2 |
Functions | |
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(). | |
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_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_get_channel_mode (struct admfm2000_dev *dev, uint8_t mode) |
int | admfm2000_set_channel_config (struct admfm2000_dev *dev, uint8_t config) |
Set the channel configuration. | |
Header file for admfm2000 Driver.
Copyright 2025(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define ADMFM2000_DEFAULT_GAIN -0x20 |
#define ADMFM2000_DIRECT_IF_MODE 1 |
#define ADMFM2000_DSA_GPIOS 5 |
#define ADMFM2000_MAX_GAIN 0 |
#define ADMFM2000_MAX_GAIN_RAW 31 |
#define ADMFM2000_MIN_GAIN -31000 |
#define ADMFM2000_MIN_GAIN_RAW 0 |
#define ADMFM2000_MIXER_MODE 0 |
#define ADMFM2000_MODE_GPIOS 2 |
#define ADMFM2000_NUM_CHANNELS 2 |
int admfm2000_get_channel_mode | ( | struct admfm2000_dev * | dev, |
uint8_t | mode ) |
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.
dev | - The device structure. |
chan | - The channel for which the value is read. |
dsa_raw | - The raw value from DSA gpios. |
int admfm2000_init | ( | struct admfm2000_dev ** | device, |
struct admfm2000_init_param * | init_param ) |
Initialize the admfm2000 device.
device | - The device structure. |
init_param | - The structure that contains the device initial parameters. |
int admfm2000_remove | ( | struct admfm2000_dev * | dev | ) |
Free the resources allocated by admfm2000_init().
dev | - The device structure. |
int admfm2000_set_channel_config | ( | struct admfm2000_dev * | dev, |
uint8_t | config ) |
Set the channel configuration.
dev | - The device structure. |
config | - The config |
int admfm2000_set_dsa_raw | ( | struct admfm2000_dev * | dev, |
uint8_t | chan, | ||
int32_t | dsa_raw ) |
Set the DSA GPIOs of the device.
dev | - The device structure. |
chan | - The channel for which the value is set. |
dsa_raw | - The raw value for GPIOs. |