#include "cmd.h"
+/**
+ * @brief \e$B%3%^%s%I4X?t!#\e(B
+ * @details
+ * ntshell_task\e$B$r;HMQ$9$k\e(BBSP\e$B$O!"\e(Bcmd_execute\e$B$N<BAu$rDs6!$9$k!#\e(B
+ * VT100\e$B$N%7!<%1%s%9%3!<%I2r<a$d4D6-@_Dj$O>e0L$G9T$o$l$F$$$k!#\e(B
+ *
+ * @param env \e$B%3%^%s%I4D6-9=B$BN!#\e(B
+ * @param argc \e$B%Q%i%a!<%??t!#\e(B
+ * @param argv \e$B%Q%i%a!<%?!#\e(B
+ */
void cmd_execute(cmd_env_t *env, int argc, char **argv)
{
int i;
#include "ntshell.h"
#include "ntstdio.h"
+/**
+ * @brief コマンド環境構造体からシェルモジュールハンドラを取得する。
+ * @parma ENV コマンド環境構造体。
+ * @return シェルモジュールハンドラ。
+ */
#define CMD_NTSHELL(ENV) (&((ENV)->ntshell))
+
+/**
+ * @brief コマンド環境構造体から標準入出力モジュールハンドラを取得する。
+ * @parma ENV コマンド環境構造体。
+ * @return 標準入出力モジュールハンドラ。
+ */
#define CMD_NTSTDIO(ENV) (&((ENV)->ntstdio))
+/**
+ * @brief コマンド環境構造体。
+ */
typedef struct {
- ntshell_t ntshell;
- ntstdio_t ntstdio;
+ ntshell_t ntshell; /**< シェルモジュールハンドラ */
+ ntstdio_t ntstdio; /**< 標準入出力モジュールハンドラ */
} cmd_env_t;
+/**
+ * @brief コマンド関数。
+ * @details
+ * ntshell_taskを使用するBSPは、cmd_executeの実装を提供する。
+ * VT100のシーケンスコード解釈や環境設定は上位で行われている。
+ *
+ * @param env コマンド環境構造体。
+ * @param argc パラメータ数。
+ * @param argv パラメータ。
+ */
void cmd_execute(cmd_env_t *env, int argc, char **argv);
#endif