Mutila: Mouse's Utilities for Arduino
Oft-used utilities: debouncing buttons, averaging samples, and so on.
src
CommandInterface.h
1
#pragma once
2
3
#include <Arduino.h>
4
#include <stdint.h>
5
18
class
CommandInterface
{
19
public
:
26
CommandInterface
(uint8_t maxCmdLen=48);
27
30
~CommandInterface
();
31
39
virtual
void
begin
(Stream& stream=Serial);
40
45
void
update
();
46
52
virtual
void
runCmd
() = 0;
53
54
public
:
61
bool
echo
;
62
63
protected
:
65
void
clearBuf
();
66
67
protected
:
68
Stream* _stream;
69
uint8_t _maxLen;
70
uint8_t _idx;
71
char
* _buf;
72
73
};
74
75
CommandInterface::begin
virtual void begin(Stream &stream=Serial)
Definition:
CommandInterface.cpp:22
CommandInterface::CommandInterface
CommandInterface(uint8_t maxCmdLen=48)
Definition:
CommandInterface.cpp:4
CommandInterface::runCmd
virtual void runCmd()=0
CommandInterface
Definition:
CommandInterface.h:18
CommandInterface::clearBuf
void clearBuf()
Definition:
CommandInterface.cpp:29
CommandInterface::echo
bool echo
Definition:
CommandInterface.h:61
CommandInterface::~CommandInterface
~CommandInterface()
Definition:
CommandInterface.cpp:14
CommandInterface::update
void update()
Definition:
CommandInterface.cpp:36
Generated by
1.8.15