-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a stupid bug in the C++ application (#4)
* - Renamed `getChannel` to `getChannelState` because `getChannel` is a stupid name for this function. - Fixed a stupid bug where I mixed up GPIOs and channels - Reading channels, enabling channels and disabling channels now works as expected. - Fixed help text - Channel arguments now no longer have optional flags - Fixed small logic error in the output text. * Added new `all` switch * Added basic toolchain files for CMake * Bumped up version to next minor
- Loading branch information
1 parent
1f26421
commit 65615d2
Showing
4 changed files
with
81 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Set the CMake cross-compiling toolchain | ||
set(CMAKE_SYSTEM_NAME Linux) | ||
set(CMAKE_SYSTEM_PROCESSOR arm) | ||
|
||
# Set the path to the aarch64-linux-gnu toolchain | ||
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc) | ||
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++) | ||
|
||
# Set the target architecture | ||
set(CMAKE_LIBRARY_ARCHITECTURE aarch64-linux-gnu) | ||
|
||
# Specify the linker | ||
set(CMAKE_LINKER aarch64-linux-gnu-ld) | ||
|
||
# Specify the necessary libraries and include directories | ||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Set the CMake cross-compiling toolchain | ||
set(CMAKE_SYSTEM_NAME Linux) | ||
set(CMAKE_SYSTEM_PROCESSOR arm) | ||
|
||
# Set the path to the arm-linux-gnueabihf toolchain | ||
set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc) | ||
set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++) | ||
|
||
# Set the target architecture | ||
set(CMAKE_LIBRARY_ARCHITECTURE arm-linux-gnueabihf) | ||
|
||
# Set other necessary flags and options | ||
set(CMAKE_C_FLAGS "-march=armv7-a -mfpu=neon -mfloat-abi=hard") | ||
set(CMAKE_CXX_FLAGS "-march=armv7-a -mfpu=neon -mfloat-abi=hard") | ||
|
||
# Specify the linker | ||
set(CMAKE_LINKER arm-linux-gnueabihf-ld) | ||
|
||
# Specify the necessary libraries and include directories | ||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |