rt_hw_cpu_reset: remove all other rt_weak

This commit is contained in:
Meco Man 2023-08-07 12:30:43 -04:00
parent 92859cc79e
commit cb810dfe75
23 changed files with 28 additions and 45 deletions

View File

@ -278,7 +278,7 @@ void rt_hw_hard_fault_exception(struct exception_stack_frame *contex)
/** /**
* reset CPU * reset CPU
*/ */
rt_weak void rt_hw_cpu_reset(void) void rt_hw_cpu_reset(void)
{ {
SCB_AIRCR = SCB_RESET_VALUE;//((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |SCB_AIRCR_SYSRESETREQ_Msk); SCB_AIRCR = SCB_RESET_VALUE;//((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |SCB_AIRCR_SYSRESETREQ_Msk);
} }

View File

@ -20,7 +20,7 @@
* this function will reset CPU * this function will reset CPU
* *
*/ */
rt_weak void rt_hw_cpu_reset() void rt_hw_cpu_reset()
{ {
} }

View File

@ -20,7 +20,7 @@
* this function will reset CPU * this function will reset CPU
* *
*/ */
rt_weak void rt_hw_cpu_reset() void rt_hw_cpu_reset()
{ {
} }

View File

@ -146,7 +146,7 @@ rt_base_t rt_hw_cpu_dcache_status()
* reset cpu by dog's time-out * reset cpu by dog's time-out
* *
*/ */
rt_weak void rt_hw_cpu_reset() void rt_hw_cpu_reset()
{ {
rt_kprintf("Restarting system...\n"); rt_kprintf("Restarting system...\n");

View File

@ -147,7 +147,7 @@ rt_base_t rt_hw_cpu_dcache_status()
* reset cpu by dog's time-out * reset cpu by dog's time-out
* *
*/ */
rt_weak void rt_hw_cpu_reset() void rt_hw_cpu_reset()
{ {
rt_kprintf("Restarting system...\n"); rt_kprintf("Restarting system...\n");

View File

@ -131,7 +131,7 @@ void rt_hw_hard_fault_exception(struct exception_stack_frame *contex)
/** /**
* reset CPU * reset CPU
*/ */
rt_weak void rt_hw_cpu_reset(void) void rt_hw_cpu_reset(void)
{ {
SCB_AIRCR = SCB_RESET_VALUE;//((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |SCB_AIRCR_SYSRESETREQ_Msk); SCB_AIRCR = SCB_RESET_VALUE;//((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |SCB_AIRCR_SYSRESETREQ_Msk);
} }

View File

@ -132,7 +132,7 @@ void rt_hw_hard_fault_exception(struct exception_stack_frame *contex)
/** /**
* reset CPU * reset CPU
*/ */
rt_weak void rt_hw_cpu_reset(void) void rt_hw_cpu_reset(void)
{ {
SCB_AIRCR = SCB_RESET_VALUE;//((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |SCB_AIRCR_SYSRESETREQ_Msk); SCB_AIRCR = SCB_RESET_VALUE;//((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |SCB_AIRCR_SYSRESETREQ_Msk);
} }

View File

@ -356,7 +356,7 @@ rt_weak void rt_hw_cpu_shutdown(void)
/** /**
* reset CPU * reset CPU
*/ */
rt_weak void rt_hw_cpu_reset(void) void rt_hw_cpu_reset(void)
{ {
SCB_AIRCR = SCB_RESET_VALUE; SCB_AIRCR = SCB_RESET_VALUE;
} }

View File

@ -498,7 +498,7 @@ rt_weak void rt_hw_cpu_shutdown(void)
/** /**
* reset CPU * reset CPU
*/ */
rt_weak void rt_hw_cpu_reset(void) void rt_hw_cpu_reset(void)
{ {
SCB_AIRCR = SCB_RESET_VALUE; SCB_AIRCR = SCB_RESET_VALUE;
} }

View File

@ -441,7 +441,7 @@ rt_weak void rt_hw_cpu_shutdown(void)
/** /**
* reset CPU * reset CPU
*/ */
rt_weak void rt_hw_cpu_reset(void) void rt_hw_cpu_reset(void)
{ {
SCB_AIRCR = SCB_RESET_VALUE; SCB_AIRCR = SCB_RESET_VALUE;
} }

View File

@ -440,7 +440,7 @@ rt_weak void rt_hw_cpu_shutdown(void)
/** /**
* reset CPU * reset CPU
*/ */
rt_weak void rt_hw_cpu_reset(void) void rt_hw_cpu_reset(void)
{ {
SCB_AIRCR = SCB_RESET_VALUE; SCB_AIRCR = SCB_RESET_VALUE;
} }

View File

@ -20,7 +20,7 @@
* this function will reset CPU * this function will reset CPU
* *
*/ */
rt_weak void rt_hw_cpu_reset() void rt_hw_cpu_reset()
{ {
} }

View File

@ -145,7 +145,7 @@ rt_base_t rt_hw_cpu_dcache_status()
* reset cpu by dog's time-out * reset cpu by dog's time-out
* *
*/ */
rt_weak void rt_hw_cpu_reset() void rt_hw_cpu_reset()
{ {
rt_kprintf("Restarting system...\n"); rt_kprintf("Restarting system...\n");

View File

@ -163,7 +163,7 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
* this function will reset CPU * this function will reset CPU
* *
*/ */
rt_weak void rt_hw_cpu_reset(void) void rt_hw_cpu_reset(void)
{ {
} }

View File

@ -20,7 +20,7 @@
* this function will reset CPU * this function will reset CPU
* *
*/ */
rt_weak void rt_hw_cpu_reset() void rt_hw_cpu_reset()
{ {
} }

View File

@ -148,7 +148,7 @@ rt_base_t rt_hw_cpu_dcache_status()
* reset cpu by dog's time-out * reset cpu by dog's time-out
* *
*/ */
rt_weak void rt_hw_cpu_reset() void rt_hw_cpu_reset()
{ {
/* Disable all interrupt except the WDT */ /* Disable all interrupt except the WDT */
INTMSK = (~((rt_uint32_t)1 << INTWDT)); INTMSK = (~((rt_uint32_t)1 << INTWDT));

View File

@ -100,7 +100,7 @@ rt_base_t rt_hw_cpu_dcache_status()
* this function will reset CPU * this function will reset CPU
* *
*/ */
rt_weak void rt_hw_cpu_reset() void rt_hw_cpu_reset()
{ {
} }

View File

@ -152,7 +152,7 @@ rt_base_t rt_hw_cpu_dcache_status()
* reset cpu by dog's time-out * reset cpu by dog's time-out
* *
*/ */
rt_weak void rt_hw_cpu_reset() void rt_hw_cpu_reset()
{ {
/* enable watchdog */ /* enable watchdog */

View File

@ -15,15 +15,6 @@
*/ */
/*@{*/ /*@{*/
/**
* reset cpu by dog's time-out
*
*/
rt_weak void rt_hw_cpu_reset()
{
/*NOTREACHED*/
}
/** /**
* shutdown CPU * shutdown CPU
* *

View File

@ -23,7 +23,7 @@
* this function will reset CPU * this function will reset CPU
* *
*/ */
rt_weak void rt_hw_cpu_reset(void) void rt_hw_cpu_reset(void)
{ {
/* open the watch-dog */ /* open the watch-dog */
WDT_EN = 0x01; /* watch dog enable */ WDT_EN = 0x01; /* watch dog enable */

View File

@ -245,7 +245,7 @@ static void sep6200_poweroff(void)
* reset cpu by dog's time-out * reset cpu by dog's time-out
* *
*/ */
rt_weak void rt_hw_cpu_reset() void rt_hw_cpu_reset()
{ {
rt_kprintf("Soft reset, Restarting system...\n"); rt_kprintf("Soft reset, Restarting system...\n");

View File

@ -10,14 +10,6 @@
#include <rtthread.h> #include <rtthread.h>
/**
* this function will reset CPU
*
*/
rt_weak void rt_hw_cpu_reset()
{
}
/** /**
* this function will shutdown CPU * this function will shutdown CPU
* *

View File

@ -66,22 +66,22 @@ static rt_device_t _console_device = RT_NULL;
rt_weak void rt_hw_us_delay(rt_uint32_t us) rt_weak void rt_hw_us_delay(rt_uint32_t us)
{ {
(void) us; (void) us;
LOG_D("rt_hw_us_delay() doesn't support for this board." LOG_W("rt_hw_us_delay() doesn't support for this board."
"Please consider implementing rt_hw_us_delay() in another file."); "Please consider implementing rt_hw_us_delay() in another file.");
} }
rt_weak void rt_hw_cpu_reset(void)
{
LOG_W("rt_hw_cpu_reset() doesn't support for this board."
"Please consider implementing rt_hw_cpu_reset() in another file.");
return;
}
rt_weak const char *rt_hw_cpu_arch(void) rt_weak const char *rt_hw_cpu_arch(void)
{ {
return "unknown"; return "unknown";
} }
rt_weak void rt_hw_cpu_reset(void)
{
LOG_D("rt_hw_cpu_reset() doesn't support for this board."
"Please consider implementing rt_hw_cpu_reset() in another file.");
return ;
}
static const char* rt_errno_strs[] = static const char* rt_errno_strs[] =
{ {
"OK", "OK",