mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-06-19 05:21:57 +00:00
Move SD Fat library out of main src
This commit is contained in:
parent
9d9c859ac1
commit
f84ff4ba7d
17 changed files with 64 additions and 116 deletions
ArduinoAddons/Arduino_1.0.x/libraries/SdFat
|
@ -17,9 +17,8 @@
|
|||
* along with the Arduino SdFat Library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "Marlin.h"
|
||||
|
||||
#ifdef SDSUPPORT
|
||||
#include "SdFat.h"
|
||||
#include <Print.h>
|
||||
#include "SdFatUtil.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -50,7 +49,8 @@ int SdFatUtil::FreeRam() {
|
|||
* \param[in] pr Print object for output.
|
||||
* \param[in] str Pointer to string stored in flash memory.
|
||||
*/
|
||||
void SdFatUtil::print_P( PGM_P str) {
|
||||
void SdFatUtil::print_P( Print *p, PGM_P str) {
|
||||
Print &MYSERIAL = *p;
|
||||
for (uint8_t c; (c = pgm_read_byte(str)); str++) MYSERIAL.write(c);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -59,8 +59,9 @@ void SdFatUtil::print_P( PGM_P str) {
|
|||
* \param[in] pr Print object for output.
|
||||
* \param[in] str Pointer to string stored in flash memory.
|
||||
*/
|
||||
void SdFatUtil::println_P( PGM_P str) {
|
||||
print_P( str);
|
||||
void SdFatUtil::println_P( Print *p, PGM_P str) {
|
||||
Print &MYSERIAL = *p;
|
||||
print_P( p, str);
|
||||
MYSERIAL.println();
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -68,15 +69,14 @@ void SdFatUtil::println_P( PGM_P str) {
|
|||
*
|
||||
* \param[in] str Pointer to string stored in flash memory.
|
||||
*/
|
||||
void SdFatUtil::SerialPrint_P(PGM_P str) {
|
||||
print_P(str);
|
||||
void SdFatUtil::SerialPrint_P( Print *p, PGM_P str) {
|
||||
print_P(p, str);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** %Print a string in flash memory to Serial followed by a CR/LF.
|
||||
*
|
||||
* \param[in] str Pointer to string stored in flash memory.
|
||||
*/
|
||||
void SdFatUtil::SerialPrintln_P(PGM_P str) {
|
||||
println_P( str);
|
||||
void SdFatUtil::SerialPrintln_P(Print *p, PGM_P str) {
|
||||
println_P( p, str);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue