bafang-esp32/src/main.h

38 lines
583 B
C
Raw Normal View History

2019-12-04 23:10:53 +01:00
#ifndef MAIN_H
#define MAIN_H
#include <Arduino.h>
namespace Main {
enum {
2020-08-17 23:31:54 +02:00
CHANNEL_NONE = -1,
CHANNEL_HWSERIAL = 0,
CHANNEL_BTSERIAL = 1,
CHANNEL_TCPSERIAL = 2,
2019-12-04 23:10:53 +01:00
NUM_CHANNELS
};
void init();
void loop();
2020-08-17 23:31:54 +02:00
Stream *channel(int num = -1);
void SecretFunction();
void SecretAction(int code);
void toggleBluetooth(int mode = -1);
void toggleWiFi(int mode = -1);
void motorProfile(int profile);
2019-12-04 23:10:53 +01:00
extern int g_CurrentChannel;
2020-08-17 23:31:54 +02:00
extern int g_Debug[NUM_CHANNELS];
2019-12-04 23:10:53 +01:00
extern char g_SerialBuffer[NUM_CHANNELS][255];
extern int g_SerialBufferPos[NUM_CHANNELS];
};
#endif