CLEON
Version 1
Cloud-Offloaded GPS Receiver
Main Page
Related Pages
Data Structures
Files
File List
Globals
sys_init.c
Go to the documentation of this file.
1
7
#include "
cleon_conf.h
"
8
#include "
app_define.h
"
9
#include "
sys_define.h
"
10
#include "
hal_define.h
"
11
#include "
fs_define.h
"
12
13
__no_init
cleon_header_u
uniCLEONHeader
;
14
__no_init
cleon_gps_data_u
uniCLEONGPSData
;
15
__no_init
cleon_sensor_data_u
uniCLEONSensorData
;
16
17
/*----------------------------------------------------------------------------*/
25
void
SYS_Init
(
void
)
26
{
27
SYS_MCU_Init
();
28
SYS_PWR_Init
();
29
SYS_EXT_FLASH_Init
();
30
SYS_MMC_Init
();
31
SYS_SENSORS_Init
();
32
SYS_USB_Init
();
33
34
SYS_InitCLEONDataStructure
();
35
36
SYS_GPS_Init
();
37
}
38
39
/*----------------------------------------------------------------------------*/
47
void
SYS_InitCLEONDataStructure
(
void
)
48
{
49
for
(
int
i = 0 ; i <
SIZE_OF_HEADER_IN_BYTE
; i++){
50
uniCLEONHeader
.
ucSingleBytes
[i] = 0;
51
}
52
53
for
(
int
i = 0 ; i <
SIZE_OF_GPS_SIGANL_IN_BYTE
; i++){
54
uniCLEONGPSData
.
ucSingleByte
[i] = 0;
55
}
56
57
for
(
int
i = 0 ; i <
SIZE_OF_SENSOR_DATA_IN_BYTE
; i++){
58
uniCLEONSensorData
.
ucSingleByte
[i] = 0;
59
}
60
61
uniCLEONHeader
.
stCLEONHeader
.
uniSignature
.
ucSingleByte
[0] =
'L'
;
62
uniCLEONHeader
.
stCLEONHeader
.
uniSignature
.
ucSingleByte
[1] =
'E'
;
63
uniCLEONHeader
.
stCLEONHeader
.
uniSignature
.
ucSingleByte
[2] =
'A'
;
64
uniCLEONHeader
.
stCLEONHeader
.
uniSignature
.
ucSingleByte
[3] =
'P'
;
65
66
uniCLEONHeader
.
stCLEONHeader
.
uniVersion
.
ucSingleByte
[0] = 0x01;
67
uniCLEONHeader
.
stCLEONHeader
.
uniVersion
.
ucSingleByte
[1] = 0x00;
68
uniCLEONHeader
.
stCLEONHeader
.
uniVersion
.
ucSingleByte
[2] = 0x01;
69
uniCLEONHeader
.
stCLEONHeader
.
uniVersion
.
ucSingleByte
[3] = 0x00;
70
71
uniCLEONHeader
.
stCLEONHeader
.
stReceiverSetting
.
uniSamplesPerMS
.
ulOriginalVar
= 16368;
72
uniCLEONHeader
.
stCLEONHeader
.
stReceiverSetting
.
uniIntermediateFreq
.
dOriginalVar
= 4092000.0;
73
74
uniCLEONHeader
.
stCLEONHeader
.
uniChunkCount
.
ulOriginalVar
= 1;
75
uniCLEONHeader
.
stCLEONHeader
.
uniChunkSizeMS
.
ulOriginalVar
= 2;
76
uniCLEONHeader
.
stCLEONHeader
.
uniChunkGapMS
.
ulOriginalVar
= 50;
77
uniCLEONHeader
.
stCLEONHeader
.
uniGPSSignalDataFormat
.
ulOriginalVar
= 1;
78
}
79
80
81
sys
sys_init.c
Generated on Tue May 28 2013 15:17:19 for CLEON by
1.8.2