diff --git a/.clang-format b/.clang-format index ba435208f..c02cf2f61 100644 --- a/.clang-format +++ b/.clang-format @@ -67,10 +67,7 @@ DeriveLineEnding: false DerivePointerAlignment: false DisableFormat: false EmptyLineBeforeAccessModifier: Always -# --- -# only in v13+ -# EmptyLineAfterAccessModifier: Leave -# --- +EmptyLineAfterAccessModifier: Leave ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true IncludeBlocks: Preserve @@ -89,10 +86,7 @@ IncludeCategories: CaseSensitive: false IncludeIsMainRegex: "(Test)?$" IncludeIsMainSourceRegex: "" -# --- -# only in v13+ -# IndentAccessModifiers: false -# --- +IndentAccessModifiers: false IndentCaseLabels: true IndentCaseBlocks: false IndentGotoLabels: false @@ -117,15 +111,12 @@ PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 60 PenaltyIndentedWhitespace: 0 PointerAlignment: Left -# --- -# only in v13+ -# ReferenceAlignment: Right -# --- +ReferenceAlignment: Pointer ReflowComments: true -# --- -# only in v13+ -# ShortNamespaceLines: 0 -# --- +SpacesInLineCommentPrefix: + Maximum: -1 + Minimum: 0 +ShortNamespaceLines: 0 # Sort**** is about sorting include/using statements alphabetically SortIncludes: false SortUsingDeclarations: false diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..05a48fc65 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" + # Workflow files stored in the + # default location of `.github/workflows` + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/build_arduino.yml b/.github/workflows/build_arduino.yml index 066826325..f4dd50322 100644 --- a/.github/workflows/build_arduino.yml +++ b/.github/workflows/build_arduino.yml @@ -2,27 +2,21 @@ name: Arduino CLI build on: pull_request: - types: [opened, reopened] + branches: [master] paths: - ".github/workflows/build_arduino.yml" - "examples/**" - "!examples/old_backups/**" - "RF24.*" push: + branches: [master] paths: - ".github/workflows/build_arduino.yml" - "examples/**" - "!examples/old_backups/**" jobs: - check_formatting: - uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main - with: - ignore: examples/old_backups - extensions: ino - build: - needs: check_formatting uses: nRF24/.github/.github/workflows/build_arduino.yaml@main with: sketch-paths: | @@ -114,55 +108,56 @@ jobs: - fqbn: arduino:samd:mkrzero # InterruptConfigure.ino uses pin 2 enable-deltas-report: true - attiny: - needs: check_formatting - uses: nRF24/.github/.github/workflows/build_arduino.yaml@main - with: - platforms: | - - source-url: "http://drazzy.com/package_drazzy.com_index.json" - name: "ATTinyCore:avr" - - name: "arduino:avr" - sketch-paths: | - - examples/rf24_ATTiny/rf24ping85 - - examples/rf24_ATTiny/timingSearch3pin - fqbn: ${{ matrix.fqbn }} - enable-deltas-report: ${{ matrix.enable-deltas-report }} - strategy: - fail-fast: false - matrix: - fqbn: - - ATTinyCore:avr:attinyx4 - - ATTinyCore:avr:attinyx4opti - - ATTinyCore:avr:attinyx4micr - - ATTinyCore:avr:attinyx5 - - ATTinyCore:avr:attinyx5micr - - ATTinyCore:avr:attinyx8 - - ATTinyCore:avr:attinyx8opti - - ATTinyCore:avr:attinyx8micr - - ATTinyCore:avr:attinyx7 - - ATTinyCore:avr:attinyx7opti - - ATTinyCore:avr:attinyx7micr - - ATTinyCore:avr:attinyx61 - - ATTinyCore:avr:attinyx61opti - - ATTinyCore:avr:attinyx41 - - ATTinyCore:avr:attinyx41opti - - ATTinyCore:avr:attinyx41micr - # - ATTinyCore:avr:attiny43 # doesn't seem to support USI implementation of SPI - - ATTinyCore:avr:attiny828 - - ATTinyCore:avr:attiny828opti - - ATTinyCore:avr:attiny1634 - - ATTinyCore:avr:attiny1634opti - - ATTinyCore:avr:attinyx313 - # By default, don't generate size deltas data. - enable-deltas-report: - - false - # Generate size deltas data for this board - include: - - fqbn: ATTinyCore:avr:attinyx5 - enable-deltas-report: true + #### NOTE installing ATTinyCore has become too problematic for various reasons + #### I'll have to revisit this later when the Arduino CLI tool gets their act together + # attiny: + # uses: nRF24/.github/.github/workflows/build_arduino.yaml@main + # with: + # platforms: | + # - source-url: "http://drazzy.com/package_drazzy.com_index.json" + # name: "ATTinyCore:avr" + # - name: "arduino:avr" + # sketch-paths: | + # - examples/rf24_ATTiny/rf24ping85 + # - examples/rf24_ATTiny/timingSearch3pin + # fqbn: ${{ matrix.fqbn }} + # enable-deltas-report: ${{ matrix.enable-deltas-report }} + # strategy: + # fail-fast: false + # matrix: + # fqbn: + # - ATTinyCore:avr:attinyx4 + # - ATTinyCore:avr:attinyx4opti + # - ATTinyCore:avr:attinyx4micr + # - ATTinyCore:avr:attinyx5 + # - ATTinyCore:avr:attinyx5micr + # - ATTinyCore:avr:attinyx8 + # - ATTinyCore:avr:attinyx8opti + # - ATTinyCore:avr:attinyx8micr + # - ATTinyCore:avr:attinyx7 + # - ATTinyCore:avr:attinyx7opti + # - ATTinyCore:avr:attinyx7micr + # - ATTinyCore:avr:attinyx61 + # - ATTinyCore:avr:attinyx61opti + # - ATTinyCore:avr:attinyx41 + # - ATTinyCore:avr:attinyx41opti + # - ATTinyCore:avr:attinyx41micr + # # - ATTinyCore:avr:attiny43 # doesn't seem to support USI implementation of SPI + # - ATTinyCore:avr:attiny828 + # - ATTinyCore:avr:attiny828opti + # - ATTinyCore:avr:attiny1634 + # - ATTinyCore:avr:attiny1634opti + # - ATTinyCore:avr:attinyx313 + # # By default, don't generate size deltas data. + # enable-deltas-report: + # - false + # # Generate size deltas data for this board + # include: + # - fqbn: ATTinyCore:avr:attinyx5 + # enable-deltas-report: true # When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report report: - needs: [build, attiny] + needs: [build] # , attiny] if: github.event_name == 'pull_request' uses: nRF24/.github/.github/workflows/arduino_size_deltas.yaml@main diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 205f7fdde..4df25ae70 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -1,9 +1,8 @@ name: Linux build on: - pull_request_target: pull_request: - types: [opened, reopened] + branches: [master] paths: - "*.h" - "*.cpp" @@ -25,6 +24,7 @@ on: - "pyRF24/pyRF24.cpp" - ".github/workflows/build_linux.yml" push: + branches: [master] paths: - "*.h" - "*.cpp" @@ -53,14 +53,9 @@ env: BUILD_TYPE: Release jobs: - check_formatting: - uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main - with: - ignore: 'examples|examples_pico|utility/RPi/bcm2835.h|utility/RPi/bcm2835.c' ####################### using Makefile ############################# build: - needs: check_formatting runs-on: ubuntu-latest strategy: @@ -150,7 +145,6 @@ jobs: ####################### using CMake ################################ using_cmake: - needs: check_formatting uses: nRF24/.github/.github/workflows/build_linux_cmake.yaml@main with: rf24-ref: ${{ github.sha }} diff --git a/.github/workflows/build_platformIO.yml b/.github/workflows/build_platformIO.yml index d893ac019..39a459553 100644 --- a/.github/workflows/build_platformIO.yml +++ b/.github/workflows/build_platformIO.yml @@ -2,7 +2,7 @@ name: PlatformIO build on: pull_request: - types: [opened, reopened] + branches: [master] paths: - ".github/workflows/build_platformIO.yml" - "library.json" @@ -10,6 +10,7 @@ on: - "!examples/old_backups/**" - "!examples/rf24_ATTiny/**" push: + branches: [master] paths: - ".github/workflows/build_platformIO.yml" - "library.json" @@ -26,14 +27,8 @@ jobs: with: deploy-release: ${{ github.event_name == 'release' }} - check_formatting: - uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main - with: - ignore: examples/old_backups - extensions: ino - build: - needs: [check_formatting, validate_lib_json] + needs: [validate_lib_json] uses: nRF24/.github/.github/workflows/build_platformio.yaml@main with: example-path: ${{ matrix.example }} diff --git a/.github/workflows/build_rp2xxx.yml b/.github/workflows/build_rp2xxx.yml index 063dc2a5a..d7b75eeb3 100644 --- a/.github/workflows/build_rp2xxx.yml +++ b/.github/workflows/build_rp2xxx.yml @@ -1,8 +1,8 @@ name: Pico SDK build on: - pull_request_target: push: + branches: [master] paths: - ".github/workflows/build_rp2xxx.yml" - "*.h" @@ -13,7 +13,7 @@ on: - "utility/rp2/*" - "examples_pico/*" pull_request: - types: [opened, reopened] + branches: [master] paths: - ".github/workflows/build_rp2xxx.yml" - "*.h" @@ -25,13 +25,7 @@ on: - "examples_pico/*" jobs: - check_formatting: - uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main - with: - ignore: '!examples_pico|' - build: - needs: check_formatting uses: nRF24/.github/.github/workflows/build_pico_sdk.yaml@main with: board-id: ${{ matrix.board }} diff --git a/.github/workflows/clang_format.yml b/.github/workflows/clang_format.yml new file mode 100644 index 000000000..79d1ea392 --- /dev/null +++ b/.github/workflows/clang_format.yml @@ -0,0 +1,14 @@ +name: check code formatting + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + check_formatting: + uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main + with: + ignore: examples/old_backups|utility/RPi/bcm2835.h|utility/RPi/bcm2835.c + extensions: ino,c,cpp,h diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index 980b6b205..7824d83c5 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -2,7 +2,7 @@ name: build Docs on: pull_request: - types: [opened, reopened] + branches: [master] paths: - "*.h" - "docs/**" @@ -17,6 +17,7 @@ on: - "Doxyfile" - "library.properties" # get lib version from here push: + branches: [master] paths: - "*.h" - "docs/**" @@ -32,7 +33,6 @@ on: - "library.properties" # get lib version from here release: types: [published, edited] - branches: [master] workflow_dispatch: jobs: diff --git a/RF24.h b/RF24.h index dbd32ae53..381d6f116 100644 --- a/RF24.h +++ b/RF24.h @@ -878,7 +878,7 @@ class RF24 * to clear by issuing txStandBy() or ensure appropriate time between transmissions. * * Use txStandBy() when this function returns `false`. - * + * * Example (Partial blocking): * @code * radio.writeFast(&buf,32); // Writes 1 payload to the buffers diff --git a/examples_linux/scanner.cpp b/examples_linux/scanner.cpp index 622a1c43d..b02b323ff 100644 --- a/examples_linux/scanner.cpp +++ b/examples_linux/scanner.cpp @@ -8,7 +8,7 @@ 03/17/2013 : Charles-Henri Hallard (http://hallard.me) Modified to use with Arduipi board http://hallard.me/arduipi - Changed to use modified bcm2835 and RF24 library + Changed to use modified bcm2835 and RF24 library */ diff --git a/examples_linux/streamingData.cpp b/examples_linux/streamingData.cpp index 1934a9751..d63a888ee 100644 --- a/examples_linux/streamingData.cpp +++ b/examples_linux/streamingData.cpp @@ -219,10 +219,11 @@ void master() cout << "Aborting at payload " << buffer[0]; break; } - } // while + } // while + uint32_t elapsedTime = getMicros(); // end the timer cout << "Time to transmit data = "; - cout << elapsedTime; // print the timer result + cout << elapsedTime; // print the timer result cout << " us. " << failures; // print number of retries cout << " failures detected. Leaving TX role." << endl; } // master diff --git a/nRF24L01.h b/nRF24L01.h index a072686a8..d4ffd281d 100644 --- a/nRF24L01.h +++ b/nRF24L01.h @@ -1,6 +1,6 @@ /* Copyright (c) 2007 Stefan Engelke - Portions Copyright (C) 2011 Greg Copeland + Portions Copyright (C) 2011 Greg Copeland Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/pyRF24/pyRF24.cpp b/pyRF24/pyRF24.cpp index 3f2e04fe0..b37f02886 100644 --- a/pyRF24/pyRF24.cpp +++ b/pyRF24/pyRF24.cpp @@ -276,9 +276,9 @@ BOOST_PYTHON_MODULE(RF24) .def(bp::init((bp::arg("spispeed")))) .def(bp::init<>()) #endif - .def("available", (bool (::RF24::*)())(&::RF24::available)) + .def("available", (bool(::RF24::*)())(&::RF24::available)) .def("available_pipe", &available_wrap) // needed to rename this method as python does not allow such overloading - .def("begin", (bool (::RF24::*)(void))(&::RF24::begin)) + .def("begin", (bool(::RF24::*)(void))(&::RF24::begin)) .def("begin", &begin_with_pins) .def("closeReadingPipe", &RF24::closeReadingPipe) .def("disableCRC", &RF24::disableCRC) @@ -298,9 +298,9 @@ BOOST_PYTHON_MODULE(RF24) .def("isChipConnected", &RF24::isChipConnected) .def("maskIRQ", &RF24::maskIRQ, (bp::arg("tx_ok"), bp::arg("tx_fail"), bp::arg("rx_ready"))) .def("openReadingPipe", &openReadingPipe_wrap, (bp::arg("number"), bp::arg("address"))) - .def("openReadingPipe", (void (::RF24::*)(::uint8_t, ::uint64_t))(&::RF24::openReadingPipe), (bp::arg("number"), bp::arg("address"))) + .def("openReadingPipe", (void(::RF24::*)(::uint8_t, ::uint64_t))(&::RF24::openReadingPipe), (bp::arg("number"), bp::arg("address"))) .def("openWritingPipe", &openWritingPipe_wrap, (bp::arg("address"))) - .def("openWritingPipe", (void (::RF24::*)(::uint64_t))(&::RF24::openWritingPipe), (bp::arg("address"))) + .def("openWritingPipe", (void(::RF24::*)(::uint64_t))(&::RF24::openWritingPipe), (bp::arg("address"))) .def("powerDown", &RF24::powerDown) .def("powerUp", &RF24::powerUp) .def("printDetails", &RF24::printDetails) @@ -310,10 +310,10 @@ BOOST_PYTHON_MODULE(RF24) .def("read", &read_wrap, (bp::arg("maxlen"))) .def("rxFifoFull", &RF24::rxFifoFull) .def("isFifo", (uint8_t(::RF24::*)(bool))(&::RF24::isFifo), (bp::arg("about_tx"))) - .def("isFifo", (bool (::RF24::*)(bool, bool))(&::RF24::isFifo), (bp::arg("about_tx"), bp::arg("check_empty"))) + .def("isFifo", (bool(::RF24::*)(bool, bool))(&::RF24::isFifo), (bp::arg("about_tx"), bp::arg("check_empty"))) .def("setAddressWidth", &RF24::setAddressWidth) - .def("setAutoAck", (void (::RF24::*)(bool))(&::RF24::setAutoAck), (bp::arg("enable"))) - .def("setAutoAck", (void (::RF24::*)(::uint8_t, bool))(&::RF24::setAutoAck), (bp::arg("pipe"), bp::arg("enable"))) + .def("setAutoAck", (void(::RF24::*)(bool))(&::RF24::setAutoAck), (bp::arg("enable"))) + .def("setAutoAck", (void(::RF24::*)(::uint8_t, bool))(&::RF24::setAutoAck), (bp::arg("pipe"), bp::arg("enable"))) .def("setCRCLength", &RF24::setCRCLength, (bp::arg("length"))) .def("setDataRate", &RF24::setDataRate, (bp::arg("speed"))) .def("setPALevel", &RF24::setPALevel, (bp::arg("level"), bp::arg("lnaEnable") = 1)) @@ -328,7 +328,7 @@ BOOST_PYTHON_MODULE(RF24) .def("testRPD", &RF24::testRPD) .def("toggleAllPipes", &RF24::toggleAllPipes) .def("setRadiation", &RF24::setRadiation) - .def("txStandBy", (bool (::RF24::*)(::uint32_t, bool))(&RF24::txStandBy), txStandBy_wrap1(bp::args("timeout", "startTx"))) + .def("txStandBy", (bool(::RF24::*)(::uint32_t, bool))(&RF24::txStandBy), txStandBy_wrap1(bp::args("timeout", "startTx"))) .def("whatHappened", &whatHappened_wrap) .def("startConstCarrier", &RF24::startConstCarrier, (bp::arg("level"), bp::arg("channel"))) .def("stopConstCarrier", &RF24::stopConstCarrier) diff --git a/utility/ATXMegaD3/includes.h b/utility/ATXMegaD3/includes.h index 2cbf987f8..3989ebeca 100644 --- a/utility/ATXMegaD3/includes.h +++ b/utility/ATXMegaD3/includes.h @@ -1,7 +1,7 @@ /** -* @file includes.h -* Configuration defines for RF24/Linux -*/ + * @file includes.h + * Configuration defines for RF24/Linux + */ #ifndef RF24_UTILITY_INCLUDES_H_ #define RF24_UTILITY_INCLUDES_H_ diff --git a/utility/RPi/interrupt.h b/utility/RPi/interrupt.h index f52117b55..00e6dca54 100644 --- a/utility/RPi/interrupt.h +++ b/utility/RPi/interrupt.h @@ -35,11 +35,11 @@ extern int attachInterrupt(int pin, int mode, void (*function)(void)); extern int detachInterrupt(int pin); /* Deprecated, no longer functional -*/ + */ extern void rfNoInterrupts(); /* Deprecated, no longer functional -*/ + */ extern void rfInterrupts(); #ifdef __cplusplus diff --git a/utility/SPIDEV/gpio.h b/utility/SPIDEV/gpio.h index c802ce6ac..ff92806c5 100644 --- a/utility/SPIDEV/gpio.h +++ b/utility/SPIDEV/gpio.h @@ -17,7 +17,7 @@ #include #include -/** Specific excpetion for SPI errors */ +/** Specific exception for SPI errors */ class GPIOException : public std::runtime_error { public: diff --git a/utility/SPIDEV/interrupt.h b/utility/SPIDEV/interrupt.h index f52117b55..00e6dca54 100644 --- a/utility/SPIDEV/interrupt.h +++ b/utility/SPIDEV/interrupt.h @@ -35,11 +35,11 @@ extern int attachInterrupt(int pin, int mode, void (*function)(void)); extern int detachInterrupt(int pin); /* Deprecated, no longer functional -*/ + */ extern void rfNoInterrupts(); /* Deprecated, no longer functional -*/ + */ extern void rfInterrupts(); #ifdef __cplusplus diff --git a/utility/SPIDEV/spi.h b/utility/SPIDEV/spi.h index 35efe2d7b..63ef5e125 100644 --- a/utility/SPIDEV/spi.h +++ b/utility/SPIDEV/spi.h @@ -15,7 +15,7 @@ #include "../../RF24_config.h" // This is cyclical and should be fixed -/** Specific excpetion for SPI errors */ +/** Specific exception for SPI errors */ class SPIException : public std::runtime_error { public: diff --git a/utility/Template/gpio.h b/utility/Template/gpio.h index dd03d5c5c..916464611 100644 --- a/utility/Template/gpio.h +++ b/utility/Template/gpio.h @@ -50,10 +50,10 @@ class GPIO static int read(int port); /** - * Similar to Arduino digitalWrite(pin,state); - * @param port - * @param value - */ + * Similar to Arduino digitalWrite(pin,state); + * @param port + * @param value + */ static void write(int port, int value); #ifndef DOXYGEN_FORCED diff --git a/utility/Template/spi.h b/utility/Template/spi.h index 3f5abada2..ddb8b7500 100644 --- a/utility/Template/spi.h +++ b/utility/Template/spi.h @@ -34,35 +34,35 @@ class SPI public: /** - * SPI constructor - */ + * SPI constructor + */ SPI(); /** - * Start SPI - */ + * Start SPI + */ void begin(int busNo); /** - * Transfer a single byte - * @param tx_ Byte to send - * @return Data returned via spi - */ + * Transfer a single byte + * @param tx_ Byte to send + * @return Data returned via spi + */ uint8_t transfer(uint8_t tx_); /** - * Transfer a buffer of data - * @param tbuf Transmit buffer - * @param rbuf Receive buffer - * @param len Length of the data - */ + * Transfer a buffer of data + * @param tbuf Transmit buffer + * @param rbuf Receive buffer + * @param len Length of the data + */ void transfernb(char* tbuf, char* rbuf, uint32_t len); /** - * Transfer a buffer of data without an rx buffer - * @param buf Pointer to a buffer of data - * @param len Length of the data - */ + * Transfer a buffer of data without an rx buffer + * @param buf Pointer to a buffer of data + * @param len Length of the data + */ void transfern(char* buf, uint32_t len); #ifndef DOXYGEN_FORCED diff --git a/utility/pigpio/gpio.cpp b/utility/pigpio/gpio.cpp index 2634d57ec..f57c3e957 100644 --- a/utility/pigpio/gpio.cpp +++ b/utility/pigpio/gpio.cpp @@ -1,5 +1,5 @@ /* -* GPIO Functions + * GPIO Functions */ #include "gpio.h" diff --git a/utility/pigpio/gpio.h b/utility/pigpio/gpio.h index 5dea0ec29..8247183ac 100644 --- a/utility/pigpio/gpio.h +++ b/utility/pigpio/gpio.h @@ -9,7 +9,7 @@ #include #include -/** Specific excpetion for SPI errors */ +/** Specific exception for SPI errors */ class GPIOException : public std::runtime_error { public: @@ -66,10 +66,10 @@ class GPIO static int read(int port); /** - * Similar to Arduino digitalWrite(pin,state); - * @param port - * @param value - */ + * Similar to Arduino digitalWrite(pin,state); + * @param port + * @param value + */ static void write(int port, int value); virtual ~GPIO(); diff --git a/utility/pigpio/interrupt.h b/utility/pigpio/interrupt.h index fb2527ac0..8acdf9207 100644 --- a/utility/pigpio/interrupt.h +++ b/utility/pigpio/interrupt.h @@ -33,18 +33,18 @@ extern int attachInterrupt(int pin, int mode, void (*function)(void)); /* * detachInterrupt: * Pi Specific detachInterrupt. - * Will cancel the interrupt thread, close the filehandle and + * Will cancel the interrupt thread, close the filehandle and * setting wiringPi back to 'none' mode. ********************************************************************************* */ extern int detachInterrupt(int pin); /* Deprecated, no longer functional -*/ + */ extern void rfNoInterrupts(); /* Deprecated, no longer functional -*/ + */ extern void rfInterrupts(); #ifdef __cplusplus diff --git a/utility/pigpio/spi.h b/utility/pigpio/spi.h index 8db0e8755..1af63b8a5 100644 --- a/utility/pigpio/spi.h +++ b/utility/pigpio/spi.h @@ -12,20 +12,20 @@ */ /** -* Example GPIO.h file -* -* @defgroup SPI SPI Example -* -* See RF24_arch_config.h for additional information -* @{ -*/ + * Example GPIO.h file + * + * @defgroup SPI SPI Example + * + * See RF24_arch_config.h for additional information + * @{ + */ #include #include #include "../../RF24_config.h" -/** Specific excpetion for SPI errors */ +/** Specific exception for SPI errors */ class SPIException : public std::runtime_error { public: @@ -40,35 +40,35 @@ class SPI public: /** - * SPI constructor - */ + * SPI constructor + */ SPI(); /** - * Start SPI - */ + * Start SPI + */ void begin(int busNo, uint32_t spi_speed); /** - * Transfer a single byte - * @param tx Byte to send - * @return Data returned via spi - */ + * Transfer a single byte + * @param tx Byte to send + * @return Data returned via spi + */ uint8_t transfer(char tx); /** - * Transfer a buffer of data - * @param tbuf Transmit buffer - * @param rbuf Receive buffer - * @param len Length of the data - */ + * Transfer a buffer of data + * @param tbuf Transmit buffer + * @param rbuf Receive buffer + * @param len Length of the data + */ void transfernb(char* tbuf, char* rbuf, uint32_t len); /** - * Transfer a buffer of data without an rx buffer - * @param buf Pointer to a buffer of data - * @param len Length of the data - */ + * Transfer a buffer of data without an rx buffer + * @param buf Pointer to a buffer of data + * @param len Length of the data + */ void transfern(char* buf, uint32_t len) { transfernb(buf, buf, len); diff --git a/utility/wiringPi/includes.h b/utility/wiringPi/includes.h index a64262faf..195c0eb53 100644 --- a/utility/wiringPi/includes.h +++ b/utility/wiringPi/includes.h @@ -1,7 +1,7 @@ /** -* @file includes.h -* Configuration defines for RF24/Linux -*/ + * @file includes.h + * Configuration defines for RF24/Linux + */ #ifndef RF24_UTILITY_INCLUDES_H_ #define RF24_UTILITY_INCLUDES_H_