2020-10-05 07:54:17 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* apps/system/trace/trace.h
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __APPS_SYSTEM_TRACE_TRACE_H
|
|
|
|
#define __APPS_SYSTEM_TRACE_TRACE_H
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#define EXTERN extern "C"
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#else
|
|
|
|
#define EXTERN extern
|
|
|
|
#endif
|
|
|
|
|
2022-04-02 10:55:21 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Types
|
|
|
|
****************************************************************************/
|
|
|
|
|
2020-10-05 07:54:17 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Function Prototypes
|
|
|
|
****************************************************************************/
|
|
|
|
|
2023-02-20 08:23:39 +01:00
|
|
|
#ifdef CONFIG_DRIVERS_NOTERAM
|
2020-10-05 07:54:17 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: trace_dump
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Read notes and dump trace results.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2023-08-11 04:38:50 +02:00
|
|
|
int trace_dump(FAR FILE *out);
|
2020-10-05 07:54:17 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: trace_dump_clear
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Clear all contents of the buffer
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
void trace_dump_clear(void);
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: trace_dump_get_overwrite
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Get overwrite mode
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
bool trace_dump_get_overwrite(void);
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: trace_dump_set_overwrite
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Set overwrite mode
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
void trace_dump_set_overwrite(bool mode);
|
|
|
|
|
2023-02-20 08:23:39 +01:00
|
|
|
#else /* CONFIG_DRIVERS_NOTERAM */
|
2020-10-05 07:54:17 +02:00
|
|
|
|
2022-04-02 10:55:21 +02:00
|
|
|
#define trace_dump(type,out)
|
2020-10-05 07:54:17 +02:00
|
|
|
#define trace_dump_clear()
|
|
|
|
#define trace_dump_get_overwrite() 0
|
|
|
|
#define trace_dump_set_overwrite(mode) (void)(mode)
|
|
|
|
|
2023-02-20 08:23:39 +01:00
|
|
|
#endif /* CONFIG_DRIVERS_NOTERAM */
|
2020-10-05 07:54:17 +02:00
|
|
|
|
|
|
|
#undef EXTERN
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __APPS_SYSTEM_TRACE_TRACE_H */
|