sensor_console.h 687 Bytes
Newer Older
Eric Duminil's avatar
Eric Duminil committed
1
2
#ifndef SENSOR_CONSOLE_H_INCLUDED
#define SENSOR_CONSOLE_H_INCLUDED
3
4
#include <Arduino.h>

Eric Duminil's avatar
Eric Duminil committed
5
/** Other scripts can use this namespace, in order to define commands, via callbacks.
6
 * Those callbacks can then be used to send commands to the sensor (reset, calibrate, night mode, ...)
Eric Duminil's avatar
Eric Duminil committed
7
 * The callbacks can either have no parameter, or one int32_t parameter.
8
9
 */

Eric Duminil's avatar
Eric Duminil committed
10
11
12
namespace sensor_console {
  void processSerialInput(const byte in_byte);
  void runCommand(const char *command);
13
14
  void defineIntCommand(const char *command, void (*function)(int32_t), const __FlashStringHelper *ifsh);
  void defineCommand(const char *command, void (*function)(void), const __FlashStringHelper *ifsh);
15
}
Eric Duminil's avatar
Eric Duminil committed
16
17

#endif