Quellcode durchsuchen

#263 Add PWM to Makefile

pull/270/head
mstroh76 vor 2 Monaten
Ursprung
Commit
725336332e
2 geänderte Dateien mit 8 neuen und 5 gelöschten Zeilen
  1. +4
    -4
      wiringPi/test/Makefile
  2. +4
    -1
      wiringPi/test/wiringpi_test9_pwm.c

+ 4
- 4
wiringPi/test/Makefile Datei anzeigen

@@ -2,13 +2,13 @@ CC = gcc
CFLAGS = -Wall
LDFLAGS =

# Need BCM26 <-> BCM19 connected (1kOhm)
tests = wiringpi_test1_sysfs wiringpi_test2_sysfs wiringpi_test3_device_wpi wiringpi_test4_device_phys wiringpi_test5_default wiringpi_test6_isr wiringpi_test7_version
# Need BCM19 <-> BCM26, +PWM: BCM12 <-> BCM13, BCM18 <-> BCM17 connected (1kOhm)
tests = wiringpi_test1_sysfs wiringpi_test2_sysfs wiringpi_test3_device_wpi wiringpi_test4_device_phys wiringpi_test5_default wiringpi_test6_isr wiringpi_test7_version wiringpi_test9_pwm

# Need XO hardware
xotests = wiringpi_xotest_test1_spi wiringpi_i2c_test1_pcf8574
xotests = wiringpi_xotest_test1_spi wiringpi_i2c_test1_pcf8574 wiringpi_test9_pwm

# Need PiFace hardware and tests condition
# Need PiFace hardware and BCM23 <-> BCM24 , BCM18 <-> BCM17 connected (1kOhm), and PiFace Out7<->In4, Out6<->In5, R0_NO<->In6, R0_NO<->In7, R_C<-100Ohm->GND
pifacetests = wiringpi_piface_test1 wiringpi_test9_pwm

all: $(tests) $(xotests) $(pifacetests)


+ 4
- 1
wiringPi/test/wiringpi_test9_pwm.c Datei anzeigen

@@ -141,7 +141,7 @@ int main (void) {
return UnitTestState();
}
printf("Wait for start ...\n");
delay(250);
delay(500);
printf("Start:\n");
//MeasureAndCheckFreq("50\% Duty (default)", 300.000); //FAIL , freq (pwmc=32) to high for irq count

@@ -215,5 +215,8 @@ int main (void) {
printf("set PWM@GPIO%d (output) back to input\n", PWM);
pinMode(PWM, INPUT);
}

printf("\nDid %d PWM GPIO tests with model %d\n", testruns, RaspberryPiModel);

return UnitTestState();
}

Laden…
Abbrechen
Speichern