SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
sys-intc.h File Reference
#include <io.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <types.h>
#include <common.h>
#include <log.h>
Include dependency graph for sys-intc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _irq_handler
 Structure for IRQ handler. More...
 

Typedefs

typedef struct _irq_handler irq_handler_t
 Structure for IRQ handler.
 
typedef void() interrupt_handler_t(void *)
 Type definition for interrupt handler function.
 

Functions

void irq_install_handler (int irq, interrupt_handler_t handle_irq, void *data)
 Installs a handler for the specified IRQ.
 
void irq_free_handler (int irq)
 Frees the resources associated with the specified IRQ handler.
 
int irq_enable (int irq_no)
 Enables the specified IRQ.
 
int irq_disable (int irq_no)
 Disables the specified IRQ.
 

Typedef Documentation

◆ interrupt_handler_t

typedef void() interrupt_handler_t(void *)

Type definition for interrupt handler function.

Parameters
Pointerto data associated with the interrupt handler

◆ irq_handler_t

typedef struct _irq_handler irq_handler_t

Structure for IRQ handler.

Parameters
dataPointer to data associated with the IRQ handler
funcFunction pointer to the IRQ handler function

Function Documentation

◆ irq_disable()

int irq_disable ( int  irq_no)

Disables the specified IRQ.

Parameters
irq_noIRQ number to be disabled
Returns
0 on success, or an error code

◆ irq_enable()

int irq_enable ( int  irq_no)

Enables the specified IRQ.

Parameters
irq_noIRQ number to be enabled
Returns
0 on success, or an error code

◆ irq_free_handler()

void irq_free_handler ( int  irq)

Frees the resources associated with the specified IRQ handler.

Parameters
irqIRQ number

◆ irq_install_handler()

void irq_install_handler ( int  irq,
interrupt_handler_t  handle_irq,
void *  data 
)

Installs a handler for the specified IRQ.

Parameters
irqIRQ number
handle_irqFunction pointer to the interrupt handler function
dataPointer to data associated with the interrupt handler