ESOS32
ESOSOn32-bitProcessors
Macros
esos_hwxxx_irq.h File Reference

This file contains routines which define, configure and allow use of hardware interrupts on the target hardware (hwxxxx) More...

#include "esos.h"
#include "esos_irq.h"
#include "esos_hwxxx.h"
Include dependency graph for esos_hwxxx_irq.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ESOS_USER_INTERRUPT(desc)
 
#define __xESOS_USER_ISR(attrib, ivt, ifsr, ifsb, ipcr, ipcb)   void _ISRFAST attrib (void)
 
#define ESOS_USER_IRQ_LEVEL1
 
#define ESOS_USER_IRQ_LEVEL2
 
#define ESOS_USER_IRQ_LEVEL3
 
#define ESOS_USER_IRQ_LEVEL4
 
#define __ESOS_USER_IRQ_UNREGISTERED   0
 
#define __ESOS_DISABLE_USER_IRQS_LEVEL   ESOS_USER_IRQ_LEVEL2
 
#define __ESOS_ENABLE_USER_IRQS_LEVEL   __ESOS_USER_IRQ_UNREGISTERED
 
#define ESOS_IRQ_HWXXX_U1TX
 
#define ESOS_IRQ_HWXXX_U1RX
 
#define ESOS_IRQ_HWXXX_U1E
 
#define __GET_IRQ_ATTRIB(Q)   __xGET_IRQ_ATTRIB(Q)
 
#define __GET_IVTQ(Q)   __xGET_IVT(Q)
 
#define __GET_IFS_NUM(Q)   __xGET_IFS_NUM(Q)
 
#define __GET_IFS_BITNUM(Q)   __xGET_IFS_BITNUM(Q)
 
#define __GET_IEC_NUM(Q)   __xGET_IFS_NUM(Q)
 
#define __GET_IEC_BITNUM(Q)   __xGET_IFS_BITNUM(Q)
 
#define __GET_IPC_NUM(Q)   __xGET_IPC_NUM(Q)
 
#define __GET_IPC_BITNUM(Q)   __xGET_IPC_BITNUM(Q)
 
#define __xGET_IRQ_ATTRIB(attrib, ivt, ifsr, ifsb, ipcr, ipcb)   attrib
 
#define __xGET_IVT(attrib, ivt, ifsr, ifsb, ipcr, ipcb)   ivt
 
#define __xGET_IFS_NUM(attrib, ivt, ifsr, ifsb, ipcr, ipcb)   ifsr
 
#define __xGET_IFS_BITNUM(attrib, ivt, ifsr, ifsb, ipcr, ipcb)   ifsb
 
#define __xGET_IEC_NUM(attrib, ivt, ifsr, ifsb, ipcr, ipcb)   ifsr
 
#define __xGET_IEC_BITNUM(attrib, ivt, ifsr, ifsb, ipcr, ipcb)   ifsb
 
#define __xGET_IPC_NUM(attrib, ivt, ifsr, ifsb, ipcr, ipcb)   ipcr
 
#define __xGET_IPC_BITNUM(attrib, ivt, ifsr, ifsb, ipcr, ipcb)   ipcb
 
#define __GET_IPL_FROM_IPCX(Q)   ((*(&IPC0+(__xGET_IPC_NUM(Q))) >> __xGET_IPC_BITNUM(Q))&0x7)
 
#define __IS_IPL_FROM_IPCX(Q, val)   ((__GET_IPL_FROM_IPCX(Q))==(val))
 
#define __PUT_IPL_INTO_IPCX(ipc, ipcb, ipl)
 
#define ESOS_UNREGISTER_HWXXX_USER_INTERRUPT(desc)
 
#define __xUNREGISTER_HWXXX_USER_INTERRUPT(attrib, ivt, ifsr, ifsb, ipcr, ipcb)
 
#define ESOS_REGISTER_HWXXX_USER_INTERRUPT(desc, ipl, p2f)
 
#define __xREGISTER_HWXXX_USER_INTERRUPT(attrib, ivt, ifsr, ifsb, ipcr, ipcb, ipl, p2f)
 
#define ESOS_DISABLE_ALL_HWXXX_USER_INTERRUPTS()
 
#define ESOS_ENABLE_ALL_HWXXX_USER_INTERRUPTS()
 
#define ESOS_IS_HWXXX_USER_INTERRUPT_ENABLED(desc)
 
#define __xIS_HWXXX_USER_INTERRUPT_ENABLED(attrib, ivt, ifsr, ifsb, ipcr, ipcb)   IS_BIT_SET(*(&IEC0+ifsr),ifsb)
 
