SmartSnippets DA1459x SDK
Data Structures | Typedefs | Functions
ad_nvms.h File Reference

NVMS adapter API. More...

#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include "ad_flash.h"
#include "partition_def.h"
#include "sdk_defs.h"

Go to the source code of this file.

Data Structures

struct  driver_t
 Partition driver functions. More...
 
struct  partition_t
 Partition structure for RAM. More...
 

Typedefs

typedef struct driver_t partition_driver_t
 Partition driver functions.
 
typedef struct partition_t partition_t
 Partition structure for RAM.
 

Functions

void ad_nvms_init (void)
 Initialize NVMS adapter.
 
nvms_t ad_nvms_open (nvms_partition_id_t id)
 Open partition to read/write access. More...
 
size_t ad_nvms_get_size (nvms_t handle)
 Get partition size. More...
 
int ad_nvms_read (nvms_t handle, uint32_t addr, uint8_t *buf, uint32_t len)
 Read partition data. More...
 
int ad_nvms_write (nvms_t handle, uint32_t addr, const uint8_t *buf, uint32_t size)
 Writes data to partition. More...
 
bool ad_nvms_erase_region (nvms_t handle, uint32_t addr, size_t size)
 Erase partition region. More...
 
size_t ad_nvms_get_pointer (nvms_t handle, uint32_t addr, size_t size, const void **ptr)
 Get direct read buffer pointer. More...
 
size_t ad_nvms_erase_size (nvms_t handle)
 Get partition erase size. More...
 
size_t ad_nvms_get_partition_count (void)
 Get partition count. More...
 
bool ad_nvms_get_partition_info (size_t index, partition_entry_t *info)
 Get partition info. More...
 
bool ad_nvms_no_cache_flushing (nvms_t handle, uint32_t base, uint32_t size)
 Control cache flushing on modifications (writes or erases) to a partition. More...
 
__STATIC_INLINE void ad_nvms_mandatory_cache_flushing (void)
 
void ad_nvms_flush (nvms_t handle, bool free_mem)
 Flush all data buffered in RAM to partition. More...
 

Detailed Description

NVMS adapter API.

Copyright (C) 2015-2020 Renesas Electronics Corporation and/or its affiliates. All rights reserved. Confidential Information.

This software ("Software") is supplied by Renesas Electronics Corporation and/or its affiliates ("Renesas"). Renesas grants you a personal, non-exclusive, non-transferable, revocable, non-sub-licensable right and license to use the Software, solely if used in or together with Renesas products. You may make copies of this Software, provided this copyright notice and disclaimer ("Notice") is included in all such copies. Renesas reserves the right to change or discontinue the Software at any time without notice.

THE SOFTWARE IS PROVIDED "AS IS". RENESAS DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. TO THE MAXIMUM EXTENT PERMITTED UNDER LAW, IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE, EVEN IF RENESAS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. USE OF THIS SOFTWARE MAY BE SUBJECT TO TERMS AND CONDITIONS CONTAINED IN AN ADDITIONAL AGREEMENT BETWEEN YOU AND RENESAS. IN CASE OF CONFLICT BETWEEN THE TERMS OF THIS NOTICE AND ANY SUCH ADDITIONAL LICENSE AGREEMENT, THE TERMS OF THE AGREEMENT SHALL TAKE PRECEDENCE. BY CONTINUING TO USE THIS SOFTWARE, YOU AGREE TO THE TERMS OF THIS NOTICE.IF YOU DO NOT AGREE TO THESE TERMS, YOU ARE NOT PERMITTED TO USE THIS SOFTWARE.