|
int | read_pqm_attr (void *device, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t attr_id) |
| Read a pqm device attribute. More...
|
|
int | write_pqm_attr (void *device, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t attr_id) |
| Write a pqm device attribute. More...
|
|
int | read_ch_attr (void *device, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t attr_id) |
| Read a channel attribute. More...
|
|
int32_t | read_samples (struct iio_device_data *dev_data) |
| function for reading samples from the device. More...
|
|
int32_t | pqm_trigger_handler (struct iio_device_data *dev_data) |
| Handles trigger: reads one data-set and writes it to the buffer. More...
|
|
◆ PQM_CURRENT_CHANNEL
#define PQM_CURRENT_CHANNEL |
( |
|
_idx, |
|
|
|
_scan_idx, |
|
|
|
_name |
|
) |
| |
Value: { \
.name = _name, .ch_type =
IIO_CURRENT, .channel = _idx, \
.scan_index = _scan_idx, .indexed =
true, .scan_type = &
pqm_scan_type, \
}
◆ PQM_VOLTAGE_CHANNEL
#define PQM_VOLTAGE_CHANNEL |
( |
|
_idx, |
|
|
|
_scan_idx, |
|
|
|
_name |
|
) |
| |
Value: { \
.name = _name, .ch_type =
IIO_VOLTAGE, .channel = _idx, \
.scan_index = _scan_idx, .indexed =
true, .scan_type = &
pqm_scan_type, \
}
◆ pqm_trigger_handler()
Handles trigger: reads one data-set and writes it to the buffer.
- Parameters
-
dev_data | - The iio device data structure. |
- Returns
- ret - Result of the handling procedure. In case of success, the size of the written data is returned.
◆ read_ch_attr()
int read_ch_attr |
( |
void * |
device, |
|
|
char * |
buf, |
|
|
uint32_t |
len, |
|
|
const struct iio_ch_info * |
channel, |
|
|
intptr_t |
attr_id |
|
) |
| |
Read a channel attribute.
- Parameters
-
device | - The iio device structure |
buf | - Buffer to be filled with requested data |
len | - Length of the received command buffer in bytes |
channel | - Command channel info |
attr_id | - attribute descriptor |
- Returns
- - The length of the buffer in case of success, negative value otherwise
◆ read_pqm_attr()
int read_pqm_attr |
( |
void * |
device, |
|
|
char * |
buf, |
|
|
uint32_t |
len, |
|
|
const struct iio_ch_info * |
channel, |
|
|
intptr_t |
attr_id |
|
) |
| |
Read a pqm device attribute.
- Parameters
-
device | - The iio device structure |
buf | - Buffer to be filled with requested data |
len | - Length of the received command buffer in bytes |
channel | - Command channel info |
attr_id | - attribute descriptor |
- Returns
- - The length of the buffer in case of success, negative value otherwise
◆ read_samples()
function for reading samples from the device.
- Parameters
-
dev_data | - The iio device data structure. |
- Returns
- the number of read samples.
◆ write_pqm_attr()
int write_pqm_attr |
( |
void * |
device, |
|
|
char * |
buf, |
|
|
uint32_t |
len, |
|
|
const struct iio_ch_info * |
channel, |
|
|
intptr_t |
attr_id |
|
) |
| |
Write a pqm device attribute.
- Parameters
-
device | - The iio device structure |
buf | - Buffer to be filled with requested data |
len | - Length of the received command buffer in bytes |
channel | - Command channel info |
attr_id | - attribute descriptor |
- Returns
- - The length of the buffer in case of success, negative value otherwise
◆ configChanged
◆ current_pqm_attributes
◆ global_pqm_attributes
◆ pqm_iio_descriptor
Initial value:= {
.channels = iio_pqm_channels,
.debug_attributes =
NULL,
.buffer_attributes =
NULL,
}
◆ pqm_scan_type
Initial value:= {.sign = 'd',
.realbits = 16,
.storagebits = 16,
.shift = 0,
.is_big_endian =
true
}
◆ processData
◆ voltage_pqm_attributes
struct iio_attribute current_pqm_attributes[]
Definition: iio_pqm.c:649
#define TOTAL_PQM_CHANNELS
Definition: common_data.h:66
int32_t read_samples(struct iio_device_data *dev_data)
function for reading samples from the device.
Definition: iio_pqm.c:529
int32_t pqm_trigger_handler(struct iio_device_data *dev_data)
Handles trigger: reads one data-set and writes it to the buffer.
Definition: iio_pqm.c:548
struct iio_attribute global_pqm_attributes[]
Definition: iio_pqm.c:695
struct scan_type pqm_scan_type
Definition: iio_pqm.c:889
@ IIO_CURRENT
Definition: iio_types.h:66
@ IIO_VOLTAGE
Definition: iio_types.h:65
struct iio_attribute voltage_pqm_attributes[]
Definition: iio_pqm.c:578
struct iio_attribute * attributes
Definition: iio_types.h:186
int32_t update_pqm_channels(void *dev, uint32_t mask)
active pqm channels
Definition: basic_example.c:78
#define NULL
Definition: wrapper.h:64
int32_t close_pqm_channels(void *dev)
close all channels
Definition: basic_example.c:91