欢迎访问ic37.com |
会员登录 免费注册
发布采购

AN2961 参数 Datasheet PDF下载

AN2961图片预览
型号: AN2961
PDF下载: 下载PDF文件 查看货源
内容描述: []
分类和应用:
文件页数/大小: 50 页 / 706 K
品牌: FREESCALE [ Freescale ]
 浏览型号AN2961的Datasheet PDF文件第35页浏览型号AN2961的Datasheet PDF文件第36页浏览型号AN2961的Datasheet PDF文件第37页浏览型号AN2961的Datasheet PDF文件第38页浏览型号AN2961的Datasheet PDF文件第40页浏览型号AN2961的Datasheet PDF文件第41页浏览型号AN2961的Datasheet PDF文件第42页浏览型号AN2961的Datasheet PDF文件第43页  
Adding the Echo Driver to an Application  
ECHO_ENABLELNA_DDR  
Description: This defines the data direction bit for the I/O pin used control Echo’s ENABLELNA pin.  
Values:  
Any I/O pin configurable as an output can be used. Use the naming convention specified  
in the CodeWarrior header file.  
#define ECHO_ENABLELNA_DDR PTEDD_PTEDD5  
Example:  
12 Adding the Echo Driver to an Application  
To add the Echo driver to an application:  
1. Copy the files Echo.c and Echo.h to the Sources directory for the project you are using.  
2. Add the Echo.c and Echo.h driver files to the project. In CodeWarrior, right click on Sources folder,  
then select Add Files…  
3. Add the line #include “Echo.hto the main application program file.  
4. Add the following lines to the main application program to give access to the Echo drivers global  
storage:  
extern unsigned char *echoNextMessage;  
extern unsigned char echoTransmitBuffer[];  
5. Decide which I/O pins in your application will control Echo functions. Modify Echo.h to link these  
pins to the Echo driver.  
6. Modify Echo.h to define the other parameters as required by the application.  
7. Modify the project parameter file to link the timer channel and SPI to the Echo services  
Echo_TxTimer_Interruptand Echo_RxSPI_Interrupt, respectively.  
The files are now added to the project and you are ready to begin using the Echo driver.  
Figure 12 shows a simple application template with the Echo.c and Echo.h files added to the sources folder  
and the necessary additions to main.c.  
Figure 13 shows the project parameter file set up to link the Echo services Echo_TxTimer_Interruptand  
Echo_RxSPI_Interruptto their corresponding interrupt vectors on the RG60.  
Software Drivers for MC33696, Rev. 1  
Freescale Semiconductor  
39  
 复制成功!