1 /*
2  * Percepio DFM v2.1.0
3  * Copyright 2023 Percepio AB
4  * www.percepio.com
5  *
6  * SPDX-License-Identifier: Apache-2.0
7  */
8 
9 /**
10  * @file
11  *
12  * @brief DFM serial port cloud port config
13  */
14 
15 #ifndef DFM_CLOUD_PORT_CONFIG_H
16 #define DFM_CLOUD_PORT_CONFIG_H
17 
18 /**
19  * @brief How to output the alert data over the serial port.
20  */
21 #define DFM_PRINT_ALERT_DATA DFM_CFG_PRINT
22 
23 /**
24  * @brief Maximum size of the MQTT topic.
25  */
26 #define DFM_CFG_CLOUD_PORT_MAX_TOPIC_SIZE (256U)
27 
28 /**
29  * @brief Intended to ensure exclusive access to the serial port before
30  * outputting the alert data, to avoid that other output (random printf
31  * calls) occur in between the "[[" and "]]" markers.
32  * This can be implemented by disabling the kernel scheduler.
33  * Note: This is mainly needed if calling xDfmAlertBegin directly from
34  * task context. It is typically not needed on alerts from hard faults or
35  * DFM_TRAP calls, as the prints then occur from an exception handler.
36  */
37 #define DFM_CFG_LOCK_SERIAL()
38 
39 /**
40  * @brief Intended to release the serial port after having written a
41  * block of alert data. If the kernel scheduler was disabled by the above
42  * macro, it should be resumed here.
43  */
44 #define DFM_CFG_UNLOCK_SERIAL()
45 
46 #endif
47