Proof-of-concept driver added
This commit is contained in:
12
drivers/Makefile
Normal file
12
drivers/Makefile
Normal file
@@ -0,0 +1,12 @@
|
||||
SUBDIRS := $(wildcard */.)
|
||||
BUILD_DIR=../build/
|
||||
|
||||
all: $(BUILD_DIR)/drivers/ $(SUBDIRS)
|
||||
|
||||
$(SUBDIRS):
|
||||
$(MAKE) -C $@
|
||||
|
||||
.PHONY: all $(SUBDIRS)
|
||||
|
||||
$(BUILD_DIR)/drivers/:
|
||||
mkdir -p $(BUILD_DIR)/drivers/
|
7
drivers/g-wolves/Makefile
Normal file
7
drivers/g-wolves/Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
SUBDIRS := $(wildcard */.)
|
||||
|
||||
all: $(SUBDIRS)
|
||||
$(SUBDIRS):
|
||||
$(MAKE) -C $@
|
||||
|
||||
.PHONY: all $(SUBDIRS)
|
10
drivers/g-wolves/htx/Makefile
Normal file
10
drivers/g-wolves/htx/Makefile
Normal file
@@ -0,0 +1,10 @@
|
||||
CC=gcc
|
||||
CFLAGS=$(shell pkg-config --cflags libusb-1.0) -O3 -Wall -shared
|
||||
LDFLAGS=$(shell pkg-config --libs libusb-1.0)
|
||||
|
||||
BUILD_DIR=../../../build/
|
||||
|
||||
all: $(BUILD_DIR)/drivers/gwolves-htx.so
|
||||
|
||||
$(BUILD_DIR)/drivers/gwolves-htx.so: htx.c | $(BUILD_DIR)/drivers/
|
||||
gcc $(CFLAGS) -o $@ $^
|
26
drivers/g-wolves/htx/htx.c
Normal file
26
drivers/g-wolves/htx/htx.c
Normal file
@@ -0,0 +1,26 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define DEVICE_NAME "HTX 4K"
|
||||
|
||||
void driver_init(void)
|
||||
{
|
||||
printf("Hello from G-Wolves HTX driver !\n");
|
||||
}
|
||||
|
||||
uint32_t driver_getkey(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
char* driver_get_name(void)
|
||||
{
|
||||
return DEVICE_NAME;
|
||||
}
|
||||
|
||||
char* driver_get_image(void)
|
||||
{
|
||||
return "g-wolves/htx/htx_0.png";
|
||||
}
|
Reference in New Issue
Block a user