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

📄 digitalphotoalbum_35qvga.c

📁 coldfire的mcf5329的程序
💻 C
字号:
/*
 * File:		DigiPhotoAlbum.c
 * Purpose:		Digital Photo Album Demo
 *
 */
/********************************************************************/
#include "src/common/common.h"
#include "LCDC_init_plane.h"
#include "DigitalPhotoAlbum.h"

//extern void CreateImageArray(imageStruct *p_images);

uint32    blendValue;
uint32    imageState;
uint32    imageNum;
imageStruct images, *p_images;

//************** DTimer0_SetUp *******************************************/

void DTimer0_SetUp(void)
{
	/* Reset timer sequence */
	MCF_DTIM0_DTMR = MCF_DTIM_DTMR_RST;   
	MCF_DTIM0_DTMR &= ~MCF_DTIM_DTMR_RST; 
	
	/* Set prescaler value to generate a counter clock */
	MCF_DTIM0_DTMR |= MCF_DTIM_DTMR_PS(0x0F);
	
	/* Enable timer interrupt on compare */
	MCF_DTIM0_DTMR |= MCF_DTIM_DTMR_ORRI;
	
	/* Timer count reset ater reaching reference value */
	MCF_DTIM0_DTMR |= MCF_DTIM_DTMR_FRR;
	
	/* Internal bus clock divided by 1 */
	MCF_DTIM0_DTMR |= MCF_DTIM_DTMR_CLK_DIV16;
	
	MCF_DTIM0_DTCN = 0x00000000;
    MCF_DTIM0_DTER |= MCF_DTIM_DTER_REF;
	
	/* Set compare value */
	MCF_DTIM0_DTRR =  0x000FFFFF; 
	

} /* DTimer0_SetUp */
/********************************************************************/


int main(void)
{ 

	uint32 exit = 1;
	uint32 i = 0;

	blendValue = 255;
	imageState = SHOW_FOREGROUND;
	
	p_images = &images;
	
	/* Set up the timer */
	DTimer0_SetUp();	

	/* Setup and enable the interrupt source */
	MCF_INTC0_ICR32 = MCF_INTC_ICR_IL(5);

	/* Unmask the interrupt */
	MCF_INTC0_IMRH &= ~ MCF_INTC_IMRH_INT_MASK32;	
	
	/* unmask interrupts in the cpu */
	mcf5xxx_irq_enable();

	/* Setup the digital photo album */
	CreateImageArray(p_images);
	imageNum = 0;
    
  	Configure_VEEEN_ON(); 
    Configure_LCD_Ports();
    Configure_Bursting();
    LCDC_Init(TFT_PANEL, SHARP_57QVGA, BPP18, ACD_DIV_0, 0xA);   
	LCDC_Display_Image((uint8*)p_images->imageArray[imageNum]);

	imageNum++;
	LCDCGW_Display_Image((uint8*)p_images->imageArray[imageNum]) ;

    LCDC_Enable(); 
    
    blendValue = 0;

	/* Enable the Timer */
	MCF_DTIM0_DTMR |= MCF_DTIM_DTMR_RST; 	
	
	/* Cycle through and display each image in the photo album */
	while(exit)
	;
  
 return 0;
} /* main */



⌨️ 快捷键说明

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