NTURT Zephyr v0.0.1
NTURT common library for Zephyr RTOS
Loading...
Searching...
No Matches
cmd.h File Reference

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>
+ Include dependency graph for cmd.h:

Data Structures

struct  cmd
 Command. More...
 

Macros

#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 .
 

Typedefs

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.
 

Functions

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.
 

Detailed Description

Command support.

Author
quantumspawner
Version
0.0.1
Date
2025-01-05