Move TC debug options to one file
This commit is contained in:
parent
219c1a68d3
commit
a5514be85c
arch/arm/src/sama5
@ -54,7 +54,6 @@
|
||||
#include <stdbool.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <arch/irq.h>
|
||||
|
||||
@ -66,20 +65,6 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMA5_TC_DEBUG
|
||||
# define tcdbg dbg
|
||||
# define tcvdbg vdbg
|
||||
# define tcdbg lldbg
|
||||
# define tcvdbg llvdbg
|
||||
# define tclldbg lldbg
|
||||
# define tcllvdbg llvdbg
|
||||
#else
|
||||
# define tcdbg(x...)
|
||||
# define tcvdbg(x...)
|
||||
# define tclldbg(x...)
|
||||
# define tcllvdbg(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
@ -56,7 +56,6 @@
|
||||
#include <semaphore.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <arch/board/board.h>
|
||||
@ -75,30 +74,6 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Timer debug is enabled if any timer client is enabled */
|
||||
|
||||
#ifndef CONFIG_DEBUG
|
||||
# undef CONFIG_DEBUG_ANALOG
|
||||
# undef CONFIG_SAMA5_TC_REGDEBUG
|
||||
#endif
|
||||
|
||||
#undef CONFIG_SAMA5_TC_DEBUG
|
||||
#if defined(CONFIG_SAMA5_ADC) && defined(CONFIG_DEBUG_ANALOG)
|
||||
# define CONFIG_SAMA5_TC_DEBUG 1
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_TC_DEBUG
|
||||
# define tcdbg dbg
|
||||
# define tcvdbg vdbg
|
||||
# define tclldbg llbg
|
||||
# define tcllvdbg llvdbg
|
||||
#else
|
||||
# define tcdbg(x...)
|
||||
# define tcvdbg(x...)
|
||||
# define tclldbg(x...)
|
||||
# define tcllvdbg(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "chip.h"
|
||||
#include "chip/sam_tc.h"
|
||||
@ -71,6 +72,32 @@
|
||||
#define TC_REGB 1
|
||||
#define TC_REGC 2
|
||||
|
||||
/* Timer debug is enabled if any timer client is enabled */
|
||||
|
||||
#ifndef CONFIG_DEBUG
|
||||
# undef CONFIG_DEBUG_ANALOG
|
||||
# undef CONFIG_SAMA5_TC_REGDEBUG
|
||||
#endif
|
||||
|
||||
#undef CONFIG_SAMA5_TC_DEBUG
|
||||
#if defined(CONFIG_SAMA5_ADC) && defined(CONFIG_DEBUG_ANALOG)
|
||||
# define CONFIG_SAMA5_TC_DEBUG 1
|
||||
#endif
|
||||
|
||||
/* Timer/counter debug output */
|
||||
|
||||
#ifdef CONFIG_SAMA5_TC_DEBUG
|
||||
# define tcdbg dbg
|
||||
# define tcvdbg vdbg
|
||||
# define tclldbg lldbg
|
||||
# define tcllvdbg llvdbg
|
||||
#else
|
||||
# define tcdbg(x...)
|
||||
# define tcvdbg(x...)
|
||||
# define tclldbg(x...)
|
||||
# define tcllvdbg(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
@ -63,7 +63,6 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
@ -148,20 +147,6 @@
|
||||
# error CONFIG_SAMA5_TICKLESS_FREERUN is the same as CONFIG_SAMA5_TICKLESS_ONESHOT
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SAMA5_TC_DEBUG
|
||||
# define tcdbg dbg
|
||||
# define tcvdbg vdbg
|
||||
# define tcdbg lldbg
|
||||
# define tcvdbg llvdbg
|
||||
# define tclldbg lldbg
|
||||
# define tcllvdbg llvdbg
|
||||
#else
|
||||
# define tcdbg(x...)
|
||||
# define tcvdbg(x...)
|
||||
# define tclldbg(x...)
|
||||
# define tcllvdbg(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
@ -325,7 +310,8 @@ int up_timer_gettime(FAR struct timespec *ts)
|
||||
*
|
||||
* Input Parameters:
|
||||
* ts - Location to return the remaining time. Zero should be returned
|
||||
* if the timer is not active.
|
||||
* if the timer is not active. ts may be zero in which case the
|
||||
* time remaining is not returned.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success. A call to up_timer_cancel() when
|
||||
|
Loading…
x
Reference in New Issue
Block a user