Defines | |
| #define | PO3030K_FULL 1 |
| #define | ARRAY_WIDTH 640 |
| #define | ARRAY_HEIGHT 480 |
| #define | GREY_SCALE_MODE 0 |
| #define | RGB_565_MODE 1 |
| #define | YUV_MODE 2 |
| #define | MODE_VGA 0x44 |
| #define | MODE_QVGA 0x11 |
| #define | MODE_QQVGA 0x33 |
| #define | SPEED_2 0x00 |
| #define | SPEED_2_3 0x10 |
| #define | SPEED_4 0x20 |
| #define | SPEED_8 0x30 |
| #define | SPEED_16 0x40 |
| #define | SPEED_32 0x50 |
| #define | SPEED_64 0x60 |
| #define | SPEED_128 0x70 |
Functions | |
| int | e_po3030k_config_cam (unsigned int sensor_x1, unsigned int sensor_y1, unsigned int sensor_width, unsigned int sensor_height, unsigned int zoom_fact_width, unsigned int zoom_fact_height, int color_mode) |
| int | e_po3030k_get_bytes_per_pixel (int color_mode) |
| void | e_po3030k_init_cam (void) |
| void | e_po3030k_write_cam_registers (void) |
| void | e_po3030k_launch_capture (char *buf) |
| int | e_po3030k_apply_timer_config (int pixel_row, int pixel_col, int bpp, int pbp, int bbl) |
| int | e_po3030k_is_img_ready (void) |
| int | e_po3030k_set_color_mode (int mode) |
| int | e_po3030k_set_sampling_mode (int mode) |
| int | e_po3030k_set_speed (int mode) |
| int | e_po3030k_set_wx (unsigned int start, unsigned int stop) |
| int | e_po3030k_set_wy (unsigned int start, unsigned int stop) |
| int | e_po3030k_set_vsync (unsigned int start, unsigned int stop, unsigned int col) |
| void | e_po3030k_set_mirror (int vertical, int horizontal) |
| void | e_po3030k_read_cam_registers (void) |
| int | e_po3030k_set_register (unsigned char adr, unsigned char value) |
| int | e_po3030k_get_register (unsigned char adr, unsigned char *value) |
| void | e_po3030k_set_bias (unsigned char pixbias, unsigned char opbias) |
| void | e_po3030k_set_integr_time (unsigned long time) |
| void | e_po3030k_set_adc_offset (unsigned char offset) |
| void | e_po3030k_set_sepia (int status) |
| void | e_po3030k_set_lens_gain (unsigned char red, unsigned char green, unsigned char blue) |
| void | e_po3030k_set_edge_prop (unsigned char gain, unsigned char tresh) |
| void | e_po3030k_set_gamma_coef (unsigned char array[12], char color) |
| void | e_po3030k_write_gamma_coef (void) |
| int | e_po3030k_sync_register_array (unsigned char start, unsigned char stop) |
| void | e_po3030k_set_color_matrix (unsigned char array[3 *3]) |
| void | e_po3030k_set_cb_cr_gain (unsigned char cg11c, unsigned char cg22c) |
| void | e_po3030k_set_brigh_contr (unsigned char bright, unsigned char contrast) |
| void | e_po3030k_set_sepia_tone (unsigned char cb, unsigned char cr) |
| void | e_po3030k_set_ww (unsigned char ww) |
| void | e_po3030k_set_awb_ae_tol (unsigned char awbm, unsigned char aem) |
| void | e_po3030k_set_ae_speed (unsigned char b, unsigned char d) |
| void | e_po3030k_set_exposure (long t) |
| void | e_po3030k_set_ref_exposure (unsigned char exp) |
| void | e_po3030k_set_max_min_exp (unsigned int min, unsigned int max) |
| void | e_po3030k_set_max_min_awb (unsigned char minb, unsigned char maxb, unsigned char minr, unsigned char maxr, unsigned char ratior, unsigned char ratiob) |
| int | e_po3030k_set_weight_win (unsigned int x1, unsigned int x2, unsigned int y1, unsigned int y2) |
| void | e_po3030k_set_awb_ae (int awb, int ae) |
| int | e_po3030k_set_color_gain (unsigned char global, unsigned char red, unsigned char green1, unsigned char green2, unsigned char blue) |
| void | e_po3030k_set_flicker_mode (int manual) |
| void | e_po3030k_set_flicker_detection (int hz50, int hz60) |
| int | e_po3030k_set_flicker_man_set (int hz50, int hz60, int fdm, int fk, int tol) |
| #define ARRAY_HEIGHT 480 |
| #define ARRAY_WIDTH 640 |
| #define GREY_SCALE_MODE 0 |
| #define MODE_QQVGA 0x33 |
| #define MODE_QVGA 0x11 |
| #define MODE_VGA 0x44 |
| #define PO3030K_FULL 1 |
If you set this at 0, you save about 168 bytes of memory But you loose all advanced camera functions
| #define RGB_565_MODE 1 |
| #define SPEED_128 0x70 |
| #define SPEED_16 0x40 |
| #define SPEED_2 0x00 |
| #define SPEED_2_3 0x10 |
| #define SPEED_32 0x50 |
| #define SPEED_4 0x20 |
| #define SPEED_64 0x60 |
| #define SPEED_8 0x30 |
| #define YUV_MODE 2 |
| int e_po3030k_apply_timer_config | ( | int | pixel_row, | |
| int | pixel_col, | |||
| int | bpp, | |||
| int | pbp, | |||
| int | bbl | |||
| ) |
Modify the interrupt configuration
| pixel_row | The number of row to take | |
| pixel_col | The number of pixel to take each pixel_row | |
| bpp | The number of byte per pixel | |
| pbp | The number of pixel to ignore between each pixel | |
| bbl | The number of row to ignore between each line |
| pixel_row | The number of row to take | |
| pixel_col | The number of pixel to take each pixel_row | |
| bpp | The number of byte per pixel | |
| pbp | The number of pixel to ignore between each pixel | |
| bbl | The number of row to ignore between each line |
| int e_po3030k_config_cam | ( | unsigned int | sensor_x1, | |
| unsigned int | sensor_y1, | |||
| unsigned int | sensor_width, | |||
| unsigned int | sensor_height, | |||
| unsigned int | zoom_fact_width, | |||
| unsigned int | zoom_fact_height, | |||
| int | color_mode | |||
| ) |
This function setup the internal timing of the camera to match the zoom, color mode and interest area.
| sensor_x1 | The X coordinate of the window's corner | |
| sensor_y1 | The Y coordinate of the window's corner | |
| sensor_width | the Width of the interest area, in FULL sampling scale | |
| sensor_height | The Height of the insterest area, in FULL sampling scale | |
| zoom_fact_width | The subsampling to apply for the window's Width | |
| zoom_fact_height | The subsampling to apply for the window's Height | |
| color_mode | The color mode in which the camera should be configured |
| sensor_x1 | The X coordinate of the window's corner | |
| sensor_y1 | The Y coordinate of the window's corner | |
| sensor_width | the Width of the interest area, in FULL sampling scale | |
| sensor_height | The Height of the insterest area, in FULL sampling scale | |
| zoom_fact_width | The subsampling to apply for the window's Width | |
| zoom_fact_height | The subsampling to apply for the window's Height | |
| color_mode | The color mode in which the camera should be configured |
| int e_po3030k_get_bytes_per_pixel | ( | int | color_mode | ) |
Return the number of bytes per pixel in the given color mode
| color_mode | The given color mode |
| int e_po3030k_get_register | ( | unsigned char | adr, | |
| unsigned char * | value | |||
| ) |
Get the register adr value
| adr | The address | |
| value | The pointer to the value to write to |
| void e_po3030k_init_cam | ( | void | ) |
Initialize the camera, must be called before any other function
| int e_po3030k_is_img_ready | ( | void | ) |
Check if the current capture is finished
| void e_po3030k_launch_capture | ( | char * | buf | ) |
Launch a capture in the buf buffer
| buf | The buffer to write to |
| void e_po3030k_read_cam_registers | ( | void | ) |
Read the camera register
| void e_po3030k_set_adc_offset | ( | unsigned char | offset | ) |
Set the Analog to Digital Converter offset
| offset | The offset |
| void e_po3030k_set_ae_speed | ( | unsigned char | b, | |
| unsigned char | d | |||
| ) |
Set AE speed
| b | AE speed factor when exposure time is decreasing ( 4 lower bits only ) | |
| d | AE speed factor when exposure time is increasing ( 4 lower bits only ) |
| void e_po3030k_set_awb_ae | ( | int | awb, | |
| int | ae | |||
| ) |
Enable/Disable AWB and AE
| awb | 1 mean AWB enabled, 0 mean disabled | |
| ae | 1 mean AE enabled, 0 mean disabled |
| void e_po3030k_set_awb_ae_tol | ( | unsigned char | awbm, | |
| unsigned char | aem | |||
| ) |
Set AWB/AE tolerence margin
| awbm | AWV Margin ( 4 lower bits only ) | |
| aem | AW Margin ( 4 lower bits only ) |
| void e_po3030k_set_bias | ( | unsigned char | pixbias, | |
| unsigned char | opbias | |||
| ) |
Set the Pixel and amplificator bias Increasing the bias produce better image quality, but increase camera's power consumption
| pixbias | The pixel bias | |
| opbias | The Amplificator bias |
| void e_po3030k_set_brigh_contr | ( | unsigned char | bright, | |
| unsigned char | contrast | |||
| ) |
Set the Brightness & Contrast
| bright | The Brightness ( signed 1+7bits fixed point format ) | |
| contrast | The Contrast |
| void e_po3030k_set_cb_cr_gain | ( | unsigned char | cg11c, | |
| unsigned char | cg22c | |||
| ) |
Set The color gain ( Cb/Cr )
| cg11c | Cb gain ( Sign[7] | Integer[6:5] | fractional[4:0] ) | |
| cg22c | Cr gain ( Sign[7] | Integer[6:5] | fractional[4:0] ) |
| int e_po3030k_set_color_gain | ( | unsigned char | global, | |
| unsigned char | red, | |||
| unsigned char | green1, | |||
| unsigned char | green2, | |||
| unsigned char | blue | |||
| ) |
Set the gains of the camera
| global | The global gain | |
| red | The red pixel's gain (fixed point [2:6] format) | |
| green1 | The green pixel near read one gain ([2:6] format) | |
| green2 | The green pixel near blue one gain ([2:6] format) | |
| blue | The blue pixel's gain ([2:6] format) |
| void e_po3030k_set_color_matrix | ( | unsigned char | array[3 *3] | ) |
| int e_po3030k_set_color_mode | ( | int | mode | ) |
Set the camera color mode
| mode | The color mode |
| void e_po3030k_set_edge_prop | ( | unsigned char | gain, | |
| unsigned char | tresh | |||
| ) |
Set Edge properties
| gain | Edge gain & moire factor (fixed point [2:3] format) | |
| tresh | Edge Enhancement threshold |
| void e_po3030k_set_exposure | ( | long | t | ) |
Set exposure time
| t | Exposure time, LSB is in 1/64 line time |
| void e_po3030k_set_flicker_detection | ( | int | hz50, | |
| int | hz60 | |||
| ) |
Set the 50/60Hz flicker detection
| hz50 | Non-zero mean 50Hz flicker detection enabled (default disabled) | |
| hz60 | Non-zero mean 60Hz flicker detection enabled (default disabled) |
| int e_po3030k_set_flicker_man_set | ( | int | hz50, | |
| int | hz60, | |||
| int | fdm, | |||
| int | fk, | |||
| int | tol | |||
| ) |
Set the camera's manual flicker's detection setting
| hz50 | The Hz for the 50Hz detection | |
| hz60 | The Hz for the 60Hz detection | |
| fdm | Flicker duration mode | |
| fk | Flicker count step | |
| tol | Flicker tolerance |
| void e_po3030k_set_flicker_mode | ( | int | manual | ) |
Set flicker detection mode
| manual | Non-zero mean manual mode is enabled ( default automatic mode enabled ) |
| void e_po3030k_set_gamma_coef | ( | unsigned char | array[12], | |
| char | color | |||
| ) |
Set gamma coefficient
| array | Gamma coefficient array | |
| color | First two bytes : - 0b01 => Green
|
| void e_po3030k_set_integr_time | ( | unsigned long | time | ) |
Set the pixel intergration time This is counted in line-time interval. See dataseet p.25 for more information
| time | The integration time ( fixed point [14:6] format ) |
| void e_po3030k_set_lens_gain | ( | unsigned char | red, | |
| unsigned char | green, | |||
| unsigned char | blue | |||
| ) |
Set lens shading gain
| red | Lens gain for red pixel | |
| green | Lens gain for green pixel | |
| blue | Lens gain for blue pixel |
| void e_po3030k_set_max_min_awb | ( | unsigned char | minb, | |
| unsigned char | maxb, | |||
| unsigned char | minr, | |||
| unsigned char | maxr, | |||
| unsigned char | ratior, | |||
| unsigned char | ratiob | |||
| ) |
Set the minimum and maximum red and blue gain in AWB mode
| minb | The minimum blue gain | |
| maxb | The maximum blue gain | |
| minr | The minimum red gain | |
| maxr | The maximum red gain | |
| ratior | The red gain ratio | |
| ratiob | The blue gain ratio |
| void e_po3030k_set_max_min_exp | ( | unsigned int | max, | |
| unsigned int | min | |||
| ) |
Set the minimum and maximum exposure time in AE mode
| min | The minimum exposure time | |
| max | The maximum exposure time |
| void e_po3030k_set_mirror | ( | int | vertical, | |
| int | horizontal | |||
| ) |
Enable/Disable horizontal or vertical mirror
| vertical | Set to 1 when vertical mirror is enabled, 0 if disabled | |
| horizontal | Set to 1 when horizontal mirror is enabled, 0 if disabled |
| void e_po3030k_set_ref_exposure | ( | unsigned char | exp | ) |
Set the reference exposure. The average brightness which the AE should have
| exp | The target exposure level |
| int e_po3030k_set_register | ( | unsigned char | adr, | |
| unsigned char | value | |||
| ) |
Set the register adr to value value
| adr | The address | |
| value | The value |
| int e_po3030k_set_sampling_mode | ( | int | mode | ) |
Set the camera sampling mode
| mode | The given sampling mode |
| void e_po3030k_set_sepia | ( | int | status | ) |
Enable/Disable Sepia color
| status | Set status to 1 to enable, 0 to disable |
| void e_po3030k_set_sepia_tone | ( | unsigned char | cb, | |
| unsigned char | cr | |||
| ) |
Set The color tone at sepia color condition
| cb | Cb tone | |
| cr | Cr tone |
| int e_po3030k_set_speed | ( | int | mode | ) |
Set the camera speed
| mode | The given speed |
| int e_po3030k_set_vsync | ( | unsigned int | start, | |
| unsigned int | stop, | |||
| unsigned int | col | |||
| ) |
Set the camera window VSYNC coordinate
| start | The start row | |
| stop | The stop row | |
| col | The start/stop column |
| int e_po3030k_set_weight_win | ( | unsigned int | x1, | |
| unsigned int | x2, | |||
| unsigned int | y1, | |||
| unsigned int | y2 | |||
| ) |
Set the Weighting Window coordinate
| x1 | The X1 coordinate | |
| x2 | The X2 coordinate | |
| y1 | The Y1 coordinate | |
| y2 | The Y2 coordinate |
| void e_po3030k_set_ww | ( | unsigned char | ww | ) |
Set the Center weight (Back Light compensation) Control parameter
| ww | Center weight ( 4 lower bits only ) |
| int e_po3030k_set_wx | ( | unsigned int | start, | |
| unsigned int | stop | |||
| ) |
Set the camera window X coordinate
| start | The start column | |
| stop | The stop column |
| int e_po3030k_set_wy | ( | unsigned int | start, | |
| unsigned int | stop | |||
| ) |
Set the camera window Y coordinate
| start | The start row | |
| stop | The stop row |
| int e_po3030k_sync_register_array | ( | unsigned char | start, | |
| unsigned char | stop | |||
| ) |
Write every known register between address start and stop (inclusivly).
| start | The beginning address of the write | |
| stop | The last write address |
| void e_po3030k_write_cam_registers | ( | void | ) |
The Po3030k module keep in memory the state of each register the camera has. When you configure the camera, it only alter the internal register state, not the camera one. This function write the internal register state in the camera.
| void e_po3030k_write_gamma_coef | ( | void | ) |
This special function write directly the Gamma coefficient and Gamma color select into camera register.
1.5.4