2 This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl).
3 Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4 Smoothie is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
5 You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>.
8 #ifndef SERIALCONSOLE_H
9 #define SERIALCONSOLE_H
11 #include "libs/Module.h"
12 #include "libs/Kernel.h"
16 #include "SerialConsole.h"
17 #include "libs/RingBuffer.h"
19 #define baud_rate_setting_ckeckusm 10922
21 class SerialConsole
: public Module
, public Serial
{
23 SerialConsole( PinName rx_pin
, PinName tx_pin
, int baud_rate
);
25 virtual void on_module_loaded();
26 void on_serial_char_received();
28 virtual void on_main_loop(void * argument
);
29 bool has_char(char letter
);
31 //string receive_buffer; // Received chars are stored here until a newline character is received
32 //vector<std::string> received_lines; // Received lines are stored here until they are requested
33 RingBuffer
<char,256> buffer
; // Receive buffer