MeshX 0.3
This repository provides an implementation for Bluetooth Low Energy (BLE) Mesh network nodes. The project allows you to create BLE mesh nodes that can communicate with each other, enabling the development of smart home solutions or other IoT-based applications.
Loading...
Searching...
No Matches
esp_platform.c
Go to the documentation of this file.
1
12
13#include "esp_err.h"
14#include "esp_log.h"
15#include "nvs_flash.h"
18
32{
33 esp_err_t err = ESP_OK;
34 /* Initialize NVS flash */
35 err = nvs_flash_init();
36 if (err == ESP_ERR_NVS_NO_FREE_PAGES)
37 {
38 ESP_ERROR_CHECK(nvs_flash_erase());
39 err = nvs_flash_init();
40 }
41 if(err)
42 return MESHX_ERR_PLAT;
43
44 /* Set log level for BLE Mesh */
45 esp_log_level_set("BLE_MESH", ESP_LOG_ERROR);
46
47 return MESHX_SUCCESS;
48}
49
55{
56 esp_restart();
57}
void meshx_platform_reset(void)
Resets the MeshX platform. This function performs a system reset, restarting the platform.
meshx_err_t meshx_platform_init(void)
Initializes the MeshX platform for the ESP32.
This header file defines the provisioning server interface for the MeshX BLE Mesh stack....
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:39
@ MESHX_SUCCESS
Definition meshx_err.h:40
@ MESHX_ERR_PLAT
Definition meshx_err.h:43
Platform abstraction layer for MeshX.