Skip to content

Commit

Permalink
style(src): rename wifi_scanner src to rf_scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
gemesa committed Apr 18, 2020
1 parent 1140e1e commit c48902b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Wi-Fi scanner
# 2.4GHz RF scanner

This project contains the source code of an nRF24L01+ and Blue Pill (STM32F103C8T6) based Wi-Fi scanner. The Blue Pill scans frequencies from 2.400GHz to 2.525GHz (1MHz resolution) with nRF24L01+ and plots the activity on each frequency through UART.
This project contains the source code of an nRF24L01+ and Blue Pill (STM32F103C8T6) based RF scanner. The Blue Pill scans frequencies from 2.400GHz to 2.525GHz (1MHz resolution) with nRF24L01+ and plots the activity on each frequency through UART.

This is what the UART output looks like (explained below):

Expand Down
6 changes: 3 additions & 3 deletions docs/project_description.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,18 @@ The STM32F103xB macro is defined for building. Optimization level is set to -O3.
Includes:
```c
#include "util.h"
#include "wifi_scanner.h"
#include "rf_scanner.h"
```

Init functions:
```c
util_init();
wifi_scanner_init();
rf_scanner_init();
```

Step functions:
```c
wifi_scanner_step();
rf_scanner_step();
blink_led();
```

Expand Down
12 changes: 6 additions & 6 deletions src/include/wifi_scanner.h → src/include/rf_scanner.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/**
******************************************************************************
* @file wifi_scanner.c
* @file rf_scanner.h
* @brief Scans frequencies from 2.400GHz to 2.525GHz (1MHz resolution)
* with nRF24L01+ and plots the activity on each frequency through UART.
* @author gemesa
******************************************************************************
*/

#ifndef GEN_DOC_WIFI_SCANNER_H_
#define GEN_DOC_WIFI_SCANNER_H_
#ifndef GEN_DOC_RF_SCANNER_H_
#define GEN_DOC_RF_SCANNER_H_

extern void wifi_scanner_init(void);
extern void wifi_scanner_step(void);
extern void rf_scanner_init(void);
extern void rf_scanner_step(void);

#endif /* GEN_DOC_WIFI_SCANNER_H_ */
#endif /* GEN_DOC_RF_SCANNER_H_ */
6 changes: 3 additions & 3 deletions src/src/gen_doc/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "util.h"
#include "wifi_scanner.h"
#include "rf_scanner.h"
/* USER CODE END Includes */

/* Private typedef -----------------------------------------------------------*/
Expand Down Expand Up @@ -100,15 +100,15 @@ int main(void)
MX_TIM2_Init();
/* USER CODE BEGIN 2 */
util_init();
wifi_scanner_init();
rf_scanner_init();
/* USER CODE END 2 */

/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
wifi_scanner_step();
rf_scanner_step();
blink_led();
/* USER CODE BEGIN 3 */
}
Expand Down
10 changes: 5 additions & 5 deletions src/src/gen_doc/wifi_scanner.c → src/src/gen_doc/rf_scanner.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
******************************************************************************
* @file wifi_scanner.c
* @file rf_scanner.c
* @brief Scans frequencies from 2.400GHz to 2.525GHz (1MHz resolution)
* with nRF24L01+ and plots the activity on each frequency through UART.
* @author gemesa
Expand Down Expand Up @@ -35,8 +35,8 @@ static void get_freq_data(uint8_t aui8_rpd[]);
static uint8_t max_array(uint8_t aui8_array[], uint8_t ui8_size);
static uint8_t calc_norm(uint8_t aui8_rpd[], uint8_t aui8_rpd_norm[], uint8_t ui8_size);
static void plot_freq_data(uint8_t aui8_rpd[]);
void wifi_scanner_step(void);
void wifi_scanner_init(void);
void rf_scanner_step(void);
void rf_scanner_init(void);
static void plot_layout(void);
static void nrf24l01p_init(void);

Expand Down Expand Up @@ -235,7 +235,7 @@ static void plot_freq_data(uint8_t aui8_rpd[])
* @brief Step function of the SWC.
* @author gemesa
*/
void wifi_scanner_step(void)
void rf_scanner_step(void)
{
/* array to store the counted RPD flags for each channel
* an RPD flag indicates whether the frequency is free or occupied */
Expand All @@ -249,7 +249,7 @@ void wifi_scanner_step(void)
* @brief Init function of the SWC.
* @author gemesa
*/
void wifi_scanner_init(void)
void rf_scanner_init(void)
{
nrf24l01p_init();
}
Expand Down

0 comments on commit c48902b

Please sign in to comment.