Recognize RD-5R files.

This commit is contained in:
Serge 2018-09-15 15:43:23 -07:00
parent 1a60618c0e
commit ecb1d074cc
5 changed files with 2295 additions and 3 deletions

View File

@ -1,12 +1,12 @@
CC = gcc CC = gcc
VERSION = 0.7 VERSION = $(shell git describe --tags --abbrev=0)
GITCOUNT = $(shell git rev-list HEAD --count) GITCOUNT = $(shell git rev-list HEAD --count)
UNAME = $(shell uname) UNAME = $(shell uname)
CFLAGS = -g -O -Wall -Werror -DVERSION='"$(VERSION).$(GITCOUNT)"' CFLAGS = -g -O -Wall -Werror -DVERSION='"$(VERSION).$(GITCOUNT)"'
LDFLAGS = -g LDFLAGS = -g
OBJS = main.o util.o radio.o dfu-libusb.o uv380.o md380.o OBJS = main.o util.o radio.o dfu-libusb.o uv380.o md380.o rd5r.o
LIBS = -lusb-1.0 LIBS = -lusb-1.0
# Linux # Linux
@ -31,8 +31,11 @@ dmrconfig.linux: dmrconfig
### ###
dfu-libusb.o: dfu-libusb.c util.h dfu-libusb.o: dfu-libusb.c util.h
dfu-windows.o: dfu-windows.c util.h
hid-libusb.o: hid-libusb.c util.h
main.o: main.c radio.h util.h main.o: main.c radio.h util.h
md380.o: md380.c radio.h util.h md380.o: md380.c radio.h util.h
radio.o: radio.c radio.h util.h radio.o: radio.c radio.h util.h
rd5r.o: rd5r.c radio.h util.h
util.o: util.c util.h util.o: util.c util.h
uv380.o: uv380.c radio.h util.h uv380.o: uv380.c radio.h util.h

View File

@ -1,6 +1,6 @@
CC = gcc CC = gcc
VERSION = 0.7 VERSION = $(shell git describe --tags --abbrev=0)
GITCOUNT = $(shell git rev-list HEAD --count) GITCOUNT = $(shell git rev-list HEAD --count)
CFLAGS = -g -O -Wall -Werror -DVERSION='"$(VERSION).$(GITCOUNT)"' CFLAGS = -g -O -Wall -Werror -DVERSION='"$(VERSION).$(GITCOUNT)"'
LDFLAGS = -g -s LDFLAGS = -g -s

View File

@ -47,6 +47,7 @@ static struct {
{ "ZD3688", &radio_d900 }, // Zastone D900 { "ZD3688", &radio_d900 }, // Zastone D900
{ "TP660", &radio_dp880 }, // Zastone DP880 { "TP660", &radio_dp880 }, // Zastone DP880
{ "ZN><:", &radio_rt27d }, // Radtel RT-27D { "ZN><:", &radio_rt27d }, // Radtel RT-27D
{ "BF-5R", &radio_rd5r }, // Baofengl RD-5R
{ 0, 0 } { 0, 0 }
}; };
@ -181,6 +182,9 @@ void radio_read_image(const char *filename)
case 262709: case 262709:
device = &radio_md380; device = &radio_md380;
break; break;
case 131072:
device = &radio_rd5r;
break;
default: default:
fprintf(stderr, "%s: Unrecognized file size %u bytes.\n", fprintf(stderr, "%s: Unrecognized file size %u bytes.\n",
filename, (int) st.st_size); filename, (int) st.st_size);

View File

@ -122,6 +122,7 @@ extern radio_device_t radio_md9600; // TYT MD-9600
extern radio_device_t radio_d900; // Zastone D900 extern radio_device_t radio_d900; // Zastone D900
extern radio_device_t radio_dp880; // Zastone DP880 extern radio_device_t radio_dp880; // Zastone DP880
extern radio_device_t radio_rt27d; // Radtel RT-27D extern radio_device_t radio_rt27d; // Radtel RT-27D
extern radio_device_t radio_rd5r; // Baofeng RD-5R
// //
// Radio: memory contents. // Radio: memory contents.

2284
rd5r.c Normal file

File diff suppressed because it is too large Load Diff