Loading...
Searching...
No Matches
esp_now_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2018 Gunar Schorcht
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#if defined(MODULE_ESP_NOW) || defined(DOXYGEN)
19
24
29#ifndef ESP_NOW_STACKSIZE
30#define ESP_NOW_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
31#endif
32
38#ifndef ESP_NOW_PRIO
39#define ESP_NOW_PRIO (GNRC_NETIF_PRIO)
40#endif
41
47#ifndef ESP_NOW_SCAN_PERIOD_MS
48#define ESP_NOW_SCAN_PERIOD_MS (10000UL)
49#endif
50
55#ifndef ESP_NOW_SOFT_AP_PASS
56#define ESP_NOW_SOFT_AP_PASS "ThisistheRIOTporttoESP"
57#endif
58
63#ifndef ESP_NOW_CHANNEL
64#define ESP_NOW_CHANNEL (6)
65#endif
66
80#ifndef ESP_NOW_KEY
81#define ESP_NOW_KEY (NULL)
82#endif
83
85
89#ifndef ESP_NOW_PARAMS
90#define ESP_NOW_PARAMS { .key = ESP_NOW_KEY, \
91 .scan_period = ESP_NOW_SCAN_PERIOD_MS, \
92 .softap_pass = ESP_NOW_SOFT_AP_PASS, \
93 .channel = ESP_NOW_CHANNEL \
94 }
95#endif
96
100typedef struct
101{
102 const uint8_t* key;
103 uint32_t scan_period;
104 const char* softap_pass;
105 uint8_t channel;
106
108
109#ifdef __cplusplus
110extern "C" {
111#endif
112
117
118#ifdef __cplusplus
119}
120#endif
121
122#endif /* MODULE_ESP_NOW || DOXYGEN */
123
#define ESP_NOW_PARAMS
Initializer for default configuration parameters.
static const esp_now_params_t esp_now_params
Static configuration structure.
Struct holding all parameters needed for device initialization.
const uint8_t * key
key of type uint8_t [16] or NULL (no encryption)
const char * softap_pass
Passphrase used for the SoftAP interface.
uint8_t channel
Channel used for ESP-NOW nodes.
uint32_t scan_period
Period at which the node scans for other nodes.