#396 change pins to default unit test hardware (Pi1 comp.)

This commit is contained in:
mstroh76
2025-09-13 15:48:34 +02:00
parent be0f0ea3c7
commit b54a60a598
10 changed files with 24 additions and 24 deletions

View File

@@ -16,7 +16,7 @@ BIN_DIR := bin
RUN_ISR_SRC := run_isr.cpp RUN_ISR_SRC := run_isr.cpp
RUN_ISR_BIN := $(BIN_DIR)/run_isr RUN_ISR_BIN := $(BIN_DIR)/run_isr
# Need BCM1 <-> BCM12 connection # Need BCM17 <-> BCM18 connection
TEST_SRCS := \ TEST_SRCS := \
test_isr_both.cpp \ test_isr_both.cpp \
test_isr_conflict_between_processes.cpp \ test_isr_conflict_between_processes.cpp \

View File

@@ -2,8 +2,8 @@
g++ is required to build the test cases. g++ is required to build the test cases.
Connect wPi pin 31 (BCM 1) and wPi pin 26 (BCM 12) to run ISR tests. Connect wPi pin 1 (BCM 18) and wPi pin 0 (BCM 17) to run ISR tests.
Also, wPi pin 28 (BCM 20) should be unconnected. Also, wPi pin 6 (BCM 25) should be unconnected.
Run `make test` or do following to run the test: Run `make test` or do following to run the test:

View File

@@ -1,13 +1,13 @@
/* /*
* Helper program of test_conflict_between_processes. * Helper program of test_conflict_between_processes.
* *
* The program configures ISR on pin 31 (BCM 1) and polls for a termination request. * The program configures ISR on pin 1 (BCM 18) and polls for a termination request.
*/ */
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <wiringPi.h> #include <wiringPi.h>
#define LISTENER_PIN 31 // BCM 1 #define LISTENER_PIN 1 // BCM 18
static uint8_t ok_to_stop = 0; static uint8_t ok_to_stop = 0;
static void noop() { static void noop() {

View File

@@ -2,8 +2,8 @@
#include <time.h> #include <time.h>
#include <wiringPi.h> #include <wiringPi.h>
#define TRIGGER_PIN 26 // BCM 12 #define TRIGGER_PIN 0 // BCM 17
#define LISTENER_PIN 31 // BCM 1 #define LISTENER_PIN 1 // BCM 18
/** /**
* Tests ISR for both edges. * Tests ISR for both edges.

View File

@@ -5,9 +5,9 @@
#include <unistd.h> #include <unistd.h>
#include <wiringPi.h> #include <wiringPi.h>
#define TRIGGER_PIN 26 // BCM 12 #define TRIGGER_PIN 0 // BCM 17
#define LISTENER_PIN 31 // BCM 1 #define LISTENER_PIN 1 // BCM 18
#define ANOTHER_LISTENER_PIN 28 // BCM 20 #define ANOTHER_LISTENER_PIN 6 // BCM 25
static void *remote_isr(void *) { static void *remote_isr(void *) {
std::system("./bin/run_isr"); std::system("./bin/run_isr");

View File

@@ -2,8 +2,8 @@
#include <time.h> #include <time.h>
#include <wiringPi.h> #include <wiringPi.h>
#define TRIGGER_PIN 26 // BCM 12 #define TRIGGER_PIN 0 // BCM 17
#define LISTENER_PIN 31 // BCM 1 #define LISTENER_PIN 1 // BCM 18
/** /**
* Tests ISR for falling edges. * Tests ISR for falling edges.

View File

@@ -2,9 +2,9 @@
#include <time.h> #include <time.h>
#include <wiringPi.h> #include <wiringPi.h>
#define TRIGGER_PIN 26 // BCM 12 #define TRIGGER_PIN 0 // BCM 17
#define LISTENER_PIN 31 // BCM 1 #define LISTENER_PIN 1 // BCM 18
#define ANOTHER_LISTENER_PIN 28 // BCM 20 #define ANOTHER_LISTENER_PIN 6 // BCM 25
/** /**
* Tests restarting ISR. * Tests restarting ISR.

View File

@@ -2,9 +2,9 @@
#include <time.h> #include <time.h>
#include <wiringPi.h> #include <wiringPi.h>
#define TRIGGER_PIN 26 // BCM 12 #define TRIGGER_PIN 0 // BCM 17
#define LISTENER_PIN 31 // BCM 1 #define LISTENER_PIN 1 // BCM 18
#define ANOTHER_LISTENER_PIN 28 // BCM 20 #define ANOTHER_LISTENER_PIN 6 // BCM 25
struct counters { struct counters {
int32_t *primary; int32_t *primary;

View File

@@ -2,9 +2,9 @@
#include <time.h> #include <time.h>
#include <wiringPi.h> #include <wiringPi.h>
#define TRIGGER_PIN 26 // BCM 12 #define TRIGGER_PIN 0 // BCM 17
#define LISTENER_PIN 31 // BCM 1 #define LISTENER_PIN 1 // BCM 18
#define ANOTHER_LISTENER_PIN 28 // BCM 20 #define ANOTHER_LISTENER_PIN 6 // BCM 25
/** /**
* Tests ISR for rising edges. * Tests ISR for rising edges.

View File

@@ -2,9 +2,9 @@
#include <time.h> #include <time.h>
#include <wiringPi.h> #include <wiringPi.h>
#define TRIGGER_PIN 26 // BCM 12 #define TRIGGER_PIN 0 // BCM 17
#define LISTENER_PIN 31 // BCM 1 #define LISTENER_PIN 1 // BCM 18
#define ANOTHER_LISTENER_PIN 28 // BCM 20 #define ANOTHER_LISTENER_PIN 6 // BCM 25
struct counters { struct counters {
uint32_t *primary; uint32_t *primary;