Слияние кода завершено, страница обновится автоматически
/******************************************************************************
Copyright (C), 2022-2023, China Dragon Tech Co., Ltd.
******************************************************************************
File Name : main.c
Version : Initial Draft
Author : ZhengJH
Created : 2022/9/27
Last Modified :
Description : main
Function List :
AppInit
main
SysConfig
tunerInit
History :
1.Date : 2022/9/27
Author : ZhengJH
Modification: Created file
******************************************************************************/
/*----------------------------------------------*
* header files *
*----------------------------------------------*/
#include "stdio.h"
#include "string.h"
#include "config.h"
#include "gpio.h"
#include "UART.h"
#include "SerielCom.h"
#include "delay.h"
#include "TIMER.h"
#include "utimer.h"
#include "mem.h"
#include "pt.h"
#include "protothread.h"
#include "ptlparsing.h"
#include "i2c_platform.h"
#include "i2c_sw.h"
/*----------------------------------------------*
* macros *
*----------------------------------------------*/
/*----------------------------------------------*
* external variables *
*----------------------------------------------*/
/*----------------------------------------------*
* external routine prototypes *
*----------------------------------------------*/
/*----------------------------------------------*
* internal routine prototypes *
*----------------------------------------------*/
/*----------------------------------------------*
* project-wide global variables *
*----------------------------------------------*/
/*----------------------------------------------*
* module-wide global variables *
*----------------------------------------------*/
/*----------------------------------------------*
* constants *
*----------------------------------------------*/
/*----------------------------------------------*
* routines' implementations *
*----------------------------------------------*/
/*---------------------------------------------------------------------*/
/* --- STC MCU Limited ------------------------------------------------*/
/* --- STC 1T Series MCU Demo Programme -------------------------------*/
/* --- Mobile: (86)13922805190 ----------------------------------------*/
/* --- Fax: 86-0513-55012956,55012947,55012969 ------------------------*/
/* --- Tel: 86-0513-55012928,55012929,55012966 ------------------------*/
/* --- Web: www.STCMCU.com --------------------------------------------*/
/* --- Web: www.STCMCUDATA.com ---------------------------------------*/
/* --- QQ: 800003751 -------------------------------------------------*/
/* 如果要在程序中使用此代码,请在程序中注明使用了STC的资料及程序 */
/*---------------------------------------------------------------------*/
#define __DEBUG__
#ifdef __DEBUG__
#define DEBUG(format) printf(format)
#else
#define DEBUG(format)
#endif
/*****************************************************************************
Prototype : SysConfig
Description : config system resource
Input : void
Output : None
Return Value :
Calls :
Called By :
History :
1.Date : 2022/10/27
Author : ZhengJH
Modification : Created function
*****************************************************************************/
void SysConfig(void)
{
GPIO_config();
COM_Init(UART1, 115200);
COM_Init(UART2, 115200);
delay_ms(2);
Timer0Init();
rtc_init();
//initialize protocol table
PtTblInit();
}
/*****************************************************************************
Prototype : AppInit
Description : app level initialize
Input : void
Output : None
Return Value :
Calls :
Called By :
History :
1.Date : 2022/10/27
Author : ZhengJH
Modification : Created function
*****************************************************************************/
void AppInit(void)
{
//We can add other application initializers here
printf("=================================\n");
printf("51 Production-Line debug platform\n");
printf(" -- CDT SW Team\n");
printf("=================================\n");
}
/*****************************************************************************
Prototype : tunerInit
Description : just for test tuner
Input : void
Output : None
Return Value :
Calls :
Called By :
History :
1.Date : 2022/10/27
Author : ZhengJH
Modification : Created function
*****************************************************************************/
void tunerInit(void)
{
u8 value = 0;
ReadRegWithDataLen(0xC0, NULL, 0, &value, 1);
printf("value = %X\n", (u16)value);
}
/*****************************************************************************
Prototype : main
Description : main function
Input : void
Output : None
Return Value :
Calls :
Called By :
History :
1.Date : 2022/9/30
Author : ZhengJH
Modification : Created function
*****************************************************************************/
void main(void)
{
SysConfig();
ThreadInit();
AppInit();
//tunerInit();
Loop();
}
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )