Kendryte K210 dvp analysis on freertos

In the routine of K210, it is related to the dvp code, so in order to better understand it in the future, I will record it here. In fact, the understanding is very easy to understand. Not much to say, the code is first.

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;
uint32_t *lcd_gram0;
uint32_t *lcd_gram1;

void sensor_restart()
{
    dvp_set_signal(file_dvp, DVP_SIG_POWER_DOWN, 1);
    usleep(200 * 1000);
    dvp_set_signal(file_dvp, DVP_SIG_POWER_DOWN, 0);
  

Guess you like

Origin blog.csdn.net/smile_5me/article/details/108236081