Implementation of the EEPROM APIs.
More...
#include <inttypes.h>
#include <stdlib.h>
#include "no_os_eeprom.h"
#include "no_os_error.h"
Implementation of the 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.
SPDX-License-Identifier: BSD-3-Clause
◆ no_os_eeprom_init()
Initialize the EEPROM.
- Parameters
-
| desc | - EEPROM descriptor |
| param | - EEPROM init parameters |
- Returns
- 0 in case of success, negative error code otherwise
◆ 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
◆ no_os_eeprom_remove()
Free the resources allocated by no_os_eeprom_init()
- Parameters
-
- 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