This commit is contained in:
ioacademy-jikim
2018-06-15 17:07:15 +09:00
parent 931b702e82
commit b313330e0f
17 changed files with 296 additions and 0 deletions
BIN
View File
Binary file not shown.
+19
View File
@@ -0,0 +1,19 @@
#include <stdio.h>
typedef struct module
{
void (*on)();
void (*off)();
} module_t;
void ledOn()
{
printf("ledOn()\n");
}
void ledOff()
{
printf("ledOff()\n");
}
module_t HMI = { ledOn, ledOff };
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
+19
View File
@@ -0,0 +1,19 @@
#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;
}