drivers; counter: run clang-format on counter_timer_shell.c
Run clang-format on this file Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
parent
3c97bf1014
commit
77e5bec398
1 changed files with 20 additions and 21 deletions
|
@ -16,9 +16,9 @@
|
|||
#define ARGV_ONESHOT_TIME 3
|
||||
|
||||
/* number of periodic interrupts */
|
||||
#define PERIODIC_CYCLES 10
|
||||
#define MAX_DELAY UINT32_MAX
|
||||
#define MAX_CHANNEL 255U
|
||||
#define PERIODIC_CYCLES 10
|
||||
#define MAX_DELAY UINT32_MAX
|
||||
#define MAX_CHANNEL 255U
|
||||
|
||||
static struct k_sem timer_sem;
|
||||
|
||||
|
@ -29,8 +29,8 @@ static void timer_top_handler(const struct device *counter_dev, void *user_data)
|
|||
k_sem_give(&timer_sem);
|
||||
}
|
||||
|
||||
static void timer_alarm_handler(const struct device *counter_dev, uint8_t chan_id,
|
||||
uint32_t ticks, void *user_data)
|
||||
static void timer_alarm_handler(const struct device *counter_dev, uint8_t chan_id, uint32_t ticks,
|
||||
void *user_data)
|
||||
{
|
||||
ARG_UNUSED(counter_dev);
|
||||
|
||||
|
@ -69,7 +69,7 @@ static int cmd_timer_free_running(const struct shell *shctx, size_t argc, char *
|
|||
|
||||
shell_info(shctx, "%s: Timer is freerunning", argv[ARGV_DEV]);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cmd_timer_stop(const struct shell *shctx, size_t argc, char **argv)
|
||||
|
@ -215,20 +215,19 @@ static void device_name_get(size_t idx, struct shell_static_entry *entry)
|
|||
|
||||
SHELL_DYNAMIC_CMD_CREATE(dsub_device_name, device_name_get);
|
||||
|
||||
SHELL_STATIC_SUBCMD_SET_CREATE(sub_timer,
|
||||
SHELL_CMD_ARG(periodic, &dsub_device_name,
|
||||
"timer periodic <timer_instance_node_id> <time_in_us>",
|
||||
cmd_timer_periodic, 3, 0),
|
||||
SHELL_CMD_ARG(oneshot, &dsub_device_name,
|
||||
"timer oneshot <timer_instance_node_id> <channel_id> <time_in_us>",
|
||||
cmd_timer_oneshot, 4, 0),
|
||||
SHELL_CMD_ARG(freerun, &dsub_device_name,
|
||||
"timer freerun <timer_instance_node_id>",
|
||||
cmd_timer_free_running, 2, 0),
|
||||
SHELL_CMD_ARG(stop, &dsub_device_name,
|
||||
"timer stop <timer_instance_node_id>",
|
||||
cmd_timer_stop, 2, 0),
|
||||
SHELL_SUBCMD_SET_END /* array terminated. */
|
||||
);
|
||||
SHELL_STATIC_SUBCMD_SET_CREATE(
|
||||
sub_timer,
|
||||
SHELL_CMD_ARG(periodic, &dsub_device_name,
|
||||
"timer periodic <timer_instance_node_id> <time_in_us>", cmd_timer_periodic, 3,
|
||||
0),
|
||||
SHELL_CMD_ARG(oneshot, &dsub_device_name,
|
||||
"timer oneshot <timer_instance_node_id> <channel_id> <time_in_us>",
|
||||
cmd_timer_oneshot, 4, 0),
|
||||
SHELL_CMD_ARG(freerun, &dsub_device_name, "timer freerun <timer_instance_node_id>",
|
||||
cmd_timer_free_running, 2, 0),
|
||||
SHELL_CMD_ARG(stop, &dsub_device_name, "timer stop <timer_instance_node_id>",
|
||||
cmd_timer_stop, 2, 0),
|
||||
SHELL_SUBCMD_SET_END /* array terminated. */
|
||||
);
|
||||
|
||||
SHELL_CMD_REGISTER(timer, &sub_timer, "Timer commands", NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue