Lines Matching full:dac
9 * @brief DAC shell commands.
13 #include <zephyr/drivers/dac.h>
35 const struct device *dac; in cmd_setup() local
39 dac = shell_device_get_binding(argv[args_indx.device]); in cmd_setup()
40 if (!dac) { in cmd_setup()
41 shell_error(sh, "DAC device not found"); in cmd_setup()
63 err = dac_channel_setup(dac, &cfg); in cmd_setup()
65 shell_error(sh, "Failed to setup DAC channel (err %d)", err); in cmd_setup()
74 const struct device *dac; in cmd_write_value() local
79 dac = shell_device_get_binding(argv[args_indx.device]); in cmd_write_value()
80 if (!dac) { in cmd_write_value()
81 shell_error(sh, "DAC device not found"); in cmd_write_value()
88 err = dac_write_value(dac, channel, value); in cmd_write_value()
90 shell_error(sh, "Failed to write DAC value (err %d)", err); in cmd_write_value()
99 "Setup DAC channel\n"
105 "Write DAC value\n"
111 SHELL_CMD_REGISTER(dac, &dac_cmds, "DAC shell commands", NULL);