no-OS
Classes | Functions
no_os_eeprom.h File Reference

Header file for EEPROM APIs. More...

#include <stdint.h>
Include dependency graph for no_os_eeprom.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  no_os_eeprom_init_param
 Structure holding the parameters for EEPROM initialization. More...
 
struct  no_os_eeprom_desc
 Structure holding the EEPROM descriptor. More...
 
struct  no_os_eeprom_platform_ops
 Structure holding the EEPROM function pointers that point to the platform specific function. More...
 

Functions

int32_t no_os_eeprom_init (struct no_os_eeprom_desc **desc, const struct no_os_eeprom_init_param *param)
 Initialize the EEPROM. More...
 
int32_t no_os_eeprom_write (struct no_os_eeprom_desc *desc, uint32_t address, uint8_t *data, uint16_t bytes)
 Write the EEPROM data. More...
 
int32_t no_os_eeprom_read (struct no_os_eeprom_desc *desc, uint32_t address, uint8_t *data, uint16_t bytes)
 Read the EEPROM data. More...
 
int32_t no_os_eeprom_remove (struct no_os_eeprom_desc *desc)
 Free the resources allocated by no_os_eeprom_init() More...
 

Detailed Description

Header file for EEPROM APIs.

Author
Mahesh Phalke (mahes.nosp@m.h.ph.nosp@m.alke@.nosp@m.anal.nosp@m.og.co.nosp@m.m)

Copyright 2022(c) Analog Devices, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Function Documentation

◆ no_os_eeprom_init()

int32_t no_os_eeprom_init ( struct no_os_eeprom_desc **  desc,
const struct no_os_eeprom_init_param param 
)

Initialize the EEPROM.

Parameters
desc- EEPROM descriptor
param- EEPROM init parameters
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ no_os_eeprom_read()

int32_t no_os_eeprom_read ( struct no_os_eeprom_desc desc,
uint32_t  address,
uint8_t *  data,
uint16_t  bytes 
)

Read the EEPROM data.

Parameters
desc- EEPROM descriptor
address- EEPROM address/location to read
data- EEPROM data (pointer)
bytes- Number of data bytes to read
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ no_os_eeprom_remove()

int32_t no_os_eeprom_remove ( struct no_os_eeprom_desc desc)

Free the resources allocated by no_os_eeprom_init()

Parameters
desc- EEPROM descriptor
Returns
0 in case of success, negative error code otherwise

◆ no_os_eeprom_write()

int32_t no_os_eeprom_write ( struct no_os_eeprom_desc desc,
uint32_t  address,
uint8_t *  data,
uint16_t  bytes 
)

Write the EEPROM data.

Parameters
desc- EEPROM descriptor
address- EEPROM address/location to write
data- EEPROM data (pointer)
bytes- Number of data bytes to write
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function: