Skip to content

Commit

Permalink
Apply suggestions from clang-format code review
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
2bndy5 and github-actions[bot] authored Mar 18, 2024
1 parent b950a42 commit b74f17e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions examples_linux/interruptConfigure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,12 @@ void ping_n_wait()
// use the non-blocking call to write a payload and begin transmission
// the "false" argument means we are expecting an ACK packet response
radio.startFastWrite(tx_payloads[pl_iterator], tx_pl_size, false);

uint32_t timer = millis();
while (!got_interrupt) {
if(millis() - timer > 500){
if (millis() - timer > 500) {
cout << "\tIRQ NOT received" << endl;
break;
}

/*
* IRQ pin is LOW when activated. Otherwise it is always HIGH
* Wait in this empty loop until IRQ pin is activated.
Expand Down
4 changes: 2 additions & 2 deletions utility/RPi/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#ifndef RF24_UTILITY_RPI_INTERRUPT_H_
#define RF24_UTILITY_RPI_INTERRUPT_H_

#include <pthread.h> // pthread_t
#include <linux/gpio.h> // gpiochip_info
#include <pthread.h> // pthread_t
#include <linux/gpio.h> // gpiochip_info
#include <stdexcept>
#include "RF24_arch_config.h" // rf24_gpio_pin_t

Expand Down
2 changes: 1 addition & 1 deletion utility/SPIDEV/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <pthread.h> // pthread_t
#include <stdexcept>
#include "gpio.h" // rf24_gpio_pin_t
#include "gpio.h" // rf24_gpio_pin_t

#define INT_EDGE_SETUP 0
#define INT_EDGE_FALLING GPIO_V2_LINE_FLAG_EDGE_FALLING
Expand Down

0 comments on commit b74f17e

Please sign in to comment.