Skip to content

Windows USE_CM108 #326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ else()
set(ALSA_LIBRARIES "")
set(UDEV_INCLUDE_DIRS "")
set(UDEV_LIBRARIES "")
# Version 1.7 supports CM108/CM119 GPIO PTT for Windows.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_CM108")
set(PORTAUDIO_INCLUDE_DIRS "")
set(PORTAUDIO_LIBRARIES "")
endif()
Expand Down
7 changes: 0 additions & 7 deletions src/direwolf.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@

#endif

// Version 1.7 supports CM108/CM119 GPIO PTT for Windows.
// Define it here so we don't need to have separate Windows
// check in all the places that test this.
#if __WIN32__
#define USE_CM108 1
#endif

/*
* Previously, we could handle only a single audio device.
* This meant we could have only two radio channels.
Expand Down
10 changes: 5 additions & 5 deletions src/ptt.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@
#include <hamlib/rig.h>
#endif

#ifdef USE_CM108
#include "cm108.h"
#endif

/* So we can have more common code for fd. */
typedef int HANDLE;
#define INVALID_HANDLE_VALUE (-1)

#endif
#endif /* __WIN32__ */

#ifdef USE_CM108
#include "cm108.h"
#endif /* USE_CM108 */

#include "textcolor.h"
#include "audio.h"
Expand Down