Command support.
More...
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/iterable_sections.h>
#include <zephyr/sys/util.h>
|
#define | CMD_NO_HANDLER 0 |
| Indicate that the command has no handler of this type.
|
|
#define | CMD_DEFINE(opcode, immed, deffered, user_data) |
| Define a command.
|
|
#define | cmd_invoke_typed(_opcode, _operand, _operand_type) |
| Invoke a command with specific operand type.
|
|
#define | cmd_invoke_auto(opcode, operand) |
| Invoke a command with operand type inferred from operand .
|
|
|
typedef int(* | cmd_immed_handler_t) (uint32_t opcode, const void *operand, size_t operand_size, void *user_data) |
| Immediate handler of a command.
|
|
typedef void(* | cmd_deffered_handler_t) (uint32_t opcode, const void *operand, size_t operand_size, void *user_data) |
| Deffered handler of a command.
|
|
|
int | cmd_invoke (uint32_t opcode, void *operand, size_t operand_size) |
| Invoke a command.
|
|
static int | cmd_invoke_void (uint32_t opcode) |
| Invoke a command without operand.
|
|
Command support.
- Author
- quantumspawner
- Version
- 0.0.1
- Date
- 2025-01-05
- Copyright
- Copyright (c) 2025 NTU Racing Team