-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
67 lines (54 loc) · 2.24 KB
/
Copy pathmain.c
File metadata and controls
67 lines (54 loc) · 2.24 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
61
62
63
64
65
66
67
/**
******************************************************************************
* @file main.c
* @author Basavaraju B V
* @version V1.0.0
* @date 22-June-2015
* @brief This file will initialize the U(S)ART and GSM Module.
******************************************************************************
*/
/*************************************************************************************************
* #includes
*************************************************************************************************/
#include "main.h"
/*************************************************************************************************
* Global variables and definitions
*************************************************************************************************/
/*
* Hardware version: <Processing_Unit>_<Communication_Hardware>_<RELAY>_<Audio_Module>_<Auto_Switch>
* ex: Product_Unit => nth hardware change of Aurduino, Communication_Hardware => nth hardware change of GSM module
*
* Software version: <Major_Release>_<Minor_Release>_<Bug_Fix>
*/
const uint8_t gProductVersion[] = "HWV_1_1_1_0_0; SWV_V_3_5_3";
/*************************************************************************************************
* Function Definition
*************************************************************************************************/
int main(void)
{
#if (USE_USART_DRIVER > 0)
//Driver part
USART_StructureType USART_Config;
//USART_Config.USART_BaudRate = 19200;
USART_Config.USART_BaudRate = 9600;
USART_Config.USART_Communication = BOTH;
USART_Config.USART_DataBits = EIGHT;
USART_Config.USART_Modes = ASYNCHRONOUS;
USART_Config.USART_Parity = NOPARITY;
USART_Config.USART_StopBits = ONESTOPBIT;
USARTInit(USART_Config);
USART_EnableInterrupt(RECEIVE);
#if(USE_GSM_MODULE != 0)
while(GSM_TestForResponse()) //Wait for Network to get acquired!
;
GSM_SetEchoOFF();
GSM_SetupForSMS();
initializeDevice();
//Enable for testing Licensing!
//gDeviceLicensed = 0;
//updateEEPROM(DEVICE_LICENSED, &gDeviceLicensed);
GSM_WaitAndProcessRequest();
#endif // USE_GSM_MODULE
#endif //USE_USART_DRIVER
return 0;
}