TT Zephyr Platforms 18.11.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
smbus_target.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Tenstorrent AI ULC
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef SMBUS_TARGET
8#define SMBUS_TARGET
9
10#include <stdint.h>
11
24
31typedef int32_t (*SmbusRcvHandler)(const uint8_t *data, uint8_t size);
32
39typedef int32_t (*SmbusSendHandler)(uint8_t *data, uint8_t *size);
40
47
57 const SmbusCmdDef *smbus_cmd);
58#endif
int32_t(* SmbusRcvHandler)(const uint8_t *data, uint8_t size)
Definition of a SMBUS receive handler.
Definition smbus_target.h:31
int32_t smbus_target_register_cmd(const struct device *dev, uint8_t cmd_id, const SmbusCmdDef *smbus_cmd)
Register the given command to the SMBUS target implementation.
int32_t(* SmbusSendHandler)(uint8_t *data, uint8_t *size)
Definition of a SMBUS send handler.
Definition smbus_target.h:39
SmbusTransType
A list of supported SMBUS transaction types.
Definition smbus_target.h:15
@ kSmbusTransBlockRead
Definition smbus_target.h:21
@ kSmbusTransWriteWord
Definition smbus_target.h:18
@ kSmbusTransBlockWriteBlockRead
Definition smbus_target.h:22
@ kSmbusTransBlockWrite
Definition smbus_target.h:20
@ kSmbusTransReadByte
Definition smbus_target.h:17
@ kSmbusTransReadWord
Definition smbus_target.h:19
@ kSmbusTransWriteByte
Definition smbus_target.h:16
__INT32_TYPE__ int32_t
__UINT8_TYPE__ uint8_t
Definition smbus_target.h:41
SmbusTransType trans_type
Definition smbus_target.h:42
uint8_t pec
Definition smbus_target.h:45
SmbusSendHandler send_handler
Definition smbus_target.h:44
SmbusRcvHandler rcv_handler
Definition smbus_target.h:43