本文整理汇总了C++中do_smbus_read_byte函数的典型用法代码示例。如果您正苦于以下问题:C++ do_smbus_read_byte函数的具体用法?C++ do_smbus_read_byte怎么用?C++ do_smbus_read_byte使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了do_smbus_read_byte函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: lsmbus_read_byte
static int lsmbus_read_byte(struct device *dev, u8 address)
{
u8 device;
device = dev->path.i2c.device;
return do_smbus_read_byte(get_sm_mmio(dev), device, address);
}
开发者ID:canistation,项目名称:coreboot,代码行数:7,代码来源:sm.c
示例2: lsmbus_read_byte
static int lsmbus_read_byte(device_t dev, uint8_t address)
{
unsigned device;
struct resource *res;
device = dev->path.i2c.device;
res = find_resource(get_pbus_smbus(dev)->dev, 0x58);
return do_smbus_read_byte(res->base, device, address);
}
开发者ID:DarkDefender,项目名称:coreboot,代码行数:10,代码来源:acpi.c
示例3: lsmbus_read_byte
static int lsmbus_read_byte(device_t dev, u8 address)
{
u16 device;
struct resource *res;
struct bus *pbus;
device = dev->path.i2c.device;
pbus = get_pbus_smbus(dev);
res = find_resource(pbus->dev, 0x20);
return do_smbus_read_byte(res->base, device, address);
}
开发者ID:DarkDefender,项目名称:coreboot,代码行数:12,代码来源:smbus.c
示例4: lsmbus_read_byte
static int lsmbus_read_byte(device_t dev, uint8_t address)
{
uint16_t device;
struct resource *res;
struct bus *pbus;
device = dev->path.i2c.device;
pbus = get_pbus_smbus(dev);
res = find_resource(pbus->dev, PCI_BASE_ADDRESS_4);
return do_smbus_read_byte(res->base, device, address);
}
开发者ID:Oxyoptia,项目名称:coreboot,代码行数:12,代码来源:smbus.c
示例5: lsmbus_read_byte
static int lsmbus_read_byte(device_t dev, uint8_t address)
{
unsigned device;
struct resource *res;
struct bus *pbus;
device = dev->path.i2c.device;
pbus = get_pbus_smbus(dev);
res = find_resource(pbus->dev, 0x20 + (pbus->link_num * 4));
return do_smbus_read_byte(res->base, device, address);
}
开发者ID:kelsieflynn,项目名称:coreboot-1,代码行数:13,代码来源:mcp55_smbus.c
示例6: lsmbus_read_byte
static int lsmbus_read_byte(device_t dev, u8 address)
{
u32 device;
struct resource *res;
struct bus *pbus;
device = dev->path.i2c.device;
pbus = get_pbus_smbus(dev);
if (!amd_sb700_aux_smbus)
res = find_resource(pbus->dev, PRIMARY_SMBUS_RESOURCE_NUMBER);
else
res = find_resource(pbus->dev, AUXILIARY_SMBUS_RESOURCE_NUMBER);
return do_smbus_read_byte(res->base, device, address);
}
开发者ID:AdriDlu,项目名称:coreboot,代码行数:16,代码来源:sm.c
示例7: smbus_read_byte
int smbus_read_byte(unsigned device, unsigned address)
{
return do_smbus_read_byte(SMBUS_IO_BASE, device, address);
}
开发者ID:AdriDlu,项目名称:coreboot,代码行数:4,代码来源:early_smbus.c
示例8: spd_read_byte
static int spd_read_byte(u32 device, u32 address)
{
return do_smbus_read_byte(SMBUS_IO_BASE, device, address);
}
开发者ID:B-Rich,项目名称:coreboot,代码行数:4,代码来源:romstage.c
示例9: smbusx_read_byte
int smbusx_read_byte(unsigned smb_index, unsigned device,
unsigned address)
{
return do_smbus_read_byte(SMBUS0_IO_BASE + (smb_index << 8),
device, address);
}
开发者ID:canistation,项目名称:coreboot,代码行数:6,代码来源:early_smbus.c
示例10: w83795_set_bank
static int w83795_set_bank(u8 bank)
{
return do_smbus_write_byte(SMBUS_IO_BASE, W83795_DEV, W83795_REG_BANKSEL, bank);
}
static u8 w83795_read(u16 reg)
{
int ret;
ret = w83795_set_bank(reg >> 8);
if (ret < 0) {
printk(BIOS_DEBUG, "read faild to set bank %x\n", reg >> 8);
return -1;
}
ret = do_smbus_read_byte(SMBUS_IO_BASE, W83795_DEV, reg & 0xff);
return ret;
}
static u8 w83795_write(u16 reg, u8 value)
{
int err;
err = w83795_set_bank(reg >> 8);
if (err < 0) {
printk(BIOS_DEBUG, "write faild to set bank %x\n", reg >> 8);
return -1;
}
err = do_smbus_write_byte(SMBUS_IO_BASE, W83795_DEV, reg & 0xff, value);
return err;
开发者ID:RafaelRMachado,项目名称:Coreboot,代码行数:31,代码来源:w83795.c
示例11: smbus_read_byte
int smbus_read_byte(u8 device, u8 address)
{
return do_smbus_read_byte(SMBUS_IO_BASE, device, address);
}
开发者ID:hustcalm,项目名称:coreboot-hacking,代码行数:4,代码来源:early_smbus.c
示例12: smbus_read_byte
u8 smbus_read_byte(u32 smbus_dev, u8 addr, u8 offset)
{
return do_smbus_read_byte(SMBUS_BASE_ADDRESS, addr, offset);
}
开发者ID:lynxis,项目名称:coreboot-signed,代码行数:4,代码来源:early_smbus.c
示例13: __attribute__
static __attribute__((unused)) int smbus_read_byte(u32 device, u32 address)
{
return do_smbus_read_byte(SMBUS_IO_BASE, device, address);
}
开发者ID:RafaelRMachado,项目名称:Coreboot,代码行数:4,代码来源:early_smbus.c
示例14: smbus_read_byte
int smbus_read_byte(unsigned int device, unsigned int address)
{
return do_smbus_read_byte(SMBUS_BASE_ADDRESS, device, address);
}
开发者ID:canistation,项目名称:coreboot,代码行数:4,代码来源:smbus.c
注:本文中的do_smbus_read_byte函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论