MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / tt_app_register

Function tt_app_register

TactilityC/Source/tt_app.cpp:16–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14#define HANDLE_AS_APP_CONTEXT(handle) ((tt::app::AppContext*)(handle))
15
16void tt_app_register(
17 const AppRegistration appRegistration
18) {
19#ifdef ESP_PLATFORM
20 assert((appRegistration.createData == nullptr) == (appRegistration.destroyData == nullptr));
21 tt::app::setElfAppParameters(
22 appRegistration.createData,
23 appRegistration.destroyData,
24 appRegistration.onCreate,
25 appRegistration.onDestroy,
26 appRegistration.onShow,
27 appRegistration.onHide,
28 reinterpret_cast<tt::app::OnResult>(appRegistration.onResult)
29 );
30#else
31 check(false, "TactilityC is not intended for PC/Simulator");
32#endif
33}
34
35BundleHandle tt_app_get_parameters(AppHandle handle) {
36 return (BundleHandle)HANDLE_AS_APP_CONTEXT(handle)->getParameters().get();

Callers 1

mainFunction · 0.85

Calls 2

setElfAppParametersFunction · 0.85
checkFunction · 0.50

Tested by

no test coverage detected