/
main.c
47 lines (34 loc) · 1.01 KB
/
main.c
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
//****************************************************************************
//* MSP430 Popcorn Popper Coffee Roaster *
//****************************************************************************
//
// module: main.c
// description: Main File
// original author: Andrew Schomin
// creation date: 05-07-2014
//
//****************************************************************************
// === INCLUDES ==============================================================
#include <msp430.h>
#include <stdlib.h>
#include "assert.h"
#include "deviceinit.h"
#include "interrupts.h"
#include "uart.h"
#include "flash.h"
#include "peripherals.h"
// === MAIN FUNTION ==========================================================
int main(void) {
//Initialize the device
InitDevice();
//Initialize the UART
InitUART();
//Enable global interrupts
eint();
InitPWM();
SetFanLevel(FAN_STATE_1);
while(1)
{
//Loop forever, interrupts take care of the rest
}
}