mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Convert original source to system workbench
Create readme Started commenting the files in english NO Optimisations yet, just trying to get it all working over as is first Using newer STM StdPeriph libs (i think they are newer?)
This commit is contained in:
69
workspace/ts100/src/Main.c
Normal file
69
workspace/ts100/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>:NULL
|
||||
<EFBFBD><EFBFBD><EFBFBD>ز<EFBFBD><EFBFBD><EFBFBD>:NULL
|
||||
*******************************************************************************/
|
||||
int 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><CFB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>ת<EFBFBD><D7AA>
|
||||
}
|
||||
}
|
||||
/******************************** END OF FILE *********************************/
|
||||
Reference in New Issue
Block a user