#define ESOS_DOES_HWXXX_USER_INTERRUPT_NEED_SERVICING(desc)
 
#define __xDOES_HWXXX_USER_INTERRUPT_NEED_SERVICING(attrib, ivt, ifsr, ifsb, ipcr, ipcb)   IS_BIT_SET(*(&IFS0+ifsr), ifsb)
 
#define ESOS_MARK_HWXXX_USER_INTERRUPT_SERVICED(desc)
 
#define __xMARK_HWXXX_USER_INTERRUPT_SERVICED(attrib, ivt, ifsr, ifsb, ipcr, ipcb)   BIT_CLEAR(*(&IFS0+ifsr),ifsb)
 
#define ESOS_ENABLE_HWXXX_USER_INTERRUPT(desc)
 
#define __xENABLE_HWXXX_USER_INTERRUPT(attrib, ivt, ifsr, ifsb, ipcr, ipcb)   BIT_SET(*(&IEC0+ifsr), ifsb)
 
#define ESOS_DISABLE_HWXXX_USER_INTERRUPT(desc)
 
#define __xDISABLE_HWXXX_USER_INTERRUPT(attrib, ivt, ifsr, ifsb, ipcr, ipcb)   BIT_CLEAR(*((&IEC0)+ifsr), ifsb)
 

Detailed Description

This file contains routines which define, configure and allow use of hardware interrupts on the target hardware (hwxxxx)

Definition in file esos_hwxxx_irq.h.

Macro Definition Documentation

◆ __PUT_IPL_INTO_IPCX

#define __PUT_IPL_INTO_IPCX (   ipc,
  ipcb,
  ipl 
)
Value:
do { \
BIT_CLEAR_MASK( (*((&IPC0)+(ipc))), ((0x07<<ipcb) + (ipl<<ipcb))); \
(*((&IPC0)+ipc)) += (ipl<<ipcb); \
}while(0)

Definition at line 2122 of file esos_hwxxx_irq.h.

◆ __xREGISTER_HWXXX_USER_INTERRUPT

#define __xREGISTER_HWXXX_USER_INTERRUPT (   attrib,
  ivt,
  ifsr,
  ifsb,
  ipcr,
  ipcb,
  ipl,
  p2f 
)
Value:
do { \
__xDISABLE_HWXXX_USER_INTERRUPT(attrib, ivt, ifsr, ifsb, ipcr, ipcb); \
__PUT_IPL_INTO_IPCX(ipcr, ipcb, ipl); \
}while(0)

Definition at line 2172 of file esos_hwxxx_irq.h.

◆ __xUNREGISTER_HWXXX_USER_INTERRUPT

#define __xUNREGISTER_HWXXX_USER_INTERRUPT (   attrib,
  ivt,
  ifsr,
  ifsb,
  ipcr,
  ipcb 
)
Value:
do{ \
__xDISABLE_HWXXX_USER_INTERRUPT(attrib, ivt, ifsr, ifsb, ipcr, ipcb); \
__PUT_IPL_INTO_IPCX(ipcr,ipcb, __ESOS_USER_IRQ_UNREGISTERED); \
}while(0)

Definition at line 2145 of file esos_hwxxx_irq.h.

◆ ESOS_DISABLE_ALL_HWXXX_USER_INTERRUPTS

#define ESOS_DISABLE_ALL_HWXXX_USER_INTERRUPTS ( )

◆ ESOS_DISABLE_HWXXX_USER_INTERRUPT

#define ESOS_DISABLE_HWXXX_USER_INTERRUPT (   desc)

Disables the user interrupt denoted by the interrupt descriptor

Parameters
descDescriptor of the hardware interrupt
Note
Hardware interrupt descriptors are found in the file esos_hw_irq.h where hw is the name of the chip for the ESOS port has been written.
See also
ESOS_USER_INTERRUPT
ESOS_REGISTER_HWXXX_USER_INTERRUPT
ESOS_UNREGISTER_HWXXX_USER_INTERRUPT
ESOS_ENABLE_HWXXX_USER_INTERRUPT
ESOS_ENABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_DISABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_IS_HWXXX_USER_INTERRUPT_ENABLED
ESOS_DOES_HWXXX_USER_INTERRUPT_NEED_SERVICING
ESOS_MARK_HWXXX_USER_INTERRUPT_SERVICED

Definition at line 2307 of file esos_hwxxx_irq.h.

◆ ESOS_DOES_HWXXX_USER_INTERRUPT_NEED_SERVICING

#define ESOS_DOES_HWXXX_USER_INTERRUPT_NEED_SERVICING (   desc)

Queries the "flag" state of user interrupt denoted by the interrupt descriptor

