no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
admfm2000.h
Go to the documentation of this file.
1/***************************************************************************/
33
34#ifndef SRC_ADMFM2000_H_
35#define SRC_ADMFM2000_H_
36
37#include <stdint.h>
38#include "no_os_gpio.h"
39
40#define ADMFM2000_MIXER_MODE 0
41#define ADMFM2000_DIRECT_IF_MODE 1
42#define ADMFM2000_DSA_GPIOS 5
43#define ADMFM2000_MODE_GPIOS 2
44#define ADMFM2000_MAX_GAIN 0
45#define ADMFM2000_MIN_GAIN -31000
46#define ADMFM2000_MAX_GAIN_RAW 31
47#define ADMFM2000_MIN_GAIN_RAW 0
48#define ADMFM2000_DEFAULT_GAIN -0x20
49#define ADMFM2000_NUM_CHANNELS 2
50
52 /* Mixer Mode */
53 uint8_t mixer_mode;
54 /* GAIN */
55 int32_t dsa_gain;
56 /* GPIO Control Switch chan 0&1 */
58 /* GPIO Control DSA chan 0&1 */
60};
61
63 /* GPIO Control Switch chan 0&1 */
64 struct no_os_gpio_desc *gpio_sw[2][2];
65 /* GPIO Control DSA chan 0&1 */
67};
68
71
72int admfm2000_remove(struct admfm2000_dev *dev);
73
74int admfm2000_set_dsa_raw(struct admfm2000_dev *dev, uint8_t chan,
75 int32_t dsa_raw);
76
77int admfm2000_get_dsa_raw(struct admfm2000_dev *dev, uint8_t chan,
78 int32_t *dsa_raw);
79
80int admfm2000_get_channel_mode(struct admfm2000_dev *dev, uint8_t mode);
81
82int admfm2000_set_channel_config(struct admfm2000_dev *dev, uint8_t config);
83
84#endif /* SRC_ADMFM2000_H_ */
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
int admfm2000_init(struct admfm2000_dev **device, struct admfm2000_init_param *init_param)
Initialize the admfm2000 device.
Definition admfm2000.c:130
int admfm2000_set_channel_config(struct admfm2000_dev *dev, uint8_t config)
Set the channel configuration.
Definition admfm2000.c:101
int admfm2000_remove(struct admfm2000_dev *dev)
Free the resources allocated by admfm2000_init().
Definition admfm2000.c:194
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.
Definition admfm2000.c:46
int admfm2000_get_channel_mode(struct admfm2000_dev *dev, uint8_t mode)
int admfm2000_set_dsa_raw(struct admfm2000_dev *dev, uint8_t chan, int32_t dsa_raw)
Set the DSA GPIOs of the device.
Definition admfm2000.c:76
Header file of GPIO Interface.
Definition admfm2000.h:62
struct no_os_gpio_desc * gpio_sw[2][2]
Definition admfm2000.h:64
struct no_os_gpio_desc * gpio_dsa[2][5]
Definition admfm2000.h:66
Definition admfm2000.h:51
struct no_os_gpio_init_param * gpio_sw_param[2][2]
Definition admfm2000.h:57
uint8_t mixer_mode
Definition admfm2000.h:53
int32_t dsa_gain
Definition admfm2000.h:55
struct no_os_gpio_init_param * gpio_dsa_param[2][5]
Definition admfm2000.h:59
Definition ad9361_util.h:63
Structure holding the GPIO descriptor.
Definition no_os_gpio.h:84
Structure holding the parameters for GPIO initialization.
Definition no_os_gpio.h:67