Lines Matching refs:modem
5 * baycom_ser_fdx.c -- baycom ser12 fullduplex radio modem driver.
15 * ser12: This is a very simple 1200 baud AFSK modem. The modem consists only
18 * for handling the HDLC protocol. The modem connects to a serial port,
23 * This modem usually draws its supply current out of the otherwise unused
27 * hsk: This is a 4800 baud FSK modem, designed for TNC use. It works fine
28 * in 'baycom-mode' :-) In contrast to the TCM3105 modem, power is
130 } modem;
179 * 0 must be used to power the modem; the modem draws its
199 bc->modem.ser12.pll_time;
204 bc->modem.ser12.pll_time += bc->baud_us;
205 bc->modem.ser12.dcd_time--;
207 if (bc->modem.shreg & 1) {
208 hdlcdrv_putbits(&bc->hdrv, (bc->modem.shreg >> 1) ^ 0xffff);
209 bc->modem.shreg = 0x10000;
212 bc->modem.shreg >>= 1;
214 if (bc->modem.ser12.dcd_time <= 0) {
216 hdlcdrv_setdcd(&bc->hdrv, (bc->modem.ser12.dcd_sum0 +
217 bc->modem.ser12.dcd_sum1 +
218 bc->modem.ser12.dcd_sum2) < 0);
219 bc->modem.ser12.dcd_sum2 = bc->modem.ser12.dcd_sum1;
220 bc->modem.ser12.dcd_sum1 = bc->modem.ser12.dcd_sum0;
221 bc->modem.ser12.dcd_sum0 = 2; /* slight bias */
222 bc->modem.ser12.dcd_time += 120;
224 if (bc->modem.ser12.last_rxbit != curs) {
225 bc->modem.ser12.last_rxbit = curs;
226 bc->modem.shreg |= 0x10000;
229 bc->modem.ser12.pll_time += bdus8;
231 bc->modem.ser12.pll_time += 1000000 - bdus8;
234 bc->modem.ser12.dcd_sum0 += 4;
236 bc->modem.ser12.dcd_sum0--;
241 while (bc->modem.ser12.pll_time >= 1000000)
242 bc->modem.ser12.pll_time -= 1000000;
279 * 0 must be used to power the modem; the modem draws its
289 if (bc->modem.ptt)
290 outb(0x0e | (!!bc->modem.ser12.tx_bit), MCR(dev->base_addr));
305 if (bc->modem.ptt && txcount) {
306 if (bc->modem.ser12.txshreg <= 1) {
307 bc->modem.ser12.txshreg = 0x10000 | hdlcdrv_getbits(&bc->hdrv);
310 bc->modem.ptt = 0;
314 bc->modem.ser12.tx_bit = !(bc->modem.ser12.tx_bit ^ (bc->modem.ser12.txshreg & 1));
315 bc->modem.ser12.txshreg >>= 1;
319 if (!bc->modem.ptt && txcount) {
323 bc->modem.ser12.txshreg = 1;
324 bc->modem.ptt = 1;
398 memset(&bc->modem, 0, sizeof(bc->modem));
423 * enable transmitter empty interrupt and modem status interrupt
428 * 0 must be used to power the modem; the modem draws its
584 MODULE_DESCRIPTION("Baycom ser12 full duplex amateur radio modem driver");