Skip to content

Commit 94d5c01

Browse files
Merge pull request #66 from MikroElektronika/wip/nikola.lukic/interrupt_assistant_templates
Added templates for Interrupt Assistant Tool
2 parents 73cda9c + ec7440e commit 94d5c01

File tree

8 files changed

+110
-0
lines changed

8 files changed

+110
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copy these lines to your main.c file.
2+
3+
#include "interrupts.h"
4+
5+
// Interrupt routine.
6+
void X_IRQHandler(void)
7+
{
8+
// Following steps are most common for interrupt handling.
9+
// Step 1 : Check if X is pending.
10+
// Step 2 : Clear interrupt flag if necessary.
11+
// Step 3 : Place your code after steps 1 and 2.
12+
}
13+
14+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copy these lines to your main.c file.
2+
3+
#include "interrupts.h"
4+
5+
// Interrupt routine for XC16.
6+
void __attribute__((__interrupt__, auto_psv)) _XInterrupt(void)
7+
{
8+
// Following steps are most common for interrupt handling.
9+
// Step 1 : Check if X is pending.
10+
// Step 2 : Clear interrupt flag if necessary.
11+
// Step 3 : Place your code after steps 1 and 2.
12+
}
13+
14+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copy these lines to your main.c file.
2+
3+
#include "interrupts.h"
4+
5+
// Interrupt routine
6+
void __attribute__((interrupt(IPL3AUTO), vector(Y))) X_ISR(void)
7+
{
8+
// Following steps are most common for interrupt handling.
9+
// Step 1 : Check if X is pending.
10+
// Step 2 : Clear interrupt flag if necessary.
11+
// Step 3 : Place your code after steps 1 and 2.
12+
}
13+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copy these lines to your main.c file.
2+
3+
#include "interrupts.h"
4+
5+
// Interrupt routine.
6+
void __interrupt(irq(X)) X_ISR(void)
7+
{
8+
// Following steps are most common for interrupt handling.
9+
// Step 1 : Check if X is pending.
10+
// Step 2 : Clear interrupt flag if necessary.
11+
// Step 3 : Place your code after steps 1 and 2.
12+
}
13+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copy these lines to your main.c file.
2+
3+
#include "interrupts.h"
4+
5+
// Interrupt routine for mikroC ARM.
6+
void X_IRQHandler(void) iv INTERRUPTS_X
7+
{
8+
// Following steps are most common for interrupt handling.
9+
// Step 1 : Check if X is pending.
10+
// Step 2 : Clear interrupt flag if necessary.
11+
// Step 3 : Place your code after steps 1 and 2.
12+
}
13+
14+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copy these lines to your main.c file.
2+
3+
#include "interrupts.h"
4+
5+
// Interrupt routine for mikroC.
6+
void X_Interrupt(void) iv 0x1A
7+
{
8+
// Following steps are most common for interrupt handling.
9+
// Step 1 : Check if X is pending.
10+
// Step 2 : Clear interrupt flag if necessary.
11+
// Step 3 : Place your code after steps 1 and 2.
12+
}
13+
14+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copy these lines to your main.c file.
2+
3+
#include "interrupts.h"
4+
5+
// Interrupt routine for mikroC PRO 16/18.
6+
void X_Interrupt(void) iv 0x8
7+
{
8+
// Following steps are most common for interrupt handling.
9+
// Step 1 : Check if X is pending.
10+
// Step 2 : Clear interrupt flag if necessary.
11+
// Step 3 : Place your code after steps 1 and 2.
12+
}
13+
14+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copy these lines to your main.c file.
2+
3+
#include "interrupts.h"
4+
5+
// Interrupt routine.
6+
void Y() iv Y ilevel 3 ics ICS_AUTO
7+
{
8+
// Following steps are most common for interrupt handling.
9+
// Step 1 : Check if X is pending.
10+
// Step 2 : Clear interrupt flag if necessary.
11+
// Step 3 : Place your code after steps 1 and 2.
12+
}
13+
14+

0 commit comments

Comments
 (0)