HPM SDK
HPMicro Software Development Kit
hpm_ov5640.h File Reference
#include "hpm_common.h"
#include "hpm_camera_config.h"

Go to the source code of this file.

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...
 

Macro Definition Documentation

◆ OV5640_ACTIVE_IMAGE_HEIGHT

#define OV5640_ACTIVE_IMAGE_HEIGHT   (1944U)

◆ OV5640_ACTIVE_IMAGE_WIDTH

#define OV5640_ACTIVE_IMAGE_WIDTH   (2592U)

◆ OV5640_CHIP_ID_HIGH_BYTE_ADDR

#define OV5640_CHIP_ID_HIGH_BYTE_ADDR   (0x300A)

◆ OV5640_CHIP_ID_HIGH_BYTE_VALUE

#define OV5640_CHIP_ID_HIGH_BYTE_VALUE   (0x56)

◆ OV5640_CHIP_ID_LOW_BYTE_ADDR

#define OV5640_CHIP_ID_LOW_BYTE_ADDR   (0x300B)

◆ OV5640_CHIP_ID_LOW_BYTE_VALUE

#define OV5640_CHIP_ID_LOW_BYTE_VALUE   (0x40)

◆ OV5640_I2C_ADDR

#define OV5640_I2C_ADDR   (0x3CU)

◆ OV5640_PWDN_ACTIVE

#define OV5640_PWDN_ACTIVE   1

◆ OV5640_PWDN_INACTIVE

#define OV5640_PWDN_INACTIVE   0

◆ OV5640_RST_ACTIVE

#define OV5640_RST_ACTIVE   0

◆ OV5640_RST_INACTIVE

#define OV5640_RST_INACTIVE   1

Function Documentation

◆ ov5640_check_chip_id()

hpm_stat_t ov5640_check_chip_id ( camera_context_t context)

◆ ov5640_flip()

hpm_stat_t ov5640_flip ( camera_context_t context,
bool  enable 
)

set ov5640 flip

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

◆ ov5640_init()

hpm_stat_t ov5640_init ( camera_context_t context,
camera_config_t ov_config 
)

◆ ov5640_mirror()

hpm_stat_t ov5640_mirror ( camera_context_t context,
bool  enable 
)

set ov5640 mirror

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

◆ ov5640_power_up()

void ov5640_power_up ( camera_context_t context)

ov5640 power up

Parameters
[in]contextcamera_context_t

◆ ov5640_read_register()

hpm_stat_t ov5640_read_register ( camera_context_t context,
uint16_t  reg,
uint8_t *  buf 
)

◆ ov5640_set_brightness()

hpm_stat_t ov5640_set_brightness ( camera_context_t context,
int32_t  brightness 
)

◆ ov5640_set_clock_config()

hpm_stat_t ov5640_set_clock_config ( camera_context_t context,
camera_config_t ov_config 
)

◆ ov5640_set_contrast()

hpm_stat_t ov5640_set_contrast ( camera_context_t context,
int32_t  contrast 
)

◆ ov5640_set_image_size()

hpm_stat_t ov5640_set_image_size ( camera_context_t context,
camera_config_t ov_config 
)

◆ ov5640_set_interface()

hpm_stat_t ov5640_set_interface ( camera_context_t context,
camera_config_t ov_config 
)

◆ ov5640_set_light_mode()

hpm_stat_t ov5640_set_light_mode ( camera_context_t context,
int32_t  lightmode 
)

◆ ov5640_set_pixel_format()

hpm_stat_t ov5640_set_pixel_format ( camera_context_t context,
display_pixel_format_t  pixel_format 
)

◆ ov5640_set_saturation()

hpm_stat_t ov5640_set_saturation ( camera_context_t context,
int32_t  saturation 
)

◆ ov5640_set_special_effect()

hpm_stat_t ov5640_set_special_effect ( camera_context_t context,
int32_t  effect 
)

◆ ov5640_software_reset()

hpm_stat_t ov5640_software_reset ( camera_context_t context)

◆ ov5640_start()

hpm_stat_t ov5640_start ( camera_context_t context)

◆ ov5640_stop()

hpm_stat_t ov5640_stop ( camera_context_t context)

◆ ov5640_write_multi_registers()

hpm_stat_t ov5640_write_multi_registers ( camera_context_t context,
const ov5640_reg_val_t  regval[],
uint32_t  len 
)

◆ ov5640_write_register()

hpm_stat_t ov5640_write_register ( camera_context_t context,
uint16_t  reg,
uint8_t  val 
)