-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reorganize overlays move files here and there Add shell and more stuff Signed-off-by: Marek Matej <[email protected]>
- Loading branch information
Marek Matej
committed
Nov 4, 2024
1 parent
ad73ed7
commit ac2bc4c
Showing
10 changed files
with
108 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
CONFIG_HEAP_MEM_POOL_SIZE=2048 | ||
CONFIG_IPM=y | ||
CONFIG_GPIO=y | ||
CONFIG_MAIN_STACK_SIZE=4096 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* Helper shell | ||
*/ | ||
|
||
#include <stdlib.h> | ||
|
||
#include <zephyr/device.h> | ||
#include <zephyr/drivers/gpio.h> | ||
#include <zephyr/drivers/regulator.h> | ||
#include <zephyr/drivers/watchdog.h> | ||
#include <zephyr/dt-bindings/gpio/nordic-npm6001-gpio.h> | ||
#include <zephyr/dt-bindings/regulator/npm6001.h> | ||
#include <zephyr/posix/unistd.h> | ||
#include <zephyr/shell/shell.h> | ||
#include <zephyr/sys/printk.h> | ||
|
||
#include <getopt.h> | ||
|
||
#define PR_SHELL(shell, fmt, ...) \ | ||
shell_fprintf(shell, SHELL_NORMAL, fmt, ##__VA_ARGS__) | ||
#define PR_ERROR(shell, fmt, ...) \ | ||
shell_fprintf(shell, SHELL_ERROR, fmt, ##__VA_ARGS__) | ||
#define PR_INFO(shell, fmt, ...) \ | ||
shell_fprintf(shell, SHELL_INFO, fmt, ##__VA_ARGS__) | ||
#define PR_WARNING(shell, fmt, ...) \ | ||
shell_fprintf(shell, SHELL_WARNING, fmt, ##__VA_ARGS__) | ||
|
||
/* Command usage info. */ | ||
#define START_HELP \ | ||
("<cmd>\n\n" \ | ||
"Start the APPCPU") | ||
|
||
#define STOP_HELP \ | ||
("<cmd>\n\n" \ | ||
"Stop the APPCPU") | ||
Check notice on line 34 in samples/drivers/ipm/ipm_esp32/src/shell.c GitHub Actions / Run compliance checks on patch series (PR)You may want to run clang-format on this change
|
||
|
||
void esp_appcpu_image_start(unsigned int hdr_offset); | ||
void esp_appcpu_image_stop(void); | ||
|
||
static int cmd_appcpu_start(const struct shell *shell, size_t argc, char **argv) | ||
{ | ||
printk("start appcpu\n"); | ||
|
||
esp_appcpu_image_start(0x20); | ||
|
||
return 0; | ||
} | ||
|
||
static int cmd_appcpu_stop(const struct shell *shell, size_t argc, char **argv) | ||
{ | ||
printk("stop appcpu\n"); | ||
|
||
esp_appcpu_image_stop(); | ||
|
||
return 0; | ||
} | ||
|
||
SHELL_STATIC_SUBCMD_SET_CREATE(sub_amp, | ||
/* Alphabetically sorted to ensure correct Tab autocompletion. */ | ||
SHELL_CMD_ARG(appstart, NULL, START_HELP, cmd_appcpu_start, 1, 0), | ||
SHELL_CMD_ARG(appstop, NULL, STOP_HELP, cmd_appcpu_stop, 1, 0), | ||
SHELL_SUBCMD_SET_END /* Array terminated. */ | ||
); | ||
Check notice on line 62 in samples/drivers/ipm/ipm_esp32/src/shell.c GitHub Actions / Run compliance checks on patch series (PR)You may want to run clang-format on this change
|
||
|
||
SHELL_CMD_REGISTER(amp, &sub_amp, "AMP debug commands.", NULL); |