changed file headers to reflect the totally refactored state of the serial and print modules

This commit is contained in:
Simen Svale Skogsrud 2011-06-03 15:31:59 +02:00
parent c0b4b8309a
commit 9a5fed4fda
4 changed files with 78 additions and 36 deletions

24
print.c
View File

@ -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 <http://www.gnu.org/licenses/>.
*/
/* 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 <math.h> #include <math.h>
#include <avr/pgmspace.h> #include <avr/pgmspace.h>
#include "serial.h" #include "serial.h"

23
print.h
View File

@ -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 <http://www.gnu.org/licenses/>.
*/
/* 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 #ifndef print_h
#define print_h #define print_h

View File

@ -1,26 +1,26 @@
/* /*
serial.c - serial functions. serial.c - Low level functions for sending and recieving bytes via the serial port
Part of Arduino - http://www.arduino.cc/ 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 Grbl is free software: you can redistribute it and/or modify
modify it under the terms of the GNU Lesser General Public it under the terms of the GNU General Public License as published by
License as published by the Free Software Foundation; either the Free Software Foundation, either version 3 of the License, or
version 2.1 of the License, or (at your option) any later version. (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 but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Lesser General Public License for more details. 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
You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* 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 <avr/interrupt.h> #include <avr/interrupt.h>
#include <avr/sleep.h> #include <avr/sleep.h>
@ -93,10 +93,7 @@ SIGNAL(USART_UDRE_vect) {
tx_buffer_tail = tail; tx_buffer_tail = tail;
// Turn off Data Register Empty Interrupt if this concludes the transfer // Turn off Data Register Empty Interrupt if this concludes the transfer
if (tail == tx_buffer_head) { if (tail == tx_buffer_head) { UCSR0B &= ~(1 << UDRIE0); }
UCSR0B &= ~(1 << UDRIE0);
}
} }
uint8_t serial_read() uint8_t serial_read()
@ -124,4 +121,3 @@ SIGNAL(USART_RX_vect)
rx_buffer_head = next_head; rx_buffer_head = next_head;
} }
} }

View File

@ -1,27 +1,26 @@
/* /*
Based on wiring.h - Partial implementation of the Wiring API for the ATmega8. serial.c - Low level functions for sending and recieving bytes via the serial port
Part of Arduino - http://www.arduino.cc/ 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 Grbl is free software: you can redistribute it and/or modify
modify it under the terms of the GNU Lesser General Public it under the terms of the GNU General Public License as published by
License as published by the Free Software Foundation; either the Free Software Foundation, either version 3 of the License, or
version 2.1 of the License, or (at your option) any later version. (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 but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Lesser General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU Lesser General You should have received a copy of the GNU General Public License
Public License along with this library; if not, write to the along with Grbl. If not, see <http://www.gnu.org/licenses/>.
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 $
*/ */
/* 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 #ifndef serial_h
#define serial_h #define serial_h