亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? load.c

?? 數(shù)碼投影儀,包含電路,RS232通信,遠(yuǎn)程控制
?? C
字號(hào):
//=============================================================================
// Filename:     load.c
//
// Description:  Functions needed to load a program and start it on the DSP.
//
// Copyright (C) 2000 - 2002 Texas Instruments Incorporated
//
//============================================================================


#include "arm_boot.h"
#include "api_mem.h"
#include "dsp_boot_code.h"


//=============================================================================
// Function:    move_bits()
//
// Description:   Helper function for dsp_load().  Copy contents of bits_ary
// to a buffer in API memory.  When the buffer becomes full, sinal to DSP via 
// a handshake flag to read the bits from the buffer.
//
//=============================================================================
static int move_bits(volatile unsigned short *handshake_flag, 
                     const unsigned short *bits_ary)
{	
    volatile unsigned short *api_buffer  = (unsigned short*)
               MAP_DSP_TO_ARM(API_BUF_START);  // start of the API buffer 
	unsigned short  		 api_offset  = 0;  // offset into API memory
	unsigned short		     code_offset = 0;  // offset into DSP Code ary
	unsigned short		     done        = 0;  // flag to signal done.
	long 	                 time_cnt;         // loop index used for timeout
	unsigned short		     i;			  

    // Need outer loop in case program is larger than can be loaded	in one pass
	while (done == 0) {
        // If the current section is not empty and there is enough buffer
        // space left to write this section out, copy the section to API.

        // code_offset should be pointing to the number of words
        // in the this section.  We need to have room for all of them,
        // plus one for the count, plus one for the target address, plus
        // one for the zero termination word.
        unsigned short section_length = bits_ary[code_offset] + 2;
        int empty_section  = (bits_ary[code_offset] == 0); 
        int buffer_full    = ((api_offset + section_length + 1) >=
                              API_BUF_LENGTH); 
        if ((!empty_section) && (!buffer_full)) {
            for(i = 0; i < section_length; i++) {
                Write_Short_API(&api_buffer[api_offset++],
                                bits_ary[code_offset++]); 
            }
        }
        else {
            // Either this is the end of the bits_ary, or there wasn't enough
            // buffer space.  In both cases moves the bits we have so far to
            // the DSP.

            // Tack on a 0 to signal the end of the section. 
            Write_Short_API(&api_buffer[api_offset], 0);

            // Signal for DSP to read what we have so far.  
            Write_Short_API(handshake_flag, 1);

            time_cnt = 0;
            while ((*handshake_flag == 1) && (++time_cnt < TIME_OUT_COUNT)) {
                // Wait for DSP to finish.  The DSP sets *handshake_flag
                // to zero after it finishes the section it's writing.
            }

            // Check if timeout occurred.
            if (time_cnt == TIME_OUT_COUNT) return LOAD_TIME_OUT;

            // Reset pointer for next section
            api_offset = 0;

            if (empty_section) {
                // Reached the end of the bits array
                done = 1;
            }
        }
    }

    return LOAD_OK;
}


//=============================================================================
// Function:    dsp_load()
//
// Description:   
//
// This function loads the DSP code and data .  It does this as
// a three stage process:
//    1) It loads the DSP Bootloader into API memory.  
//    2) The ARM and DSP Bootloader load the DSP Code a chunk at a time using a
//       small section of API memory.  
//    3) The ARM and DSP Bootloader load the DSP data a chunk at a time using
//       a small section of API memory. 
//
//=============================================================================
int dsp_load(dsp_app_struct *dsp_app)
{
    unsigned short		      code_offset;   // Curr. offset into DSP Code ary
    unsigned short		      section_length;// Number of words in each section
    long 	                  time_cnt;      // Loop index used for timeout
    unsigned short           *section_addr;
    unsigned short		      i;
    int                       status = LOAD_OK;

    volatile unsigned short *dsp_ready      = (unsigned short*)DSP_READY;
    volatile unsigned short *prog_buf_ready = (unsigned short*)PROG_BUF_READY;
    volatile unsigned short *data_buf_ready = (unsigned short*)DATA_BUF_READY;
    volatile unsigned short *copy_done      = (unsigned short*)COPY_DONE;
    volatile unsigned short *pmst           = (unsigned short*)PMST;

    volatile long  *clkm_cntl_reset = (long *)0xffff2f10;
    volatile long  *dsp_reg         = (long *)0xffff2f04;

    // put DSP In Reset
    *clkm_cntl_reset |= 0x1;  //set bit1, DSP XF LED will turn on

    // set DSP in API boot mode and microcomputer mode
    *dsp_reg &= ~0x0600; //clear bits 9 and 10

    // clear the handshaking registers
    Write_Short_API(dsp_ready, 0);        // The DSP is still in API mode.
    Write_Short_API(prog_buf_ready, 0);   // Prog is not ready to load.
    Write_Short_API(data_buf_ready, 0);   // Data is not ready to load.
    Write_Short_API(copy_done, 0);	      // We're not done.
	
    // set the PMST for the DSP Exec to setup the memory map during bootload
    Write_Short_API(pmst, dsp_app->pmst); 

    // copy DSP Bootloader to API Ram
    code_offset=0;				// Current offset into DSP Program array
    section_length = dsp_boot_program[code_offset++];
    while(section_length != 0) {
        section_addr = (unsigned short *)
                            (MAP_DSP_TO_ARM(dsp_boot_program[code_offset++])); 
        // copy this section
        for (i = 0; i < section_length; i++) {
            Write_Short_API(section_addr++, dsp_boot_program[code_offset++]);
        }
        // get next section's length
        section_length = dsp_boot_program[code_offset++];
    }

    // take the DSP out of reset
    *clkm_cntl_reset &= ~0x1; //clear bit 1

    time_cnt = 0;
    while ((*dsp_ready == 0) && (++time_cnt < TIME_OUT_COUNT)) {
        // Wait for DSP to finish.  The DSP sets *dsp_ready to 1 after it
        // switches from API boot mode to normal boot mode.
    }

    // Check if timeout occurred.
    if (time_cnt == TIME_OUT_COUNT) return LOAD_TIME_OUT;

    status = move_bits(prog_buf_ready, dsp_app->pprogram);
    if (status == LOAD_TIME_OUT) return status;

    status = move_bits(data_buf_ready, dsp_app->pdata);

    return status;
}



