CAM driver APIs. More...
Data Structures | |
| struct | cam_config_t |
| CAM config. More... | |
Macros | |
| #define | CAM_DATA_STORE_MODE_NORMAL (0U) |
| CAM data store mode. More... | |
| #define | CAM_DATA_STORE_MODE_Y_UV_PLANES (CAM_CR1_STORAGE_MODE_SET(1)) |
| #define | CAM_DATA_STORE_MODE_Y_ONLY (CAM_CR1_STORAGE_MODE_SET(2)) |
| #define | CAM_DATA_STORE_MODE_BINARY (CAM_CR1_STORAGE_MODE_SET(3)) |
| #define | CAM_SENSOR_BITWIDTH_8BITS (CAM_CR1_SENSOR_BIT_WIDTH_SET(0)) |
| CAM sensor bitwidth. More... | |
| #define | CAM_SENSOR_BITWIDTH_10BITS (CAM_CR1_SENSOR_BIT_WIDTH_SET(1)) |
| #define | CAM_SENSOR_BITWIDTH_24BITS (CAM_CR1_SENSOR_BIT_WIDTH_SET(3)) |
| #define | CAM_COLOR_FORMAT_RGB888 (CAM_CR1_COLOR_FORMATS_SET(2)) |
| CAM input color format. More... | |
| #define | CAM_COLOR_FORMAT_RGB565 (CAM_CR1_COLOR_FORMATS_SET(4)) |
| #define | CAM_COLOR_FORMAT_RGB555 (CAM_CR1_COLOR_FORMATS_SET(6)) |
| #define | CAM_COLOR_FORMAT_YCBCR422_YUV422 (CAM_CR1_COLOR_FORMATS_SET(7)) |
| #define | CAM_COLOR_FORMAT_YUV444 (CAM_CR1_COLOR_FORMATS_SET(8)) |
| #define | CAM_COLOR_FORMAT_RAW8 (CAM_CR1_COLOR_FORMATS_SET(0xf)) |
| #define | CAM_COLOR_FORMAT_UNSUPPORTED (1) |
Functions | |
| static uint32_t | cam_get_pixel_format (display_pixel_format_t format) |
| cam get pixel format value More... | |
| static void | cam_set_color_key (CAM_Type *ptr, uint32_t high, uint32_t low) |
| CAM set high and low limits of color key. More... | |
| void | cam_get_default_config (CAM_Type *ptr, cam_config_t *config, display_pixel_format_t pixel_format) |
| CAM get default config. More... | |
| hpm_stat_t | cam_init (CAM_Type *ptr, cam_config_t *config) |
| CAM init. More... | |
| void | cam_start (CAM_Type *ptr) |
| CAM start. More... | |
| void | cam_stop (CAM_Type *ptr) |
| CAM stop. More... | |
| static void | cam_update_buffer (CAM_Type *ptr, uint32_t buffer) |
| CAM update DMASA_FB1 buffer. More... | |
| static void | cam_update_buffer2 (CAM_Type *ptr, uint32_t buffer) |
| CAM update DMASA_FB2 buffer. More... | |
| static void | cam_enable_binary_output (CAM_Type *ptr) |
| CAM enable binary output. More... | |
| static void | cam_disable_binary_output (CAM_Type *ptr) |
| CAM disable binary output. More... | |
| static void | cam_set_binary_threshold (CAM_Type *ptr, uint8_t threshold) |
| CAM set binary threshold. More... | |
| static void | cam_enable_argb8888_output (CAM_Type *ptr) |
| CAM enable argb8888 output. More... | |
| static void | cam_disable_argb8888_output (CAM_Type *ptr) |
| CAM disable argb8888 output. More... | |
| static void | cam_set_input_pixel_byte_order (CAM_Type *ptr, cam_input_pixel_byte_order_t order) |
| CAM set input pixel byte order. More... | |
| static void | cam_enable_irq (CAM_Type *ptr, cam_irq_mask_t irq_mask) |
| CAM enable irq. More... | |
| static void | cam_disable_irq (CAM_Type *ptr, cam_irq_mask_t irq_mask) |
| CAM disable irq. More... | |
| static bool | cam_check_status (CAM_Type *ptr, cam_status_mask_t sta_mask) |
| Check CAM status according to the given status mask. More... | |
| static void | cam_clear_status (CAM_Type *ptr, cam_status_mask_t sta_mask) |
| Clear CAM status according to the given status mask. More... | |
| void | cam_stop_safely (CAM_Type *ptr) |
| CAM safety stop. More... | |
CAM driver APIs.
| #define CAM_COLOR_FORMAT_RAW8 (CAM_CR1_COLOR_FORMATS_SET(0xf)) |
#include <drivers/inc/hpm_cam_drv.h>
| #define CAM_COLOR_FORMAT_RGB555 (CAM_CR1_COLOR_FORMATS_SET(6)) |
#include <drivers/inc/hpm_cam_drv.h>
| #define CAM_COLOR_FORMAT_RGB565 (CAM_CR1_COLOR_FORMATS_SET(4)) |
#include <drivers/inc/hpm_cam_drv.h>
| #define CAM_COLOR_FORMAT_RGB888 (CAM_CR1_COLOR_FORMATS_SET(2)) |
#include <drivers/inc/hpm_cam_drv.h>
CAM input color format.
| #define CAM_COLOR_FORMAT_UNSUPPORTED (1) |
#include <drivers/inc/hpm_cam_drv.h>
| #define CAM_COLOR_FORMAT_YCBCR422_YUV422 (CAM_CR1_COLOR_FORMATS_SET(7)) |
#include <drivers/inc/hpm_cam_drv.h>
| #define CAM_COLOR_FORMAT_YUV444 (CAM_CR1_COLOR_FORMATS_SET(8)) |
#include <drivers/inc/hpm_cam_drv.h>
| #define CAM_DATA_STORE_MODE_BINARY (CAM_CR1_STORAGE_MODE_SET(3)) |
#include <drivers/inc/hpm_cam_drv.h>
| #define CAM_DATA_STORE_MODE_NORMAL (0U) |
#include <drivers/inc/hpm_cam_drv.h>
CAM data store mode.
| #define CAM_DATA_STORE_MODE_Y_ONLY (CAM_CR1_STORAGE_MODE_SET(2)) |
#include <drivers/inc/hpm_cam_drv.h>
| #define CAM_DATA_STORE_MODE_Y_UV_PLANES (CAM_CR1_STORAGE_MODE_SET(1)) |
#include <drivers/inc/hpm_cam_drv.h>
| #define CAM_SENSOR_BITWIDTH_10BITS (CAM_CR1_SENSOR_BIT_WIDTH_SET(1)) |
#include <drivers/inc/hpm_cam_drv.h>
| #define CAM_SENSOR_BITWIDTH_24BITS (CAM_CR1_SENSOR_BIT_WIDTH_SET(3)) |
#include <drivers/inc/hpm_cam_drv.h>
| #define CAM_SENSOR_BITWIDTH_8BITS (CAM_CR1_SENSOR_BIT_WIDTH_SET(0)) |
#include <drivers/inc/hpm_cam_drv.h>
CAM sensor bitwidth.
#include <drivers/inc/hpm_cam_drv.h>
cam input pixel byte order
| enum cam_irq_mask_t |
#include <drivers/inc/hpm_cam_drv.h>
CAM IRQ mask.
| enum cam_status_mask_t |
#include <drivers/inc/hpm_cam_drv.h>
CAM status mask.
|
inlinestatic |
#include <drivers/inc/hpm_cam_drv.h>
Check CAM status according to the given status mask.
| [in] | ptr | CAM base address |
| sta_mask | sta_mask refer to cam_status_mask_t |
| true | if any bit in given mask is set |
| false | if none of any bit in given mask is set |
|
inlinestatic |
#include <drivers/inc/hpm_cam_drv.h>
Clear CAM status according to the given status mask.
| [in] | ptr | CAM base address |
| sta_mask | sta_mask refer to cam_status_mask_t |
|
inlinestatic |
#include <drivers/inc/hpm_cam_drv.h>
CAM disable argb8888 output.
| [in] | ptr | CAM base address |
|
inlinestatic |
|
inlinestatic |
#include <drivers/inc/hpm_cam_drv.h>
CAM disable irq.
| [in] | ptr | CAM base address |
| [in] | irq_mask | irq mask value |
|
inlinestatic |
#include <drivers/inc/hpm_cam_drv.h>
CAM enable argb8888 output.
This function is used to enable CAM argb8888 pixel output after the CAM is initialized by the cam_init and input pixel byte order is configured by the cam_set_input_pixel_byte_order.
| [in] | ptr | CAM base address |
|
inlinestatic |
#include <drivers/inc/hpm_cam_drv.h>
CAM enable binary output.
This function is used to enable CAM binary output after the CAM is initialized by the cam_init.
| [in] | ptr | CAM base address |
|
inlinestatic |
#include <drivers/inc/hpm_cam_drv.h>
CAM enable irq.
| [in] | ptr | CAM base address |
| [in] | irq_mask | irq mask value |
| void cam_get_default_config | ( | CAM_Type * | ptr, |
| cam_config_t * | config, | ||
| display_pixel_format_t | pixel_format | ||
| ) |
#include <drivers/inc/hpm_cam_drv.h>
CAM get default config.
| [in] | ptr | CAM base address |
| [out] | config | cam_config_t |
| [in] | pixel_format | display_pixel_format_t |
|
inlinestatic |
#include <drivers/inc/hpm_cam_drv.h>
cam get pixel format value
| format | display_pixel_format_t |
| hpm_stat_t cam_init | ( | CAM_Type * | ptr, |
| cam_config_t * | config | ||
| ) |
#include <drivers/inc/hpm_cam_drv.h>
CAM init.
| [in] | ptr | CAM base address |
| [in] | config | cam_config_t |
| hpm_stat_t | status_invalid_argument or status_success |
|
inlinestatic |
#include <drivers/inc/hpm_cam_drv.h>
CAM set binary threshold.
| [in] | ptr | CAM base address |
| [in] | threshold | threshold value of binary output |
|
inlinestatic |
#include <drivers/inc/hpm_cam_drv.h>
CAM set high and low limits of color key.
| [in] | ptr | CAM base address |
| [in] | high | color key high limits |
| [in] | low | color key low limits |
|
inlinestatic |
#include <drivers/inc/hpm_cam_drv.h>
CAM set input pixel byte order.
| [in] | ptr | CAM base address |
| [in] | order | cam_input_pixel_byte_order_t |
| void cam_start | ( | CAM_Type * | ptr | ) |
| void cam_stop | ( | CAM_Type * | ptr | ) |
#include <drivers/inc/hpm_cam_drv.h>
CAM stop.
| [in] | ptr | CAM base address |
| void cam_stop_safely | ( | CAM_Type * | ptr | ) |
#include <drivers/inc/hpm_cam_drv.h>
CAM safety stop.
| [in] | ptr | CAM base address |
|
inlinestatic |
#include <drivers/inc/hpm_cam_drv.h>
CAM update DMASA_FB1 buffer.
| [in] | ptr | CAM base address |
| [in] | buffer | buffer point address |
|
inlinestatic |
#include <drivers/inc/hpm_cam_drv.h>
CAM update DMASA_FB2 buffer.
| [in] | ptr | CAM base address |
| [in] | buffer | buffer point address |