uCmd
Simple command parser for microcontrollers
ucmd.c File Reference

uCmd source file More...

#include <stdlib.h>
#include <string.h>
#include "ucmd.h"
Include dependency graph for ucmd.c:

Go to the source code of this file.

Functions

int ucmd_parse (Command cmd_list[], const char *delim, const char *in)
 Parse a command string and match against a Command List.

Detailed Description

uCmd source file

This file defines the only function in this module: ucmd_parse()

Author:
Dan Fekete <thefekete@gmail.com>
Date:
March 13, 2015

Definition in file ucmd.c.


Function Documentation

int ucmd_parse ( Command  cmd_list[],
const char *  delim,
const char *  in 
)

Parse a command string and match against a Command List.

Parameters:
cmd_lista Command array (see the Command List section for more info)
delima null terminated string used to split the command string
ina null terminated command string to parse
Returns:
if a command is found, returns commands return code. Otherwise, returns UCMD_CMD_NOT_FOUND for unmatched command or 0 for an empty or NULL command string.

Definition at line 28 of file ucmd.c.

 All Data Structures Files Functions Variables Typedefs Defines