//============================================================================
// Function:    dsp_start()
//
// Description:   This function starts the DSP running following a dsp_load
//
//============================================================================
void dsp_start(void)
{
    // Write the register telling the DSP that the bootload is done. =====
    volatile unsigned short *copy_done = (unsigned short *)COPY_DONE;
    Write_Short_API(copy_done, 1);
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品综合一区二区三区| 国产一区在线精品| 久久久久九九视频| 一本久久a久久免费精品不卡| 人禽交欧美网站| 中文字幕在线一区免费| 日韩一本二本av| 色偷偷久久人人79超碰人人澡| 精品一区在线看| 天堂成人免费av电影一区| 亚洲少妇30p| 久久久精品中文字幕麻豆发布| 欧美精品高清视频| 91免费看`日韩一区二区| 狠狠色丁香婷婷综合| 亚洲一区影音先锋| 亚洲欧美综合网| 国产三区在线成人av| 日韩免费高清av| 欧美顶级少妇做爰| 欧美性大战久久久久久久蜜臀| www.亚洲国产| 国产精品影视在线| 国内精品免费**视频| 日本vs亚洲vs韩国一区三区 | 99久久99久久综合| 国内一区二区在线| 精品一区二区三区免费播放| 爽好久久久欧美精品| 亚洲综合一区二区| 亚洲人成7777| 亚洲人成在线观看一区二区| 国产精品毛片a∨一区二区三区| www国产成人免费观看视频 深夜成人网| 7777精品伊人久久久大香线蕉的 | 国产黄色精品网站| 精品影院一区二区久久久| 免费成人av在线| 天天av天天翘天天综合网 | 在线观看免费一区| 91精品福利在线| 日本精品免费观看高清观看| 91麻豆文化传媒在线观看| www.亚洲人| 91蝌蚪porny成人天涯| 色综合久久综合中文综合网| 99riav一区二区三区| 91免费小视频| 欧美日韩一区二区三区视频| 欧美私人免费视频| 91超碰这里只有精品国产| 欧美日韩国产大片| 日韩一区二区免费在线电影| 2023国产精品自拍| 久久久久久毛片| 国产精品传媒入口麻豆| 亚洲精品免费看| 五月天亚洲婷婷| 久久精品国产久精国产爱| 国产精品一区免费视频| 成人激情免费视频| 色综合中文综合网| 久久99久久99| 丁香亚洲综合激情啪啪综合| 99久久免费视频.com| 欧美午夜不卡视频| 日韩一区二区三区av| 国产无一区二区| 亚洲乱码国产乱码精品精小说| 无吗不卡中文字幕| 国产精品影音先锋| 色欧美片视频在线观看| 欧美精品aⅴ在线视频| 久久一留热品黄| 亚洲美女少妇撒尿| 日本不卡免费在线视频| 成人一区二区三区中文字幕| 色婷婷综合中文久久一本| 日韩一区二区三区免费看 | 欧美私人免费视频| 精品国产网站在线观看| 1区2区3区国产精品| 亚洲成av人在线观看| 韩国一区二区三区| 在线视频一区二区三| 精品裸体舞一区二区三区| 中文字幕一区二| 免费欧美高清视频| 97久久精品人人做人人爽50路| 56国语精品自产拍在线观看| 久久综合久久综合亚洲| 亚洲激情图片小说视频| 国产真实精品久久二三区| 在线看日本不卡| 国产亚洲一区二区三区四区| 视频精品一区二区| 不卡视频免费播放| 精品国内二区三区| 亚洲成a人v欧美综合天堂下载| 成人av综合在线| 精品理论电影在线观看| 亚洲一区二区三区中文字幕在线 | 不卡av免费在线观看| 日韩一区二区高清| 亚洲欧美一区二区三区孕妇| 久久激情综合网| 在线观看国产日韩| 中文一区二区完整视频在线观看| 麻豆高清免费国产一区| 欧美性猛片aaaaaaa做受| 中文字幕一区二区在线观看| 久久精品国产成人一区二区三区 | 亚洲国产精品久久不卡毛片| 成人激情免费电影网址| 久久久综合视频| 日韩精品一级二级| 91福利社在线观看| 国产精品视频你懂的| 韩国视频一区二区| 欧美一区二区成人| 午夜久久久久久久久久一区二区| 色婷婷久久久亚洲一区二区三区| 中文字幕av资源一区| 国产精品一区二区男女羞羞无遮挡| 91.xcao| 亚洲一区二区三区中文字幕 | 亚洲欧美色综合| 成人久久18免费网站麻豆 | 日韩二区三区在线观看| 日本电影欧美片| 一区av在线播放| 在线免费亚洲电影| 亚洲精品成a人| 91啪九色porn原创视频在线观看| 国产精品美女久久久久久久久| 国产毛片精品一区| 国产亚洲精品免费| 国产91精品免费| 中文字幕一区二区三区四区不卡| 成人动漫av在线| 亚洲欧洲精品一区二区三区| 成年人午夜久久久| 中文字幕一区二区三区乱码在线 | 7777精品伊人久久久大香线蕉 | 亚洲午夜国产一区99re久久| 欧美中文字幕一二三区视频| 一区二区三区四区在线免费观看| 欧美性受xxxx黑人xyx性爽| 亚洲五码中文字幕| 91麻豆精品国产91久久久久久久久 | 在线综合视频播放| 极品少妇xxxx偷拍精品少妇| 欧美精品一区二区三区很污很色的 | 91精品国产综合久久精品图片| 免费高清不卡av| 久久综合九色综合97_久久久| 国产乱对白刺激视频不卡| 国产精品女同一区二区三区| 91香蕉视频污| 亚洲www啪成人一区二区麻豆| 日韩免费电影网站| 国产成人自拍高清视频在线免费播放| 国产精品无圣光一区二区| 色综合视频在线观看| 日韩高清不卡一区二区三区| 亚洲精品在线免费观看视频| 国产a久久麻豆| 一区二区在线观看免费视频播放| 91精品欧美综合在线观看最新| 韩国女主播一区二区三区| 国产精品久久久久一区二区三区共| 色婷婷精品大在线视频| 久久精品国产亚洲一区二区三区| 欧美经典一区二区| 欧美午夜精品一区二区蜜桃| 久久99九九99精品| 亚洲精品欧美二区三区中文字幕| 日韩丝袜美女视频| 99国产精品国产精品久久| 日韩1区2区日韩1区2区| 国产精品久久久久久亚洲毛片| 欧美三区在线视频| 国产成人av在线影院| 亚洲一区二区三区爽爽爽爽爽| 精品乱人伦一区二区三区| 色先锋久久av资源部| 激情综合色综合久久综合| 亚洲精品久久久久久国产精华液| 欧美一区二区视频网站| aaa欧美大片| 精品在线免费视频| 香港成人在线视频| 国产精品久久久久婷婷二区次| 欧美一级在线观看| 日本黄色一区二区| 成人福利视频网站| 精品一区二区影视| 日韩和欧美的一区| 亚洲视频在线一区| 久久久精品免费观看|