-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser.c
More file actions
66 lines (51 loc) · 2.78 KB
/
Copy pathuser.c
File metadata and controls
66 lines (51 loc) · 2.78 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
49
50
51
52
53
54
55
56
57
58
59
60
#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 "i2c.h"
#include "uart.h"
#include "user.h"
#include "portas.h"
#include "simon_hd44780_lcd.h"
#include "system.h"
#include "timers.h"
#include "debug_leds.h"
/******************************************************************************/
/* Application */
/******************************************************************************/
inline void init_app(void)
{
/**************************************************************************/
/* Initialize microcontroller ports */
/* [portas.c] for more */
/**************************************************************************/
init_ports();
/**************************************************************************/
/**************************************************************************/
/* Initialize peripherals */
/**************************************************************************/
/* Initialize i2c protocol */
init_i2c();
/* Initialize uart protocol */
init_uart();
/* Initialize the hd44780 lcd */
lcd_init();
/**************************************************************************/
/**************************************************************************/
/* Interrupts */
/* [system.c] for more */
/**************************************************************************/
/* */
configure_interrupts();
/* */
/* Global interrupts */
enable_gi();
/**************************************************************************/
/* */
/* */
/* We'll be using timer one to count delays in kline */
configure_timer1();
/**************************************************************************/
return;
}