Bouffalo SDK  1.0
Bouffalolab Software Development Kit
CAM
Collaboration diagram for CAM:

Modules

 CAMERA input format definition
 
 CAMERA output format definition
 
 CAMERA interrupt status definition
 
 CAMERA interrupt mask definition
 
 CAMERA interrupt clear definition
 
 CAMERA hsync/vsync polarity active level definition
 
 CAMERA input source definition
 
 CAMERA burst length definition
 
 CAMERA feature control cmd definition
 

Data Structures

struct  bflb_cam_config_s
 CAM configuration structure. More...
 

Functions

void bflb_cam_init (struct bflb_device_s *dev, const struct bflb_cam_config_s *config)
 Initialize cam. More...
 
void bflb_cam_start (struct bflb_device_s *dev)
 Enable cam. More...
 
void bflb_cam_stop (struct bflb_device_s *dev)
 Disable cam. More...
 
void bflb_cam_int_mask (struct bflb_device_s *dev, uint32_t int_type, bool mask)
 Mask or unmask cam interrupt. More...
 
void bflb_cam_int_clear (struct bflb_device_s *dev, uint32_t int_type)
 Clear cam interrupt. More...
 
void bflb_cam_crop_vsync (struct bflb_device_s *dev, uint16_t start_line, uint16_t end_line)
 Crop vsync. More...
 
void bflb_cam_crop_hsync (struct bflb_device_s *dev, uint16_t start_pixel, uint16_t end_pixel)
 Crop hsync. More...
 
void bflb_cam_pop_one_frame (struct bflb_device_s *dev)
 Pop one frame. More...
 
void bflb_cam_swap_input_yu_order (struct bflb_device_s *dev, bool enable)
 Swap input order of y and uv. More...
 
void bflb_cam_filter_frame_period (struct bflb_device_s *dev, uint8_t frame_count, uint32_t frame_valid)
 Set frame filter, if frame_count = 3, frame_valid = 101b, second frame will be dropped every 3 frames. More...
 
uint8_t bflb_cam_get_frame_count (struct bflb_device_s *dev)
 Get frame count. More...
 
uint32_t bflb_cam_get_frame_info (struct bflb_device_s *dev, uint8_t **pic)
 Get frame information. More...
 
uint32_t bflb_cam_get_intstatus (struct bflb_device_s *dev)
 Get interrupt status. More...
 
int bflb_cam_feature_control (struct bflb_device_s *dev, int cmd, size_t arg)
 Control cam feature. More...
 

Detailed Description

Function Documentation

◆ bflb_cam_crop_hsync()

void bflb_cam_crop_hsync ( struct bflb_device_s dev,
uint16_t  start_pixel,
uint16_t  end_pixel 
)

Crop hsync.

Parameters
[in]devdevice handle
[in]start_pixelstart pixel of each line
[in]end_pixelend pixel of each line, not include

◆ bflb_cam_crop_vsync()

void bflb_cam_crop_vsync ( struct bflb_device_s dev,
uint16_t  start_line,
uint16_t  end_line 
)

Crop vsync.

Parameters
[in]devdevice handle
[in]start_linestart line of window
[in]end_lineend line of window, not include

◆ bflb_cam_feature_control()

int bflb_cam_feature_control ( struct bflb_device_s dev,
int  cmd,
size_t  arg 
)

Control cam feature.

Parameters
[in]devdevice handle
[in]cmdfeature command
[in]arguser data
Returns
A negated errno value on failure

◆ bflb_cam_filter_frame_period()

void bflb_cam_filter_frame_period ( struct bflb_device_s dev,
uint8_t  frame_count,
uint32_t  frame_valid 
)

Set frame filter, if frame_count = 3, frame_valid = 101b, second frame will be dropped every 3 frames.

Parameters
[in]devdevice handle
[in]frame_countframe filter period
[in]frame_validframe valid

◆ bflb_cam_get_frame_count()

uint8_t bflb_cam_get_frame_count ( struct bflb_device_s dev)

Get frame count.

Parameters
[in]devdevice handle
Returns
Frame count

◆ bflb_cam_get_frame_info()

uint32_t bflb_cam_get_frame_info ( struct bflb_device_s dev,
uint8_t **  pic 
)

Get frame information.

Parameters
[in]devdevice handle
[out]picpointer to frame start address
Returns
Size of frame

◆ bflb_cam_get_intstatus()

uint32_t bflb_cam_get_intstatus ( struct bflb_device_s dev)

Get interrupt status.

Parameters
[in]devdevice handle
Returns
Interrupt status

◆ bflb_cam_init()

void bflb_cam_init ( struct bflb_device_s dev,
const struct bflb_cam_config_s config 
)

Initialize cam.

Parameters
[in]devdevice handle
[in]configpointer to cam configure structure

◆ bflb_cam_int_clear()

void bflb_cam_int_clear ( struct bflb_device_s dev,
uint32_t  int_type 
)

Clear cam interrupt.

Parameters
[in]devdevice handle
[in]int_typeint_type cam interrupt clear type, use CAMERA interrupt clear definition

◆ bflb_cam_int_mask()

void bflb_cam_int_mask ( struct bflb_device_s dev,
uint32_t  int_type,
bool  mask 
)

Mask or unmask cam interrupt.

Parameters
[in]devdevice handle
[in]int_typecam interrupt mask type, use CAMERA interrupt mask definition
[in]maskmask or unmask

◆ bflb_cam_pop_one_frame()

void bflb_cam_pop_one_frame ( struct bflb_device_s dev)

Pop one frame.

Parameters
[in]devdevice handle

◆ bflb_cam_start()

void bflb_cam_start ( struct bflb_device_s dev)

Enable cam.

Parameters
[in]devdevice handle

◆ bflb_cam_stop()

void bflb_cam_stop ( struct bflb_device_s dev)

Disable cam.

Parameters
[in]devdevice handle

◆ bflb_cam_swap_input_yu_order()

void bflb_cam_swap_input_yu_order ( struct bflb_device_s dev,
bool  enable 
)

Swap input order of y and uv.

Parameters
[in]devdevice handle
[in]enableenable or disable