66 lines
1.4 KiB
C
66 lines
1.4 KiB
C
/**
|
|
******************************************************************************
|
|
* @file main.c
|
|
* @author Alexander
|
|
* @version V1.0
|
|
* @date 2022-xx-xx
|
|
* @brief 测试led
|
|
******************************************************************************
|
|
* @attention
|
|
*
|
|
* 实验平台:HK32F030M开发板
|
|
* 论坛 :https://bbs.21ic.com/iclist-1010-1.html
|
|
*
|
|
******************************************************************************
|
|
*/
|
|
#include "hk32f030m.h"
|
|
#include "demo.h"
|
|
// #include "usart_printf.h"
|
|
#define SOFT_DELAY Delay(0x0FFFFF);
|
|
|
|
void Delay(__IO uint32_t nCount);
|
|
|
|
/**
|
|
* @brief 主函数
|
|
* @param 无
|
|
* @retval 无
|
|
*/
|
|
int main(void)
|
|
{
|
|
|
|
SPI_HW_Init();
|
|
USART_Config();
|
|
extern void Audio_8bit_init(void);
|
|
Audio_8bit_init();
|
|
while (1)
|
|
{
|
|
|
|
}
|
|
}
|
|
|
|
void Delay(__IO uint32_t nCount) // 简单的延时函数
|
|
{
|
|
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 */
|