esp-sdr-zephyr
Raw I/Q receive and transmit on the ESP32-S3/C6 Wi-Fi radio, for Zephyr
Loading...
Searching...
No Matches
esp_sdr_xtensa.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: GPL-3.0-or-later
3 */
4
10
11#ifndef ESP_SDR_ESP_SDR_XTENSA_H_
12#define ESP_SDR_ESP_SDR_XTENSA_H_
13
14#include <stdint.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#if defined(CONFIG_SOC_SERIES_ESP32S3)
22static inline __attribute__((always_inline)) uint32_t esp_sdr_ccount(void)
23{
24 uint32_t c;
25
26 __asm__ volatile("rsr.ccount %0" : "=r"(c));
27 return c;
28}
29
36static inline void esp_sdr_pie_enable(void)
37{
38 uint32_t cp;
39
40 __asm__ volatile("rsr.cpenable %0" : "=r"(cp));
41 cp |= 1U << 3;
42 __asm__ volatile("wsr.cpenable %0\n\trsync" : : "r"(cp));
43}
44#endif
45
46#ifdef __cplusplus
47}
48#endif
49
50#endif /* ESP_SDR_ESP_SDR_XTENSA_H_ */
static void esp_sdr_pie_enable(void)
Enable the vector unit, coprocessor 3, on this CPU.
Definition esp_sdr_xtensa.h:36
static uint32_t esp_sdr_ccount(void)
Definition esp_sdr_xtensa.h:22