aboutsummaryrefslogtreecommitdiffstats
path: root/examples/test-session.cpp
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-03-08 14:44:13 -0500
committerMarti Bolivar <mbolivar@leaflabs.com>2011-03-08 15:50:32 -0500
commitc37972e81501b0e8024b59e98b16c27a85597492 (patch)
treebf217f10f276e18a40498f10527f4d4aec083968 /examples/test-session.cpp
parent8863418f0595c8dfd7d01081be941541539827bb (diff)
downloadlibrambutan-c37972e81501b0e8024b59e98b16c27a85597492.tar.gz
librambutan-c37972e81501b0e8024b59e98b16c27a85597492.zip
qa-slave-shield.cpp and test-session.cpp fixes for Mini and RET6 Edition.
There's a bit of a hack on the RET6 NR_DAC_PINS: due to the fact that PA5 is hooked up to the built-in LED and DAC channel 2, I set NR_DAC_PINS to 0 for the STM32F103RE (in libmaple.h), so that init() doesn't dac_init() and mess with the LED. Not too worried about it since this is just a beta board, but we'll need to fix this in the design for the real version. Also, BUT should be moved, since it steals Timer 8's channel 4 CC connection.
Diffstat (limited to 'examples/test-session.cpp')
-rw-r--r--examples/test-session.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/examples/test-session.cpp b/examples/test-session.cpp
index cf1f4ec..c473521 100644
--- a/examples/test-session.cpp
+++ b/examples/test-session.cpp
@@ -55,6 +55,14 @@ const uint8 adc_pins[] = {
46, 47, 48, 49, 50, 51, 52, 53, 54};
const uint8 pins_to_skip[] = {LED_PIN};
+#elif defined(BOARD_maple_RET6)
+const uint8 pwm_pins[] =
+ {0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 14, 24, 25, 27, 28, 35, 37, 37,
+ 38}; // NB 38 is BUT
+const uint8 adc_pins[] =
+ {0, 1, 2, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 27, 28};
+const uint8 pins_to_skip[] = {LED_PIN};
+
#else
#error "Board type has not been selected correctly."
#endif
@@ -497,10 +505,12 @@ void cmd_gpio_qa(void) {
COMM.println(i);
continue;
}
- COMM.print("Checking pin ")
+ COMM.print("Checking pin ");
COMM.print(i, DEC);
while(digitalRead(i) == 0) continue;
for(int j = 0; j < NR_GPIO_PINS; j++) {
+ if (skip_pin_p(j))
+ continue;
if(digitalRead(j) && j != i) {
COMM.print(": FAIL ########################### D");
COMM.println(j, DEC);
@@ -509,6 +519,8 @@ void cmd_gpio_qa(void) {
}
while(digitalRead(i) == 1) continue;
for(int j = 0; j < NR_GPIO_PINS; j++) {
+ if (skip_pin_p(j))
+ continue;
if(digitalRead(j) && j != i) {
COMM.print(": FAIL ########################### D");
COMM.println(j, DEC);