Merge pull request #15735 from jenswet/fix-esp32-includes
cpu/esp_common: Add missing includes and ISO-C++ compatibility
This commit is contained in:
commit
04133b6d88
@ -65,7 +65,7 @@
|
|||||||
static esp_now_netdev_t _esp_now_dev = { 0 };
|
static esp_now_netdev_t _esp_now_dev = { 0 };
|
||||||
static const netdev_driver_t _esp_now_driver;
|
static const netdev_driver_t _esp_now_driver;
|
||||||
|
|
||||||
static bool _esp_now_add_peer(const uint8_t* bssid, uint8_t channel, uint8_t* key)
|
static bool _esp_now_add_peer(const uint8_t* bssid, uint8_t channel, const uint8_t* key)
|
||||||
{
|
{
|
||||||
if (esp_now_is_peer_exist(bssid)) {
|
if (esp_now_is_peer_exist(bssid)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -21,6 +21,11 @@
|
|||||||
#define ESP_NOW_NETDEV_H
|
#define ESP_NOW_NETDEV_H
|
||||||
|
|
||||||
#include "net/netdev.h"
|
#include "net/netdev.h"
|
||||||
|
#include "mutex.h"
|
||||||
|
#include "net/ethernet/hdr.h"
|
||||||
|
#ifdef MODULE_GNRC
|
||||||
|
#include "net/gnrc/nettype.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|||||||
@ -103,10 +103,10 @@
|
|||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint8_t* key; /**< key of type uint8_t [16] or NULL (no encryption) */
|
const uint8_t* key; /**< key of type uint8_t [16] or NULL (no encryption) */
|
||||||
uint32_t scan_period; /**< Period at which the node scans for other nodes */
|
uint32_t scan_period; /**< Period at which the node scans for other nodes */
|
||||||
char* softap_pass; /**< Passphrase used for the SoftAP interface */
|
const char* softap_pass; /**< Passphrase used for the SoftAP interface */
|
||||||
uint8_t channel; /**< Channel used for ESP-NOW nodes */
|
uint8_t channel; /**< Channel used for ESP-NOW nodes */
|
||||||
|
|
||||||
} esp_now_params_t;
|
} esp_now_params_t;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user