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

📄 iop.c

📁 C语言编写的监控中心终端程序。基于GPRS上传收发数据功能
💻 C
字号:
#include "config.h"
#include "regmap.h"
#include "global.h"
#include "dma.h"
#include "memmap.h"
#include "set.h"

void iop_init(const BYTE *rom, int len)
{
    UINT16		i;
    UINT32		*p, *q;

#if 1
#ifndef SUPPORT_COMBO
    regs0->gpio_sel |= ((1 << 8));		// disable rom A19 set to GPIO
    regs0->gpio_sel |= ((3 << 7));		// gpio A8,A9
    regs0->gpio_sel &= (~(1 << 9));		// gpio A10
    regs0->gpio_master[0] &= (~(0x07 << 8));	// dsa used
#endif

//  regs0->gpio_master[0] &= (~(0x07 << 0));	// game GPIO 0,2

#ifdef EMU_DEMO_BOARD
    regs0->gpio_master[1] &= (~(0x0f << 6));	//vfd and ir GPIO 22,23,24,25
#else
    regs0->gpio_master[1] &= (~(0x017 << 5));	//vfd and ir GPIO 21,22,23,25
#endif

#ifdef SUPPORT_ESP
    regs0->gpio_master[2] &= (~(1 << 8));
#endif

//  audio clk divided from GPIO 40
//  regs0->pos_cfg = 0x08;
//  regs0->gpio_oe[2] &= (~(0x0100));
//  regs0->gpio_master[2] |= (0x100);
#endif

    regs0->iop_control = -1;	// RF_DSP24_RESET | RF_DSP24_STALL;

    p = (UINT32 *)rom;
    q = (UINT32 *)(SDRAM_BASE + regs0->iopya * 1024);
    len = (len + 3) & ~0x03;
    for (i = 0; i < len / 4; i++)
	*q++ = *p++;
//  MIPS_flush_LBC_cache();
    regs0->iop_control = 0;
}

⌨️ 快捷键说明

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