D_XNv Driver Interface.
Copyright (c) 2018 Microchip Technology Inc. and its subsidiaries.
#include "N_Types.h"
Macros | |
#define | D_XNV_SECTOR_SIZE (65536uL) |
Typedefs | |
typedef uint16_t | D_XNv_Size_t |
Functions | |
void | D_XNv_EraseSector (uint8_t sector) |
Erases a sector of the external NV. More... | |
bool | D_XNv_IsEmpty (uint8_t sector, uint16_t offset, D_XNv_Size_t numberOfBytes) |
Checks if the requested range is empty (containing all 0xFF). More... | |
bool | D_XNv_IsEqual (uint8_t sector, uint16_t offset, uint8_t *pBuffer, D_XNv_Size_t numberOfBytes) |
Compare bytes with contents of the external NV. More... | |
void | D_XNv_Read (uint8_t sector, uint16_t offset, uint8_t *pBuffer, D_XNv_Size_t numberOfBytes) |
Read bytes from the external NV. More... | |
void | D_XNv_Write (uint8_t sector, uint16_t offset, const uint8_t *pBuffer, D_XNv_Size_t numberOfBytes) |
Write bytes to the external NV. More... | |
#define D_XNV_SECTOR_SIZE (65536uL) |
typedef uint16_t D_XNv_Size_t |
void D_XNv_EraseSector | ( | uint8_t | sector | ) |
Erases a sector of the external NV.
bool D_XNv_IsEmpty | ( | uint8_t | sector, |
uint16_t | offset, | ||
D_XNv_Size_t | numberOfBytes | ||
) |
Checks if the requested range is empty (containing all 0xFF).
sector | The sector to use (0..7) |
offset | The start offset to check |
numberOfBytes | The number of bytes to check |
bool D_XNv_IsEqual | ( | uint8_t | sector, |
uint16_t | offset, | ||
uint8_t * | pBuffer, | ||
D_XNv_Size_t | numberOfBytes | ||
) |
Compare bytes with contents of the external NV.
sector | The sector to use (0..7) | |
offset | The offset to start comparing with | |
[in] | pBuffer | The start address of the buffer that contains the data to compare with |
numberOfBytes | The number of bytes to compare |
void D_XNv_Read | ( | uint8_t | sector, |
uint16_t | offset, | ||
uint8_t * | pBuffer, | ||
D_XNv_Size_t | numberOfBytes | ||
) |
Read bytes from the external NV.
sector | The sector to use (0..7) | |
offset | The offset to start reading at | |
[out] | pBuffer | The start address of the buffer to store the read data to |
numberOfBytes | The number of bytes to read |
void D_XNv_Write | ( | uint8_t | sector, |
uint16_t | offset, | ||
const uint8_t * | pBuffer, | ||
D_XNv_Size_t | numberOfBytes | ||
) |
Write bytes to the external NV.
sector | The sector to use (0..7) | |
offset | The offset to start writing to | |
[in] | pBuffer | The start address of the buffer that contains the data to write |
numberOfBytes | The number of bytes to write |