-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://gitee.com/openLuat/luatos-soc-pc
- Loading branch information
Showing
34 changed files
with
1,400 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
xmake clean -a | ||
export VM_64bit=1 | ||
export LUAT_USE_GUI=n | ||
xmake f -p linux -a i386 -y | ||
xmake -w -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
xmake clean -a | ||
export VM_64bit=1 | ||
export LUAT_USE_GUI=y | ||
xmake f -p linux -a i386 -y | ||
xmake -w -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
|
||
xmake clean -a | ||
set VM_64bit=0 | ||
set LUAT_USE_GUI=n | ||
xmake f -a x86 -y | ||
xmake -y -w -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
xmake clean -a | ||
set VM_64bit=0 | ||
set LUAT_USE_GUI=y | ||
xmake f -a x86 -y | ||
xmake -y -w -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
|
||
xmake clean -a | ||
set VM_64bit=1 | ||
set LUAT_USE_GUI=n | ||
xmake f -a x86 -y | ||
xmake -y -w -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
xmake clean -a | ||
set VM_64bit=1 | ||
set LUAT_USE_GUI=n | ||
xmake f -a x86 -y | ||
xmake -y -w -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# 用法指南 | ||
|
||
## 交互模式 | ||
|
||
windows | ||
|
||
```bash | ||
luatos-pc.exe | ||
``` | ||
|
||
linux | ||
|
||
```bash | ||
./luatos-pc | ||
``` | ||
|
||
若需退出交互模式 | ||
```lua | ||
os.exit() | ||
``` | ||
|
||
## 指定文件或文件夹加载并启动 | ||
|
||
支持指定多个文件或文件夹,一起加载并启动 | ||
|
||
|
||
单文件启动 | ||
```bash | ||
luatos-pc.exe test/001.helloworld/main.lua | ||
``` | ||
|
||
多文件启动,按第一个`main.lua`作为主文件 | ||
```bash | ||
luatos-pc.exe test/001.helloworld/main.lua test/abc.lua test/logo.jpg | ||
``` | ||
|
||
按文件夹启动, 路径需要以`/`或者`\` 结尾 | ||
```bash | ||
luatos-pc.exe ../LuatOS/demo/gmssl/ | ||
``` | ||
|
||
文件和文件夹混合启动 | ||
```bash | ||
luatos-pc.exe test/001.helloworld/main.lua ../LuatOS/demo/gmssl/ | ||
``` | ||
|
||
## 加载luatools项目文件直接启动 | ||
|
||
```bash | ||
luatos-pc.exe --llt=D:/luatools/project/air101_gpio.ini | ||
``` | ||
|
||
## 加载luadb镜像文件启动 | ||
|
||
```bash | ||
luatos-pc.exe --ldb=D:/luatools/SoC量产文件/script.bin | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef LUAT_MOCK_H | ||
#define LUAT_MOCK_H | ||
|
||
int luat_mock_init(const char* path); | ||
|
||
#define MOCK_DISABLED (-0xFF) | ||
|
||
typedef struct luat_mock_ctx | ||
{ | ||
char key[128]; | ||
char* req_data; | ||
size_t req_len; | ||
char* resp_data; | ||
size_t resp_len; | ||
int resp_type; | ||
int resp_code; | ||
}luat_mock_ctx_t; | ||
|
||
int luat_mock_call(luat_mock_ctx_t* ctx); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,6 @@ void luat_pcconf_init(void); | |
|
||
void luat_pcconf_save(void); | ||
|
||
void free_uv_handle(void* ptr); | ||
|
||
#endif |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
#include "luat_base.h" | ||
#include "luat_i2c.h" | ||
|
||
#define LUAT_LOG_TAG "luat.i2c" | ||
#include "luat_log.h" | ||
|
||
int luat_i2c_exist(int id) { | ||
return id == 0; | ||
} | ||
|
||
int luat_i2c_setup(int id, int speed) { | ||
return 0; | ||
} | ||
|
||
int luat_i2c_close(int id) { | ||
return 0; | ||
} | ||
|
||
int luat_i2c_send(int id, int addr, void* buff, size_t len, uint8_t stop) { | ||
return 0; | ||
} | ||
|
||
int luat_i2c_recv(int id, int addr, void* buff, size_t len) { | ||
return 0; | ||
} | ||
|
||
int luat_i2c_transfer(int id, int addr, uint8_t *reg, size_t reg_len, uint8_t *buff, size_t len) { | ||
return 0; | ||
} | ||
|
||
int luat_i2c_no_block_transfer(int id, int addr, uint8_t is_read, uint8_t *reg, size_t reg_len, uint8_t *buff, size_t len, uint16_t Toms, void *CB, void *pParam) { | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.