cpu/*: remove unneeded ENABLE_DEBUG
This commit is contained in:
parent
4cce485b6f
commit
7eb3414cff
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "timex.h"
|
#include "timex.h"
|
||||||
@ -46,13 +47,11 @@ extern "C" {
|
|||||||
#define IWDG_UNLOCK ((uint16_t)0x5555)
|
#define IWDG_UNLOCK ((uint16_t)0x5555)
|
||||||
#define IWDG_LOCK ((uint16_t)0x0000)
|
#define IWDG_LOCK ((uint16_t)0x0000)
|
||||||
|
|
||||||
#if ENABLE_DEBUG
|
|
||||||
/* wdt_time (us) = LSI(us) x 4 x 2^PRE x RELOAD */
|
|
||||||
static inline uint32_t _wdt_time(uint8_t pre, uint16_t rel)
|
static inline uint32_t _wdt_time(uint8_t pre, uint16_t rel)
|
||||||
{
|
{
|
||||||
|
/* wdt_time (us) = LSI(us) x 4 x 2^PRE x RELOAD */
|
||||||
return (uint32_t)(((uint64_t) US_PER_SEC * 4 * (1 << pre) * rel ) / CLOCK_LSI);
|
return (uint32_t)(((uint64_t) US_PER_SEC * 4 * (1 << pre) * rel ) / CLOCK_LSI);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static inline void _iwdt_unlock(void)
|
static inline void _iwdt_unlock(void)
|
||||||
{
|
{
|
||||||
@ -133,9 +132,7 @@ void wdt_setup_reboot(uint32_t min_time, uint32_t max_time)
|
|||||||
_set_prescaler(pre);
|
_set_prescaler(pre);
|
||||||
_set_reload(rel);
|
_set_reload(rel);
|
||||||
|
|
||||||
#if ENABLE_DEBUG
|
DEBUG("[wdt]: reset time %" PRIu32 " [us]\n", _wdt_time(pre, rel));
|
||||||
DEBUG("[wdt]: reset time %lu [us]\n", _wdt_time(pre, rel));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Refresh wdt counter */
|
/* Refresh wdt counter */
|
||||||
wdt_kick();
|
wdt_kick();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user