Files
carbon 0545e9dc6d init version 2024-05-07
commit d1edce71135cc6d98c0a4b5729774542b676e769
Author: sophgo-forum-service <forum_service@sophgo.com>
Date:   Fri Mar 15 16:07:33 2024 +0800

    [fix] recommend using ssh method to clone repo.
    [fix] fix sensor driver repo branch name.
2024-05-07 19:36:36 +08:00

32 lines
776 B
C

/* SPDX-License-Identifier: GPL-2.0+
*
* Copyright (c) 2015 Free Electrons
* Copyright (c) 2015 NextThing Co
* Copyright (c) 2018 Microchip Technology, Inc.
*
*/
#ifndef __W1_EEPROM_H
#define __W1_EEPROM_H
struct udevice;
struct w1_eeprom_ops {
/*
* Reads a buff from the given EEPROM memory, starting at
* given offset and place the results into the given buffer.
* Should read given count of bytes.
* Should return 0 on success, and normal error.h on error
*/
int (*read_buf)(struct udevice *dev, unsigned int offset,
u8 *buf, unsigned int count);
};
int w1_eeprom_read_buf(struct udevice *dev, unsigned int offset,
u8 *buf, unsigned int count);
int w1_eeprom_dm_init(void);
int w1_eeprom_get_id(struct udevice *dev, u64 *id);
#endif