Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BSP_B-L475E-IOT01
Diff: main.cpp
- Revision:
- 26:130bb1173866
- Parent:
- 25:65a9183a2178
- Child:
- 27:bab23d82832b
--- a/main.cpp Wed Sep 26 15:01:07 2018 +0100
+++ b/main.cpp Fri Nov 23 09:15:36 2018 +0000
@@ -1,18 +1,4 @@
-/* mbed Microcontroller Library
- * Copyright (c) 2006-2013 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+
#include "mbed.h"
#include <stdio.h>
#include <errno.h>
@@ -36,18 +22,19 @@
#include "LittleFileSystem.h"
#include "FATFileSystem.h"
-
// Physical block device, can be any device that supports the BlockDevice API
-SPIFBlockDevice bd(
+/*SPIFBlockDevice bd(
MBED_CONF_SPIF_DRIVER_SPI_MOSI,
MBED_CONF_SPIF_DRIVER_SPI_MISO,
MBED_CONF_SPIF_DRIVER_SPI_CLK,
- MBED_CONF_SPIF_DRIVER_SPI_CS);
+ MBED_CONF_SPIF_DRIVER_SPI_CS);*/
+
+#define BLOCK_SIZE 512
+HeapBlockDevice bd(2048, BLOCK_SIZE);
// File system declaration
LittleFileSystem fs("fs");
-
// Set up the button to trigger an erase
InterruptIn irq(BUTTON1);
void erase() {