aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wirish/boards/maple.cpp4
-rw-r--r--wirish/boards/maple.h2
-rw-r--r--wirish/boards/maple_RET6.cpp6
-rw-r--r--wirish/boards/maple_RET6.h14
-rw-r--r--wirish/boards/maple_mini.cpp2
-rw-r--r--wirish/boards/maple_mini.h2
6 files changed, 21 insertions, 9 deletions
diff --git a/wirish/boards/maple.cpp b/wirish/boards/maple.cpp
index 2d35e7b..c82a113 100644
--- a/wirish/boards/maple.cpp
+++ b/wirish/boards/maple.cpp
@@ -100,11 +100,11 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = {
};
extern const uint8 boardPWMPins[] __FLASH__ = {
- 0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 14, 24, 25, 27, 28
+ 0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 14, 24, 27, 28
};
extern const uint8 boardADCPins[] __FLASH__ = {
- 0, 1, 2, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 27, 28
+ 0, 1, 2, 3, 10, 11, 12, 15, 16, 17, 18, 19, 20, 27, 28
};
extern const uint8 boardUsedPins[] __FLASH__ = {
diff --git a/wirish/boards/maple.h b/wirish/boards/maple.h
index 4b55f7a..bfa9bc2 100644
--- a/wirish/boards/maple.h
+++ b/wirish/boards/maple.h
@@ -70,7 +70,7 @@
#define BOARD_NR_GPIO_PINS 44
/* Number of pins capable of PWM output */
-#define BOARD_NR_PWM_PINS 16
+#define BOARD_NR_PWM_PINS 15
/* Number of pins capable of ADC conversion */
#define BOARD_NR_ADC_PINS 15
diff --git a/wirish/boards/maple_RET6.cpp b/wirish/boards/maple_RET6.cpp
index d5d3d32..25cdb10 100644
--- a/wirish/boards/maple_RET6.cpp
+++ b/wirish/boards/maple_RET6.cpp
@@ -96,12 +96,14 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = {
{GPIOB, NULL, NULL, 4, 0, ADCx}, /* D43/PB4 */
};
+/* Note: Do NOT include pin 38 (TIM8_CH4), as that's BOARD_BUTTON_PIN
+ * and thus not broken out to a header. */
extern const uint8 boardPWMPins[BOARD_NR_PWM_PINS] __FLASH__ = {
- 0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 14, 24, 25, 27, 28
+ 0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 14, 24, 27, 28, 35, 36, 37
};
extern const uint8 boardADCPins[BOARD_NR_ADC_PINS] __FLASH__ = {
- 0, 1, 2, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 27, 28
+ 0, 1, 2, 3, 10, 11, 12, 15, 16, 17, 18, 19, 20, 27, 28
};
extern const uint8 boardUsedPins[BOARD_NR_USED_PINS] __FLASH__ = {
diff --git a/wirish/boards/maple_RET6.h b/wirish/boards/maple_RET6.h
index e70edce..755f400 100644
--- a/wirish/boards/maple_RET6.h
+++ b/wirish/boards/maple_RET6.h
@@ -40,6 +40,9 @@
#ifndef _BOARDS_MAPLE_RET6_H_
#define _BOARDS_MAPLE_RET6_H_
+/* A few of these values will seem strange given that it's a
+ * high-density board. */
+
#define CYCLES_PER_MICROSECOND 72
#define SYSTICK_RELOAD_VAL 71999 /* takes a cycle to reload */
@@ -55,7 +58,12 @@
#define BOARD_USART3_TX_PIN 29
#define BOARD_USART3_RX_PIN 30
-#define BOARD_NR_SPI 3
+/* Note:
+ *
+ * SPI3 is unusable due to pin 43 (PB4) and NRST tie-together :(, but
+ * leave the definitions so as not to clutter things up. This is only
+ * OK since RET6 Ed. is specifically advertised as a beta board. */
+#define BOARD_NR_SPI 2
#define BOARD_SPI1_NSS_PIN 10
#define BOARD_SPI1_MOSI_PIN 11
#define BOARD_SPI1_MISO_PIN 12
@@ -70,7 +78,9 @@
#define BOARD_SPI3_SCK_PIN 42
#define BOARD_NR_GPIO_PINS 44
-#define BOARD_NR_PWM_PINS 16
+/* Note: NOT 19. The missing one is D38 a.k.a. BOARD_BUTTON_PIN, which
+ * isn't broken out to a header and is thus unusable for PWM. */
+#define BOARD_NR_PWM_PINS 18
#define BOARD_NR_ADC_PINS 15
#define BOARD_NR_USED_PINS 7
diff --git a/wirish/boards/maple_mini.cpp b/wirish/boards/maple_mini.cpp
index 3bc250b..6a3a86b 100644
--- a/wirish/boards/maple_mini.cpp
+++ b/wirish/boards/maple_mini.cpp
@@ -90,7 +90,7 @@ extern const uint8 boardPWMPins[BOARD_NR_PWM_PINS] __FLASH__ = {
};
extern const uint8 boardADCPins[BOARD_NR_ADC_PINS] __FLASH__ = {
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 33 // NB: 33 is BOARD_LED_PIN
+ 3, 4, 5, 6, 7, 8, 9, 10, 11
};
#define USB_DP 23
diff --git a/wirish/boards/maple_mini.h b/wirish/boards/maple_mini.h
index fde7f98..51d63cd 100644
--- a/wirish/boards/maple_mini.h
+++ b/wirish/boards/maple_mini.h
@@ -66,7 +66,7 @@
#define BOARD_NR_GPIO_PINS 34
#define BOARD_NR_PWM_PINS 12
-#define BOARD_NR_ADC_PINS 10
+#define BOARD_NR_ADC_PINS 9
#define BOARD_NR_USED_PINS 4
#define BOARD_JTMS_SWDIO_PIN 22