Skip to content

Commit

Permalink
ran clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Feb 16, 2024
1 parent 7214569 commit 64d4f7f
Show file tree
Hide file tree
Showing 17 changed files with 81 additions and 80 deletions.
2 changes: 1 addition & 1 deletion RF24.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples_linux/scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

Expand Down
5 changes: 3 additions & 2 deletions examples_linux/streamingData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion nRF24L01.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Copyright (c) 2007 Stefan Engelke <[email protected]>
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
Expand Down
16 changes: 8 additions & 8 deletions pyRF24/pyRF24.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ BOOST_PYTHON_MODULE(RF24)
.def(bp::init<uint32_t>((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)
Expand All @@ -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)
Expand All @@ -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))
Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions utility/ATXMegaD3/includes.h
Original file line number Diff line number Diff line change
@@ -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_
Expand Down
4 changes: 2 additions & 2 deletions utility/RPi/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion utility/SPIDEV/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <map>
#include <stdexcept>

/** Specific excpetion for SPI errors */
/** Specific exception for SPI errors */
class GPIOException : public std::runtime_error
{
public:
Expand Down
4 changes: 2 additions & 2 deletions utility/SPIDEV/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion utility/SPIDEV/spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions utility/Template/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 17 additions & 17 deletions utility/Template/spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion utility/pigpio/gpio.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* GPIO Functions
* GPIO Functions
*/

#include "gpio.h"
Expand Down
10 changes: 5 additions & 5 deletions utility/pigpio/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <map>
#include <stdexcept>

/** Specific excpetion for SPI errors */
/** Specific exception for SPI errors */
class GPIOException : public std::runtime_error
{
public:
Expand Down Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions utility/pigpio/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
50 changes: 25 additions & 25 deletions utility/pigpio/spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <inttypes.h>
#include <stdexcept>

#include "../../RF24_config.h"

/** Specific excpetion for SPI errors */
/** Specific exception for SPI errors */
class SPIException : public std::runtime_error
{
public:
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions utility/wiringPi/includes.h
Original file line number Diff line number Diff line change
@@ -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_
Expand Down

0 comments on commit 64d4f7f

Please sign in to comment.