mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Move TC debug options to one file
This commit is contained in:
@@ -54,7 +54,6 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <arch/irq.h>
|
#include <arch/irq.h>
|
||||||
|
|
||||||
@@ -66,20 +65,6 @@
|
|||||||
* Pre-processor Definitions
|
* 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
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -56,7 +56,6 @@
|
|||||||
#include <semaphore.h>
|
#include <semaphore.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
@@ -75,30 +74,6 @@
|
|||||||
* Pre-processor Definitions
|
* 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
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "chip/sam_tc.h"
|
#include "chip/sam_tc.h"
|
||||||
@@ -71,6 +72,32 @@
|
|||||||
#define TC_REGB 1
|
#define TC_REGB 1
|
||||||
#define TC_REGC 2
|
#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
|
* Public Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -63,7 +63,6 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
|
|
||||||
@@ -148,20 +147,6 @@
|
|||||||
# error CONFIG_SAMA5_TICKLESS_FREERUN is the same as CONFIG_SAMA5_TICKLESS_ONESHOT
|
# error CONFIG_SAMA5_TICKLESS_FREERUN is the same as CONFIG_SAMA5_TICKLESS_ONESHOT
|
||||||
#endif
|
#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
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -325,7 +310,8 @@ int up_timer_gettime(FAR struct timespec *ts)
|
|||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* ts - Location to return the remaining time. Zero should be returned
|
* 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:
|
* Returned Value:
|
||||||
* Zero (OK) is returned on success. A call to up_timer_cancel() when
|
* Zero (OK) is returned on success. A call to up_timer_cancel() when
|
||||||
|
|||||||
Reference in New Issue
Block a user