From f76d17279ec7709e0d1035021fcb471de3b0a587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Thu, 5 Jan 2017 21:02:28 +0100 Subject: [PATCH] Change the merge sensor pin for the v7 PCB. --- right/src/merge_sensor.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/right/src/merge_sensor.h b/right/src/merge_sensor.h index 4f8858f..12f75e5 100644 --- a/right/src/merge_sensor.h +++ b/right/src/merge_sensor.h @@ -7,12 +7,21 @@ // Macros: +#if UHK_PCB_MAJOR_VERSION == 7 + #define MERGE_SENSOR_GPIO GPIOB + #define MERGE_SENSOR_PORT PORTB + #define MERGE_SENSOR_CLOCK kCLOCK_PortB + #define MERGE_SENSOR_PIN 3 + #define MERGE_SENSOR_IRQ PORTB_IRQn + #define MERGE_SENSOR_IRQ_HANDLER PORTB_IRQHandler +#else #define MERGE_SENSOR_GPIO GPIOB #define MERGE_SENSOR_PORT PORTB #define MERGE_SENSOR_CLOCK kCLOCK_PortB #define MERGE_SENSOR_PIN 2 #define MERGE_SENSOR_IRQ PORTB_IRQn #define MERGE_SENSOR_IRQ_HANDLER PORTB_IRQHandler +#endif #define MERGE_SENSOR_IS_MERGED !GPIO_ReadPinInput(MERGE_SENSOR_GPIO, MERGE_SENSOR_PIN)