Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.

Commit f5d2196

Browse files
committed
add apic timer
1 parent bb7b51f commit f5d2196

21 files changed

Lines changed: 161 additions & 56 deletions

docs/command_system.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
### 初期化
2424

2525
```c
26-
#include <util/shell.h>
27-
#include <util/commands.h>
26+
#include <shell/shell.h>
27+
#include <shell/commands.h>
2828

2929
// カーネルのmain関数などで
3030
init_shell(); // シェルとコマンドシステムを初期化
@@ -35,7 +35,7 @@ init_shell(); // シェルとコマンドシステムを初期化
3535
### 1. コマンド関数の実装
3636

3737
```c
38-
#include <util/commands.h>
38+
#include <shell/commands.h>
3939
#include <util/console.h>
4040

4141
static int cmd_mycommand(int argc, char **argv) {

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ LiteCoreカーネルのドキュメントの目次
4040
- [入出力ユーティリティ](./util/io)
4141
- [シェル機能](./util/shell)
4242
- [コマンドシステム](./util/commands)
43-
- [拡張コマンド](./util/extended_commands)
43+
- [拡張コマンド](./shell/extended_commands.h)
4444
- [シェル統合](./util/shell_integration)
4545
- [カーネル初期化](./util/init_msg)
4646

docs/util/commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
この章では、コマンドシステムについて記述します。
2-
実装されているファイルは[commands.c](../../src/kernel/util/commands.c), [commands.h](../../src/include/util/commands.h)です。
2+
実装されているファイルは[commands.c](../../src/kernel/util/commands.c), [commands.h](../../src/include/shell/commands.h)です。
33

44
## 概要
55
コマンドシステムは、シェルで実行可能なコマンドの登録と実行を管理します。コマンドラインの解析、引数の分割、コマンドハンドラの呼び出しを行います。最大32個のコマンドを登録でき、各コマンドには名前、説明、実行関数が関連付けられます。

docs/util/extended_commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
この章では、拡張コマンドについて記述します。
2-
実装されているファイルは[extended_commands.c](../../src/kernel/util/extended_commands.c)です。
2+
実装されているファイルは[extended_commands.c](../../src/kernel/shell/extended_commands.h.c)です。
33

44
## 概要
55
拡張コマンドモジュールは、ファイルシステム操作やシステム情報表示などの高度なシェルコマンドを提供します。ext2ファイルシステムの操作、メモリ情報の表示、PCIデバイスの列挙などが含まれます。

docs/util/shell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
この章では、シェル機能について記述します。
2-
実装されているファイルは[shell.c](../../src/kernel/util/shell.c), [shell.h](../../src/include/util/shell.h)です。
2+
実装されているファイルは[shell.c](../../src/kernel/util/shell.c), [shell.h](../../src/include/shell/shell.h)です。
33

44
## 概要
55
シェルモジュールは、対話型コマンドラインインターフェースを提供します。ユーザー入力の読み取り、バッファ管理、コマンドの実行、プロンプト表示を行います。バックスペース、Enterキー、制御文字の処理をサポートします。

docs/util/shell_integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
この章では、シェル統合機能について記述します。
2-
実装されているファイルは[shell_integration.c](../../src/kernel/util/shell_integration.c), [shell_integration.h](../../src/include/util/shell_integration.h)です。
2+
実装されているファイルは[shell_integration.c](../../src/kernel/util/shell_integration.c), [shell_integration.h](../../src/include/shell/shell_integration.h)です。
33

44
## 概要
55
シェル統合モジュールは、シェルシステム全体の初期化を簡素化します。標準シェル、組み込みコマンド、拡張コマンドを一括で初期化します。

src/include/config.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#define VERSION "0.1"
55

66
// 初期化メッセージを表示するかどうか
7-
#define INIT_MSG
7+
//#define INIT_MSG
88

99
#ifndef NULL
1010
#define NULL ((void *)0)
@@ -40,4 +40,10 @@ typedef unsigned short uint16_t;
4040
*/
4141
typedef unsigned int uint32_t;
4242

43+
/**
44+
* @typedef uint64_t
45+
* @brief 64bit符号なし整数型
46+
*/
47+
typedef unsigned long long uint64_t;
48+
4349
#endif /* _CONFIG_H */

src/include/driver/timer/timer.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef _TIMER_H
2+
#define _TIMER_H
3+
4+
#include <config.h>
5+
6+
int kwait(uint32_t us);
7+
8+
#endif /* _TIMER_H */

0 commit comments

Comments
 (0)