esp_now_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Gunar Schorcht
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef ESP_NOW_PARAMS_H
20 #define ESP_NOW_PARAMS_H
21 
22 #if defined(MODULE_ESP_NOW) || defined(DOXYGEN)
23 
33 #ifndef ESP_NOW_STACKSIZE
34 #define ESP_NOW_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
35 #endif
36 
42 #ifndef ESP_NOW_PRIO
43 #define ESP_NOW_PRIO (GNRC_NETIF_PRIO)
44 #endif
45 
51 #ifndef ESP_NOW_SCAN_PERIOD
52 #define ESP_NOW_SCAN_PERIOD (10000000UL)
53 #endif
54 
59 #ifndef ESP_NOW_SOFT_AP_PASS
60 #define ESP_NOW_SOFT_AP_PASS "ThisistheRIOTporttoESP"
61 #endif
62 
67 #ifndef ESP_NOW_CHANNEL
68 #define ESP_NOW_CHANNEL (6)
69 #endif
70 
84 #ifndef ESP_NOW_KEY
85 #define ESP_NOW_KEY (NULL)
86 #endif
87 
93 #ifndef ESP_NOW_PARAMS
94 #define ESP_NOW_PARAMS { .key = ESP_NOW_KEY, \
95  .scan_period = ESP_NOW_SCAN_PERIOD, \
96  .softap_pass = ESP_NOW_SOFT_AP_PASS, \
97  .channel = ESP_NOW_CHANNEL \
98  }
99 #endif
100 
104 typedef struct
105 {
106  uint8_t* key;
107  uint32_t scan_period;
108  char* softap_pass;
109  uint8_t channel;
112 
113 #ifdef __cplusplus
114 extern "C" {
115 #endif
116 
121 
122 #ifdef __cplusplus
123 }
124 #endif
125 
126 #endif /* MODULE_ESP_NOW || DOXYGEN */
127 
128 #endif /* ESP_NOW_PARAMS_H */
129 
ESP_NOW_PARAMS
#define ESP_NOW_PARAMS
Initializer for default configuration parameters.
Definition: esp_now_params.h:94
esp_now_params_t::channel
uint8_t channel
Channel used for ESP-NOW nodes.
Definition: esp_now_params.h:109
esp_now_params_t::key
uint8_t * key
key of type uint8_t [16] or NULL (no encryption)
Definition: esp_now_params.h:106
esp_now_params_t::scan_period
uint32_t scan_period
Period at which the node scans for other nodes.
Definition: esp_now_params.h:107
esp_now_params
static const esp_now_params_t esp_now_params
Static configuration structure.
Definition: esp_now_params.h:120
esp_now_params_t
Struct holding all parameters needed for device initialization.
Definition: esp_now_params.h:104
esp_now_params_t::softap_pass
char * softap_pass
Passphrase used for the SoftAP interface.
Definition: esp_now_params.h:108