Parameters
descDescriptor of the hardware interrupt
Return values
TRUEIf the user interrupt is needs to be serviced
FALSEOtherwise
Note
Hardware interrupt descriptors are found in the file esos_hw_irq.h where hw is the name of the chip for the ESOS port has been written.
See also
ESOS_USER_INTERRUPT
ESOS_REGISTER_HWXXX_USER_INTERRUPT
ESOS_UNREGISTER_HWXXX_USER_INTERRUPT
ESOS_ENABLE_HWXXX_USER_INTERRUPT
ESOS_DISABLE_HWXXX_USER_INTERRUPT
ESOS_ENABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_DISABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_IS_HWXXX_USER_INTERRUPT_ENABLED
ESOS_MARK_HWXXX_USER_INTERRUPT_SERVICED

Definition at line 2250 of file esos_hwxxx_irq.h.

◆ ESOS_ENABLE_ALL_HWXXX_USER_INTERRUPTS

#define ESOS_ENABLE_ALL_HWXXX_USER_INTERRUPTS ( )

◆ ESOS_ENABLE_HWXXX_USER_INTERRUPT

#define ESOS_ENABLE_HWXXX_USER_INTERRUPT (   desc)

Enables the user interrupt denoted by the interrupt descriptor

Parameters
descDescriptor of the hardware interrupt
Note
Hardware interrupt descriptors are found in the file esos_hw_irq.h where hw is the name of the chip for the ESOS port has been written.
See also
ESOS_USER_INTERRUPT
ESOS_REGISTER_HWXXX_USER_INTERRUPT
ESOS_UNREGISTER_HWXXX_USER_INTERRUPT
ESOS_DISABLE_HWXXX_USER_INTERRUPT
ESOS_ENABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_DISABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_IS_HWXXX_USER_INTERRUPT_ENABLED
ESOS_DOES_HWXXX_USER_INTERRUPT_NEED_SERVICING
ESOS_MARK_HWXXX_USER_INTERRUPT_SERVICED

Definition at line 2288 of file esos_hwxxx_irq.h.

◆ ESOS_IRQ_HWXXX_U1E

#define ESOS_IRQ_HWXXX_U1E

◆ ESOS_IRQ_HWXXX_U1RX

#define ESOS_IRQ_HWXXX_U1RX

◆ ESOS_IRQ_HWXXX_U1TX

#define ESOS_IRQ_HWXXX_U1TX

◆ ESOS_IS_HWXXX_USER_INTERRUPT_ENABLED

#define ESOS_IS_HWXXX_USER_INTERRUPT_ENABLED (   desc)

Queries the enabled state of user interrupt denoted by the interrupt descriptor

Parameters
descDescriptor of the hardware interrupt
Return values
TRUEIf the user interrupt is currently enabled
FALSEIf the user interrupt is currently disabled
Note
Hardware interrupt descriptors are found in the file esos_hw_irq.h where hw is the name of the chip for the ESOS port has been written.
See also
ESOS_USER_INTERRUPT
ESOS_REGISTER_HWXXX_USER_INTERRUPT
ESOS_UNREGISTER_HWXXX_USER_INTERRUPT
ESOS_ENABLE_HWXXX_USER_INTERRUPT
ESOS_DISABLE_HWXXX_USER_INTERRUPT
ESOS_ENABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_DISABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_DOES_HWXXX_USER_INTERRUPT_NEED_SERVICING
ESOS_MARK_HWXXX_USER_INTERRUPT_SERVICED

Definition at line 2229 of file esos_hwxxx_irq.h.

◆ ESOS_MARK_HWXXX_USER_INTERRUPT_SERVICED

#define ESOS_MARK_HWXXX_USER_INTERRUPT_SERVICED (   desc)

Tells ESOS to mark the user interrupt denoted by the interrupt descriptor as being serviced

Parameters
descDescriptor of the hardware interrupt
Note
Hardware interrupt descriptors are found in the file esos_hw_irq.h where hw is the name of the chip for the ESOS port has been written.
See also
ESOS_USER_INTERRUPT
ESOS_REGISTER_HWXXX_USER_INTERRUPT
ESOS_UNREGISTER_HWXXX_USER_INTERRUPT
ESOS_ENABLE_HWXXX_USER_INTERRUPT
ESOS_DISABLE_HWXXX_USER_INTERRUPT
ESOS_ENABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_DISABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_IS_HWXXX_USER_INTERRUPT_ENABLED
ESOS_MARK_HWXXX_USER_INTERRUPT_SERVICED

Definition at line 2269 of file esos_hwxxx_irq.h.

