在K210的例程中是有关dvp的代码,那么为了今后自己可以更好的理解在这记录一下,其实理解还是非常好理解的,不多说,先上代码。
dvp.h
#ifndef _DVPH_H
#define _DVPH_H
#include <stdio.h>
#define DVP_WIDTH 640
#define DVP_HIGHT 480
extern volatile uint8_t dvp_finish_flag;
extern volatile uint8_t gram_mux;
extern uint32_t *lcd_gram0;
extern uint32_t *lcd_gram1;
void dvp_init();
#endif
dvp.c
#include <sys/unistd.h>
#include <devices.h>
#include "dvp_camera.h"
#include "iomem.h"
enum _data_for
{
DATA_FOR_AI = 0,
DATA_FOR_DISPLAY = 1,
} ;
enum _enable
{
DISABLE = 0,
ENABLE = 1,
} ;
volatile uint8_t dvp_finish_flag;
volatile uint8_t gram_mux;
handle_t file_dvp;