⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 io_dce.c

📁 话带数据中传真解调程序
💻 C
字号:
/* * *	Stuff that handles dce IO stuff. * *	Copyright (c) 1999 Richard J.M. Close * *	Can be freely distributed and used under the terms of the GNU GPL. */#include "io_dce.h"unsigned char io_dce_tx_fifo_empty(void){  unsigned char var1 = 0;  if(io_dce_tx_wptr == io_dce_tx_rptr)    x_send_mail (0x82, 1, &var1, 1);  // Jamie's diss has 83 not 82!  return var1;}void io_init_dce_tx_fifo(void){   io_dce_tx_eptr = io_dce_tx_sptr;  io_dce_tx_sptr = &io_dce_tx_buff[0];  io_dce_tx_wptr = io_dce_tx_sptr;  io_dce_tx_rptr = io_dce_tx_sptr;}void io_init_dce_rx_fifo(void){  io_dce_rx_eptr = io_dce_tx_eptr;  io_dce_rx_sptr = &io_dce_rx_buff[0];  io_dce_rx_wptr = io_dce_rx_sptr;  io_dce_rx_rptr = io_dce_rx_sptr;}unsigned int io_get_dce_rx_count(void){  unsigned int eax, ecx;  ecx = (unsigned int)(io_dce_rx_eptr - io_dce_rx_sptr);  ecx = ecx/2;  if (io_dce_rx_wptr < io_dce_rx_rptr) goto loc_3AD4C;  eax = io_dce_rx_wptr - io_dce_rx_rptr;  eax = eax/2;  return eax;loc_3AD4C:  eax = io_dce_rx_wptr - io_dce_rx_rptr;  eax = eax/2;  eax = eax + ecx;  return eax;}// Transmits a defined number of words.void io_write_dce_fifo (unsigned int count, unsigned short wData){  unsigned int tempCount = count;  if (count != 0){    {      // Copy data (word) to fifo.      *io_dce_tx_wptr = (unsigned char) (wData & 0xff);  //LSB      io_dce_tx_wptr++;      *io_dce_tx_wptr = (unsigned char) (wData / 256);   //MSB      io_dce_tx_wptr++;            // Make sure we are not at end of buffer.      if (io_dce_tx_wptr >= io_dce_tx_eptr)	// Reached end of tx buffer so reset pointer to start.	io_dce_tx_wptr = io_dce_tx_sptr;            tempCount--;    } while (tempCount > 0);  }  // Try to transmit the data.  io_start_dce_transmit();}void io_start_dce_transmit(void){  printf("io_start_dce_transmit: not yet implemented!");}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -