ESPectre SDK
2.8.0-280-gac7af68
Wi-Fi CSI motion sensing for ESP32 firmware
Toggle main menu visibility
Loading...
Searching...
No Matches
csi_types.h
Go to the documentation of this file.
1
/*
2
* ESPectre - CSI Public Types
3
*
4
* Stable HT20 dimensions and detector subcarrier selection shared by the
5
* core-only and full-runtime SDK surfaces.
6
*
7
* Author: Francesco Pace <francesco.pace@gmail.com>
8
* SPDX-License-Identifier: GPL-3.0-only
9
* Commercial licensing available under separate agreement; see LICENSING.md.
10
*/
11
#pragma once
12
13
#include <array>
14
#include <cstdint>
15
16
namespace
espectre
{
17
18
constexpr
uint16_t
HT20_NUM_SUBCARRIERS
= 64U;
19
constexpr
uint16_t
HT20_CSI_LEN
= 128U;
20
constexpr
uint16_t
HT20_CSI_LEN_DOUBLE
= 256U;
21
constexpr
uint16_t
HT20_CSI_LEN_SHORT
= 114U;
22
constexpr
uint16_t
HT20_CSI_LEN_SHORT_DOUBLE
= 228U;
23
constexpr
uint8_t
HT20_CSI_LEN_SHORT_LEFT_PAD
= 8U;
24
constexpr
uint8_t
HT20_GUARD_BAND_LOW
= 4U;
25
constexpr
uint8_t
HT20_GUARD_BAND_HIGH
= 60U;
26
constexpr
uint8_t
HT20_DC_SUBCARRIER
= 32U;
27
constexpr
uint8_t
HT20_SELECTED_BAND_SIZE
= 12U;
28
29
constexpr
uint8_t
DEFAULT_SUBCARRIERS
[
HT20_SELECTED_BAND_SIZE
] = {
30
4U, 8U, 13U, 18U, 23U, 28U, 36U, 41U, 46U, 51U, 56U, 60U,
31
};
32
using
SelectedSubcarriers
= std::array<uint8_t, HT20_SELECTED_BAND_SIZE>;
33
34
constexpr
SelectedSubcarriers
make_default_subcarriers
() {
35
SelectedSubcarriers
subcarriers{};
36
for
(uint8_t i = 0U; i <
HT20_SELECTED_BAND_SIZE
; ++i) {
37
subcarriers[i] =
DEFAULT_SUBCARRIERS
[i];
38
}
39
return
subcarriers;
40
}
41
42
}
// namespace espectre
espectre
Definition
espectre_sdk_version.h:62
espectre::make_default_subcarriers
constexpr SelectedSubcarriers make_default_subcarriers()
Definition
csi_types.h:34
espectre::HT20_NUM_SUBCARRIERS
constexpr uint16_t HT20_NUM_SUBCARRIERS
Definition
csi_types.h:18
espectre::SelectedSubcarriers
std::array< uint8_t, HT20_SELECTED_BAND_SIZE > SelectedSubcarriers
Definition
csi_types.h:32
espectre::HT20_CSI_LEN_SHORT_DOUBLE
constexpr uint16_t HT20_CSI_LEN_SHORT_DOUBLE
Definition
csi_types.h:22
espectre::HT20_CSI_LEN_SHORT_LEFT_PAD
constexpr uint8_t HT20_CSI_LEN_SHORT_LEFT_PAD
Definition
csi_types.h:23
espectre::HT20_SELECTED_BAND_SIZE
constexpr uint8_t HT20_SELECTED_BAND_SIZE
Definition
csi_types.h:27
espectre::HT20_CSI_LEN_SHORT
constexpr uint16_t HT20_CSI_LEN_SHORT
Definition
csi_types.h:21
espectre::HT20_GUARD_BAND_HIGH
constexpr uint8_t HT20_GUARD_BAND_HIGH
Definition
csi_types.h:25
espectre::DEFAULT_SUBCARRIERS
constexpr uint8_t DEFAULT_SUBCARRIERS[HT20_SELECTED_BAND_SIZE]
Definition
csi_types.h:29
espectre::HT20_CSI_LEN_DOUBLE
constexpr uint16_t HT20_CSI_LEN_DOUBLE
Definition
csi_types.h:20
espectre::HT20_GUARD_BAND_LOW
constexpr uint8_t HT20_GUARD_BAND_LOW
Definition
csi_types.h:24
espectre::HT20_CSI_LEN
constexpr uint16_t HT20_CSI_LEN
Definition
csi_types.h:19
espectre::HT20_DC_SUBCARRIER
constexpr uint8_t HT20_DC_SUBCARRIER
Definition
csi_types.h:26
src
cpp
core
csi_types.h
Generated by
1.17.0