24AA32A/24LC32A EEPROM Interfaces
More...
#include <stdbool.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include "24xx32a.h"
#include "no_os_eeprom.h"
#include "no_os_i2c.h"
#include "no_os_error.h"
#include "no_os_delay.h"
#include "no_os_util.h"
#include "no_os_alloc.h"
24AA32A/24LC32A EEPROM Interfaces
- 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
◆ eeprom_24xx32a_init()
Initialize the 24XX32A EEPROM.
- Parameters
-
| desc | - EEPROM descriptor |
| param | - EEPROM init parameters |
- Returns
- 0 in case of success, negative error code otherwise
◆ eeprom_24xx32a_read()
| int32_t eeprom_24xx32a_read |
( |
struct no_os_eeprom_desc * | desc, |
|
|
uint32_t | address, |
|
|
uint8_t * | data, |
|
|
uint16_t | bytes ) |
Read the 24XX32A 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
◆ eeprom_24xx32a_remove()
Free the resources allocated by eeprom_24xx32a_init()
- Parameters
-
- Returns
- 0 in case of success, negative error code otherwise
◆ eeprom_24xx32a_write()
| int32_t eeprom_24xx32a_write |
( |
struct no_os_eeprom_desc * | desc, |
|
|
uint32_t | address, |
|
|
uint8_t * | data, |
|
|
uint16_t | bytes ) |
Write the 24XX32A 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
◆ eeprom_24xx32a_ops
Initial value:= {
}
int32_t eeprom_24xx32a_init(struct no_os_eeprom_desc **desc, const struct no_os_eeprom_init_param *param)
Initialize the 24XX32A EEPROM.
Definition 24xx32a.c:30
int32_t eeprom_24xx32a_write(struct no_os_eeprom_desc *desc, uint32_t address, uint8_t *data, uint16_t bytes)
Write the 24XX32A EEPROM data.
Definition 24xx32a.c:119
int32_t eeprom_24xx32a_read(struct no_os_eeprom_desc *desc, uint32_t address, uint8_t *data, uint16_t bytes)
Read the 24XX32A EEPROM data.
Definition 24xx32a.c:79
int32_t eeprom_24xx32a_remove(struct no_os_eeprom_desc *desc)
Free the resources allocated by eeprom_24xx32a_init()
Definition 24xx32a.c:173
24XX32A EEPROM specific ops structure
24XX32A EEPROM specific platform ops structure