Skip to content

Commit

Permalink
add: 关联编译ws2812和onewire库
Browse files Browse the repository at this point in the history
  • Loading branch information
wendal committed Nov 16, 2023
1 parent 7595921 commit 11cf418
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/luat_conf_bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@
#define LUAT_USE_BIT64 1
#define LUAT_USE_FASTLZ 1
#define LUAT_USE_SQLITE3 1
#define LUAT_USE_ONEWIRE 1
#define LUAT_USE_WS2812 1

//--------------------------------------------------
// GUI相关
Expand Down
6 changes: 6 additions & 0 deletions port/luat_base_mini.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ static const luaL_Reg loadedlibs[] = {
#endif
#ifdef LUAT_USE_SQLITE3
{"sqlite3", luaopen_sqlite3},
#endif
#ifdef LUAT_USE_WS2812
{"ws2812", luaopen_ws2812},
#endif
#ifdef LUAT_USE_ONEWIRE
{"onewire", luaopen_onewire},
#endif
{NULL, NULL}
};
Expand Down
7 changes: 7 additions & 0 deletions port/rtos/luat_rtos_task_pc.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,10 @@ int luat_rtos_event_recv(luat_rtos_task_handle task_handle, uint32_t wait_event_
return -1;
}

void luat_os_entry_cri(void) {

}

void luat_os_exit_cri(void) {

}
10 changes: 10 additions & 0 deletions xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,16 @@ target("luatos-lua")
add_includedirs(luatos.."components/network/ercoap/include",{public = true})
add_files(luatos.."components/network/ercoap/src/*.c")
add_files(luatos.."components/network/ercoap/binding/*.c")

-- ws2812
add_includedirs(luatos.."components/ws2812/include",{public = true})
add_files(luatos.."components/ws2812/src/*.c")
add_files(luatos.."components/ws2812/binding/*.c")

-- onewire
add_includedirs(luatos.."components/onewire/include",{public = true})
add_files(luatos.."components/onewire/src/*.c")
add_files(luatos.."components/onewire/binding/*.c")

if os.getenv("LUAT_USE_GUI") == "y" then
add_files("ui/*.c")
Expand Down

0 comments on commit 11cf418

Please sign in to comment.