LibDriver OV2640
Loading...
Searching...
No Matches
driver_ov2640.c File Reference

driver ov2640 source file More...

#include "driver_ov2640.h"
Include dependency graph for driver_ov2640.c:

Go to the source code of this file.

Macros

#define CHIP_NAME   "OmniVision OV2640"
 chip information definition
#define MANUFACTURER_NAME   "OmniVision"
#define SUPPLY_VOLTAGE_MIN   2.5f
#define SUPPLY_VOLTAGE_MAX   3.0f
#define MAX_CURRENT   40.0f
#define TEMPERATURE_MIN   -30.0f
#define TEMPERATURE_MAX   70.0f
#define DRIVER_VERSION   1000
#define OV2640_ADDRESS   0x60
 iic address definition
#define OV2640_REG_DSP_BANK_R_BYPASS   0x05
 chip dsp bank register definition
#define OV2640_REG_DSP_BANK_QS   0x44
#define OV2640_REG_DSP_BANK_CTRLI   0x50
#define OV2640_REG_DSP_BANK_HSIZE   0x51
#define OV2640_REG_DSP_BANK_VSIZE   0x52
#define OV2640_REG_DSP_BANK_XOFFL   0x53
#define OV2640_REG_DSP_BANK_YOFFL   0x54
#define OV2640_REG_DSP_BANK_VHYX   0x55
#define OV2640_REG_DSP_BANK_DPRP   0x56
#define OV2640_REG_DSP_BANK_TEST   0x57
#define OV2640_REG_DSP_BANK_ZMOW   0x5A
#define OV2640_REG_DSP_BANK_ZMOH   0x5B
#define OV2640_REG_DSP_BANK_ZMHH   0x5C
#define OV2640_REG_DSP_BANK_BPADDR   0x7C
#define OV2640_REG_DSP_BANK_BPDATA   0x7D
#define OV2640_REG_DSP_BANK_CTRL2   0x86
#define OV2640_REG_DSP_BANK_CTRL3   0x87
#define OV2640_REG_DSP_BANK_SIZEL   0x8C
#define OV2640_REG_DSP_BANK_HSIZE8   0xC0
#define OV2640_REG_DSP_BANK_VSIZE8   0xC1
#define OV2640_REG_DSP_BANK_CTRL0   0xC2
#define OV2640_REG_DSP_BANK_CTRL1   0xC3
#define OV2640_REG_DSP_BANK_R_DVP_SP   0xD3
#define OV2640_REG_DSP_BANK_IMAGE_MODE   0xDA
#define OV2640_REG_DSP_BANK_RESET   0xE0
#define OV2640_REG_DSP_BANK_MS_SP   0xF0
#define OV2640_REG_DSP_BANK_SS_ID   0xF7
#define OV2640_REG_DSP_BANK_SS_CTRL   0xF8
#define OV2640_REG_DSP_BANK_MC_BIST   0xF9
#define OV2640_REG_DSP_BANK_MC_AL   0xFA
#define OV2640_REG_DSP_BANK_MC_AH   0xFB
#define OV2640_REG_DSP_BANK_MC_D   0xFC
#define OV2640_REG_DSP_BANK_P_CMD   0xFD
#define OV2640_REG_DSP_BANK_P_STATUS   0xFE
#define OV2640_REG_DSP_BANK_RA_DLMT   0xFF
#define OV2640_REG_SENSOR_BANK_GAIN   0x00
 chip sensor bank register definition
#define OV2640_REG_SENSOR_BANK_COM1   0x03
#define OV2640_REG_SENSOR_BANK_REG04   0x04
#define OV2640_REG_SENSOR_BANK_REG08   0x08
#define OV2640_REG_SENSOR_BANK_COM2   0x09
#define OV2640_REG_SENSOR_BANK_PIDH   0x0A
#define OV2640_REG_SENSOR_BANK_PIDL   0x0B
#define OV2640_REG_SENSOR_BANK_COM3   0x0C
#define OV2640_REG_SENSOR_BANK_COM4   0x0D
#define OV2640_REG_SENSOR_BANK_AEC   0x10
#define OV2640_REG_SENSOR_BANK_CLKRC   0x11
#define OV2640_REG_SENSOR_BANK_COM7   0x12
#define OV2640_REG_SENSOR_BANK_COM8   0x13
#define OV2640_REG_SENSOR_BANK_COM9   0x14
#define OV2640_REG_SENSOR_BANK_COM10   0x15
#define OV2640_REG_SENSOR_BANK_HREFST   0x17
#define OV2640_REG_SENSOR_BANK_HREFEND   0x18
#define OV2640_REG_SENSOR_BANK_VSTRT   0x19
#define OV2640_REG_SENSOR_BANK_VEND   0x1A
#define OV2640_REG_SENSOR_BANK_MIDH   0x1C
#define OV2640_REG_SENSOR_BANK_MIDL   0x1D
#define OV2640_REG_SENSOR_BANK_AEW   0x24
#define OV2640_REG_SENSOR_BANK_AEB   0x25
#define OV2640_REG_SENSOR_BANK_VV   0x26
#define OV2640_REG_SENSOR_BANK_REG2A   0x2A
#define OV2640_REG_SENSOR_BANK_FRARL   0x2B
#define OV2640_REG_SENSOR_BANK_ADDVSL   0x2D
#define OV2640_REG_SENSOR_BANK_ADDVSH   0x2E
#define OV2640_REG_SENSOR_BANK_YAVG   0x2F
#define OV2640_REG_SENSOR_BANK_HSDY   0x30
#define OV2640_REG_SENSOR_BANK_HEDY   0x31
#define OV2640_REG_SENSOR_BANK_REG32   0x32
#define OV2640_REG_SENSOR_BANK_ARCOM2   0x34
#define OV2640_REG_SENSOR_BANK_REG45   0x45
#define OV2640_REG_SENSOR_BANK_FLL   0x46
#define OV2640_REG_SENSOR_BANK_FLH   0x47
#define OV2640_REG_SENSOR_BANK_COM19   0x48
#define OV2640_REG_SENSOR_BANK_ZOOMS   0x49
#define OV2640_REG_SENSOR_BANK_COM22   0x4B
#define OV2640_REG_SENSOR_BANK_COM25   0x4E
#define OV2640_REG_SENSOR_BANK_BD50   0x4F
#define OV2640_REG_SENSOR_BANK_BD60   0x50
#define OV2640_REG_SENSOR_BANK_REG5D   0x5D
#define OV2640_REG_SENSOR_BANK_REG5E   0x5E
#define OV2640_REG_SENSOR_BANK_REG5F   0x5F
#define OV2640_REG_SENSOR_BANK_REG60   0x60
#define OV2640_REG_SENSOR_BANK_HISTO_LOW   0x61
#define OV2640_REG_SENSOR_BANK_HISTO_HIGH   0x62

