Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
microrlShell.h
Go to the documentation of this file.
1#pragma once
10#include "ch.h"
11#include "hal.h"
12
13
14#ifndef SHELL_DYNAMIC_ENTRIES_NUMBER
15#define SHELL_DYNAMIC_ENTRIES_NUMBER 0U
16#endif
17
18// legacy compatibility
19#define shellCreate(C, S, P) shellCreateFromHeap(C, S, P)
20
24typedef void (shellcmd_f)(BaseSequentialStream *chp, int argc, const char * const argv[]);
25
26
30typedef struct {
31 const char *sc_name;
34
44
45#if !defined(__DOXYGEN__)
47#endif
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52 void shellInit(void);
53#if CH_CFG_USE_HEAP && CH_CFG_USE_DYNAMIC
55#endif
57 size_t size, tprio_t prio);
58#if SHELL_DYNAMIC_ENTRIES_NUMBER
59 bool shellAddEntry(const ShellCommand sc);
60#endif
61 bool shellGetLine(BaseSequentialStream *chp, char *line, unsigned size);
62 void modeAlternate (void (*) (uint8_t c, uint32_t mode), uint32_t mode);
63 void modeShell (void);
64#ifdef __cplusplus
65}
66#endif
67
68
BaseSequentialStream * sc_channel
I/O channel associated to the shell.
const ShellCommand * sc_commands
Shell extra commands table.
shellcmd_f * sc_function
Command function.
const char * sc_name
Command name.
void shellInit(void)
Shell manager initialization.
event_source_t shell_terminated
Shell termination event source.
void() shellcmd_f(BaseSequentialStream *chp, int argc, const char *const argv[])
Command handler function type.
void modeShell(void)
void modeAlternate(void(*funcp)(uint8_t c, uint32_t mode), uint32_t mode)
bool shellGetLine(BaseSequentialStream *chp, char *line, unsigned size)
thread_t * shellCreateStatic(const ShellConfig *scp, void *wsp, size_t size, tprio_t prio)
Spawns a new shell.
Custom command entry type.
Shell descriptor type.
uint16_t foo
Definition main_demo5.c:58
static uint8_t mode
mode holds the current sonar mode mode = 0 used at high altitude, uses 16 wave patterns mode = 1 used...
Definition sonar_bebop.c:65
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.