Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
One Time Programmable Memory

Interfaces for One Time Programmable (OTP) Memory. More...

Files

file  otp.h
 Main header file for OTP driver API.

Functions

int otp_read (const struct device *dev, off_t offset, void *data, size_t len)
 Read data from OTP memory.
int otp_program (const struct device *dev, off_t offset, const void *data, size_t len)
 Program data to the given OTP memory.

Detailed Description

Interfaces for One Time Programmable (OTP) Memory.

Since
4.4
Version
0.1.0

Function Documentation

◆ otp_program()

int otp_program ( const struct device * dev,
off_t offset,
const void * data,
size_t len )

#include <zephyr/drivers/otp.h>

Program data to the given OTP memory.

Parameters
devOTP device
offsetAddress offset to program data to.
dataBuffer with data to program.
lenNumber of bytes to program.
Returns
0 on success, negative errno code on failure.

◆ otp_read()

int otp_read ( const struct device * dev,
off_t offset,
void * data,
size_t len )

#include <zephyr/drivers/otp.h>

Read data from OTP memory.

Parameters
devOTP device
offsetAddress offset to read from.
dataBuffer to store read data.
lenNumber of bytes to read.
Returns
0 on success, negative errno code on failure.