📄 spi4_rx_dl.c
字号:
// Copyright (C) 2002-2003 Intel Corporation, All Rights Reserved.
// Permission is hereby granted to merge this program code with
// other program material to create a derivative work. This
// derivative work may be distributed in compiled object form only.
// Any other publication of this program, in any form, without the
// explicit permission of the copyright holder is prohibited.
//
// Send questions and comments to erik.j.johnson@intel.com,
// aaron.kunze@intel.com
//-------------------------------------------------------------------
// spi4_rx_dl.c - Chapter 5
// This file contains a dispatch loop which receives packets
// from a SPI-4 device and places them on a ring to further
// processing
//
// Include Files
#include "dl_system.h"
#include "dl_source.h"
#include "system_init.h"
#include "dispatch_loop.h"
#include "spi4_rx.h"
#include "dl_buf.c"
#include "dl_meta.h"
//-----------------------------------------------------------
// Global variables/Registers
//-----------------------------------------------------------
dl_buf_handle_t dlBufHandle;
__declspec(gp_reg) int dlNextBlock;
extern dl_meta_t dlMeta;
void main()
{
//-------------------------------------------------------
// Initialize the blocks
//-------------------------------------------------------
// Initialize the system
system_init();
// Initialize the outgoing ring
dl_sink_init();
// spi4 rx initialization
spi4_rx_init();
//-------------------------------------------------------
// dispatch loop
//-------------------------------------------------------
while(1)
{
// Reassembly a packet
spi4_rx();
// Enqueue the packet on the rx to processing
dl_sink();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -