HPM SDK
HPMicro Software Development Kit
Sensor driver APIs for OV5640

OV5640 sensor driver APIs. More...

Data Structures

struct  ov5640_clock_config_t
 
struct  ov5640_light_mode_config_t
 
struct  ov5640_special_effect_config_t
 
struct  ov5640_reg_val_t
 
struct  ov5640_resolution_param_t
 

Macros

#define OV5640_ACTIVE_IMAGE_WIDTH   (2592U)
 
#define OV5640_ACTIVE_IMAGE_HEIGHT   (1944U)
 
#define OV5640_I2C_ADDR   (0x3CU)
 
#define OV5640_CHIP_ID_HIGH_BYTE_ADDR   (0x300A)
 
#define OV5640_CHIP_ID_HIGH_BYTE_VALUE   (0x56)
 
#define OV5640_CHIP_ID_LOW_BYTE_ADDR   (0x300B)
 
#define OV5640_CHIP_ID_LOW_BYTE_VALUE   (0x40)
 
#define OV5640_RST_ACTIVE   0
 
#define OV5640_RST_INACTIVE   1
 
#define OV5640_PWDN_ACTIVE   1
 
#define OV5640_PWDN_INACTIVE   0
 

Functions

hpm_stat_t ov5640_init (camera_context_t *context, camera_config_t *ov_config)
 
hpm_stat_t ov5640_read_register (camera_context_t *context, uint16_t reg, uint8_t *buf)
 
hpm_stat_t ov5640_write_register (camera_context_t *context, uint16_t reg, uint8_t val)
 
hpm_stat_t ov5640_write_multi_registers (camera_context_t *context, const ov5640_reg_val_t regval[], uint32_t len)
 
hpm_stat_t ov5640_software_reset (camera_context_t *context)
 
hpm_stat_t ov5640_set_pixel_format (camera_context_t *context, display_pixel_format_t pixel_format)
 
hpm_stat_t ov5640_check_chip_id (camera_context_t *context)
 
hpm_stat_t ov5640_set_image_size (camera_context_t *context, camera_config_t *ov_config)
 
hpm_stat_t ov5640_set_clock_config (camera_context_t *context, camera_config_t *ov_config)
 
hpm_stat_t ov5640_set_interface (camera_context_t *context, camera_config_t *ov_config)
 
hpm_stat_t ov5640_flip (camera_context_t *context, bool enable)
 set ov5640 flip More...
 
hpm_stat_t ov5640_start (camera_context_t *context)
 
hpm_stat_t ov5640_stop (camera_context_t *context)
 
hpm_stat_t ov5640_set_brightness (camera_context_t *context, int32_t brightness)
 
hpm_stat_t ov5640_set_contrast (camera_context_t *context, int32_t contrast)
 
hpm_stat_t ov5640_set_saturation (camera_context_t *context, int32_t saturation)
 
hpm_stat_t ov5640_set_light_mode (camera_context_t *context, int32_t lightmode)
 
hpm_stat_t ov5640_set_special_effect (camera_context_t *context, int32_t effect)
 
void ov5640_power_up (camera_context_t *context)
 ov5640 power up More...
 
hpm_stat_t ov5640_mirror (camera_context_t *context, bool enable)
 set ov5640 mirror More...
 

Detailed Description

OV5640 sensor driver APIs.

Macro Definition Documentation

◆ OV5640_ACTIVE_IMAGE_HEIGHT

◆ OV5640_ACTIVE_IMAGE_WIDTH

◆ OV5640_CHIP_ID_HIGH_BYTE_ADDR

◆ OV5640_CHIP_ID_HIGH_BYTE_VALUE

◆ OV5640_CHIP_ID_LOW_BYTE_ADDR

◆ OV5640_CHIP_ID_LOW_BYTE_VALUE

◆ OV5640_I2C_ADDR

◆ OV5640_PWDN_ACTIVE

◆ OV5640_PWDN_INACTIVE

◆ OV5640_RST_ACTIVE

◆ OV5640_RST_INACTIVE

Function Documentation

◆ ov5640_check_chip_id()

◆ ov5640_flip()

hpm_stat_t ov5640_flip ( camera_context_t context,
bool  enable 
)

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/components/camera/ov5640/hpm_ov5640.h>

set ov5640 flip

Parameters
[in]contextcamera_context_t
[in]enableenable flip if true
Returns
hpm_stat_t

◆ ov5640_init()

◆ ov5640_mirror()

hpm_stat_t ov5640_mirror ( camera_context_t context,
bool  enable 
)

#include </home/docs/checkouts/readthedocs.org/user_builds/hpm-sdk/checkouts/latest/components/camera/ov5640/hpm_ov5640.h>

set ov5640 mirror

Parameters
[in]contextcamera_context_t
[in]enableenable mirror if true
Returns
hpm_stat_t

◆ ov5640_power_up()

◆ ov5640_read_register()

◆ ov5640_set_brightness()

◆ ov5640_set_clock_config()

◆ ov5640_set_contrast()

◆ ov5640_set_image_size()

◆ ov5640_set_interface()

◆ ov5640_set_light_mode()

◆ ov5640_set_pixel_format()

◆ ov5640_set_saturation()

◆ ov5640_set_special_effect()

◆ ov5640_software_reset()

◆ ov5640_start()

◆ ov5640_stop()

◆ ov5640_write_multi_registers()

◆ ov5640_write_register()