Skip to content

Commit

Permalink
Revert "Version for Arduino ide 1.60"
Browse files Browse the repository at this point in the history
This reverts commit 6df6310.
  • Loading branch information
gallegojm committed Feb 14, 2015
1 parent 6df6310 commit 00451b6
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 1,080 deletions.
20 changes: 3 additions & 17 deletions FatFs/FatFs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,11 @@
* Copyright (c) 2014 by Jean-Michel Gallego
*
* Use version R0.10c of FatFs updated at November 26, 2014
*
* This Library 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,
* 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 the Arduino SdSpiCard Library. If not, see
* <http://www.gnu.org/licenses/>.
*/

#include "FatFs.h"

FatFsCard card;
Sd2Card card;

extern "C" int sd_status()
{
Expand Down Expand Up @@ -57,7 +43,7 @@ extern "C" int sd_disk_ioctl( uint8_t cmd )
case CTRL_SYNC : // Make sure that data has been written
res = RES_OK;
// res = spiRec() == 0XFF ? RES_OK : RES_NOTRDY ;
// res = card.waitNotBusy( SD_WRITE_TIMEOUT ) ? RES_OK : RES_NOTRDY ;
// res = card.waitNotBusy( 100 ) ? RES_OK : RES_NOTRDY ;
break;

default:
Expand Down Expand Up @@ -96,7 +82,7 @@ uint8_t ffs_result;
bool FatFsClass::begin( uint8_t csPin, uint8_t sckDiv )
{
ffs_result = 0;
if( ! card.begin( csPin, sckDiv ))
if( ! card.init( sckDiv, csPin ))
return false;
ffs_result = f_mount( & ffs, "", 1 );
return ffs_result == 0;
Expand Down
18 changes: 1 addition & 17 deletions FatFs/FatFs.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,16 @@
* Copyright (c) 2014 by Jean-Michel Gallego
*
* Use version R0.10c of FatFs updated at November 26, 2014
*
* This Library 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,
* 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 the Arduino SdSpiCard Library. If not, see
* <http://www.gnu.org/licenses/>.
*/

#ifndef FATFS_H
#define FATFS_H

#include <Arduino.h>
#include <FatFsCard.h>
#include <SdSpiCard.h>
#include "ff.h"
#include "diskio.h"

#define SPI_SCK_INIT_DIVISOR 400000

class FatFsClass
{
public:
Expand Down
Loading

0 comments on commit 00451b6

Please sign in to comment.