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
meshx_platform.h File Reference

Platform abstraction layer for MeshX. More...

Include dependency graph for meshx_platform.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

meshx_err_t meshx_platform_init (void)
 Initializes the MeshX platform.
 
 __attribute__ ((noreturn)) void meshx_platform_reset(void)
 Resets the MeshX platform. This function performs a system reset, restarting the platform.
 

Detailed Description

Platform abstraction layer for MeshX.

This header provides initialization functions for the MeshX platform and its Bluetooth subsystem.

Definition in file meshx_platform.h.

Function Documentation

◆ __attribute__()

__attribute__ ( (noreturn) )

Resets the MeshX platform. This function performs a system reset, restarting the platform.

◆ meshx_platform_init()

meshx_err_t meshx_platform_init ( void )

Initializes the MeshX platform.

This function sets up the necessary hardware and software components required for the MeshX platform to function correctly.

Returns
meshx_err_t Returns MESHX_OK on success, or an appropriate error code.

Initializes the MeshX platform.

This function sets up the necessary components and configurations required for the MeshX platform to operate on the ESP32. It ensures that the platform is ready for use by other components of the MeshX system.

Returns
  • MESHX_OK on successful initialization.
  • Appropriate error code of type meshx_err_t on failure.

Definition at line 31 of file esp_platform.c.

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}
@ MESHX_SUCCESS
Definition meshx_err.h:40
@ MESHX_ERR_PLAT
Definition meshx_err.h:43
Here is the caller graph for this function: