renamed protocol methods to reflect the new module name
This commit is contained in:
parent
85f62111b5
commit
6893463e80
@ -3,10 +3,10 @@ The general structure of Grbl
|
|||||||
|
|
||||||
The main processing stack:
|
The main processing stack:
|
||||||
|
|
||||||
'serial_protocol' : Accepts command lines from the serial port and passes them to 'gcode' for execution.
|
'protocol' : Accepts command lines from the serial port and passes them to 'gcode' for execution.
|
||||||
Provides status responses for each command.
|
Provides status responses for each command.
|
||||||
|
|
||||||
'gcode' : Recieves gcode from 'serial_protocol', parses it according to the current state
|
'gcode' : Recieves gcode from 'protocol', parses it according to the current state
|
||||||
of the parser and issues commands via '..._control' modules
|
of the parser and issues commands via '..._control' modules
|
||||||
|
|
||||||
'spindle_control' : Commands for controlling the spindle.
|
'spindle_control' : Commands for controlling the spindle.
|
||||||
|
4
main.c
4
main.c
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
sp_init();
|
protocol_init();
|
||||||
settings_init();
|
settings_init();
|
||||||
plan_init();
|
plan_init();
|
||||||
st_init();
|
st_init();
|
||||||
@ -46,7 +46,7 @@ int main(void)
|
|||||||
|
|
||||||
for(;;){
|
for(;;){
|
||||||
sleep_mode(); // Wait for it ...
|
sleep_mode(); // Wait for it ...
|
||||||
sp_process(); // ... process the serial protocol
|
protocol_process(); // ... process the serial protocol
|
||||||
}
|
}
|
||||||
return 0; /* never reached */
|
return 0; /* never reached */
|
||||||
}
|
}
|
||||||
|
@ -51,14 +51,14 @@ void status_message(int status_code) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sp_init()
|
void protocol_init()
|
||||||
{
|
{
|
||||||
beginSerial(BAUD_RATE);
|
beginSerial(BAUD_RATE);
|
||||||
printPgmString(PSTR("\r\nGrbl " GRBL_VERSION));
|
printPgmString(PSTR("\r\nGrbl " GRBL_VERSION));
|
||||||
printPgmString(PSTR("\r\n"));
|
printPgmString(PSTR("\r\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void sp_process()
|
void protocol_process()
|
||||||
{
|
{
|
||||||
char c;
|
char c;
|
||||||
while((c = serialRead()) != -1)
|
while((c = serialRead()) != -1)
|
||||||
|
@ -21,10 +21,10 @@
|
|||||||
#define serial_h
|
#define serial_h
|
||||||
|
|
||||||
// Initialize the serial protocol
|
// Initialize the serial protocol
|
||||||
void sp_init();
|
void protocol_init();
|
||||||
|
|
||||||
// Read command lines from the serial port and execute them as they
|
// Read command lines from the serial port and execute them as they
|
||||||
// come in. Blocks until the serial buffer is emptied.
|
// come in. Blocks until the serial buffer is emptied.
|
||||||
void sp_process();
|
void protocol_process();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user