Code for using and configuring Interrupts. More...
#include "nz_ioPorts.h"
Go to the source code of this file.
Macros | |
#define | USE_AND_OR |
#define | CHANGE_INT_ON INT_ENABLE |
#define | CHANGE_INT_OFF INT_DISABLE |
#define | CHANGE_INT_PRI_7 INT_PRI_7 |
#define | CHANGE_INT_PRI_6 INT_PRI_6 |
#define | CHANGE_INT_PRI_5 INT_PRI_5 |
#define | CHANGE_INT_PRI_4 INT_PRI_4 |
#define | CHANGE_INT_PRI_3 INT_PRI_3 |
#define | CHANGE_INT_PRI_2 INT_PRI_2 |
#define | CHANGE_INT_PRI_1 INT_PRI_1 |
#define | CHANGE_INT_PRI_0 INT_PRI_0 |
#define | NZ_INT_DIS_PUSH() |
#define | NZ_INT_EN_POP() |
#define | NZ_INT_DIS_SAVE(save_to) |
#define | NZ_INT_EN_SAVE(save_to) |
#define | NZ_INT_DISABLE_FIBERS() NZOS_INT_KERNEL_DISABLE() |
#define | NZ_INT_ENABLE_FIBERS() NZOS_INT_KERNEL_ENABLE() |
#define | NZ_INT_DISABLE_P07() __builtin_disi(0x3FFF) |
#define | NZ_INT_ENABLE_P07() __builtin_disi(0) |
#define | NZ_BUILTIN_DISI(val) __builtin_disi(val) |
#define | NZ_SET_AND_SAVE_CPU_IPL(ipl, lvl) SET_AND_SAVE_CPU_IPL(ipl,lvl) |
#define | NZ_RESTORE_CPU_IPL(ipl) RESTORE_CPU_IPL(ipl) |
#define | intOnChangeConfig(conf) ConfigIntCN(conf) |
#define | intOnChangeEnablePort(portID) portSetBitadr(portGetCNIE(portID)) |
#define | intOnChangeDisablePort(portID) portClearBitadr(portGetCNIE(portID)) |
#define | intOnChangeClearIF() InputChange_Clear_Intr_Status_Bit |
Code for using and configuring Interrupts.
Code for using and configuring Interrupts
The following defines are used to configure this module, and should be placed in projdefs.h. Note that all items marked [-DEFAULT-] are defaults, and do not have to be placed in projdefs.h if they contain desired configuration! For details, see Project Configuration.
The software supplied herewith is owned by Modtronix Engineering, and is protected under applicable copyright laws. The software supplied herewith is intended and supplied to you, the Company customer, for use solely and exclusively on products manufactured by Modtronix Engineering. The code may be modified and can be used free of charge for commercial and non commercial applications. All rights are reserved. Any use in violation of the foregoing restrictions may subject the user to criminal sanctions under applicable laws, as well as to civil liability for the breach of the terms and conditions of this license.
THIS SOFTWARE IS PROVIDED IN AN 'AS IS' CONDITION. NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
File History
2013-11-20, David H. (DH):
#define intOnChangeClearIF | ( | ) | InputChange_Clear_Intr_Status_Bit |
Clear "Interrupt on Change" interrupt flag
#define intOnChangeConfig | ( | conf) | ConfigIntCN(conf) |
Configure and Enable "Interrupt on Change". For example:
conf | An OR'ed combination of:
|
#define intOnChangeDisablePort | ( | portID) | portClearBitadr(portGetCNIE(portID)) |
Disable "Interrupt on Change" for the given IO Port (port of SBC).
portID | The "Port ID" of the requested port. Is a number from 0 to 41, also known as the "Netcruzer Port Name". |
#define intOnChangeEnablePort | ( | portID) | portSetBitadr(portGetCNIE(portID)) |
Enables "Interrupt on Change" for the given IO Port (port of SBC).
portID | The "Port ID" of the requested port. Is a number from 0 to 41, also known as the "Netcruzer Port Name". |
#define NZ_BUILTIN_DISI | ( | val) | __builtin_disi(val) |
Disable interrupt for given number of instruction cycles
#define NZ_INT_DIS_PUSH | ( | ) |
#define NZ_INT_DIS_SAVE | ( | save_to) |
#define NZ_INT_DISABLE_FIBERS | ( | ) | NZOS_INT_KERNEL_DISABLE() |
Disable fibers
#define NZ_INT_DISABLE_P07 | ( | ) | __builtin_disi(0x3FFF) |
Disable All Interrupt level, excluding level 7. For TMR1 and TMR2 interrupts (maybe more), if this method is used to disable interrupt, the IF is NOT set while interrupts are disabled!!!! Using NZ_SET_AND_SAVE_CPU_IPL to disabled interrupts does NOT disable these IF from getting set!
#define NZ_INT_EN_POP | ( | ) |
#define NZ_INT_EN_SAVE | ( | save_to) |
#define NZ_INT_ENABLE_FIBERS | ( | ) | NZOS_INT_KERNEL_ENABLE() |
Disable fibers
#define NZ_INT_ENABLE_P07 | ( | ) | __builtin_disi(0) |
Enable All Interrupt levels
#define NZ_RESTORE_CPU_IPL | ( | ipl) | RESTORE_CPU_IPL(ipl) |
Restore CPU IPL to given level.
#define NZ_SET_AND_SAVE_CPU_IPL | ( | ipl, | |
lvl | |||
) | SET_AND_SAVE_CPU_IPL(ipl,lvl) |
Set CPU IPL to new level, and save current level to given var. All interrupts equal to AND lower than given level will be disabled.