From 9a5fed4fda7012f87d48a72c919d92ef6f4b9f70 Mon Sep 17 00:00:00 2001 From: Simen Svale Skogsrud Date: Fri, 3 Jun 2011 15:31:59 +0200 Subject: [PATCH] changed file headers to reflect the totally refactored state of the serial and print modules --- print.c | 24 ++++++++++++++++++++++++ print.h | 23 +++++++++++++++++++++++ serial.c | 36 ++++++++++++++++-------------------- serial.h | 31 +++++++++++++++---------------- 4 files changed, 78 insertions(+), 36 deletions(-) diff --git a/print.c b/print.c index ffd3f33..de3a1ad 100644 --- a/print.c +++ b/print.c @@ -1,3 +1,27 @@ +/* + print.c - Functions for formatting output strings + Part of Grbl + + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl 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. + + Grbl 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. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +/* This code was initially inspired by the wiring_serial module by David A. Mellis which + used to be a part of the Arduino project. */ + + #include #include #include "serial.h" diff --git a/print.h b/print.h index 62b76ea..b8241f6 100644 --- a/print.h +++ b/print.h @@ -1,3 +1,26 @@ +/* + print.h - Functions for formatting output strings + Part of Grbl + + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl 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. + + Grbl 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. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +/* This code was initially inspired by the wiring_serial module by David A. Mellis which + used to be a part of the Arduino project. */ + #ifndef print_h #define print_h diff --git a/serial.c b/serial.c index cc78802..d71eded 100644 --- a/serial.c +++ b/serial.c @@ -1,26 +1,26 @@ /* - serial.c - serial functions. - Part of Arduino - http://www.arduino.cc/ + serial.c - Low level functions for sending and recieving bytes via the serial port + Part of Grbl - Copyright (c) 2005-2006 David A. Mellis + Copyright (c) 2009-2011 Simen Svale Skogsrud - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + Grbl 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. - This library is distributed in the hope that it will be useful, + Grbl 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General - Public License along with this library; if not, write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, - Boston, MA 02111-1307 USA + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . */ +/* This code was initially inspired by the wiring_serial module by David A. Mellis which + used to be a part of the Arduino project. */ + #include #include @@ -93,10 +93,7 @@ SIGNAL(USART_UDRE_vect) { tx_buffer_tail = tail; // Turn off Data Register Empty Interrupt if this concludes the transfer - if (tail == tx_buffer_head) { - UCSR0B &= ~(1 << UDRIE0); - } - + if (tail == tx_buffer_head) { UCSR0B &= ~(1 << UDRIE0); } } uint8_t serial_read() @@ -124,4 +121,3 @@ SIGNAL(USART_RX_vect) rx_buffer_head = next_head; } } - diff --git a/serial.h b/serial.h index 1f7e420..ec41433 100644 --- a/serial.h +++ b/serial.h @@ -1,27 +1,26 @@ /* - Based on wiring.h - Partial implementation of the Wiring API for the ATmega8. - Part of Arduino - http://www.arduino.cc/ + serial.c - Low level functions for sending and recieving bytes via the serial port + Part of Grbl - Copyright (c) 2005-2006 David A. Mellis + Copyright (c) 2009-2011 Simen Svale Skogsrud - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + Grbl 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. - This library is distributed in the hope that it will be useful, + Grbl 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 - Lesser General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General - Public License along with this library; if not, write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, - Boston, MA 02111-1307 USA - - $Id: wiring.h 387 2008-03-08 21:30:00Z mellis $ + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . */ +/* This code was initially inspired by the wiring_serial module by David A. Mellis which + used to be a part of the Arduino project. */ + #ifndef serial_h #define serial_h