no-OS
xilinx_irq.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * @file xilinx_irq.h
3  * @brief Header containing types used in the irq driver.
4  * @author Cristian Pop (cristian.pop@analog.com)
5 ********************************************************************************
6  * Copyright 2019(c) Analog Devices, Inc.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright notice,
12  * this list of conditions and the following disclaimer.
13  *
14  * 2. Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  *
18  * 3. Neither the name of Analog Devices, Inc. nor the names of its
19  * contributors may be used to endorse or promote products derived from this
20  * software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR
23  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
25  * EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
28  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
31  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *******************************************************************************/
33 
34 #ifndef XILINX_IRQ_H_
35 #define XILINX_IRQ_H_
36 
37 /******************************************************************************/
38 /***************************** Include Files **********************************/
39 /******************************************************************************/
40 
41 #include <stdint.h>
42 #include "no_os_irq.h"
43 
44 /******************************************************************************/
45 /*************************** Types Declarations *******************************/
46 /******************************************************************************/
47 
57 };
58 
67 };
68 
73 struct xil_irq_desc {
77  void *instance;
78 };
79 
83 extern const struct no_os_irq_platform_ops xil_irq_ops;
84 
85 #endif
no_os_alloc.h
xil_irq_ctrl_remove
int32_t xil_irq_ctrl_remove(struct no_os_irq_ctrl_desc *desc)
Free the resources allocated by no_os_irq_ctrl_init().
Definition: xilinx_irq.c:360
no_os_callback_desc
Structure describing a callback to be registered.
Definition: no_os_irq.h:142
no_os_irq.h
Header file of IRQ interface.
xil_irq_register_callback
int32_t xil_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: xilinx_irq.c:239
NO_OS_IS_ERR_VALUE
#define NO_OS_IS_ERR_VALUE(x)
Definition: no_os_error.h:50
xil_irq_init_param::type
enum xil_irq_type type
Definition: xilinx_irq.h:66
xil_irq_type
xil_irq_type
Xilinx platform architecture sections.
Definition: xilinx_irq.h:52
no_os_irq_platform_ops::init
int32_t(* init)(struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param)
Definition: no_os_irq.h:162
xil_irq_desc
Xilinx platform specific IRQ descriptor.
Definition: xilinx_irq.h:73
no_os_calloc
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
no_os_irq_init_param::extra
void * extra
Definition: no_os_irq.h:116
no_os_error.h
Error codes definition.
xil_irq_desc::type
enum xil_irq_type type
Definition: xilinx_irq.h:75
xil_irq_ops
const struct no_os_irq_platform_ops xil_irq_ops
Xilinx platform specific IRQ platform ops structure.
Definition: xilinx_irq.c:373
no_os_callback_desc::ctx
void * ctx
Definition: no_os_irq.h:146
no_os_irq_trig_level
no_os_irq_trig_level
Definition: no_os_irq.h:76
no_os_irq_init_param::irq_ctrl_id
uint32_t irq_ctrl_id
Definition: no_os_irq.h:109
no_os_callback_desc::callback
void(* callback)(void *context)
Definition: no_os_irq.h:144
xil_irq_desc::instance
void * instance
Definition: xilinx_irq.h:77
xil_irq_global_disable
int32_t xil_irq_global_disable(struct no_os_irq_ctrl_desc *desc)
Disable global interrupts.
Definition: xilinx_irq.c:166
IRQ_PS
@ IRQ_PS
Definition: xilinx_irq.h:56
xilinx_irq.h
xil_irq_unregister_callback
int32_t xil_irq_unregister_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *cb)
Unregisters a generic IRQ handling function.
Definition: xilinx_irq.c:331
irq_id
irq_id
Interrupts IDs supported by the irq driver.
Definition: aducm3029_irq.h:62
xil_irq_ops
const struct no_os_irq_platform_ops xil_irq_ops
Xilinx specific IRQ platform ops structure.
Definition: xilinx_irq.c:373
no_os_free
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
NULL
#define NULL
Definition: wrapper.h:64
no_os_irq_ctrl_desc::irq_ctrl_id
uint32_t irq_ctrl_id
Definition: no_os_irq.h:125
no_os_irq_init_param
Structure holding the initial parameters for Interrupt Request.
Definition: no_os_irq.h:107
xil_irq_disable
int32_t xil_irq_disable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Disable specific interrupt.
Definition: xilinx_irq.c:209
IRQ_PL
@ IRQ_PL
Definition: xilinx_irq.h:54
no_os_irq_platform_ops
Structure holding IRQ function pointers that point to the platform specific function.
Definition: no_os_irq.h:160
xil_irq_enable
int32_t xil_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable specific interrupt.
Definition: xilinx_irq.c:180
NO_OS_IRQ_EDGE_BOTH
@ NO_OS_IRQ_EDGE_BOTH
Definition: no_os_irq.h:81
xil_irq_ctrl_init
int32_t xil_irq_ctrl_init(struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param)
Initialize the IRQ interrupts.
Definition: xilinx_irq.c:64
no_os_irq_ctrl_desc
Definition: no_os_irq.h:123
no_os_irq_ctrl_desc::extra
void * extra
Definition: no_os_irq.h:134
xil_irq_init_param
Structure holding the initialization parameters for Xilinx platform specific IRQ parameters.
Definition: xilinx_irq.h:64
xil_irq_global_enable
int32_t xil_irq_global_enable(struct no_os_irq_ctrl_desc *desc)
Enable global interrupts.
Definition: xilinx_irq.c:154
xil_irq_trigger_level_set
int32_t xil_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: xilinx_irq.c:287