Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Macros | Typedefs | Enumerations | Functions
terminal.h File Reference

Terminal handler. More...

#include <stdarg.h>
#include "wsf_types.h"
#include "wsf_os.h"

Go to the source code of this file.

Data Structures

struct  terminalCommand_tag
 Terminal command. More...
 

Macros

#define TERMINAL_MAX_ARGC   8u
 Maximum number of arguments to any command. More...
 
#define TERMINAL_MAX_COMMAND_LEN   100u
 Maximum length of command line. More...
 
#define TERMINAL_PRINTF_MAX_LEN   256u
 Maximum length of any printed output. More...
 
#define TERMINAL_STRING_PROMPT   "> "
 Prompt string. More...
 
#define TERMINAL_STRING_ERROR   "ERROR: "
 Error prefix. More...
 
#define TERMINAL_STRING_USAGE   "USAGE: "
 Usage prefix. More...
 
#define TERMINAL_STRING_NEW_LINE   "\r\n"
 New line string. More...
 

Typedefs

typedef uint8_t(* terminalHandler_t) (uint32_t argc, char **argv)
 Handler for a terminal command. More...
 
typedef bool_t(* terminalUartTx_t) (const uint8_t *pBuf, uint32_t len)
 Handler for transmit. More...
 
typedef struct terminalCommand_tag terminalCommand_t
 Terminal command. More...
 

Enumerations

Functions

void TerminalInit (wsfHandlerId_t handlerId)
 Initialize terminal. More...
 
void TerminalRegisterUartTxFunc (terminalUartTx_t uartTxFunc)
 Register the UART Tx Function for the platform. More...
 
void TerminalRegisterCommand (terminalCommand_t *pCommand)
 Register command with terminal. More...
 
void TerminalHandler (wsfEventMask_t event, wsfMsgHdr_t *pMsg)
 Handler for terminal messages. More...
 
void TerminalRx (uint8_t dataByte)
 Called by application when a data byte is received. More...
 
void TerminalTxStr (const char *pStr)
 Called by application to transmit string. More...
 
void TerminalTxChar (char c)
 Called by application to transmit character. More...
 
void TerminalTxPrint (const char *pStr,...)
 Called by application to print formatted data. More...
 
void TerminalTx (const uint8_t *pData, uint16_t len)
 Application function to transmit data.. More...
 

Detailed Description

Terminal handler.

Copyright (c) 2015-2018 Arm Ltd. All Rights Reserved.

Copyright (c) 2019-2020 Packetcraft, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file terminal.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.