#396 change pins to default unit test hardware (Pi1 comp.)
This commit is contained in:
@@ -16,7 +16,7 @@ BIN_DIR := bin
|
||||
RUN_ISR_SRC := run_isr.cpp
|
||||
RUN_ISR_BIN := $(BIN_DIR)/run_isr
|
||||
|
||||
# Need BCM1 <-> BCM12 connection
|
||||
# Need BCM17 <-> BCM18 connection
|
||||
TEST_SRCS := \
|
||||
test_isr_both.cpp \
|
||||
test_isr_conflict_between_processes.cpp \
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
g++ is required to build the test cases.
|
||||
|
||||
Connect wPi pin 31 (BCM 1) and wPi pin 26 (BCM 12) to run ISR tests.
|
||||
Also, wPi pin 28 (BCM 20) should be unconnected.
|
||||
Connect wPi pin 1 (BCM 18) and wPi pin 0 (BCM 17) to run ISR tests.
|
||||
Also, wPi pin 6 (BCM 25) should be unconnected.
|
||||
|
||||
Run `make test` or do following to run the test:
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
* 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 <stdio.h>
|
||||
#include <wiringPi.h>
|
||||
|
||||
#define LISTENER_PIN 31 // BCM 1
|
||||
#define LISTENER_PIN 1 // BCM 18
|
||||
|
||||
static uint8_t ok_to_stop = 0;
|
||||
static void noop() {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#include <time.h>
|
||||
#include <wiringPi.h>
|
||||
|
||||
#define TRIGGER_PIN 26 // BCM 12
|
||||
#define LISTENER_PIN 31 // BCM 1
|
||||
#define TRIGGER_PIN 0 // BCM 17
|
||||
#define LISTENER_PIN 1 // BCM 18
|
||||
|
||||
/**
|
||||
* Tests ISR for both edges.
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#include <unistd.h>
|
||||
#include <wiringPi.h>
|
||||
|
||||
#define TRIGGER_PIN 26 // BCM 12
|
||||
#define LISTENER_PIN 31 // BCM 1
|
||||
#define ANOTHER_LISTENER_PIN 28 // BCM 20
|
||||
#define TRIGGER_PIN 0 // BCM 17
|
||||
#define LISTENER_PIN 1 // BCM 18
|
||||
#define ANOTHER_LISTENER_PIN 6 // BCM 25
|
||||
|
||||
static void *remote_isr(void *) {
|
||||
std::system("./bin/run_isr");
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#include <time.h>
|
||||
#include <wiringPi.h>
|
||||
|
||||
#define TRIGGER_PIN 26 // BCM 12
|
||||
#define LISTENER_PIN 31 // BCM 1
|
||||
#define TRIGGER_PIN 0 // BCM 17
|
||||
#define LISTENER_PIN 1 // BCM 18
|
||||
|
||||
/**
|
||||
* Tests ISR for falling edges.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#include <time.h>
|
||||
#include <wiringPi.h>
|
||||
|
||||
#define TRIGGER_PIN 26 // BCM 12
|
||||
#define LISTENER_PIN 31 // BCM 1
|
||||
#define ANOTHER_LISTENER_PIN 28 // BCM 20
|
||||
#define TRIGGER_PIN 0 // BCM 17
|
||||
#define LISTENER_PIN 1 // BCM 18
|
||||
#define ANOTHER_LISTENER_PIN 6 // BCM 25
|
||||
|
||||
/**
|
||||
* Tests restarting ISR.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#include <time.h>
|
||||
#include <wiringPi.h>
|
||||
|
||||
#define TRIGGER_PIN 26 // BCM 12
|
||||
#define LISTENER_PIN 31 // BCM 1
|
||||
#define ANOTHER_LISTENER_PIN 28 // BCM 20
|
||||
#define TRIGGER_PIN 0 // BCM 17
|
||||
#define LISTENER_PIN 1 // BCM 18
|
||||
#define ANOTHER_LISTENER_PIN 6 // BCM 25
|
||||
|
||||
struct counters {
|
||||
int32_t *primary;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#include <time.h>
|
||||
#include <wiringPi.h>
|
||||
|
||||
#define TRIGGER_PIN 26 // BCM 12
|
||||
#define LISTENER_PIN 31 // BCM 1
|
||||
#define ANOTHER_LISTENER_PIN 28 // BCM 20
|
||||
#define TRIGGER_PIN 0 // BCM 17
|
||||
#define LISTENER_PIN 1 // BCM 18
|
||||
#define ANOTHER_LISTENER_PIN 6 // BCM 25
|
||||
|
||||
/**
|
||||
* Tests ISR for rising edges.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#include <time.h>
|
||||
#include <wiringPi.h>
|
||||
|
||||
#define TRIGGER_PIN 26 // BCM 12
|
||||
#define LISTENER_PIN 31 // BCM 1
|
||||
#define ANOTHER_LISTENER_PIN 28 // BCM 20
|
||||
#define TRIGGER_PIN 0 // BCM 17
|
||||
#define LISTENER_PIN 1 // BCM 18
|
||||
#define ANOTHER_LISTENER_PIN 6 // BCM 25
|
||||
|
||||
struct counters {
|
||||
uint32_t *primary;
|
||||
|
||||
Reference in New Issue
Block a user