Skip to content

Commit

Permalink
[hal] filesystem_impl.h
Browse files Browse the repository at this point in the history
  • Loading branch information
avtolstoy committed Jul 11, 2023
1 parent 1bf68f0 commit 998da42
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
30 changes: 30 additions & 0 deletions hal/src/nRF52840/littlefs/filesystem_impl.h
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2023 Particle Industries, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#include "platform_config.h"

/* FIXME */
#define FILESYSTEM_PROG_SIZE (256)
#define FILESYSTEM_READ_SIZE (256)

#define FILESYSTEM_BLOCK_SIZE (sFLASH_PAGESIZE)
/* XXX: Using half of the external flash for now */
#define FILESYSTEM_BLOCK_COUNT (sFLASH_PAGECOUNT / 2)
#define FILESYSTEM_FIRST_BLOCK (0)
#define FILESYSTEM_LOOKAHEAD (128)
28 changes: 28 additions & 0 deletions hal/src/rtl872x/littlefs/filesystem_impl.h
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2023 Particle Industries, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#include "platform_config.h"

#define FILESYSTEM_PROG_SIZE (256)
#define FILESYSTEM_READ_SIZE (256)

#define FILESYSTEM_BLOCK_SIZE (sFLASH_PAGESIZE)
#define FILESYSTEM_BLOCK_COUNT (sFLASH_FILESYSTEM_PAGE_COUNT)
#define FILESYSTEM_FIRST_BLOCK (sFLASH_FILESYSTEM_FIRST_PAGE)
#define FILESYSTEM_LOOKAHEAD (128)

0 comments on commit 998da42

Please sign in to comment.