1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests/net/esp_wifi_csi: Initial esp wifi csi test

This commit is contained in:
MrKevinWeiss 2023-09-27 12:37:30 +02:00
parent fdee34ae08
commit 9e6d2c613f
No known key found for this signature in database
GPG Key ID: C26684F1C0767FFF
3 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,9 @@
BOARD ?= esp32-wroom-32
include ../Makefile.net_common
USEMODULE += esp_wifi_csi
USEMODULE += esp_wifi_csi_metadata
FEATURES_REQUIRED += esp_wifi
include $(RIOTBASE)/Makefile.include

View File

@ -0,0 +1,8 @@
ESP WIFI CSI Test
=================
This is simple test to show WIFI CSI (Channel State Information).
To use the application specific callback, run:
```
CFLAGS='-DESP_WIFI_CSI_RX_CB_OVERRIDE' make
```

View File

@ -0,0 +1,51 @@
/*
* Copyright (C) 2023 HAW Hamburg
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup tests
* @{
*
* @file
*
* @author Kevin Weiss <kevin.weiss@haw-hamburg.de>
*
* @}
*/
#ifdef ESP_WIFI_CSI_RX_CB_OVERRIDE
#include <stdio.h>
#include "esp_wifi_types.h"
#endif
#include "esp-wifi/esp_wifi_netdev.h"
#ifdef ESP_WIFI_CSI_RX_CB_OVERRIDE
void esp_wifi_csi_rx_cb(void *ctx, wifi_csi_info_t *data)
{
(void)ctx;
printf("App WiFi CSI %p\n", data);
}
#endif
/** the only ESP WiFi device */
extern esp_wifi_netdev_t _esp_wifi_dev;
/** setup function for the ESP WiFi */
extern void esp_wifi_setup (esp_wifi_netdev_t* dev);
int main(void)
{
esp_wifi_setup(&_esp_wifi_dev);
while (1) {
/* do nothing */
}
/* should be never reached */
return 0;
}