first commit
This commit is contained in:
69
S100App/Src/Main.c
Normal file
69
S100App/Src/Main.c
Normal file
@@ -0,0 +1,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 ͳһ<CDB3><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*******************************************************************************/
|
||||
#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"
|
||||
|
||||
/*******************************************************************************
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: main
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><>ѭ<EFBFBD><D1AD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:NULL
|
||||
<EFBFBD><EFBFBD><EFBFBD>ز<EFBFBD><EFBFBD><EFBFBD>: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(); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>U<EFBFBD><55>
|
||||
|
||||
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(); //<2F><>ʾCtrl_status
|
||||
Status_Tran(); //<2F><><EFBFBD>ݵ<EFBFBD>ǰ״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD><CFB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>ת<EFBFBD><D7AA>
|
||||
}
|
||||
}
|
||||
/******************************** END OF FILE *********************************/
|
||||
Reference in New Issue
Block a user