Skip to content

Commit 4272160

Browse files
committed
move flash_disk.c to mrbgems/picoruby-filesystem-fat
1 parent a008590 commit 4272160

File tree

6 files changed

+7
-115
lines changed

6 files changed

+7
-115
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ pico_sdk_init()
4242
file(GLOB SRCS src/*.c)
4343
add_executable(${PROJECT_NAME}
4444
${SRCS}
45+
${CMAKE_SOURCE_DIR}/lib/picoruby/mrbgems/picoruby-filesystem-fat/ports/rp2040/flash_disk.c
4546
${CMAKE_SOURCE_DIR}/lib/picoruby/mrbgems/picoruby-gpio/ports/rp2040/gpio.c
4647
${CMAKE_SOURCE_DIR}/lib/picoruby/mrbgems/picoruby-i2c/ports/rp2040/i2c.c
4748
${CMAKE_SOURCE_DIR}/lib/picoruby/mrbgems/picoruby-spi/ports/rp2040/spi.c
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
#ifndef FLASH_DISK_DEFINED_H_
2-
#define FLASH_DISK_DEFINED_H_
1+
#ifndef MSC_DISK_DEFINED_H_
2+
#define MSC_DISK_DEFINED_H_
33

44
#include <hardware/flash.h>
5-
#include <ff.h>
6-
#include <diskio.h>
75

86
#ifdef __cplusplus
97
extern "C" {
@@ -20,15 +18,9 @@ extern "C" {
2018
#define SECTOR_SIZE 4096 /* == FLASH_SECTOR_SIZE */
2119
#define SECTOR_COUNT 192 /* Seems FatFS allows 192 as the minimum */
2220

23-
int FLASH_disk_initialize(void);
24-
int FLASH_disk_status(void);
25-
int FLASH_disk_read(BYTE *buff, LBA_t sector, UINT count);
26-
int FLASH_disk_write(const BYTE *buff, LBA_t sector, UINT count);
27-
DRESULT FLASH_disk_ioctl(BYTE cmd, void *buff);
28-
2921
#ifdef __cplusplus
3022
}
3123
#endif
3224

33-
#endif /* FLASH_DISK_DEFINED_H_ */
25+
#endif /* MSC_DISK_DEFINED_H_ */
3426

src/flash_disk.c

Lines changed: 0 additions & 101 deletions
This file was deleted.

src/msc_disk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "tusb.h"
3131

3232
#include "../include/keyboard.h"
33-
#include "../include/flash_disk.h"
33+
#include "../include/msc_disk.h"
3434
#include <mrubyc.h>
3535

3636
// whether host does safe-eject

src/usb_descriptors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ c_merge_mouse_report(mrbc_vm *vm, mrbc_value *v, int argc)
527527
// String Descriptors
528528
// Note: Tentative and dirty implementation until getting rid of VIA
529529
//--------------------------------------------------------------------+
530-
#include "../include/flash_disk.h"
530+
#include "../include/msc_disk.h"
531531
static void
532532
c_save_prk_conf(mrbc_vm *vm, mrbc_value *v, int argc)
533533
{

0 commit comments

Comments
 (0)