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:
parent
fdee34ae08
commit
9e6d2c613f
9
tests/net/esp_wifi_csi/Makefile
Normal file
9
tests/net/esp_wifi_csi/Makefile
Normal 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
|
8
tests/net/esp_wifi_csi/README.md
Normal file
8
tests/net/esp_wifi_csi/README.md
Normal 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
|
||||
```
|
51
tests/net/esp_wifi_csi/main.c
Normal file
51
tests/net/esp_wifi_csi/main.c
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user