Functions

uint8_t ov2640_init (ov2640_handle_t *handle)
 initialize the chip
uint8_t ov2640_deinit (ov2640_handle_t *handle)
 close the chip
uint8_t ov2640_table_init (ov2640_handle_t *handle)
 table init
uint8_t ov2640_table_jpeg_init (ov2640_handle_t *handle)
 table jpeg init
uint8_t ov2640_table_rgb565_init (ov2640_handle_t *handle)
 table rgb565 init
uint8_t ov2640_set_agc_gain (ov2640_handle_t *handle, uint16_t gain)
 set agc gain
uint8_t ov2640_get_agc_gain (ov2640_handle_t *handle, uint16_t *gain)
 get agc gain
uint8_t ov2640_set_dummy_frame (ov2640_handle_t *handle, ov2640_dummy_frame_t frame)
 set dummy frame
uint8_t ov2640_get_dummy_frame (ov2640_handle_t *handle, ov2640_dummy_frame_t *frame)
 get dummy frame
uint8_t ov2640_set_vertical_window_line_start (ov2640_handle_t *handle, uint16_t start)
 set vertical window line start
uint8_t ov2640_get_vertical_window_line_start (ov2640_handle_t *handle, uint16_t *start)
 get vertical window line start
uint8_t ov2640_set_vertical_window_line_end (ov2640_handle_t *handle, uint16_t end)
 set vertical window line end
uint8_t ov2640_get_vertical_window_line_end (ov2640_handle_t *handle, uint16_t *end)
 get vertical window line end
