OpenBIC
OpenSource Bridge-IC
|
#include <shell/shell.h>
#include <stdlib.h>
#include <logging/log.h>
#include "sensor.h"
#include "plat_hook.h"
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) | |
#define I2C_DEVICE_PREFIX "I2C_" |
LOG_MODULE_REGISTER | ( | plat_smbus_shell | ) |
SHELL_CMD_REGISTER | ( | smbus | , |
& | sub_smbus_cmds, | ||
"smbus command" | , | ||
NULL | |||
) |
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 | |||
) |