Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Programmable RF Attenuator
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Programmable RF Attenuator
Commits
404e6ad2
Commit
404e6ad2
authored
May 03, 2024
by
Vasco Guita
Committed by
Federico Vaga
May 03, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include libftdi from SDK if libftdi-config is not installed
parent
c84f4850
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
Makefile
software/lib/Makefile
+9
-4
eeprom.c
software/lib/eeprom.c
+4
-0
liboattnusb.c
software/lib/liboattnusb.c
+4
-0
No files found.
software/lib/Makefile
View file @
404e6ad2
...
@@ -47,11 +47,16 @@ LIBFTDI_CONFIG = $(shell command -v libftdi1-config)
...
@@ -47,11 +47,16 @@ LIBFTDI_CONFIG = $(shell command -v libftdi1-config)
ifeq
($(LIBFTDI_CONFIG),)
ifeq
($(LIBFTDI_CONFIG),)
LIBFTDI_CONFIG
=
$(
shell
command
-v
libftdi-config
)
LIBFTDI_CONFIG
=
$(
shell
command
-v
libftdi-config
)
endif
endif
LIBFTDI_INC
:=
$(
shell
$(LIBFTDI_CONFIG)
--cflags
)
ifeq
($(LIBFTDI_CONFIG),)
LIBFTDI_LIBS
:=
$(
shell
$(LIBFTDI_CONFIG)
--libs
)
CFLAGS
+=
-DLIBFTDI1
LDLIBS
+=
-lftdi1
else
LIBFTDI_INC
:=
$(
shell
$(LIBFTDI_CONFIG)
--cflags
)
LIBFTDI_LIBS
:=
$(
shell
$(LIBFTDI_CONFIG)
--libs
)
CFLAGS
+=
$(LIBFTDI_INC)
LDLIBS
+=
$(LIBFTDI_LIBS)
endif
CFLAGS
+=
$(LIBFTDI_INC)
LDLIBS
+=
$(LIBFTDI_LIBS)
LDLIBS
+=
-ludev
LDLIBS
+=
-ludev
CPPCHECK
?=
cppcheck
CPPCHECK
?=
cppcheck
...
...
software/lib/eeprom.c
View file @
404e6ad2
...
@@ -20,7 +20,11 @@
...
@@ -20,7 +20,11 @@
#include <sys/time.h>
#include <sys/time.h>
#include <libusb-1.0/libusb.h>
#include <libusb-1.0/libusb.h>
#ifdef LIBFTDI1
#include <libftdi1/ftdi.h>
#else
#include <ftdi.h>
#include <ftdi.h>
#endif
#include "liboattnusb.h"
#include "liboattnusb.h"
#include "liboattnusb-i.h"
#include "liboattnusb-i.h"
...
...
software/lib/liboattnusb.c
View file @
404e6ad2
...
@@ -15,7 +15,11 @@
...
@@ -15,7 +15,11 @@
#include <stdio.h>
#include <stdio.h>
#include <errno.h>
#include <errno.h>
#include <libusb-1.0/libusb.h>
#include <libusb-1.0/libusb.h>
#ifdef LIBFTDI1
#include <libftdi1/ftdi.h>
#else
#include <ftdi.h>
#include <ftdi.h>
#endif
#include "liboattnusb.h"
#include "liboattnusb.h"
#include "liboattnusb-i.h"
#include "liboattnusb-i.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment