/*********************************************************************************************************************
* TC264 Opensourec Library TC264 Դ⣩һڹٷ SDK ӿڵĵԴ
* Copyright (c) 2022 SEEKFREE ɿƼ
*
* ļ TC264 Դһ
*
* TC264 Դ 
* Ըᷢ GPLGNU General Public License GNUͨù֤
*  GPL ĵ3棨 GPL3.0ѡģκκİ汾·/޸
*
* Դķϣܷãδκεı֤
* ûԻʺض;ı֤
* ϸμ GPL
*
* ӦյԴͬʱյһ GPL ĸ
* ûУ<https://www.gnu.org/licenses/>
*
* ע
* Դʹ GPL3.0 Դ֤Э Ϊİ汾
* Ӣİ libraries/doc ļµ GPL3_permission_statement.txt ļ
* ֤ libraries ļ ļµ LICENSE ļ
* ӭλʹò ޸ʱ뱣ɿƼİȨ
*
* ļ          zf_device_camera
* ˾          ɶɿƼ޹˾
* 汾Ϣ          鿴 libraries/doc ļ version ļ 汾˵
*           ADS v1.9.4
* ƽ̨          TC264D
*           https://seekfree.taobao.com/
*
* ޸ļ¼
*                               ע
* 2022-09-15       pudding            first version
* 2023-04-25       pudding            ע˵
********************************************************************************************************************/

#ifndef _zf_device_camera_h_
#define _zf_device_camera_h_

#include "zf_common_fifo.h"
#include "zf_common_typedef.h"
#include "zf_driver_uart.h"
#include "zf_device_type.h"

//=================================================ͷ ================================================
#define CAMERA_RECEIVER_BUFFER_SIZE     (8)         // ͷݻС
extern fifo_struct camera_receiver_fifo;            // ͷfifoṹ
extern uint8 camera_send_image_frame_header[4];     // ͷݷ͵λ֡ͷ
//=================================================ͷ ================================================

//=================================================ͷ ================================================
void  camera_binary_image_decompression (const uint8 *data1, uint8 *data2, uint32 image_size);                  // ͷͼݽѹΪʮưλ С
void  camera_send_image                 (uart_index_enum uartn, const uint8 *image_addr, uint32 image_size);    // ͷͼλ鿴ͼ
void  camera_fifo_init                  (void);                                                                 // ͷ FIFO ʼ
uint8 camera_init                       (uint8 *source_addr, uint8 *destination_addr, uint16 image_size);       // ͷɼʼ
//=================================================ͷ ================================================

#endif
