Creata a separate source file for DM-1801.

This commit is contained in:
Serge Vakulenko 2019-07-30 11:25:58 -07:00
parent 3a36a2549d
commit 4b93238c35
5 changed files with 2356 additions and 29 deletions

View File

@ -4,7 +4,8 @@ VERSION = $(shell git describe --tags --abbrev=0)
GITCOUNT = $(shell git rev-list HEAD --count)
UNAME = $(shell uname)
OBJS = main.o util.o radio.o dfu-libusb.o uv380.o md380.o rd5r.o gd77.o hid.o serial.o d868uv.o
OBJS = main.o util.o radio.o dfu-libusb.o uv380.o md380.o rd5r.o \
gd77.o hid.o serial.o d868uv.o dm1801.o
LDFLAGS = -g
LIBS = $(shell pkg-config --libs --static libusb-1.0)
CFLAGS = -g -O -Wall -Werror -DVERSION='"$(VERSION).$(GITCOUNT)"' \

View File

@ -1,11 +1,12 @@
CC = gcc
CC = gcc
VERSION = $(shell git describe --tags --abbrev=0)
GITCOUNT = $(shell git rev-list HEAD --count)
CFLAGS = -g -O -Wall -Werror -DVERSION='"$(VERSION).$(GITCOUNT)"'
LDFLAGS = -g -s
CFLAGS = -g -O -Wall -Werror -DVERSION='"$(VERSION).$(GITCOUNT)"'
LDFLAGS = -g -s
OBJS = main.o util.o radio.o dfu-windows.o uv380.o md380.o rd5r.o gd77.o hid.o hid-windows.o serial.o d868uv.o
OBJS = main.o util.o radio.o dfu-windows.o uv380.o md380.o rd5r.o \
gd77.o hid.o hid-windows.o serial.o d868uv.o dm1801.o
LIBS = -lhid -lsetupapi
# Compiling Windows binary from Linux
@ -21,15 +22,15 @@ ifeq (/usr/local/bin/i686-w64-mingw32-gcc,$(wildcard /usr/local/bin/i686-w64-min
CC = i686-w64-mingw32-gcc
endif
all: dmrconfig.exe
all: dmrconfig.exe
dmrconfig.exe: $(OBJS)
dmrconfig.exe: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
clean:
rm -f *~ *.o core dmrconfig
install: dmrconfig
install: dmrconfig
install -c -s dmrconfig /usr/local/bin/dmrconfig
###

2345
dm1801.c Normal file

File diff suppressed because it is too large Load Diff

20
gd77.c
View File

@ -2342,23 +2342,3 @@ radio_device_t radio_gd77 = {
gd77_update_timestamp,
//TODO: gd77_write_csv,
};
//
// Baofeng DM-1801
//
radio_device_t radio_dm1801 = {
"Baofeng DM-1801",
gd77_download,
gd77_upload,
gd77_is_compatible,
gd77_read_image,
gd77_save_image,
gd77_print_version,
gd77_print_config,
gd77_verify_config,
gd77_parse_parameter,
gd77_parse_header,
gd77_parse_row,
gd77_update_timestamp,
//TODO: gd77_write_csv,
};

View File

@ -46,9 +46,9 @@ static struct {
{ "2017", &radio_md2017 }, // TYT MD-2017, Retevis RT82
{ "MD9600", &radio_md9600 }, // TYT MD-9600
{ "BF-5R", &radio_rd5r }, // Baofeng RD-5R, TD-5R
{ "1801", &radio_dm1801 }, // Baofeng DM-1801
{ "DM-1701", &radio_rt84 }, // Baofeng DM-1701, Retevis RT84
{ "MD-760P", &radio_gd77 }, // Radioddity GD-77, version 3.1.1 and later
{ "1801", &radio_dm1801 }, // Baofeng DM-1801
{ "D868UVE", &radio_d868uv }, // Anytone AT-D868UV
{ "D878UV", &radio_d878uv }, // Anytone AT-D878UV
{ "D6X2UV", &radio_dmr6x2 }, // BTECH DMR-6x2