summaryrefslogtreecommitdiffstats
path: root/apps/osmocomBB/osmocomBB/include/calypso/tsp.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/osmocomBB/osmocomBB/include/calypso/tsp.h')
-rw-r--r--apps/osmocomBB/osmocomBB/include/calypso/tsp.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/apps/osmocomBB/osmocomBB/include/calypso/tsp.h b/apps/osmocomBB/osmocomBB/include/calypso/tsp.h
new file mode 100644
index 0000000000..d58a562adf
--- /dev/null
+++ b/apps/osmocomBB/osmocomBB/include/calypso/tsp.h
@@ -0,0 +1,31 @@
+#ifndef _CALYPSO_TSP_H
+#define _CALYPSO_TSP_H
+
+#define TSPACT(x) (1 << x)
+#define TSPEN(x) (x)
+
+/* initiate a TSP write through the TPU */
+void tsp_write(uint8_t dev_idx, uint8_t bitlen, uint32_t dout);
+
+/* Configure clock edge and chip enable polarity for a device */
+void tsp_setup(uint8_t dev_idx, int clk_rising, int en_positive, int en_edge);
+
+/* Obtain the current tspact state */
+uint16_t tsp_act_state(void);
+
+/* Update the TSPACT state, including enable and disable */
+void tsp_act_update(uint16_t new_act);
+
+/* Enable one or multiple TSPACT signals */
+void tsp_act_enable(uint16_t bitmask);
+
+/* Disable one or multiple TSPACT signals */
+void tsp_act_disable(uint16_t bitmask);
+
+/* Toggle one or multiple TSPACT signals */
+void tsp_act_toggle(uint16_t bitmask);
+
+/* Initialize TSP driver */
+void tsp_init(void);
+
+#endif /* _CALYPSO_TSP_H */