mirror of
https://github.com/ioacademy-jikim/android_framwork
synced 2025-06-07 16:06:29 +00:00
20 lines
275 B
C
20 lines
275 B
C
#include <dlfcn.h>
|
|
|
|
typedef struct module
|
|
{
|
|
void (*on)();
|
|
void (*off)();
|
|
} module_t;
|
|
|
|
int main()
|
|
{
|
|
void *handle;
|
|
module_t *module;
|
|
handle = dlopen("libled.so", RTLD_NOW);
|
|
module = dlsym( handle, "HMI" );
|
|
module->on();
|
|
module->off();
|
|
dlclose(handle);
|
|
return 0;
|
|
}
|