uint8_t ov2640_set_horizontal_mirror (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable horizontal mirror
uint8_t ov2640_get_horizontal_mirror (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get horizontal mirror status
uint8_t ov2640_set_vertical_flip (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable vertical flip
uint8_t ov2640_get_vertical_flip (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get vertical flip status
uint8_t ov2640_set_aec (ov2640_handle_t *handle, uint16_t aec)
 set aec
uint8_t ov2640_get_aec (ov2640_handle_t *handle, uint16_t *aec)
 get aec
uint8_t ov2640_set_frame_exposure_pre_charge_row_number (ov2640_handle_t *handle, uint8_t num)
 set frame exposure pre charge row number
uint8_t ov2640_get_frame_exposure_pre_charge_row_number (ov2640_handle_t *handle, uint8_t *num)
 get frame exposure pre charge row number
uint8_t ov2640_set_mode (ov2640_handle_t *handle, ov2640_mode_t mode)
 set mode
uint8_t ov2640_get_mode (ov2640_handle_t *handle, ov2640_mode_t *mode)
 get mode
uint8_t ov2640_set_power_reset_pin_remap (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable power reset pin remap
uint8_t ov2640_get_power_reset_pin_remap (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get power reset pin remap status
uint8_t ov2640_set_output_drive (ov2640_handle_t *handle, ov2640_output_drive_t select)
 set output drive
uint8_t ov2640_get_output_drive (ov2640_handle_t *handle, ov2640_output_drive_t *select)
 get output drive
uint8_t ov2640_set_band (ov2640_handle_t *handle, ov2640_band_t band)
 set band
uint8_t ov2640_get_band (ov2640_handle_t *handle, ov2640_band_t *band)
 get band
uint8_t ov2640_set_auto_band (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable auto band
uint8_t ov2640_get_auto_band (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get auto band status
uint8_t ov2640_set_live_video_after_snapshot (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable live video after snapshot
uint8_t ov2640_get_live_video_after_snapshot (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get live video after snapshot status
uint8_t ov2640_set_clock_output_power_down_pin_status (ov2640_handle_t *handle, ov2640_pin_status_t status)
 set clock output power down pin status
uint8_t ov2640_get_clock_output_power_down_pin_status (ov2640_handle_t *handle, ov2640_pin_status_t *status)
 get clock output power down pin status
uint8_t ov2640_set_clock_rate_double (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable double clock rate
uint8_t ov2640_get_clock_rate_double (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get clock rate double status
uint8_t ov2640_set_clock_divider (ov2640_handle_t *handle, uint8_t divider)
 set clock divider
uint8_t ov2640_get_clock_divider (ov2640_handle_t *handle, uint8_t *divider)
 get clock divider
uint8_t ov2640_soft_reset (ov2640_handle_t *handle)
 soft reset
uint8_t ov2640_set_resolution (ov2640_handle_t *handle, ov2640_resolution_t resolution)
 set resolution
uint8_t ov2640_get_resolution (ov2640_handle_t *handle, ov2640_resolution_t *resolution)
 get resolution
uint8_t ov2640_set_zoom (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable zoom
uint8_t ov2640_get_zoom (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get zoom status
uint8_t ov2640_set_color_bar_test (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable color bar test
uint8_t ov2640_get_color_bar_test (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get color bar test status
uint8_t ov2640_set_band_filter (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable band filter
uint8_t ov2640_get_band_filter (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get band filter status
uint8_t ov2640_set_agc_control (ov2640_handle_t *handle, ov2640_control_t control)
 set agc control
uint8_t ov2640_get_agc_control (ov2640_handle_t *handle, ov2640_control_t *control)
 get agc control
uint8_t ov2640_set_exposure_control (ov2640_handle_t *handle, ov2640_control_t control)
 set exposure control
uint8_t ov2640_get_exposure_control (ov2640_handle_t *handle, ov2640_control_t *control)
 get exposure control
uint8_t ov2640_set_agc_gain_ceiling (ov2640_handle_t *handle, ov2640_agc_gain_t agc)
 set agc
uint8_t ov2640_get_agc_gain_ceiling (ov2640_handle_t *handle, ov2640_agc_gain_t *agc)
 get agc
uint8_t ov2640_set_chsync_href_swap (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable chsync href swap
uint8_t ov2640_get_chsync_href_swap (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get chsync href swap status
uint8_t ov2640_set_href_chsync_swap (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable href chsync swap
uint8_t ov2640_get_href_chsync_swap (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get href chsync swap status
uint8_t ov2640_set_pclk_output_qualified_by_href (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable pclk output qualified by href
uint8_t ov2640_get_pclk_output_qualified_by_href (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get pclk output qualified by href status
uint8_t ov2640_set_pclk_edge (ov2640_handle_t *handle, ov2640_edge_t edge)
 set pclk edge
uint8_t ov2640_get_pclk_edge (ov2640_handle_t *handle, ov2640_edge_t *edge)
 get pclk edge
uint8_t ov2640_set_href_polarity (ov2640_handle_t *handle, ov2640_polarity_t polarity)
 set href polarity
uint8_t ov2640_get_href_polarity (ov2640_handle_t *handle, ov2640_polarity_t *polarity)
 get href polarity
uint8_t ov2640_set_vsync_polarity (ov2640_handle_t *handle, ov2640_polarity_t polarity)
 set vsync polarity
uint8_t ov2640_get_vsync_polarity (ov2640_handle_t *handle, ov2640_polarity_t *polarity)
 get vsync polarity
uint8_t ov2640_set_hsync_polarity (ov2640_handle_t *handle, ov2640_polarity_t polarity)
 set hsync polarity
uint8_t ov2640_get_hsync_polarity (ov2640_handle_t *handle, ov2640_polarity_t *polarity)
 get hsync polarity
uint8_t ov2640_set_luminance_signal_high_range (ov2640_handle_t *handle, uint8_t range)
 set luminance signal high range
uint8_t ov2640_get_luminance_signal_high_range (ov2640_handle_t *handle, uint8_t *range)
 get luminance signal high range
uint8_t ov2640_set_luminance_signal_low_range (ov2640_handle_t *handle, uint8_t range)
 set luminance signal low range
uint8_t ov2640_get_luminance_signal_low_range (ov2640_handle_t *handle, uint8_t *range)
 get luminance signal low range
uint8_t ov2640_set_fast_mode_large_step_range (ov2640_handle_t *handle, uint8_t high_threshold, uint8_t low_threshold)
 set fast mode large step range
uint8_t ov2640_get_fast_mode_large_step_range (ov2640_handle_t *handle, uint8_t *high_threshold, uint8_t *low_threshold)
 get fast mode large step range
uint8_t ov2640_set_line_interval_adjust (ov2640_handle_t *handle, uint16_t adjust)
 set line interval adjust
uint8_t ov2640_get_line_interval_adjust (ov2640_handle_t *handle, uint16_t *adjust)
 get line interval adjust
uint8_t ov2640_set_hsync_position_and_width_end_point (ov2640_handle_t *handle, uint16_t position)
 set hsync position and width end point
uint8_t ov2640_get_hsync_position_and_width_end_point (ov2640_handle_t *handle, uint16_t *position)
 get hsync position and width end point
uint8_t ov2640_set_hsync_position_and_width_start_point (ov2640_handle_t *handle, uint16_t position)
 set hsync position and width start point
uint8_t ov2640_get_hsync_position_and_width_start_point (ov2640_handle_t *handle, uint16_t *position)
 get hsync position and width start point
uint8_t ov2640_set_vsync_pulse_width (ov2640_handle_t *handle, uint16_t width)
 set vsync pulse width
uint8_t ov2640_get_vsync_pulse_width (ov2640_handle_t *handle, uint16_t *width)
 get vsync pulse width
uint8_t ov2640_set_luminance_average (ov2640_handle_t *handle, uint8_t average)
 set luminance average
uint8_t ov2640_get_luminance_average (ov2640_handle_t *handle, uint8_t *average)
 get luminance average
uint8_t ov2640_set_horizontal_window_start (ov2640_handle_t *handle, uint16_t start)
 set horizontal window start
uint8_t ov2640_get_horizontal_window_start (ov2640_handle_t *handle, uint16_t *start)
 get horizontal window start
uint8_t ov2640_set_horizontal_window_end (ov2640_handle_t *handle, uint16_t end)
 set horizontal window end
uint8_t ov2640_get_horizontal_window_end (ov2640_handle_t *handle, uint16_t *end)
 get horizontal window end
uint8_t ov2640_set_pclk (ov2640_handle_t *handle, ov2640_pclk_t pclk)
 set pclk
uint8_t ov2640_get_pclk (ov2640_handle_t *handle, ov2640_pclk_t *pclk)
 get pclk
uint8_t ov2640_set_zoom_window_horizontal_start_point (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable zoom window horizontal start point
uint8_t ov2640_get_zoom_window_horizontal_start_point (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get zoom window horizontal start point status
uint8_t ov2640_set_frame_length_adjustment (ov2640_handle_t *handle, uint16_t frame)
 set frame length adjustment
uint8_t ov2640_get_frame_length_adjustment (ov2640_handle_t *handle, uint16_t *frame)
 get frame length adjustment
uint8_t ov2640_set_zoom_mode_vertical_window_start_point (ov2640_handle_t *handle, uint16_t point)
 set zoom mode vertical window start point
uint8_t ov2640_get_zoom_mode_vertical_window_start_point (ov2640_handle_t *handle, uint16_t *point)
 get zoom mode vertical window start point
uint8_t ov2640_set_flash_light (ov2640_handle_t *handle, uint8_t control)
 set flash light
uint8_t ov2640_get_flash_light (ov2640_handle_t *handle, uint8_t *control)
 get flash light
uint8_t ov2640_set_50hz_banding_aec (ov2640_handle_t *handle, uint16_t aec)
 set 50hz banding aec
uint8_t ov2640_get_50hz_banding_aec (ov2640_handle_t *handle, uint16_t *aec)
 get 50hz banding aec
uint8_t ov2640_set_60hz_banding_aec (ov2640_handle_t *handle, uint16_t aec)
 set 60hz banding aec
uint8_t ov2640_get_60hz_banding_aec (ov2640_handle_t *handle, uint16_t *aec)
 get 60hz banding aec
uint8_t ov2640_set_16_zone_average_weight_option (ov2640_handle_t *handle, uint32_t avg)
 set 16 zone average weight option
uint8_t ov2640_get_16_zone_average_weight_option (ov2640_handle_t *handle, uint32_t *avg)
 get 16 zone average weight option
uint8_t ov2640_set_histogram_algorithm_low_level (ov2640_handle_t *handle, uint8_t level)
 set histogram algorithm low level
uint8_t ov2640_get_histogram_algorithm_low_level (ov2640_handle_t *handle, uint8_t *level)
 get histogram algorithm low level
uint8_t ov2640_set_histogram_algorithm_high_level (ov2640_handle_t *handle, uint8_t level)
 set histogram algorithm high level
uint8_t ov2640_get_histogram_algorithm_high_level (ov2640_handle_t *handle, uint8_t *level)
 get histogram algorithm high level
uint8_t ov2640_set_dsp_bypass (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable dsp bypass
uint8_t ov2640_get_dsp_bypass (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get dsp bypass status
uint8_t ov2640_set_auto_mode (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable auto_mode
uint8_t ov2640_get_auto_mode (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get auto mode status
uint8_t ov2640_set_dvp_pclk (ov2640_handle_t *handle, uint8_t pclk)
 set dvp pclk
uint8_t ov2640_get_dvp_pclk (ov2640_handle_t *handle, uint8_t *pclk)
 get dvp pclk
uint8_t ov2640_set_dvp_y8 (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable dvp y8
uint8_t ov2640_get_dvp_y8 (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get dvp y8 status
uint8_t ov2640_set_jpeg_output (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable jpeg output
uint8_t ov2640_get_jpeg_output (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get jpeg output status
uint8_t ov2640_set_dvp_output_format (ov2640_handle_t *handle, ov2640_dvp_output_format_t format)
 set dvp output format
uint8_t ov2640_get_dvp_output_format (ov2640_handle_t *handle, ov2640_dvp_output_format_t *format)
 get dvp output format
uint8_t ov2640_set_dvp_jpeg_output_href_timing (ov2640_handle_t *handle, ov2640_href_timing_t timing)
 set dvp jpeg output href timing
uint8_t ov2640_get_dvp_jpeg_output_href_timing (ov2640_handle_t *handle, ov2640_href_timing_t *timing)
 get dvp jpeg output href timing
uint8_t ov2640_set_byte_swap (ov2640_handle_t *handle, ov2640_byte_swap_t byte_swap)
 set byte swap
uint8_t ov2640_get_byte_swap (ov2640_handle_t *handle, ov2640_byte_swap_t *byte_swap)
 get byte swap
uint8_t ov2640_set_reset (ov2640_handle_t *handle, ov2640_reset_t type, ov2640_bool_t enable)
 enable or disable reset
uint8_t ov2640_get_reset (ov2640_handle_t *handle, ov2640_reset_t type, ov2640_bool_t *enable)
 get reset status
uint8_t ov2640_set_sccb_master_speed (ov2640_handle_t *handle, uint8_t speed)
 set sccb master speed
uint8_t ov2640_get_sccb_master_speed (ov2640_handle_t *handle, uint8_t *speed)
 get sccb master speed
uint8_t ov2640_set_sccb_slave_id (ov2640_handle_t *handle, uint8_t id)
 set sccb slave id
uint8_t ov2640_get_sccb_slave_id (ov2640_handle_t *handle, uint8_t *id)
 get sccb slave id
uint8_t ov2640_set_address_auto_increase (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable address auto increase
uint8_t ov2640_get_address_auto_increase (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get address auto increase status
uint8_t ov2640_set_sccb (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable sccb
uint8_t ov2640_get_sccb (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get sccb status
uint8_t ov2640_set_sccb_master_clock_delay (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable sccb master clock delay
uint8_t ov2640_get_sccb_master_clock_delay (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get sccb master clock delay status
uint8_t ov2640_set_sccb_master_access (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable sccb master access
uint8_t ov2640_get_sccb_master_access (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get sccb master access status
uint8_t ov2640_set_sensor_pass_through_access (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable sensor pass through access
uint8_t ov2640_get_sensor_pass_through_access (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get sensor pass through access status
uint8_t ov2640_set_bist (ov2640_handle_t *handle, ov2640_bist_t bist, ov2640_bool_t enable)
 enable or disable bist
uint8_t ov2640_get_bist (ov2640_handle_t *handle, ov2640_bist_t bist, ov2640_bool_t *enable)
 get bist status
uint8_t ov2640_set_program_memory_pointer_address (ov2640_handle_t *handle, uint16_t addr)
 set program memory pointer address
uint8_t ov2640_get_program_memory_pointer_address (ov2640_handle_t *handle, uint16_t *addr)
 get program memory pointer address
uint8_t ov2640_set_program_memory_pointer_access_address (ov2640_handle_t *handle, uint8_t addr)
 set program memory pointer access address
uint8_t ov2640_get_program_memory_pointer_access_address (ov2640_handle_t *handle, uint8_t *addr)
 get program memory pointer access address
uint8_t ov2640_set_sccb_protocol_command (ov2640_handle_t *handle, uint8_t cmd)
 set sccb protocol command
uint8_t ov2640_get_sccb_protocol_command (ov2640_handle_t *handle, uint8_t *cmd)
 get sccb protocol command
uint8_t ov2640_set_sccb_protocol_status (ov2640_handle_t *handle, uint8_t status)
 set sccb protocol status
uint8_t ov2640_get_sccb_protocol_status (ov2640_handle_t *handle, uint8_t *status)
 get sccb protocol status
uint8_t ov2640_set_cip (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable cip
uint8_t ov2640_get_cip (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get cip status
uint8_t ov2640_set_dmy (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable dmy
uint8_t ov2640_get_dmy (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get dmy status
uint8_t ov2640_set_raw_gma (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable raw gma
uint8_t ov2640_get_raw_gma (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get raw gma status
uint8_t ov2640_set_dg (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable dg
uint8_t ov2640_get_dg (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get dg status
uint8_t ov2640_set_awb (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable awb
uint8_t ov2640_get_awb (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get awb status
uint8_t ov2640_set_awb_gain (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable awb gain
uint8_t ov2640_get_awb_gain (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get awb gain status
uint8_t ov2640_set_lenc (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable lenc
uint8_t ov2640_get_lenc (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get lenc status
uint8_t ov2640_set_pre (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable pre
uint8_t ov2640_get_pre (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get pre status
uint8_t ov2640_set_aec_enable (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable aec enable
uint8_t ov2640_get_aec_enable (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get aec enable status
uint8_t ov2640_set_aec_sel (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable aec sel
uint8_t ov2640_get_aec_sel (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get aec sel status
uint8_t ov2640_set_stat_sel (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable stat sel
uint8_t ov2640_get_stat_sel (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get stat sel status
uint8_t ov2640_set_vfirst (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable vfirst
uint8_t ov2640_get_vfirst (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get vfirst status
uint8_t ov2640_set_yuv422 (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable yuv422
uint8_t ov2640_get_yuv422 (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get yuv422 status
uint8_t ov2640_set_yuv (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable yuv
uint8_t ov2640_get_yuv (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get yuv status
uint8_t ov2640_set_rgb (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable rgb
uint8_t ov2640_get_rgb (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get rgb status
uint8_t ov2640_set_raw (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable raw
uint8_t ov2640_get_raw (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get raw status
uint8_t ov2640_set_dcw (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable dcw
uint8_t ov2640_get_dcw (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get dcw status
uint8_t ov2640_set_sde (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable sde
uint8_t ov2640_get_sde (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get sde status
uint8_t ov2640_set_uv_adj (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable uv adj
uint8_t ov2640_get_uv_adj (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get uv adj status
uint8_t ov2640_set_uv_avg (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable uv avg
uint8_t ov2640_get_uv_avg (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get uv avg status
uint8_t ov2640_set_cmx (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable cmx
uint8_t ov2640_get_cmx (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get cmx status
uint8_t ov2640_set_bpc (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable bpc
uint8_t ov2640_get_bpc (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get bpc status
uint8_t ov2640_set_wpc (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable wpc
uint8_t ov2640_get_wpc (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get wpc status
uint8_t ov2640_set_sde_indirect_register_address (ov2640_handle_t *handle, uint8_t addr)
 set sde indirect register address
uint8_t ov2640_get_sde_indirect_register_address (ov2640_handle_t *handle, uint8_t *addr)
 get sde indirect register address
uint8_t ov2640_set_sde_indirect_register_data (ov2640_handle_t *handle, uint8_t data)
 set sde indirect register data
uint8_t ov2640_get_sde_indirect_register_data (ov2640_handle_t *handle, uint8_t *data)
 get sde indirect register data
uint8_t ov2640_set_image_horizontal (ov2640_handle_t *handle, uint16_t size)
 set image horizontal
uint8_t ov2640_get_image_horizontal (ov2640_handle_t *handle, uint16_t *size)
 get image horizontal
uint8_t ov2640_set_image_vertical (ov2640_handle_t *handle, uint16_t size)
 set image vertical
uint8_t ov2640_get_image_vertical (ov2640_handle_t *handle, uint16_t *size)
 get image vertical
uint8_t ov2640_set_quantization_scale_factor (ov2640_handle_t *handle, uint8_t factor)
 set quantization scale factor
uint8_t ov2640_get_quantization_scale_factor (ov2640_handle_t *handle, uint8_t *factor)
 get quantization scale factor
uint8_t ov2640_set_lp_dp (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable lp dp
uint8_t ov2640_get_lp_dp (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get lp dp status
uint8_t ov2640_set_round (ov2640_handle_t *handle, ov2640_bool_t enable)
 enable or disable round
uint8_t ov2640_get_round (ov2640_handle_t *handle, ov2640_bool_t *enable)
 get round status
uint8_t ov2640_set_vertical_divider (ov2640_handle_t *handle, uint8_t divider)
 set vertical divider
uint8_t ov2640_get_vertical_divider (ov2640_handle_t *handle, uint8_t *divider)
 get vertical divider
uint8_t ov2640_set_horizontal_divider (ov2640_handle_t *handle, uint8_t divider)
 set horizontal divider
uint8_t ov2640_get_horizontal_divider (ov2640_handle_t *handle, uint8_t *divider)
 get horizontal divider
uint8_t ov2640_set_horizontal_size (ov2640_handle_t *handle, uint16_t size)
 set horizontal size
uint8_t ov2640_get_horizontal_size (ov2640_handle_t *handle, uint16_t *size)
 get horizontal size
uint8_t ov2640_set_vertical_size (ov2640_handle_t *handle, uint16_t size)
 set vertical size
uint8_t ov2640_get_vertical_size (ov2640_handle_t *handle, uint16_t *size)
 get vertical size
uint8_t ov2640_set_offset_x (ov2640_handle_t *handle, uint16_t size)
 set offset x
uint8_t ov2640_get_offset_x (ov2640_handle_t *handle, uint16_t *size)
 get offset x
uint8_t ov2640_set_offset_y (ov2640_handle_t *handle, uint16_t size)
 set offset y
uint8_t ov2640_get_offset_y (ov2640_handle_t *handle, uint16_t *size)
 get offset y
uint8_t ov2640_set_dp_selx (ov2640_handle_t *handle, uint8_t size)
 set dp selx
uint8_t ov2640_get_dp_selx (ov2640_handle_t *handle, uint8_t *size)
 get dp selx
uint8_t ov2640_set_dp_sely (ov2640_handle_t *handle, uint8_t size)
 set dp sely
uint8_t ov2640_get_dp_sely (ov2640_handle_t *handle, uint8_t *size)
 get dp sely
uint8_t ov2640_set_output_width (ov2640_handle_t *handle, uint16_t size)
 set output width
uint8_t ov2640_get_output_width (ov2640_handle_t *handle, uint16_t *size)
 get output width
uint8_t ov2640_set_output_height (ov2640_handle_t *handle, uint16_t size)
 set output height
uint8_t ov2640_get_output_height (ov2640_handle_t *handle, uint16_t *size)
 get output height
uint8_t ov2640_set_zoom_speed (ov2640_handle_t *handle, uint8_t speed)
 set zoom speed
uint8_t ov2640_get_zoom_speed (ov2640_handle_t *handle, uint8_t *speed)
 get zoom speed
uint8_t ov2640_set_light_mode (ov2640_handle_t *handle, ov2640_light_mode_t mode)
 set light mode
uint8_t ov2640_set_color_saturation (ov2640_handle_t *handle, ov2640_color_saturation_t color)
 set color saturation
uint8_t ov2640_set_brightness (ov2640_handle_t *handle, ov2640_brightness_t brightness)
 set brightness
uint8_t ov2640_set_contrast (ov2640_handle_t *handle, ov2640_contrast_t contrast)
 set contrast
uint8_t ov2640_set_special_effect (ov2640_handle_t *handle, ov2640_special_effect_t effect)
 set special effect
uint8_t ov2640_get_dsp_reg (ov2640_handle_t *handle, uint8_t reg, uint8_t *data)
 get dsp reg
uint8_t ov2640_set_dsp_reg (ov2640_handle_t *handle, uint8_t reg, uint8_t data)
 set dsp reg
uint8_t ov2640_get_sensor_reg (ov2640_handle_t *handle, uint8_t reg, uint8_t *data)
 get sensor reg
uint8_t ov2640_set_sensor_reg (ov2640_handle_t *handle, uint8_t reg, uint8_t data)
 set sensor reg
uint8_t ov2640_info (ov2640_info_t *info)
 get chip's information

Variables

const uint8_t gsc_ov2640_init_table [][2]
 innter table globle definition
const uint8_t gsc_ov2640_jpeg_init_table [][2]
 jpeg init table definition
const uint8_t gsc_ov2640_rgb565_init_table [][2]
 rgb565 init table definition

Detailed Description

driver ov2640 source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version
1.0.0
Author
Shifeng Li
Date
2023-11-30

history

Date Version Author Description
2023/11/30 1.0 Shifeng Li first upload

Definition in file driver_ov2640.c.

Macro Definition Documentation

◆ CHIP_NAME

#define CHIP_NAME   "OmniVision OV2640"

chip information definition

chip name

Definition at line 42 of file driver_ov2640.c.

◆ DRIVER_VERSION

#define DRIVER_VERSION   1000

driver version

Definition at line 49 of file driver_ov2640.c.

◆ MANUFACTURER_NAME

#define MANUFACTURER_NAME   "OmniVision"

manufacturer name

Definition at line 43 of file driver_ov2640.c.

◆ MAX_CURRENT

#define MAX_CURRENT   40.0f

chip max current

Definition at line 46 of file driver_ov2640.c.

◆ OV2640_ADDRESS

#define OV2640_ADDRESS   0x60

iic address definition

iic address

Definition at line 54 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_BPADDR

#define OV2640_REG_DSP_BANK_BPADDR   0x7C

sde indirect address register

Definition at line 72 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_BPDATA

#define OV2640_REG_DSP_BANK_BPDATA   0x7D

sde indirect data register

Definition at line 73 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_CTRL0

#define OV2640_REG_DSP_BANK_CTRL0   0xC2

module0 enable register

Definition at line 79 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_CTRL1

#define OV2640_REG_DSP_BANK_CTRL1   0xC3

module1 enable register

Definition at line 80 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_CTRL2

#define OV2640_REG_DSP_BANK_CTRL2   0x86

module2 enable register

Definition at line 74 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_CTRL3

#define OV2640_REG_DSP_BANK_CTRL3   0x87

module3 enable register

Definition at line 75 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_CTRLI

#define OV2640_REG_DSP_BANK_CTRLI   0x50

control register

Definition at line 61 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_DPRP

#define OV2640_REG_DSP_BANK_DPRP   0x56

dprp register

Definition at line 67 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_HSIZE

#define OV2640_REG_DSP_BANK_HSIZE   0x51

hsize register

Definition at line 62 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_HSIZE8

#define OV2640_REG_DSP_BANK_HSIZE8   0xC0

image horizontal size register

Definition at line 77 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_IMAGE_MODE

#define OV2640_REG_DSP_BANK_IMAGE_MODE   0xDA

image mode register

Definition at line 82 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_MC_AH

#define OV2640_REG_DSP_BANK_MC_AH   0xFB

program memory pointer address high register

Definition at line 89 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_MC_AL

#define OV2640_REG_DSP_BANK_MC_AL   0xFA

program memory pointer address low register

Definition at line 88 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_MC_BIST

#define OV2640_REG_DSP_BANK_MC_BIST   0xF9

microcontroller reset register

Definition at line 87 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_MC_D

#define OV2640_REG_DSP_BANK_MC_D   0xFC

program memory pointer address register

Definition at line 90 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_MS_SP

#define OV2640_REG_DSP_BANK_MS_SP   0xF0

sccb master speed register

Definition at line 84 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_P_CMD

#define OV2640_REG_DSP_BANK_P_CMD   0xFD

sccb protocol command register

Definition at line 91 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_P_STATUS

#define OV2640_REG_DSP_BANK_P_STATUS   0xFE

sccb protocol status register

Definition at line 92 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_QS

#define OV2640_REG_DSP_BANK_QS   0x44

quantization scale factor register

Definition at line 60 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_R_BYPASS

#define OV2640_REG_DSP_BANK_R_BYPASS   0x05

chip dsp bank register definition

bypass dsp register

Definition at line 59 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_R_DVP_SP

#define OV2640_REG_DSP_BANK_R_DVP_SP   0xD3

dvp sp register

Definition at line 81 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_RA_DLMT

#define OV2640_REG_DSP_BANK_RA_DLMT   0xFF

bank select register

Definition at line 93 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_RESET

#define OV2640_REG_DSP_BANK_RESET   0xE0

reset register

Definition at line 83 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_SIZEL

#define OV2640_REG_DSP_BANK_SIZEL   0x8C

sizel register

Definition at line 76 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_SS_CTRL

#define OV2640_REG_DSP_BANK_SS_CTRL   0xF8

sccb slave control register

Definition at line 86 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_SS_ID

#define OV2640_REG_DSP_BANK_SS_ID   0xF7

sccb slave id register

Definition at line 85 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_TEST

#define OV2640_REG_DSP_BANK_TEST   0x57

test register

Definition at line 68 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_VHYX

#define OV2640_REG_DSP_BANK_VHYX   0x55

vhyx register

Definition at line 66 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_VSIZE

#define OV2640_REG_DSP_BANK_VSIZE   0x52

vsize register

Definition at line 63 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_VSIZE8

#define OV2640_REG_DSP_BANK_VSIZE8   0xC1

image vertical size register

Definition at line 78 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_XOFFL

#define OV2640_REG_DSP_BANK_XOFFL   0x53

offset x register

Definition at line 64 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_YOFFL

#define OV2640_REG_DSP_BANK_YOFFL   0x54

offset y register

Definition at line 65 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_ZMHH

#define OV2640_REG_DSP_BANK_ZMHH   0x5C

zmhh register

Definition at line 71 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_ZMOH

#define OV2640_REG_DSP_BANK_ZMOH   0x5B

zmoh register

Definition at line 70 of file driver_ov2640.c.

◆ OV2640_REG_DSP_BANK_ZMOW

#define OV2640_REG_DSP_BANK_ZMOW   0x5A

zmow register

Definition at line 69 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_ADDVSH

#define OV2640_REG_SENSOR_BANK_ADDVSH   0x2E

addvsh register

Definition at line 125 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_ADDVSL

#define OV2640_REG_SENSOR_BANK_ADDVSL   0x2D

addvsl register

Definition at line 124 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_AEB

#define OV2640_REG_SENSOR_BANK_AEB   0x25

aeb register

Definition at line 120 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_AEC

#define OV2640_REG_SENSOR_BANK_AEC   0x10

aec register

Definition at line 107 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_AEW

#define OV2640_REG_SENSOR_BANK_AEW   0x24

aew register

Definition at line 119 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_ARCOM2

#define OV2640_REG_SENSOR_BANK_ARCOM2   0x34

arcom2 register

Definition at line 130 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_BD50

#define OV2640_REG_SENSOR_BANK_BD50   0x4F

bd50 register

Definition at line 138 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_BD60

#define OV2640_REG_SENSOR_BANK_BD60   0x50

bd60 register

Definition at line 139 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_CLKRC

#define OV2640_REG_SENSOR_BANK_CLKRC   0x11

clkrc register

Definition at line 108 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_COM1

#define OV2640_REG_SENSOR_BANK_COM1   0x03

com1 register

Definition at line 99 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_COM10

#define OV2640_REG_SENSOR_BANK_COM10   0x15

com10 register

Definition at line 112 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_COM19

#define OV2640_REG_SENSOR_BANK_COM19   0x48

com19 register

Definition at line 134 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_COM2

#define OV2640_REG_SENSOR_BANK_COM2   0x09

com2 register

Definition at line 102 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_COM22

#define OV2640_REG_SENSOR_BANK_COM22   0x4B

com22 register

Definition at line 136 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_COM25

#define OV2640_REG_SENSOR_BANK_COM25   0x4E

com25 register

Definition at line 137 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_COM3

#define OV2640_REG_SENSOR_BANK_COM3   0x0C

com3 register

Definition at line 105 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_COM4

#define OV2640_REG_SENSOR_BANK_COM4   0x0D

com4 register

Definition at line 106 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_COM7

#define OV2640_REG_SENSOR_BANK_COM7   0x12

com7 register

Definition at line 109 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_COM8

#define OV2640_REG_SENSOR_BANK_COM8   0x13

com8 register

Definition at line 110 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_COM9

#define OV2640_REG_SENSOR_BANK_COM9   0x14

com9 register

Definition at line 111 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_FLH

#define OV2640_REG_SENSOR_BANK_FLH   0x47

flh register

Definition at line 133 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_FLL

#define OV2640_REG_SENSOR_BANK_FLL   0x46

fll register

Definition at line 132 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_FRARL

#define OV2640_REG_SENSOR_BANK_FRARL   0x2B

frarl register

Definition at line 123 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_GAIN

#define OV2640_REG_SENSOR_BANK_GAIN   0x00

chip sensor bank register definition

gain register

Definition at line 98 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_HEDY

#define OV2640_REG_SENSOR_BANK_HEDY   0x31

hedy register

Definition at line 128 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_HISTO_HIGH

#define OV2640_REG_SENSOR_BANK_HISTO_HIGH   0x62

histo high register

Definition at line 145 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_HISTO_LOW

#define OV2640_REG_SENSOR_BANK_HISTO_LOW   0x61

histo low register

Definition at line 144 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_HREFEND

#define OV2640_REG_SENSOR_BANK_HREFEND   0x18

hrefend register

Definition at line 114 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_HREFST

#define OV2640_REG_SENSOR_BANK_HREFST   0x17

hrefst register

Definition at line 113 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_HSDY

#define OV2640_REG_SENSOR_BANK_HSDY   0x30

hsdy register

Definition at line 127 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_MIDH

#define OV2640_REG_SENSOR_BANK_MIDH   0x1C

id byte high register

Definition at line 117 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_MIDL

#define OV2640_REG_SENSOR_BANK_MIDL   0x1D

id byte low register

Definition at line 118 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_PIDH

#define OV2640_REG_SENSOR_BANK_PIDH   0x0A

product id number msb register

Definition at line 103 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_PIDL

#define OV2640_REG_SENSOR_BANK_PIDL   0x0B

product id number lsb register

Definition at line 104 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_REG04

#define OV2640_REG_SENSOR_BANK_REG04   0x04

reg04 register

Definition at line 100 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_REG08

#define OV2640_REG_SENSOR_BANK_REG08   0x08

reg08 register

Definition at line 101 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_REG2A

#define OV2640_REG_SENSOR_BANK_REG2A   0x2A

reg2a register

Definition at line 122 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_REG32

#define OV2640_REG_SENSOR_BANK_REG32   0x32

reg32 register

Definition at line 129 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_REG45

#define OV2640_REG_SENSOR_BANK_REG45   0x45

reg45 register

Definition at line 131 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_REG5D

#define OV2640_REG_SENSOR_BANK_REG5D   0x5D

reg5d register

Definition at line 140 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_REG5E

#define OV2640_REG_SENSOR_BANK_REG5E   0x5E

reg5e register

Definition at line 141 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_REG5F

#define OV2640_REG_SENSOR_BANK_REG5F   0x5F

reg5f register

Definition at line 142 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_REG60

#define OV2640_REG_SENSOR_BANK_REG60   0x60

reg60 register

Definition at line 143 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_VEND

#define OV2640_REG_SENSOR_BANK_VEND   0x1A

vend register

Definition at line 116 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_VSTRT

#define OV2640_REG_SENSOR_BANK_VSTRT   0x19

vstrt register

Definition at line 115 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_VV

#define OV2640_REG_SENSOR_BANK_VV   0x26

vv register

Definition at line 121 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_YAVG

#define OV2640_REG_SENSOR_BANK_YAVG   0x2F

yavg register

Definition at line 126 of file driver_ov2640.c.

◆ OV2640_REG_SENSOR_BANK_ZOOMS

#define OV2640_REG_SENSOR_BANK_ZOOMS   0x49

zooms register

Definition at line 135 of file driver_ov2640.c.

◆ SUPPLY_VOLTAGE_MAX

#define SUPPLY_VOLTAGE_MAX   3.0f

chip max supply voltage

Definition at line 45 of file driver_ov2640.c.

◆ SUPPLY_VOLTAGE_MIN

#define SUPPLY_VOLTAGE_MIN   2.5f

chip min supply voltage

Definition at line 44 of file driver_ov2640.c.

◆ TEMPERATURE_MAX

#define TEMPERATURE_MAX   70.0f

chip max operating temperature

Definition at line 48 of file driver_ov2640.c.

◆ TEMPERATURE_MIN

#define TEMPERATURE_MIN   -30.0f

chip min operating temperature

Definition at line 47 of file driver_ov2640.c.

Variable Documentation

◆ gsc_ov2640_init_table

const uint8_t gsc_ov2640_init_table

innter table globle definition

init table definition

init register

Definition at line 150 of file driver_ov2640.c.

◆ gsc_ov2640_jpeg_init_table

const uint8_t gsc_ov2640_jpeg_init_table
Initial value:
=
{
{0xFF, 0x00},
{0xDA, 0x10},
{0xD7, 0x03},
{0xDF, 0x00},
{0x33, 0x80},
{0x3C, 0x40},
{0xE1, 0x77},
{0x00, 0x00},
{0xFF, 0x01},
{0xE0, 0x14},
{0xE1, 0x77},
{0xE5, 0x1F},
{0xD7, 0x03},
{0xDA, 0x10},
{0xE0, 0x00},
}

jpeg init table definition

jpeg init register

Definition at line 151 of file driver_ov2640.c.

◆ gsc_ov2640_rgb565_init_table

const uint8_t gsc_ov2640_rgb565_init_table
Initial value:
=
{
{0xFF, 0x00},
{0xDA, 0x09},
{0xD7, 0x03},
{0xDF, 0x02},
{0x33, 0xA0},
{0x3C, 0x00},
{0xE1, 0x67},
{0xFF, 0x01},
{0xE0, 0x00},
{0xE1, 0x00},
{0xE5, 0x00},
{0xD7, 0x00},
{0xDA, 0x00},
{0xE0, 0x00},
}

rgb565 init table definition

rgb565 init register

Definition at line 152 of file driver_ov2640.c.