rt-thread-official/bsp/Vango/v85xxp/applications/main.c

54 lines
1.1 KiB
C
Raw Normal View History

2021-09-07 20:08:26 +08:00
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-01-04 iysheng first version
*/
#include <board.h>
#include <drivers/adc.h>
#include <rtdbg.h>
#include <stdio.h>
#include <rtthread.h>
#include "board.h"
#define LED1 GET_PIN(C, 0)
int main(void)
{
rt_pin_mode(LED1, PIN_MODE_OUTPUT);
while (1)
{
rt_pin_write(LED1, PIN_HIGH);
rt_thread_mdelay(500);
rt_pin_write(LED1, PIN_LOW);
rt_thread_mdelay(500);
}
return 0;
}
#ifndef ASSERT_NDEBUG
/**
* @brief Reports the name of the source file and the source line number
* where the assert_errhandler error has occurred.
* @param file: pointer to the source file name
* @param line: assert_errhandler error line source number
* @retval None
*/
void assert_errhandler(uint8_t* file, uint32_t line)
{
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* Infinite loop */
while (1)
{
}
}
#endif