move header into seperate files and have include guards

This commit is contained in:
Florian Ludwig 2018-06-09 22:28:20 +02:00
parent f5eb8cdc76
commit c036b044c0
4 changed files with 27 additions and 16 deletions

8
src/configmanager.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef CONFIGMANAGER_H
#define CONFIGMANAGER_H
void eraseConfig(void);
void saveConfig(void);
void loadConfig(void);
#endif

10
src/lorawan.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef LORAWAN_H
#define LORAWAN_H
void onEvent(ev_t ev);
void do_send(osjob_t* j);
void gen_lora_deveui(uint8_t * pdeveui);
void RevBytes(unsigned char* b, size_t c);
void get_hard_deveui(uint8_t *pdeveui);
#endif

View File

@ -1,3 +1,6 @@
#ifndef MACSNIFF_H
#define MACSNIFF_H
// ESP32 Functions
#include <esp_wifi.h>
@ -26,3 +29,5 @@ void wifi_sniffer_packet_handler(void *buff, wifi_promiscuous_pkt_type_t type);
// function defined in rokkithash.cpp
uint32_t rokkit(const char * , int );
#endif

View File

@ -1,4 +1,8 @@
#include "configmanager.h"
#include "lorawan.h"
#include "macsniff.h"
// program version - note: increment version after modifications to configData_t struct!!
#define PROGVERSION "1.3.8" // use max 10 chars here!
#define PROGNAME "PAXCNT"
@ -23,22 +27,6 @@ void reset_counters(void);
void blink_LED(uint16_t set_color, uint16_t set_blinkduration);
void led_loop(void);
// defined in configmanager.cpp
void eraseConfig(void);
void saveConfig(void);
void loadConfig(void);
// defined in lorawan.cpp
void onEvent(ev_t ev);
void do_send(osjob_t* j);
void gen_lora_deveui(uint8_t * pdeveui);
void RevBytes(unsigned char* b, size_t c);
void get_hard_deveui(uint8_t *pdeveui);
// defined in wifisniffer.cpp
void wifi_sniffer_init(void);
void wifi_sniffer_set_channel(uint8_t channel);
void wifi_sniffer_packet_handler(void *buff, wifi_promiscuous_pkt_type_t type);
// defined in blescan.cpp
#ifdef BLECOUNTER