1 /* 2 * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #pragma once 8 9 #include <stdint.h> 10 #include <stdbool.h> 11 #include "hal/cam_types.h" 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 typedef struct lcd_cam_dev_t cam_dev_t; // CAM SOC layer handle 18 19 /** 20 * @brief CAM hardware interface object data 21 */ 22 typedef struct cam_hal_context { 23 cam_dev_t *hw; /*!< Beginning address of the CAM peripheral registers. */ 24 } cam_hal_context_t; 25 26 /** 27 * @brief CAM HAL driver configuration 28 */ 29 typedef struct cam_hal_config { 30 int port; /*!< CAM port */ 31 bool byte_swap_en; /*!< CAM enable byte swap */ 32 } cam_hal_config_t; 33 34 /** 35 * @brief Initialize CAM hardware 36 * 37 * @param hal CAM object data pointer 38 * @param config CAM configuration 39 * 40 * @return None 41 */ 42 void cam_hal_init(cam_hal_context_t *hal, const cam_hal_config_t *config); 43 44 /** 45 * @brief De-initialize CAM hardware 46 * 47 * @param hal CAM object data pointer 48 * 49 * @return None 50 */ 51 void cam_hal_deinit(cam_hal_context_t *hal); 52 53 /** 54 * @brief Start CAM to receive frame data 55 * 56 * @param hal CAM object data pointer 57 * 58 * @return None 59 */ 60 void cam_hal_start_streaming(cam_hal_context_t *hal); 61 62 /** 63 * @brief Stop CAM receiving frame data 64 * 65 * @param hal CAM object data pointer 66 * 67 * @return None 68 */ 69 void cam_hal_stop_streaming(cam_hal_context_t *hal); 70 71 #ifdef __cplusplus 72 } 73 #endif 74