Go to the documentation of this file.
40 #ifndef IIO_TRIGGER_H_
41 #define IIO_TRIGGER_H_
53 #define TRIG_MAX_NAME_SIZE 20
129 #ifndef LINUX_PLATFORM
int iio_trig_disable(void *trig)
Disable system interrupt which is linked to the given trigger.
Definition: iio_trigger.c:133
Header file for iio_trigger.
struct iio_desc * iio_desc
Definition: iio_trigger.h:64
Structure describing a callback to be registered.
Definition: no_os_irq.h:136
Header file of IRQ interface.
int32_t no_os_irq_register_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc)
Register a callback to handle the irq events.
Definition: no_os_irq.c:94
uint32_t irq_id
Definition: iio_trigger.h:68
Structure holding channel attributess.
Definition: iio_types.h:105
int iio_hw_trig_init(struct iio_hw_trig **iio_trig, struct iio_hw_trig_init_param *init_param)
Initialize hardware trigger.
Definition: iio_trigger.c:62
void iio_hw_trig_handler(void *trig)
Trigger interrupt handler. This function will be called when a system interrupt is asserted for the c...
Definition: iio_trigger.c:149
struct iio_desc * iio_desc
Definition: iio_trigger.h:113
int iio_trig_disable(void *trig)
Disable system interrupt which is linked to the given trigger.
Definition: iio_trigger.c:133
const char * name
Definition: iio_trigger.h:126
char name[TRIG_MAX_NAME_SIZE+1]
Definition: iio_trigger.h:115
int iio_sw_trig_init(struct iio_sw_trig **iio_trig, struct iio_sw_trig_init_param *init_param)
Initialize software trigger.
Definition: iio_trigger.c:183
struct no_os_irq_ctrl_desc * irq_ctrl
Definition: iio_trigger.h:96
no_os_irq_peripheral
Definition: no_os_irq.h:85
void * no_os_calloc(size_t nitems, size_t size)
int iio_hw_trig_init(struct iio_hw_trig **iio_trig, struct iio_hw_trig_init_param *init_param)
Initialize hardware trigger.
Definition: iio_trigger.c:62
int iio_sw_trig_remove(struct iio_sw_trig *trig)
Free the resources allocated by iio_sw_trig_init().
Definition: iio_trigger.c:233
int iio_sw_trig_handler(void *trig, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
Handles the write request for trigger_now attribute.
Definition: iio_trigger.c:214
struct iio_desc * iio_desc
Definition: iio_trigger.h:94
struct no_os_irq_ctrl_desc * irq_ctrl
Definition: iio_trigger.h:66
#define TRIG_MAX_NAME_SIZE
Definition: iio_trigger.h:53
enum no_os_irq_trig_level irq_trig_lvl
Definition: iio_trigger.h:100
int iio_trig_enable(void *trig)
Enable system interrupt which is linked to the given trigger.
Definition: iio_trigger.c:116
char name[TRIG_MAX_NAME_SIZE+1]
Definition: iio_trigger.h:72
no_os_irq_trig_level
Definition: no_os_irq.h:77
int iio_hw_trig_remove(struct iio_hw_trig *trig)
Free the resources allocated by iio_hw_trig_init().
Definition: iio_trigger.c:166
void * handle
Definition: iio_trigger.h:85
void(* callback)(void *context)
Definition: no_os_irq.h:138
int iio_trig_remove(struct iio_sw_trig *trig)
int iio_hw_trig_remove(struct iio_hw_trig *trig)
Free the resources allocated by iio_hw_trig_init().
Definition: iio_trigger.c:166
int iio_process_trigger_type(struct iio_desc *desc, char *trigger_name)
Searches for trigger name and processes the trigger based on its type (sync or async with the interru...
Definition: iio.c:1053
enum no_os_irq_trig_level irq_trig_lvl
Definition: iio_trigger.h:70
IIO software trigger structure.
Definition: iio_trigger.h:111
int iio_trig_enable(void *trig)
Enable system interrupt which is linked to the given trigger.
Definition: iio_trigger.c:116
Header file for iio_types.
void no_os_free(void *ptr)
IIO hardware trigger initialization structure.
Definition: iio_trigger.h:92
enum no_os_irq_event event
Definition: iio_trigger.h:81
enum no_os_irq_peripheral peripheral
Definition: iio_trigger.h:83
uint32_t irq_id
Definition: iio_trigger.h:98
IIO software trigger initialization structure.
Definition: iio_trigger.h:122
void iio_hw_trig_handler(void *trig)
Trigger interrupt handler. This function will be called when a system interrupt is asserted for the c...
Definition: iio_trigger.c:149
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:96
int iio_sw_trig_handler(void *trig, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
Handles the write request for trigger_now attribute.
Definition: iio_trigger.c:214
@ NO_OS_EVT_GPIO
Definition: no_os_irq.h:68
no_os_irq_event
Definition: no_os_irq.h:67
int iio_sw_trig_init(struct iio_sw_trig **iio_trig, struct iio_sw_trig_init_param *init_param)
Initialize software trigger.
Definition: iio_trigger.c:183
int32_t no_os_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable specific interrupt.
Definition: no_os_irq.c:183
struct iio_hw_trig_cb_info cb_info
Definition: iio_trigger.h:102
Hardware trigger callback extra information structure.
Definition: iio_trigger.h:79
int32_t no_os_irq_trigger_level_set(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, enum no_os_irq_trig_level trig)
Set interrupt trigger level.
Definition: no_os_irq.c:164
struct iio_desc * iio_desc
Definition: iio_trigger.h:124
int32_t no_os_irq_disable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Disable specific interrupt.
Definition: no_os_irq.c:200
Definition: no_os_irq.h:119
IIO hardware trigger structure.
Definition: iio_trigger.h:62
const char * name
Definition: iio_trigger.h:104