-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystem.c
More file actions
51 lines (35 loc) · 1.55 KB
/
Copy pathsystem.c
File metadata and controls
51 lines (35 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <pic16f877a.h> /* Pic definitions */
#include <stdbool.h> /* Bools, true of false */
#include <stdint.h> /* For uint8_t definition */
#include <stdlib.h>
#include <xc.h> /* XC8 General Include File */
#include "system.h"
/******************************************************************************/
/* Interrupts */
/******************************************************************************/
void configure_interrupts(void)
{
/* Enables TMR1 Overflow Interrupt */
/* and Synchronous Serial Port Interrupt Enable bit */
/* */
//PIE1 = 0x09;
//PIE1bits.TMR1IE = 1;
/* Enable Timer1 interrupt */
//PIE1bits.TMR1IE
PIE1bits.TMR1IE = 1; /* hard debug time over this :c */
//TMR1IE_bit = 1;
/* Enable TX interrupt */
//PIE1bits.TXIE = 1;
//PIE1 = 0x00;
//PIR1
//PIE2
//PIR2
}
void enable_gi(void)
{
/* GIE: Global Interrupt Enable bit */
INTCONbits.GIE = 1;
/* PIE: Peripheral Interrupt Enable bit */
INTCONbits.PEIE = 1;
}
/* ************************************************************************** */