summaryrefslogtreecommitdiff
path: root/mtac.h
diff options
context:
space:
mode:
Diffstat (limited to 'mtac.h')
-rw-r--r--mtac.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/mtac.h b/mtac.h
index 1a84884..4581c07 100644
--- a/mtac.h
+++ b/mtac.h
@@ -1,13 +1,22 @@
#ifndef IO_MODULE_MTAC_H_
#define IO_MODULE_MTAC_H_
+
+
// NUM_AP should be defined from the board code
// it should be set to the value of CONFIG_MTS_NUM_ACCESSORY_PORTS
// arch/arm/mach-at91/board-dt-sam9.c
// if it is 0 or undefined, there is no accessory card support on this HW
+#ifdef mtcpmhs
+#define NUM_BUILT_IN 1
+
+#else
+#define NUM_BUILT_IN 0
+#endif
+
#ifdef CONFIG_MTS_NUM_ACCESSORY_PORTS
#ifndef NUM_AP
-#define NUM_AP CONFIG_MTS_NUM_ACCESSORY_PORTS
+#define NUM_AP CONFIG_MTS_NUM_ACCESSORY_PORTS + NUM_BUILT_IN
#endif
#else
@@ -17,7 +26,7 @@
#define PRODUCT_ID_MTAC_GPIOB "MTAC-GPIOB"
#define PRODUCT_ID_MTAC_MFSER "MTAC-MFSER"
-#define PRODUCT_ID_MTAC_ETH "MTAC-ETH"
+#define PRODUCT_ID_MTAC_ETH "MTAC-ETH"
#define PRODUCT_ID_MTAC_LORA "MTAC-LORA"
#define PRODUCT_ID_MTAC_PULSE "MTAC-PULSE"
#define PRODUCT_ID_MTAC_XDOT "MTAC-XDOT"
@@ -54,6 +63,9 @@ enum {
enum ap {
port_1 = 1,
port_2,
+#ifdef mtcpmhs
+ port_3,
+#endif
};
// info for accessory port