|
@@ -0,0 +1,21 @@
|
|
1
|
+#ifndef SHARED_H
|
|
2
|
+#define SHARED_H
|
|
3
|
+
|
|
4
|
+/*
|
|
5
|
+ * To save space in the binary when multiple-driver images are
|
|
6
|
+ * compiled, uninitialised data areas can be shared between drivers.
|
|
7
|
+ * This will typically be used to share statically-allocated receive
|
|
8
|
+ * and transmit buffers between drivers.
|
|
9
|
+ *
|
|
10
|
+ * Use as e.g.
|
|
11
|
+ *
|
|
12
|
+ * struct {
|
|
13
|
+ * char rx_buf[NUM_RX_BUF][RX_BUF_SIZE];
|
|
14
|
+ * char tx_buf[TX_BUF_SIZE];
|
|
15
|
+ * } my_static_data __shared;
|
|
16
|
+ *
|
|
17
|
+ */
|
|
18
|
+
|
|
19
|
+#define __shared __asm__ ( "_shared_bss" );
|
|
20
|
+
|
|
21
|
+#endif /* SHARED_H */
|