make it compile with arduino 1.0 ; function is still untested.
This commit is contained in:
parent
b0c3871750
commit
0bc9daa4f7
@ -5,7 +5,12 @@
|
||||
// Licence: GPL
|
||||
#define HardwareSerial_h // trick to disable the standard HWserial
|
||||
#include <math.h>
|
||||
#include <WProgram.h>
|
||||
#if ARDUINO >= 100
|
||||
#include "Arduino.h"
|
||||
#else
|
||||
#include "WProgram.h"
|
||||
#endif
|
||||
|
||||
#include "fastio.h"
|
||||
#include <avr/pgmspace.h>
|
||||
#include "Configuration.h"
|
||||
|
@ -25,7 +25,11 @@
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include <math.h>
|
||||
#include "wiring.h"
|
||||
#if ARDUINO >= 100
|
||||
#include "Arduino.h"
|
||||
#else
|
||||
#include "wiring.h"
|
||||
#endif
|
||||
#include "wiring_private.h"
|
||||
|
||||
// this next line disables the entire HardwareSerial.cpp,
|
||||
|
1284
Marlin/Sd2Card.cpp
1284
Marlin/Sd2Card.cpp
File diff suppressed because it is too large
Load Diff
@ -24,13 +24,13 @@
|
||||
* \brief SdBaseFile class
|
||||
*/
|
||||
#include <avr/pgmspace.h>
|
||||
#if ARDUINO < 100
|
||||
#define HardwareSerial_h // trick to disable the standard HWserial
|
||||
#if ARDUINO < 100
|
||||
#include <WProgram.h>
|
||||
#include "MarlinSerial.h"
|
||||
#else // ARDUINO
|
||||
#include <Arduino.h>
|
||||
#endif // ARDUINO
|
||||
#include "MarlinSerial.h"
|
||||
#include "SdFatConfig.h"
|
||||
#include "SdVolume.h"
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -24,13 +24,14 @@
|
||||
* \brief Useful utility functions.
|
||||
*/
|
||||
#include <avr/pgmspace.h>
|
||||
#if ARDUINO < 100
|
||||
|
||||
#define HardwareSerial_h // trick to disable the standard HWserial
|
||||
#if ARDUINO < 100
|
||||
#include <WProgram.h>
|
||||
#include "MarlinSerial.h"
|
||||
#else // ARDUINO
|
||||
#include <Arduino.h>
|
||||
#endif // ARDUINO
|
||||
#include "MarlinSerial.h"
|
||||
/** Store and print a string in flash memory.*/
|
||||
#define PgmPrint(x) SerialPrint_P(PSTR(x))
|
||||
/** Store and print a string in flash memory followed by a CR/LF.*/
|
||||
|
@ -51,7 +51,12 @@ int16_t SdFile::write(const void* buf, uint16_t nbyte) {
|
||||
* \param[in] b the byte to be written.
|
||||
* Use writeError to check for errors.
|
||||
*/
|
||||
void SdFile::write(uint8_t b) {
|
||||
#if ARDUINO >= 100
|
||||
size_t SdFile::write(uint8_t b)
|
||||
#else
|
||||
void SdFile::write(uint8_t b)
|
||||
#endif
|
||||
{
|
||||
SdBaseFile::write(&b, 1);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -34,7 +34,12 @@ class SdFile : public SdBaseFile, public Print {
|
||||
public:
|
||||
SdFile() {}
|
||||
SdFile(const char* name, uint8_t oflag);
|
||||
void write(uint8_t b);
|
||||
#if ARDUINO >= 100
|
||||
size_t write(uint8_t b);
|
||||
#else
|
||||
void write(uint8_t b);
|
||||
#endif
|
||||
|
||||
int16_t write(const void* buf, uint16_t nbyte);
|
||||
void write(const char* str);
|
||||
void write_P(PGM_P str);
|
||||
|
@ -101,7 +101,11 @@ extern uint8_t active_extruder;
|
||||
|
||||
|
||||
/////semi-private stuff
|
||||
#include <WProgram.h>
|
||||
#if ARDUINO >= 100
|
||||
#include "Arduino.h"
|
||||
#else
|
||||
#include "WProgram.h"
|
||||
#endif
|
||||
|
||||
extern block_t block_buffer[BLOCK_BUFFER_SIZE]; // A ring buffer for motion instfructions
|
||||
extern volatile unsigned char block_buffer_head; // Index of the next block to be pushed
|
||||
|
Loading…
Reference in New Issue
Block a user