◆ ESOS_REGISTER_HWXXX_USER_INTERRUPT

#define ESOS_REGISTER_HWXXX_USER_INTERRUPT (   desc,
  ipl,
  p2f 
)

Registers the user interrupt denoted by the interrupt descriptor

Parameters
descDescriptor of the hardware interrupt
iplInterrupt Priority Level (IPL) for the interrupt being registered
p2fPointer to function to serve as the ISR. Function must have void arguments and return void
Note
Hardware interrupt descriptors are found in the file esos_hw_irq.h where hw is the name of the chip for the ESOS port has been written.
See also
ESOS_USER_INTERRUPT
ESOS_UNREGISTER_HWXXX_USER_INTERRUPT
ESOS_ENABLE_HWXXX_USER_INTERRUPT
ESOS_DISABLE_HWXXX_USER_INTERRUPT
ESOS_ENABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_DISABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_IS_HWXXX_USER_INTERRUPT_ENABLED
ESOS_DOES_HWXXX_USER_INTERRUPT_NEED_SERVICING
ESOS_MARK_HWXXX_USER_INTERRUPT_SERVICED

Definition at line 2171 of file esos_hwxxx_irq.h.

◆ ESOS_UNREGISTER_HWXXX_USER_INTERRUPT

#define ESOS_UNREGISTER_HWXXX_USER_INTERRUPT (   desc)

Unregisters the user interrupt denoted by the interrupt descriptor

Parameters
descDescriptor of the hardware interrupt
Note
Hardware interrupt descriptors are found in the file esos_hw_irq.h where hw is the name of the chip for the ESOS port has been written.
See also
ESOS_USER_INTERRUPT
ESOS_REGISTER_HWXXX_USER_INTERRUPT
ESOS_ENABLE_HWXXX_USER_INTERRUPT
ESOS_DISABLE_HWXXX_USER_INTERRUPT
ESOS_ENABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_DISABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_IS_HWXXX_USER_INTERRUPT_ENABLED
ESOS_DOES_HWXXX_USER_INTERRUPT_NEED_SERVICING
ESOS_MARK_HWXXX_USER_INTERRUPT_SERVICED

Definition at line 2144 of file esos_hwxxx_irq.h.

◆ ESOS_USER_INTERRUPT

#define ESOS_USER_INTERRUPT (   desc)

Declaration of an ESOS interrupt.

This macro is used to declare an ESOS user inerrupt. All ESOS user interrupt tasks must be declared with this macro.

Parameters
descDescriptor of the hardware interrupt
Note
ESOS user interrupts have no arguments passed in and cannot return values.
Hardware interrupt descriptors are found in the file esos_hw_irq.h where hw is the name of the chip for the ESOS port has been written.
See also
ESOS_REGISTER_HWXXX_USER_INTERRUPT
ESOS_UNREGISTER_HWXXX_USER_INTERRUPT
ESOS_ENABLE_HWXXX_USER_INTERRUPT
ESOS_DISABLE_HWXXX_USER_INTERRUPT
ESOS_ENABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_DISABLE_ALL_HWXXX_USER_INTERRUPTS
ESOS_IS_HWXXX_USER_INTERRUPT_ENABLED
ESOS_DOES_HWXXX_USER_INTERRUPT_NEED_SERVICING
ESOS_MARK_HWXXX_USER_INTERRUPT_SERVICED

Definition at line 75 of file esos_hwxxx_irq.h.

◆ ESOS_USER_IRQ_LEVEL1

#define ESOS_USER_IRQ_LEVEL1

Highest priority user interrupt level on PIC24 Family

See also
ESOS_REGISTER_HWXXX_USER_INTERRUPT

Definition at line 93 of file esos_hwxxx_irq.h.

◆ ESOS_USER_IRQ_LEVEL2

#define ESOS_USER_IRQ_LEVEL2

Second-highest priority user interrupt level on PIC24 Family

See also
ESOS_REGISTER_HWXXX_USER_INTERRUPT

Definition at line 99 of file esos_hwxxx_irq.h.

◆ ESOS_USER_IRQ_LEVEL3

#define ESOS_USER_IRQ_LEVEL3

Third-highest priority user interrupt level on PIC24 Family

See also
ESOS_REGISTER_HWXXX_USER_INTERRUPT

Definition at line 105 of file esos_hwxxx_irq.h.

◆ ESOS_USER_IRQ_LEVEL4

#define ESOS_USER_IRQ_LEVEL4

Lowest priority user interrupt level on PIC24 Family

See also
ESOS_REGISTER_HWXXX_USER_INTERRUPT

Definition at line 111 of file esos_hwxxx_irq.h.