OpenBIC
OpenSource Bridge-IC
plat_smbus_shell.c File Reference
#include <shell/shell.h>
#include <stdlib.h>
#include <logging/log.h>
#include "sensor.h"
#include "plat_hook.h"
Include dependency graph for plat_smbus_shell.c:

Macros

#define I2C_DEVICE_PREFIX   "I2C_"
 

Functions

 LOG_MODULE_REGISTER (plat_smbus_shell)
 
 SHELL_DYNAMIC_CMD_CREATE (dsub_device_name, device_name_get)
 
 SHELL_STATIC_SUBCMD_SET_CREATE (sub_smbus_cmds, SHELL_CMD_ARG(block_write, &dsub_device_name, "smbus block_write <bus> <devaddr> <cmd> [<byte1>, ...]", cmd_block_write, 5, 0), SHELL_CMD_ARG(block_read, &dsub_device_name, "smbus block_read <bus> <devaddr> <cmd> ", cmd_block_read, 4, 0), SHELL_SUBCMD_SET_END)
 
 SHELL_CMD_REGISTER (smbus, &sub_smbus_cmds, "smbus command", NULL)
 

Macro Definition Documentation

◆ I2C_DEVICE_PREFIX

#define I2C_DEVICE_PREFIX   "I2C_"

Function Documentation

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_smbus_shell  )

◆ SHELL_CMD_REGISTER()

SHELL_CMD_REGISTER ( smbus  ,
sub_smbus_cmds,
"smbus command"  ,
NULL   
)

◆ SHELL_DYNAMIC_CMD_CREATE()

SHELL_DYNAMIC_CMD_CREATE ( dsub_device_name  ,
device_name_get   
)

◆ SHELL_STATIC_SUBCMD_SET_CREATE()

SHELL_STATIC_SUBCMD_SET_CREATE ( sub_smbus_cmds  ,
SHELL_CMD_ARG(block_write, &dsub_device_name, "smbus block_write <bus> <devaddr> <cmd> [<byte1>, ...]", cmd_block_write, 5, 0)  ,
SHELL_CMD_ARG(block_read, &dsub_device_name, "smbus block_read <bus> <devaddr> <cmd> ", cmd_block_read, 4, 0)  ,
SHELL_SUBCMD_SET_END   
)