MeshX 0.4
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_fal_interface.h File Reference

Flash Abstraction Layer (FAL) Interface for MeshX. More...

#include "meshx_err.h"
#include <stdint.h>
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  meshx_fal_partition_t

Functions

meshx_err_t meshx_fal_read (const meshx_fal_partition_t *part, uint32_t offset, void *buf, size_t len)
 Read data from a flash partition.
meshx_err_t meshx_fal_write (const meshx_fal_partition_t *part, uint32_t offset, const void *buf, size_t len)
 Write data to a flash partition.
meshx_err_t meshx_fal_erase (const meshx_fal_partition_t *part, uint32_t offset, size_t len)
 Erase a range of a flash partition.
meshx_err_t meshx_fal_find_partition (const char *name, meshx_fal_partition_t *part)
 Find a flash partition by name.

Detailed Description

Flash Abstraction Layer (FAL) Interface for MeshX.

Copyright © 2024 - 2025 MeshX

This header defines the interface for interacting with raw flash partitions.

Author
Pranjal Chanda

Function Documentation

◆ meshx_fal_erase()

meshx_err_t meshx_fal_erase ( const meshx_fal_partition_t * part,
uint32_t offset,
size_t len )

Erase a range of a flash partition.

Parameters
[in]partPointer to the partition structure.
[in]offsetOffset from the start of the partition (must be sector aligned).
[in]lenNumber of bytes to erase (must be sector aligned).
Returns
meshx_err_t MESHX_SUCCESS on success, or error code.

◆ meshx_fal_find_partition()

meshx_err_t meshx_fal_find_partition ( const char * name,
meshx_fal_partition_t * part )

Find a flash partition by name.

Parameters
[in]nameName of the partition to find.
[out]partPointer to the partition structure to populate.
Returns
meshx_err_t MESHX_SUCCESS on success, or error code.

◆ meshx_fal_read()

meshx_err_t meshx_fal_read ( const meshx_fal_partition_t * part,
uint32_t offset,
void * buf,
size_t len )

Read data from a flash partition.

Parameters
[in]partPointer to the partition structure.
[in]offsetOffset from the start of the partition.
[out]bufPointer to the buffer to store read data.
[in]lenNumber of bytes to read.
Returns
meshx_err_t MESHX_SUCCESS on success, or error code.

◆ meshx_fal_write()

meshx_err_t meshx_fal_write ( const meshx_fal_partition_t * part,
uint32_t offset,
const void * buf,
size_t len )

Write data to a flash partition.

Parameters
[in]partPointer to the partition structure.
[in]offsetOffset from the start of the partition.
[in]bufPointer to the buffer containing data to write.
[in]lenNumber of bytes to write.
Returns
meshx_err_t MESHX_SUCCESS on success, or error code.