summaryrefslogtreecommitdiff
path: root/src/include/console/i2c_smbus.h
blob: bea90b676780bfdcccfe3029fcb1d9f2bc36c8d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* SPDX-License-Identifier: GPL-2.0-only */

#ifndef CONSOLE_I2C_SMBUS_H
#define CONSOLE_I2C_SMBUS_H

#include <stdint.h>

void i2c_smbus_console_init(void);
void i2c_smbus_console_tx_byte(unsigned char c);

#define __CONSOLE_SMBUS_ENABLE__	CONFIG(CONSOLE_I2C_SMBUS)

#if __CONSOLE_SMBUS_ENABLE__
static inline void __i2c_smbus_console_init(void)
{
	i2c_smbus_console_init();
}

static inline void __i2c_smbus_console_tx_byte(u8 data)
{
	i2c_smbus_console_tx_byte(data);
}
#else
static inline void __i2c_smbus_console_init(void)	{}
static inline void __i2c_smbus_console_tx_byte(u8 data)	{}
#endif /* __CONSOLE_SMBUS_ENABLE__ */

#endif /* CONSOLE_I2C_SMBUS_H */