[X9E] Massstorage OK?
This commit is contained in:
@@ -34,7 +34,6 @@
|
||||
|
||||
/// Number of SD Slots
|
||||
#define NUM_SD_SLOTS 1
|
||||
#define SD_BLOCK_SIZE 512
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/// Checks if the device is write protected.
|
||||
@@ -224,7 +223,7 @@ unsigned char MEDSdcard_Initialize(Media *media, unsigned char mciID)
|
||||
media->handler = 0;
|
||||
media->flush = 0;
|
||||
|
||||
media->blockSize = SD_BLOCK_SIZE;
|
||||
media->blockSize = BLOCK_SIZE;
|
||||
media->baseAddress = 0;
|
||||
|
||||
media->size = SD_GET_BLOCKNR();
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program 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.
|
||||
*/
|
||||
|
||||
// TODO merge this file with board_sky9x.h
|
||||
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -484,7 +484,9 @@
|
||||
///// MCI Card Detect pin.
|
||||
#define BOARD_SD_PIN_CD PIN_MCI_CD
|
||||
|
||||
#define SD_CARD_PRESENT() ( (PIOB->PIO_PDSR & PIO_PB7) == 0 )
|
||||
#define BLOCK_SIZE 512
|
||||
#define MSD_BUFFER_SIZE (12*BLOCK_SIZE) // Size of the MSD IO buffer in bytes (6K, more the better)
|
||||
#define SD_CARD_PRESENT() ( (PIOB->PIO_PDSR & PIO_PB7) == 0 )
|
||||
|
||||
// States for initialising card
|
||||
#define SD_ST_ERR -1
|
||||
@@ -634,4 +636,4 @@ struct t_serial_tx
|
||||
volatile uint16_t ready ;
|
||||
};
|
||||
|
||||
#endif // _BOARD_H_
|
||||
#endif // _BOARD_H_
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program 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.
|
||||
*/
|
||||
|
||||
#include "../opentx.h"
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program 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.
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
#ifndef SIMU
|
||||
|
||||
@@ -27,12 +27,6 @@ extern "C" {
|
||||
extern unsigned char MEDSdcard_Initialize(Media *media, unsigned char mciID);
|
||||
}
|
||||
|
||||
/** Size of one block in bytes. */
|
||||
#define BLOCK_SIZE 512
|
||||
|
||||
/** Size of the MSD IO buffer in bytes (6K, more the better). */
|
||||
#define MSD_BUFFER_SIZE (12*BLOCK_SIZE)
|
||||
|
||||
/** LUN read/write buffer. */
|
||||
unsigned char msdBuffer[MSD_BUFFER_SIZE];
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
|
||||
#include "../../../usb/device/massstorage/MSDLun.h"
|
||||
|
||||
#include "board_lowlevel.h"
|
||||
#include "../../../usb/device/core/USBD.h"
|
||||
#include "debug.h"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/// Default LUN block size in bytes
|
||||
#define DEFAULT_LUN_BLOCK_SIZE 512
|
||||
#define DEFAULT_LUN_BLOCK_SIZE BLOCK_SIZE
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Internal variables
|
||||
|
||||
Reference in New Issue
Block a user