45 lines
1016 B
C
45 lines
1016 B
C
|
|
#include <rtthread.h>
|
|
|
|
#include <board.h>
|
|
#include <drv_gpio.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
#include "shell.h"
|
|
#include "chrg_wdt.h"
|
|
|
|
void show_app_version (void)
|
|
{
|
|
#if 0
|
|
rt_kprintf("\r\n\r\n================================================\r\n");
|
|
rt_kprintf("\tcharger control via RT-Thread v%d.%d.%d\r\n",
|
|
RT_VERSION_MAJOR, RT_VERSION_MINOR, RT_VERSION_PATCH);
|
|
rt_kprintf("\tbuilt @ %s, %s\r\n", __DATE__, __TIME__);
|
|
rt_kprintf("\tUID: %08X %08X %08X\r\n",
|
|
HAL_GetUIDw2(), HAL_GetUIDw1(), HAL_GetUIDw0());
|
|
rt_kprintf("================================================\r\n");
|
|
#else
|
|
rt_kprintf("\tcharger control via RT-Thread v%d.%d.%d built @ %s, %s\r\n",
|
|
RT_VERSION_MAJOR, RT_VERSION_MINOR, RT_VERSION_PATCH, __DATE__, __TIME__);
|
|
#endif
|
|
}
|
|
|
|
int main(void)
|
|
{
|
|
//rt_uint32_t tick = 0;
|
|
|
|
#if defined(RT_USING_FINSH) && defined(FINSH_USING_MSH)
|
|
finsh_set_prompt("chrg ");
|
|
#endif
|
|
|
|
while (1) {
|
|
rt_thread_mdelay(1000);
|
|
chrg_wdt_feed();
|
|
|
|
//rt_kprintf("%d\r\n", ++tick);
|
|
}
|
|
}
|
|
|
|
|