Zephyr API 3.6.99
Loading...
Searching...
No Matches
log_frontend_stmesp.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef ZEPHYR_INCLUDE_LOGGING_LOG_FRONTEND_STMESP_H_
7#define ZEPHYR_INCLUDE_LOGGING_LOG_FRONTEND_STMESP_H_
8
9#include <errno.h>
10#include <zephyr/types.h>
11#ifdef CONFIG_LOG_FRONTEND_STMESP
13#endif
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
30
37
43
51static inline void log_frontend_stmesp_tp(uint16_t x)
52{
53#ifdef CONFIG_LOG_FRONTEND_STMESP
54 STMESP_Type *port;
55 int err = stmesp_get_port((uint32_t)x + CONFIG_LOG_FRONTEND_STMESP_TP_CHAN_BASE, &port);
56
57 __ASSERT_NO_MSG(err == 0);
58 if (err == 0) {
59 stmesp_flag(port, 1, true,
60 IS_ENABLED(CONFIG_LOG_FRONTEND_STMESP_GUARANTEED_ACCESS));
61 }
62#endif
63}
64
74{
75#ifdef CONFIG_LOG_FRONTEND_STMESP
76 STMESP_Type *port;
77 int err = stmesp_get_port((uint32_t)x + CONFIG_LOG_FRONTEND_STMESP_TP_CHAN_BASE, &port);
78
79 __ASSERT_NO_MSG(err == 0);
80 if (err == 0) {
81 stmesp_data32(port, d, true, true,
82 IS_ENABLED(CONFIG_LOG_FRONTEND_STMESP_GUARANTEED_ACCESS));
83 }
84#endif
85}
86
87#ifdef __cplusplus
88}
89#endif
90
91#endif /* ZEPHYR_INCLUDE_LOGGING_LOG_FRONTEND_STMESP_H_ */
irp nz macro MOVR cc d
Definition asm-macro-32-bit-gnu.h:11
System error numbers.
static void stmesp_flag(STMESP_Type *reg, uint32_t data, bool ts, bool guaranteed)
Write flag to STMESP.
Definition stmesp.h:99
static int stmesp_get_port(uint32_t idx, STMESP_Type **port)
Return address of a STM extended stimulus port.
Definition stmesp.h:169
static void stmesp_data32(STMESP_Type *reg, uint32_t data, bool ts, bool marked, bool guaranteed)
Write 32 bit data to STMESP.
Definition stmesp.h:152
#define IS_ENABLED(config_macro)
Check for macro definition in compiler-visible expressions.
Definition util_macro.h:124
static void log_frontend_stmesp_tp_d32(uint16_t x, uint32_t d)
Trace point with 32 bit data.
Definition log_frontend_stmesp.h:73
static void log_frontend_stmesp_tp(uint16_t x)
Trace point.
Definition log_frontend_stmesp.h:51
void log_frontend_stmesp_dummy_write(void)
Perform a dummy write to STMESP.
void log_frontend_stmesp_pre_sleep(void)
Hook to be called before going to sleep.
int log_frontend_stmesp_etr_ready(void)
Notify frontend that ETR/STM is ready.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT16_TYPE__ uint16_t
Definition stdint.h:89