mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-19 17:35:54 +08:00
添加智能灯固件代码
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# The following lines of boilerplate have to be in your project's CMakeLists
|
||||
# in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(sd_card)
|
||||
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# This is a project Makefile. It is assumed the directory this Makefile resides in is a
|
||||
# project subdirectory.
|
||||
#
|
||||
|
||||
PROJECT_NAME := sd_card
|
||||
|
||||
include $(IDF_PATH)/make/project.mk
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
# SD Card example
|
||||
|
||||
(See the README.md file in the upper level 'examples' directory for more information about examples.)
|
||||
|
||||
This example demonstrates how to use an SD card with ESP32 or ESP32-S2. Example does the following steps:
|
||||
|
||||
1. Use an "all-in-one" `esp_vfs_fat_sdmmc_mount` function to:
|
||||
- initialize SDMMC peripheral,
|
||||
- probe and initialize the card connected to SD/MMC slot 1 (HS2_CMD, HS2_CLK, HS2_D0, HS2_D1, HS2_D2, HS2_D3 lines),
|
||||
- mount FAT filesystem using FATFS library (and format card, if the filesystem can not be mounted),
|
||||
- register FAT filesystem in VFS, enabling C standard library and POSIX functions to be used.
|
||||
2. Print information about the card, such as name, type, capacity, and maximum supported frequency.
|
||||
3. Create a file using `fopen` and write to it using `fprintf`.
|
||||
4. Rename the file. Before renaming, check if destination file already exists using `stat` function, and remove it using `unlink` function.
|
||||
5. Open renamed file for reading, read back the line, and print it to the terminal.
|
||||
|
||||
This example support SD (SDSC, SDHC, SDXC) cards and eMMC chips.
|
||||
|
||||
## Hardware
|
||||
|
||||
### Connections for ESP32
|
||||
|
||||
This example runs on ESP-WROVER-KIT boards without any extra modifications required, only the SD card needs to be inserted into the slot.
|
||||
|
||||
Other ESP32 development boards need to be connected to SD card as follows:
|
||||
|
||||
ESP32 pin | SD card pin | SPI pin | Notes
|
||||
--------------|-------------|---------|------------
|
||||
GPIO14 (MTMS) | CLK | SCK | 10k pullup in SD mode
|
||||
GPIO15 (MTDO) | CMD | MOSI | 10k pullup, both in SD and SPI modes
|
||||
GPIO2 | D0 | MISO | 10k pullup in SD mode, pull low to go into download mode (see Note about GPIO2 below!)
|
||||
GPIO4 | D1 | N/C | not used in 1-line SD mode; 10k pullup in 4-line SD mode
|
||||
GPIO12 (MTDI) | D2 | N/C | not used in 1-line SD mode; 10k pullup in 4-line SD mode (see Note about GPIO12 below!)
|
||||
GPIO13 (MTCK) | D3 | CS | not used in 1-line SD mode, but card's D3 pin must have a 10k pullup
|
||||
N/C | CD | | optional, not used in the example
|
||||
N/C | WP | | optional, not used in the example
|
||||
|
||||
This example doesn't utilize card detect (CD) and write protect (WP) signals from SD card slot.
|
||||
|
||||
With the given pinout for SPI mode, same connections between the SD card and ESP32 can be used to test both SD and SPI modes, provided that the appropriate pullups are in place.
|
||||
See [the document about pullup requirements](https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/sd_pullup_requirements.html) for more details about pullup support and compatibility of modules and development boards.
|
||||
|
||||
In SPI mode, pins can be customized. See the initialization of ``spi_bus_config_t`` and ``sdspi_slot_config_t`` structures in the example code.
|
||||
|
||||
### Connections for ESP32-S2
|
||||
|
||||
Note that ESP32-S2 doesn't include SD Host peripheral and only supports SD over SPI. Therefore only SCK, MOSI, MISO, CS and ground pins need to be connected.
|
||||
|
||||
ESP32-S2 pin | SD card pin | SPI pin | Notes
|
||||
--------------|-------------|---------|------------
|
||||
GPIO14 | CLK | SCK | 10k pullup
|
||||
GPIO15 | CMD | MOSI | 10k pullup
|
||||
GPIO2 | D0 | MISO | 10k pullup
|
||||
GPIO13 | D3 | CS | 10k pullup
|
||||
N/C | CD | | optional, not used in the example
|
||||
N/C | WP | | optional, not used in the example
|
||||
|
||||
In SPI mode, pins can be customized. See the initialization of ``spi_bus_config_t`` and ``sdspi_slot_config_t`` structures in the example code.
|
||||
|
||||
### Note about GPIO2 (ESP32 only)
|
||||
|
||||
GPIO2 pin is used as a bootstrapping pin, and should be low to enter UART download mode. One way to do this is to connect GPIO0 and GPIO2 using a jumper, and then the auto-reset circuit on most development boards will pull GPIO2 low along with GPIO0, when entering download mode.
|
||||
|
||||
- Some boards have pulldown and/or LED on GPIO2. LED is usually ok, but pulldown will interfere with D0 signals and must be removed. Check the schematic of your development board for anything connected to GPIO2.
|
||||
|
||||
### Note about GPIO12 (ESP32 only)
|
||||
|
||||
GPIO12 is used as a bootstrapping pin to select output voltage of an internal regulator which powers the flash chip (VDD_SDIO). This pin has an internal pulldown so if left unconnected it will read low at reset (selecting default 3.3V operation). When adding a pullup to this pin for SD card operation, consider the following:
|
||||
|
||||
- For boards which don't use the internal regulator (VDD_SDIO) to power the flash, GPIO12 can be pulled high.
|
||||
- For boards which use 1.8V flash chip, GPIO12 needs to be pulled high at reset. This is fully compatible with SD card operation.
|
||||
- On boards which use the internal regulator and a 3.3V flash chip, GPIO12 must be low at reset. This is incompatible with SD card operation.
|
||||
* In most cases, external pullup can be omitted and an internal pullup can be enabled using a `gpio_pullup_en(GPIO_NUM_12);` call. Most SD cards work fine when an internal pullup on GPIO12 line is enabled. Note that if ESP32 experiences a power-on reset while the SD card is sending data, high level on GPIO12 can be latched into the bootstrapping register, and ESP32 will enter a boot loop until external reset with correct GPIO12 level is applied.
|
||||
* Another option is to burn the flash voltage selection efuses. This will permanently select 3.3V output voltage for the internal regulator, and GPIO12 will not be used as a bootstrapping pin. Then it is safe to connect a pullup resistor to GPIO12. This option is suggested for production use.
|
||||
|
||||
The following command can be used to program flash voltage selection efuses **to 3.3V**:
|
||||
|
||||
```sh
|
||||
components/esptool_py/esptool/espefuse.py set_flash_voltage 3.3V
|
||||
```
|
||||
|
||||
This command will burn the `XPD_SDIO_TIEH`, `XPD_SDIO_FORCE`, and `XPD_SDIO_REG` efuses. With all three burned to value 1, the internal VDD_SDIO flash voltage regulator is permanently enabled at 3.3V. See the technical reference manual for more details.
|
||||
|
||||
`espefuse.py` has a `--do-not-confirm` option if running from an automated flashing script.
|
||||
|
||||
## How to use example
|
||||
|
||||
SD card can be used in various modes. See below on choosing the mode to be used.
|
||||
|
||||
### 4-line and 1-line SD modes
|
||||
|
||||
By default, example code uses the following initializer for SDMMC slot configuration:
|
||||
|
||||
```c++
|
||||
sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
|
||||
```
|
||||
|
||||
Among other things, this sets `slot_config.width = 0`, which means that SD/MMC driver will use the maximum bus width supported by the slot. For slot 1, it will switch to 4-line mode when initializing the card (initial communication always happens in 1-line mode). If some of the card's D1, D2, D3 pins are not connected to the ESP32, set `slot_config.width = 1` — then the SD/MMC driver will not attempt to switch to 4-line mode.
|
||||
|
||||
Note that even if card's D3 line is not connected to the ESP32, it still has to be pulled up, otherwise the card will go into SPI protocol mode.
|
||||
|
||||
### SPI mode
|
||||
|
||||
By default, the example uses SDMMC Host peripheral to access the card using SD protocol. To use SPI peripheral instead (and SPI protocol), uncomment ``#define USE_SPI_MODE`` line in the example code.
|
||||
|
||||
### Build and flash
|
||||
|
||||
Build the project and flash it to the board, then run monitor tool to view serial output:
|
||||
|
||||
```
|
||||
idf.py -p PORT flash monitor
|
||||
```
|
||||
|
||||
(Replace PORT with serial port name.)
|
||||
|
||||
(To exit the serial monitor, type ``Ctrl-]``.)
|
||||
|
||||
See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
|
||||
|
||||
|
||||
## Example output
|
||||
|
||||
Here is an example console output. In this case a 128MB SDSC card was connected, and `EXAMPLE_FORMAT_IF_MOUNT_FAILED` menuconfig option enabled. Card was unformatted, so the initial mount has failed. Card was then partitioned, formatted, and mounted again.
|
||||
|
||||
```
|
||||
I (336) example: Initializing SD card
|
||||
I (336) example: Using SDMMC peripheral
|
||||
I (336) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
|
||||
W (596) vfs_fat_sdmmc: failed to mount card (13)
|
||||
W (596) vfs_fat_sdmmc: partitioning card
|
||||
W (596) vfs_fat_sdmmc: formatting card, allocation unit size=16384
|
||||
W (7386) vfs_fat_sdmmc: mounting again
|
||||
Name: XA0E5
|
||||
Type: SDHC/SDXC
|
||||
Speed: 20 MHz
|
||||
Size: 61068MB
|
||||
I (7386) example: Opening file
|
||||
I (7396) example: File written
|
||||
I (7396) example: Renaming file
|
||||
I (7396) example: Reading file
|
||||
I (7396) example: Read from file: 'Hello XA0E5!'
|
||||
I (7396) example: Card unmounted
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Failure to upload the example
|
||||
|
||||
```
|
||||
Connecting........_____....._____....._____....._____....._____....._____....._____
|
||||
|
||||
A fatal error occurred: Failed to connect to Espressif device: Invalid head of packet (0x34)
|
||||
```
|
||||
|
||||
Disconnect the SD card D0/MISO line from GPIO2 and try uploading again. Read "Note about GPIO2" above.
|
||||
|
||||
### Card fails to initialize with `sdmmc_init_sd_scr: send_scr (1) returned 0x107` error
|
||||
|
||||
Check connections between the card and the ESP32. For example, if you have disconnected GPIO2 to work around the flashing issue, connect it back and reset the ESP32 (using a button on the development board, or by pressing Ctrl-T Ctrl-R in IDF Monitor).
|
||||
|
||||
### Card fails to initialize with `sdmmc_check_scr: send_scr returned 0xffffffff` error
|
||||
|
||||
Connections between the card and the ESP32 are too long for the frequency used. Try using shorter connections, or try reducing the clock speed of SD interface.
|
||||
|
||||
### Failure to mount filesystem
|
||||
|
||||
```
|
||||
example: Failed to mount filesystem. If you want the card to be formatted, set the EXAMPLE_FORMAT_IF_MOUNT_FAILED menuconfig option.
|
||||
```
|
||||
The example will be able to mount only cards formatted using FAT32 filesystem. If the card is formatted as exFAT or some other filesystem, you have an option to format it in the example code. Enable the `EXAMPLE_FORMAT_IF_MOUNT_FAILED` menuconfig option, then build and flash the example.
|
||||
@@ -0,0 +1,2 @@
|
||||
idf_component_register(SRCS "sd_card_example_main.c"
|
||||
INCLUDE_DIRS ".")
|
||||
@@ -0,0 +1,9 @@
|
||||
menu "SD Card Example menu"
|
||||
|
||||
config EXAMPLE_FORMAT_IF_MOUNT_FAILED
|
||||
bool "Format the card if mount failed"
|
||||
default n
|
||||
help
|
||||
If this config item is set, format_if_mount_failed will be set to true and the card will be formatted if
|
||||
the mount has failed.
|
||||
endmenu
|
||||
@@ -0,0 +1,4 @@
|
||||
#
|
||||
# "main" pseudo-component makefile.
|
||||
#
|
||||
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
|
||||
@@ -0,0 +1,198 @@
|
||||
/* SD card and FAT filesystem example.
|
||||
This example code is in the Public Domain (or CC0 licensed, at your option.)
|
||||
|
||||
Unless required by applicable law or agreed to in writing, this
|
||||
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include "esp_err.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_vfs_fat.h"
|
||||
#include "driver/sdspi_host.h"
|
||||
#include "driver/spi_common.h"
|
||||
#include "sdmmc_cmd.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||
#include "driver/sdmmc_host.h"
|
||||
#endif
|
||||
|
||||
static const char *TAG = "example";
|
||||
|
||||
#define MOUNT_POINT "/sdcard"
|
||||
|
||||
// This example can use SDMMC and SPI peripherals to communicate with SD card.
|
||||
// By default, SDMMC peripheral is used.
|
||||
// To enable SPI mode, uncomment the following line:
|
||||
|
||||
// #define USE_SPI_MODE
|
||||
|
||||
// ESP32-S2 doesn't have an SD Host peripheral, always use SPI:
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32S2
|
||||
#ifndef USE_SPI_MODE
|
||||
#define USE_SPI_MODE
|
||||
#endif // USE_SPI_MODE
|
||||
// on ESP32-S2, DMA channel must be the same as host id
|
||||
#define SPI_DMA_CHAN host.slot
|
||||
#endif //CONFIG_IDF_TARGET_ESP32S2
|
||||
|
||||
// DMA channel to be used by the SPI peripheral
|
||||
#ifndef SPI_DMA_CHAN
|
||||
#define SPI_DMA_CHAN 1
|
||||
#endif //SPI_DMA_CHAN
|
||||
|
||||
// When testing SD and SPI modes, keep in mind that once the card has been
|
||||
// initialized in SPI mode, it can not be reinitialized in SD mode without
|
||||
// toggling power to the card.
|
||||
|
||||
#ifdef USE_SPI_MODE
|
||||
// Pin mapping when using SPI mode.
|
||||
// With this mapping, SD card can be used both in SPI and 1-line SD mode.
|
||||
// Note that a pull-up on CS line is required in SD mode.
|
||||
#define PIN_NUM_MISO 2
|
||||
#define PIN_NUM_MOSI 15
|
||||
#define PIN_NUM_CLK 14
|
||||
#define PIN_NUM_CS 13
|
||||
#endif //USE_SPI_MODE
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
esp_err_t ret;
|
||||
// Options for mounting the filesystem.
|
||||
// If format_if_mount_failed is set to true, SD card will be partitioned and
|
||||
// formatted in case when mounting fails.
|
||||
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
|
||||
#ifdef CONFIG_EXAMPLE_FORMAT_IF_MOUNT_FAILED
|
||||
.format_if_mount_failed = true,
|
||||
#else
|
||||
.format_if_mount_failed = false,
|
||||
#endif // EXAMPLE_FORMAT_IF_MOUNT_FAILED
|
||||
.max_files = 5,
|
||||
.allocation_unit_size = 16 * 1024
|
||||
};
|
||||
sdmmc_card_t* card;
|
||||
const char mount_point[] = MOUNT_POINT;
|
||||
ESP_LOGI(TAG, "Initializing SD card");
|
||||
|
||||
// Use settings defined above to initialize SD card and mount FAT filesystem.
|
||||
// Note: esp_vfs_fat_sdmmc/sdspi_mount is all-in-one convenience functions.
|
||||
// Please check its source code and implement error recovery when developing
|
||||
// production applications.
|
||||
#ifndef USE_SPI_MODE
|
||||
ESP_LOGI(TAG, "Using SDMMC peripheral");
|
||||
sdmmc_host_t host = SDMMC_HOST_DEFAULT();
|
||||
|
||||
// This initializes the slot without card detect (CD) and write protect (WP) signals.
|
||||
// Modify slot_config.gpio_cd and slot_config.gpio_wp if your board has these signals.
|
||||
sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
|
||||
|
||||
// To use 1-line SD mode, uncomment the following line:
|
||||
// slot_config.width = 1;
|
||||
|
||||
// GPIOs 15, 2, 4, 12, 13 should have external 10k pull-ups.
|
||||
// Internal pull-ups are not sufficient. However, enabling internal pull-ups
|
||||
// does make a difference some boards, so we do that here.
|
||||
gpio_set_pull_mode(15, GPIO_PULLUP_ONLY); // CMD, needed in 4- and 1- line modes
|
||||
gpio_set_pull_mode(2, GPIO_PULLUP_ONLY); // D0, needed in 4- and 1-line modes
|
||||
gpio_set_pull_mode(4, GPIO_PULLUP_ONLY); // D1, needed in 4-line mode only
|
||||
gpio_set_pull_mode(12, GPIO_PULLUP_ONLY); // D2, needed in 4-line mode only
|
||||
gpio_set_pull_mode(13, GPIO_PULLUP_ONLY); // D3, needed in 4- and 1-line modes
|
||||
|
||||
ret = esp_vfs_fat_sdmmc_mount(mount_point, &host, &slot_config, &mount_config, &card);
|
||||
#else
|
||||
ESP_LOGI(TAG, "Using SPI peripheral");
|
||||
|
||||
sdmmc_host_t host = SDSPI_HOST_DEFAULT();
|
||||
spi_bus_config_t bus_cfg = {
|
||||
.mosi_io_num = PIN_NUM_MOSI,
|
||||
.miso_io_num = PIN_NUM_MISO,
|
||||
.sclk_io_num = PIN_NUM_CLK,
|
||||
.quadwp_io_num = -1,
|
||||
.quadhd_io_num = -1,
|
||||
.max_transfer_sz = 4000,
|
||||
};
|
||||
ret = spi_bus_initialize(host.slot, &bus_cfg, SPI_DMA_CHAN);
|
||||
if (ret != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Failed to initialize bus.");
|
||||
return;
|
||||
}
|
||||
|
||||
// This initializes the slot without card detect (CD) and write protect (WP) signals.
|
||||
// Modify slot_config.gpio_cd and slot_config.gpio_wp if your board has these signals.
|
||||
sdspi_device_config_t slot_config = SDSPI_DEVICE_CONFIG_DEFAULT();
|
||||
slot_config.gpio_cs = PIN_NUM_CS;
|
||||
slot_config.host_id = host.slot;
|
||||
|
||||
ret = esp_vfs_fat_sdspi_mount(mount_point, &host, &slot_config, &mount_config, &card);
|
||||
#endif //USE_SPI_MODE
|
||||
|
||||
if (ret != ESP_OK) {
|
||||
if (ret == ESP_FAIL) {
|
||||
ESP_LOGE(TAG, "Failed to mount filesystem. "
|
||||
"If you want the card to be formatted, set the EXAMPLE_FORMAT_IF_MOUNT_FAILED menuconfig option.");
|
||||
} else {
|
||||
ESP_LOGE(TAG, "Failed to initialize the card (%s). "
|
||||
"Make sure SD card lines have pull-up resistors in place.", esp_err_to_name(ret));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Card has been initialized, print its properties
|
||||
sdmmc_card_print_info(stdout, card);
|
||||
|
||||
// Use POSIX and C standard library functions to work with files.
|
||||
// First create a file.
|
||||
ESP_LOGI(TAG, "Opening file");
|
||||
FILE* f = fopen(MOUNT_POINT"/hello.txt", "w");
|
||||
if (f == NULL) {
|
||||
ESP_LOGE(TAG, "Failed to open file for writing");
|
||||
return;
|
||||
}
|
||||
fprintf(f, "Hello %s!\n", card->cid.name);
|
||||
fclose(f);
|
||||
ESP_LOGI(TAG, "File written");
|
||||
|
||||
// Check if destination file exists before renaming
|
||||
struct stat st;
|
||||
if (stat(MOUNT_POINT"/foo.txt", &st) == 0) {
|
||||
// Delete it if it exists
|
||||
unlink(MOUNT_POINT"/foo.txt");
|
||||
}
|
||||
|
||||
// Rename original file
|
||||
ESP_LOGI(TAG, "Renaming file");
|
||||
if (rename(MOUNT_POINT"/hello.txt", MOUNT_POINT"/foo.txt") != 0) {
|
||||
ESP_LOGE(TAG, "Rename failed");
|
||||
return;
|
||||
}
|
||||
|
||||
// Open renamed file for reading
|
||||
ESP_LOGI(TAG, "Reading file");
|
||||
f = fopen(MOUNT_POINT"/foo.txt", "r");
|
||||
if (f == NULL) {
|
||||
ESP_LOGE(TAG, "Failed to open file for reading");
|
||||
return;
|
||||
}
|
||||
char line[64];
|
||||
fgets(line, sizeof(line), f);
|
||||
fclose(f);
|
||||
// strip newline
|
||||
char* pos = strchr(line, '\n');
|
||||
if (pos) {
|
||||
*pos = '\0';
|
||||
}
|
||||
ESP_LOGI(TAG, "Read from file: '%s'", line);
|
||||
|
||||
// All done, unmount partition and disable SDMMC or SPI peripheral
|
||||
esp_vfs_fat_sdcard_unmount(mount_point, card);
|
||||
ESP_LOGI(TAG, "Card unmounted");
|
||||
#ifdef USE_SPI_MODE
|
||||
//deinitialize the bus after all devices are removed
|
||||
spi_bus_free(host.slot);
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
from tiny_test_fw import Utility
|
||||
import ttfw_idf
|
||||
import re
|
||||
|
||||
|
||||
@ttfw_idf.idf_example_test(env_tag='UT_T1_SDMODE')
|
||||
def test_examples_sd_card(env, extra_data):
|
||||
|
||||
dut = env.get_dut('sd_card', 'examples/storage/sd_card')
|
||||
dut.start_app()
|
||||
dut.expect('example: Initializing SD card', timeout=20)
|
||||
peripheral = dut.expect(re.compile(r'example: Using (\w+) peripheral'), timeout=5)[0]
|
||||
Utility.console_log('peripheral {} detected'.format(peripheral))
|
||||
assert peripheral in ('SDMMC', 'SPI')
|
||||
|
||||
# These lines are matched separately because of ASCII color codes in the output
|
||||
name = dut.expect(re.compile(r'Name: (\w+)'), timeout=5)[0]
|
||||
_type = dut.expect(re.compile(r'Type: (\S+)'), timeout=5)[0]
|
||||
speed = dut.expect(re.compile(r'Speed: (\S+)'), timeout=5)[0]
|
||||
size = dut.expect(re.compile(r'Size: (\S+)'), timeout=5)[0]
|
||||
|
||||
Utility.console_log('Card {} {} {}MHz {} found'.format(name, _type, speed, size))
|
||||
|
||||
dut.expect_all('Opening file',
|
||||
'File written',
|
||||
'Renaming file',
|
||||
'Reading file',
|
||||
"Read from file: 'Hello {}!".format(name),
|
||||
'Card unmounted',
|
||||
timeout=5)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_examples_sd_card()
|
||||
@@ -0,0 +1 @@
|
||||
CONFIG_EXAMPLE_FORMAT_IF_MOUNT_FAILED=y
|
||||
Reference in New Issue
Block a user