72 lines
1.5 KiB
C
72 lines
1.5 KiB
C
|
/**
|
|||
|
******************************************************************************
|
|||
|
* @file main.c
|
|||
|
* @author Alexander
|
|||
|
* @version V1.0
|
|||
|
* @date 2022-xx-xx
|
|||
|
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD>led
|
|||
|
******************************************************************************
|
|||
|
* @attention
|
|||
|
*
|
|||
|
* ʵ<EFBFBD><EFBFBD>ƽ̨:HK32F030M<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD>̳ :https://bbs.21ic.com/iclist-1010-1.html
|
|||
|
*
|
|||
|
******************************************************************************
|
|||
|
*/
|
|||
|
#include "hk32f030m.h"
|
|||
|
#include "bsp_led.h"
|
|||
|
|
|||
|
#define SOFT_DELAY Delay(0x0FFFFF);
|
|||
|
|
|||
|
void Delay(__IO uint32_t nCount);
|
|||
|
|
|||
|
/**
|
|||
|
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* @param <EFBFBD><EFBFBD>
|
|||
|
* @retval <EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
|
|||
|
int main(void)
|
|||
|
{
|
|||
|
/* LED <20>˿ڳ<CBBF>ʼ<EFBFBD><CABC> */
|
|||
|
LED_GPIO_Config();
|
|||
|
|
|||
|
while (1)
|
|||
|
{
|
|||
|
LED2_ON;
|
|||
|
LED2_OFF;
|
|||
|
// digitalLo(LED2_GPIO_PORT,LED2_GPIO_PIN);
|
|||
|
//SOFT_DELAY;
|
|||
|
// digitalHi(LED2_GPIO_PORT,LED2_GPIO_PIN);
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
void Delay(__IO uint32_t nCount) //<2F><EFBFBD><F2B5A5B5><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
|||
|
{
|
|||
|
for(; nCount != 0; nCount--);
|
|||
|
}
|
|||
|
|
|||
|
#ifdef USE_FULL_ASSERT
|
|||
|
/**
|
|||
|
* @brief Reports the name of the source file and the source line number
|
|||
|
* where the assert_param error has occurred.
|
|||
|
* @param file: pointer to the source file name
|
|||
|
* @param line: assert_param error line source number
|
|||
|
* @retval None
|
|||
|
*/
|
|||
|
void assert_failed(char* file , uint32_t line)
|
|||
|
{
|
|||
|
/* User can add his own implementation to report the file name and line number,
|
|||
|
tex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
|
|||
|
/* Infinite loop */
|
|||
|
|
|||
|
while (1)
|
|||
|
{
|
|||
|
}
|
|||
|
}
|
|||
|
#endif /* USE_FULL_ASSERT */
|
|||
|
|
|||
|
|