Electricity/USER/mian.c

39 lines
745 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
*Copyright ,2023 , NANOCHAP
*File name: MIAN.C
*Author:
*Version: V1.0
*Date: 2023-11-
*Description: 1S 定时器测试TIMER0
*Function List:
History:
1.V1.0
Date:
Author:
Modification: 初版
*/
#include "my_header.h"
#include "ENS1_MTP.h"
#include "ENS1_CLOCK.h"
#include "ENS1_UART.h"
#include "ENS1_TIMER.h"
#include "ENS1_GPIO.h"
int main(){
MTP_init();
ClockInit();
GPIO_IO_Init(GPIO_19, OUTPUT, 0x00, 0x02, 0x00, 0x00, ENABLE);
GPIO_Output(GPIO_19, LOW_LEVEL);
/*uart*/
UART_Init(CMSDK_UART1, &UART1_Init);
UART_ITConfig(CMSDK_UART1, &UART1_ITSet);
/*TIMER*/
TIMER0_Init(1);
while(1)
{
/*在 void TIMER0_Handler(void) 中断处理函数中打印*/
}
}