summaryrefslogtreecommitdiff
path: root/xhfc/xhfc_tdm_iface.h
blob: e82825a8e34dfbc2c0fbc32182a2a39a505cea30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 * FUCK YOU rm -r
 *
 */

/*
 * TDM activation/deactivation is done with the XHFC driver module calling
 * during its initialization a symbol exported by the TDM driver module
 * sth like
 *
void activate_tdm(void);
void deactivate_tdm(void);
 *
 * The mapping between timeslots and physical/DAHDI channels is done by
 * registering a mapping between a timeslot and buffers at initialization of
 * the XHFC driver module
 *
void tdm_read_add(uint ts, u8 *readchunk);
void tdm_write_add(uint ts, u8 *writechunk);
 *
 * The TDM driver is then able to read/write in the buffers and then call a
 * function to process them. This function calls the buffer processing function
 * of DAHDI, dahdi_receive, dahdi_transmit, and dahdi_ec_span.
 */
void xhfc_rxtx(void);
/*
 * And I guess its code would be something like
 *
	for (i = 0; i < NB_PORT; i++) {
		dahdi_ec_span(spans[i]);
		dahdi_write(spans[i]);
		dahdi_read(spans[i]);
	}
 *
 */

/* Error reporting
 *
 * Done by updating the counters in struct dahdi_count count.
 * The TDM driver reports errors to the XHFC driver which reports them to
 * DAHDI?
 *
 * - should all the error reporting be done through DAHDI? should low level TDM
 *   errors even be transmitted to the XHFC driver module?
 */