summaryrefslogtreecommitdiff
path: root/io-module/mts_io.h
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2014-09-23 10:35:11 -0500
committerMike Fiore <mfiore@multitech.com>2014-09-23 10:35:11 -0500
commita21c24fa2486e4d4a3b25d0dcbf873ae62fdbcec (patch)
tree6d78da220c6235cd33408acbd22adf9b4038bbc1 /io-module/mts_io.h
parent24c012065ca7a764e1e51a9cfc4422d649cd2851 (diff)
downloadmts-io-a21c24fa2486e4d4a3b25d0dcbf873ae62fdbcec.tar.gz
mts-io-a21c24fa2486e4d4a3b25d0dcbf873ae62fdbcec.tar.bz2
mts-io-a21c24fa2486e4d4a3b25d0dcbf873ae62fdbcec.zip
mts-io: clean up accessory card support
use custom kernel config option MTS_NUM_ACCESSORY_PORTS to find out how many slots exist (mostly) dynamically handle any number of accessory cards streamline code to make it easier to add accessory cards in the future
Diffstat (limited to 'io-module/mts_io.h')
-rw-r--r--io-module/mts_io.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/io-module/mts_io.h b/io-module/mts_io.h
index b91423e..ac39463 100644
--- a/io-module/mts_io.h
+++ b/io-module/mts_io.h
@@ -102,5 +102,25 @@ enum {
LED_FLASHING,
};
+enum ap {
+ port_1 = 1,
+ port_2,
+};
+
+enum spi_devices {
+ din = 0,
+ dout = 1,
+ adc = 2,
+};
+
+// info for accessory port
+// contains function pointers for setup and teardown and useful info
+// each type of accessory card should have one of these
+struct ap_info {
+ uint8_t product_id;
+ bool (*setup)(enum ap port);
+ bool (*teardown)(enum ap port);
+};
+
#endif /* ~__MTS_IO_H */