Microchip® Advanced Software Framework

ov7740.c File Reference

API driver for OV7740 CMOS image sensor.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include "ov7740.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>

Functions

uint32_t ov_configure (Twi *const p_twi, const e_ov7740_format format)
 Configure the OV7740 sensor for a specified image size (pixel format). More...
 
uint32_t ov_configure_finish (Twi *const p_twi)
 Complete the OV7740 sensor configuration. More...
 
uint32_t ov_configure_manual (Twi *const p_twi)
 Configure the OV7740 sensor manually. More...
 
void ov_dump_registers (Twi *const p_twi, ov_reg *p_regs)
 Dump all registers. More...
 
static uint32_t ov_id (Twi *const p_twi)
 Read PID and VER. More...
 
uint32_t ov_init (Twi *const p_twi)
 Initialize the OV7740 sensor. More...
 
static uint32_t ov_manufacturer (Twi *const p_twi)
 Read Manufacturer. More...
 
void ov_power (uint32_t ul_on_off, Pio *const p_pio, const uint32_t ul_mask)
 Turn OV7740 sensor on/off using power pin. More...
 
uint32_t ov_read_reg (Twi *const p_twi, twi_packet_t *const p_packet)
 Read a value from a register in an OV7740 sensor device. More...
 
void ov_reset (Pio *const p_pio, const uint32_t ul_mask)
 Reset OV7740 sensor using power pin. More...
 
uint32_t ov_restore_manual (volatile uint32_t *p_backup_addr, uint32_t ul_size)
 Restore backup register manually. More...
 
static void ov_retrieve_manual (Twi *const p_twi)
 Retrieve register manually. More...
 
uint32_t ov_store_manual (Twi *const p_twi, volatile uint32_t *p_backup_addr, uint32_t ul_size)
 Store back up register manually. More...
 
static uint32_t ov_test_write (Twi *const p_twi)
 OV7740 test write. More...
 
uint32_t ov_write_reg (Twi *const p_twi, twi_packet_t *const p_packet)
 Write a specified value to a register of the OV7740 sensor. More...
 
uint32_t ov_write_regs (Twi *const p_twi, const ov_reg *p_reg_list)
 Initialize a list of OV7740 registers. More...
 

Variables

static ov_reg regs_manual []
 Register array for manual operation (given by OmniVision toolkit). More...