Minor updates.
- Updated makefile to be more universally compatible by not requiring grep or ruby. - Edited XON/XOFF flow control usage, noting that FTDI-based Arduinos are known to work, but not Atmega8U2-based Arduino. Still officially not supported, but added for advanced users. - Minor edits.
This commit is contained in:
parent
d6abf10d49
commit
86cdae0060
3
Makefile
3
Makefile
@ -81,8 +81,7 @@ main.elf: $(OBJECTS)
|
||||
grbl.hex: main.elf
|
||||
rm -f grbl.hex
|
||||
avr-objcopy -j .text -j .data -O ihex main.elf grbl.hex
|
||||
avr-objdump -h main.elf | grep .bss | ruby -e 'puts "\n\n--- Requires %s bytes of SRAM" % STDIN.read.match(/0[0-9a-f]+\s/)[0].to_i(16)'
|
||||
avr-size *.hex *.elf *.o
|
||||
avr-size -C --mcu=$(DEVICE) main.elf
|
||||
# If you have an EEPROM section, you must also create a hex file for the
|
||||
# EEPROM and add it to the "flash" target.
|
||||
|
||||
|
15
config.h
15
config.h
@ -115,12 +115,15 @@
|
||||
#define DWELL_TIME_STEP 50 // Integer (1-255) (milliseconds)
|
||||
|
||||
// FOR ADVANCED USERS ONLY: Toggles XON/XOFF software flow control for serial communications.
|
||||
// Officially not supported due to problems involving USB-to-serial chip latency (Atmega8U2/FTDI)
|
||||
// when connecting to an Arduino through the USB port. This problem has to do with having no control
|
||||
// of the USB packets and causing standard terminal programs not being able to honor the XON/XOFF
|
||||
// control characters on time. However, with specially programmed UI's or avoiding the USB interface
|
||||
// completely, XON/XOFF flow control should work. In any case, please report any successes to grbl
|
||||
// administrators!
|
||||
// Officially not supported due to problems involving the Atmega8U2 USB-to-serial chips on current
|
||||
// future Arduinos boards. The firmware on these chips do not support XON/XOFF flow control
|
||||
// characters and the intermediate buffer in the chips cause latency and overflow problems with
|
||||
// standard terminal programs. However, using specifically-programmed UI's to manage this latency
|
||||
// problem has been confirmed to work, as well as, using older FTDI FT232RL-based Arduinos
|
||||
// (Duemilanove) since their firmaware correctly manage the XON/XOFF characters. Other unconfirmed
|
||||
// methods include using an FTDI board/cable or directly communicate on the RX/TX pins on the
|
||||
// Arduino, both of which circumvent the Atmega8U2 chip altogether. In any case, please report any
|
||||
// successes to grbl administrators!
|
||||
#define ENABLE_XONXOFF 0 // Boolean. Default disabled.
|
||||
|
||||
// -----------------------------------------------
|
||||
|
2
gcode.c
2
gcode.c
@ -569,7 +569,7 @@ static int next_statement(char *letter, double *double_ptr, char *line, uint8_t
|
||||
- Evaluation of expressions
|
||||
- Variables
|
||||
- Multiple home locations
|
||||
- Multiple coordinate systems (May be added in the future)
|
||||
- Multiple coordinate systems (Additional ones maybe added in config.h)
|
||||
- Probing
|
||||
- Override control
|
||||
- Tool changes
|
||||
|
2
limits.c
2
limits.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
limits.h - code pertaining to limit-switches and performing the homing cycle
|
||||
limits.c - code pertaining to limit-switches and performing the homing cycle
|
||||
Part of Grbl
|
||||
|
||||
Copyright (c) 2009-2011 Simen Svale Skogsrud
|
||||
|
20
serial.c
20
serial.c
@ -111,12 +111,15 @@ ISR(USART_UDRE_vect)
|
||||
uint8_t tail = tx_buffer_tail;
|
||||
|
||||
#if ENABLE_XONXOFF
|
||||
switch (flow_ctrl) {
|
||||
case SEND_XOFF: UDR0 = XOFF_CHAR; flow_ctrl = XOFF_SENT; break;
|
||||
case SEND_XON: UDR0 = XON_CHAR; flow_ctrl = XON_SENT; break;
|
||||
default:
|
||||
if (flow_ctrl == SEND_XOFF) {
|
||||
UDR0 = XOFF_CHAR;
|
||||
flow_ctrl = XOFF_SENT;
|
||||
} else if (flow_ctrl == SEND_XON) {
|
||||
UDR0 = XON_CHAR;
|
||||
flow_ctrl = XON_SENT;
|
||||
} else
|
||||
#endif
|
||||
|
||||
{
|
||||
// Send a byte from the buffer
|
||||
UDR0 = tx_buffer[tail];
|
||||
|
||||
@ -125,10 +128,7 @@ ISR(USART_UDRE_vect)
|
||||
if (tail == TX_BUFFER_SIZE) { tail = 0; }
|
||||
|
||||
tx_buffer_tail = tail;
|
||||
|
||||
#if ENABLE_XONXOFF
|
||||
}
|
||||
#endif
|
||||
|
||||
// Turn off Data Register Empty Interrupt to stop tx-streaming if this concludes the transfer
|
||||
if (tail == tx_buffer_head) { UCSR0B &= ~(1 << UDRIE0); }
|
||||
@ -144,7 +144,7 @@ uint8_t serial_read()
|
||||
if (rx_buffer_tail == RX_BUFFER_SIZE) { rx_buffer_tail = 0; }
|
||||
|
||||
#if ENABLE_XONXOFF
|
||||
if ((get_rx_buffer_count() < RX_BUFFER_LOW) && flow_ctrl != XON_SENT) {
|
||||
if ((get_rx_buffer_count() < RX_BUFFER_LOW) && flow_ctrl == XOFF_SENT) {
|
||||
flow_ctrl = SEND_XON;
|
||||
UCSR0B |= (1 << UDRIE0); // Force TX
|
||||
}
|
||||
@ -183,7 +183,7 @@ ISR(USART_RX_vect)
|
||||
rx_buffer_head = next_head;
|
||||
|
||||
#if ENABLE_XONXOFF
|
||||
if ((get_rx_buffer_count() >= RX_BUFFER_FULL) && flow_ctrl != XOFF_SENT) {
|
||||
if ((get_rx_buffer_count() >= RX_BUFFER_FULL) && flow_ctrl == XON_SENT) {
|
||||
flow_ctrl = SEND_XOFF;
|
||||
UCSR0B |= (1 << UDRIE0); // Force TX
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user