blob: a7ee03ef30bdeddf57caca081b94f285b080e958 (
plain)
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
68
69
|
/********************* (C) COPYRIGHT 2015 e-Design Co.,Ltd. **********************
File Name : main.c
Version : S100 APP Ver 2.11
Description:
Author : Celery
Data: 2015/07/07
History:
2015/07/07 ͳһ������
*******************************************************************************/
#include <string.h>
#include <stdio.h>
#include "APP_Version.h"
#include "Disk.h"
#include "Bios.h"
#include "USB_lib.h"
#include "I2C.h"
#include "Flash.h"
#include "MMA8652FC.h"
#include "UI.h"
#include "OLed.h"
#include "CTRL.h"
#include "HARDWARE.h"
/*******************************************************************************
������: main
��������:��ѭ��
�������:NULL
���ز���:NULL
*******************************************************************************/
void main(void)
{
RCC_Config();
NVIC_Config(0x4000);
Init_Timer2();
Init_Timer3();
GPIO_Config();
USB_Port(DISABLE);
Delay_Ms(200);
USB_Port(ENABLE);
USB_Init();
I2C_Configuration();
Ad_Init();
if (Get_CtrlStatus() != CONFIG) StartUp_Accelerated();
System_Init();
Init_Oled();
Clear_Screen();
Init_Gtime();
APP_Init();
Disk_BuffInit();
Config_Analysis(); // ��������U��
Pid_Init();
Set_gKey(NO_KEY);
Start_Watchdog(3000);
while (1) {
Clear_Watchdog();
if (Get_CtrlStatus() != CONFIG && LEAVE_WAIT_TIMER == 0) {
Check_Accelerated();
LEAVE_WAIT_TIMER = 50;
}
OLed_Display(); //��ʾCtrl_status
Status_Tran(); //���ݵ�ǰ״̬����ϰ��������ʱ��ת��
}
}
/******************************** END OF FILE *********************************/
|