📄 buxx_adsc.h
字号:
/* ************************************************************************ */
/* */
/* ROHM BU15xx demo firmware on MD2306 */
/* Client : ROHM Co., Ltd.丂丂丂丂丂丂 */
/* End User : */
/* */
/* Processor: ARM-7TDMI(THUMB Mode) */
/* Dev.Env. : ARM-SDTv2.51 */
/* */
/* API:BU15xx control Routines Header */
/* */
/* file : BUxx_aDSC.h */
/* Auther : J.SATO(NTC)丂 */
/* Date : 2004/Jul./1 */
/* */
/* Copyright (c) 2002-04 Naritagiken Co., Ltd. All rights reserved. */
/* ************************************************************************ */
/* History: */
/* 2004/Jul./1 Rev 1.00 create */
/* */
/* ************************************************************************ */
#ifndef BUXX_ADSC_H_INCLUDED
#define BUXX_ADSC_H_INCLUDED
/* ************************************************** */
/* INCLUDE FILES */
/* ************************************************** */
//#include <stdarg.h>
#include <string.h>
#include "BUxx_setuptable.h"
//#include "bu1568/BUxx_aDRT.h"
/* ************************************************** */
/* TYPEDEF */
/* ************************************************** */
typedef struct tagMOTIONJPEG{
UINT8 *addr;
UINT32 offset;
UINT32 size;
UINT32 bufsize;
UINT16 mark;
UINT16 width;
UINT16 height;
UINT16 index;
UINT16 total;
CAMSET cam;
}MJSET;
/* ************************************************** */
/* DEFINES */
/* ************************************************** */
#define sDEFAULT 0
#define sUP 1
#define sDOWN 2
#define X_ZOOM (CAM_HSIZE/(CAM_HSIZE-CAM_VSIZE))
#define Y_ZOOM (CAM_VSIZE/(CAM_HSIZE-CAM_VSIZE))
#define X_ZOOMSTEP (10)
#define Y_ZOOMSTEP (X_ZOOMSTEP*CAM_VSIZE/CAM_HSIZE)
#define tZOOM_UP 0
#define tZOOM_DOWN 1
/* ************************************************** */
/* GLOBAL VARIABLE */
/* ************************************************** */
/* ************************************************** */
/* GLOBAL FUNCTIONS */
/* ************************************************** */
int aDSC_bu15xx_OPEN(void);
void aDSC_bu15xx_CLOSE(void);
int aDSC_Start_Preview(const UINT16 st_x, const UINT16 st_y, const UINT16 xsize, const UINT16 ysize, const CAMSET *const cam);
UINT16 aDSC_Quit_Preview(void);
void aDSC_int_disp(void);
void SwitchtoVGA( void );
void SwitchtoQVGA( void );
void SwitchtoQQVGA( void );
int aDSC_i2c_set ( const UINT16 seri_devtype, const UINT16 seri_devadr, const UINT16 seri_2ndadr, const UINT16 seri_dat, const UINT16 peri_sdc, const UINT16 seri_rw);
UINT16 aDSC_i2c_read(const UINT16 seri_devtype, const UINT16 seri_devadr, const UINT16 seri_2ndadr, UINT8 seri_dat, const UINT16 peri_sdc, const UINT16 seri_rw);
void aDSC_filter_set( const int sel );
#if 0
void SwitchtoQVGA( void );
void SwitchtoVGA( void );
int aDSC_fmemory_clear( const UINT16 st_x, const UINT16 st_y, const UINT16 xsize, const UINT16 ysize, const UINT16 color);
int aDSC_fmemory_write_rgb565(const UINT16 *rgb_data, const UINT16 st_x, const UINT16 st_y, const UINT16 xsize, const UINT16 ysize);
void aDSC_fmemory_write_string(const char *string, const int space, const UINT16 st_x, const UINT16 st_y);
void aDSC_fmemory_write_bit16(const UINT16 num, const int space, const UINT16 st_x, const UINT16 st_y);
int aDSC_transparent_write_rgb565(const UINT16 *rgb_data, const UINT16 st_x, const UINT16 st_y, const UINT16 color, const UINT16 c_mask);
int aDSC_maskmemory_write( const UINT16 st_x, const UINT16 st_y, const UINT16 xsize, const UINT16 ysize, UINT32 trans_color);
void aDSC_overlayframe_on(void);
void aDSC_overlayframe_off(void);
void aDSC_exOVL_init(const UINT16 ovl_xsize, const UINT16 ovl_ysize,
const UINT16 trans_clr, const UINT16 mask_clr);
int aDSC_exOVL1_size(const UINT16 st_x, const UINT16 st_y, const UINT16 xsize, const UINT16 ysize );
int aDSC_exOVL1_write_rgb(const UINT16 *pExOSD, const UINT16 st_x, const UINT16 st_y,
const UINT16 xsize, const UINT16 ysize, const UINT16 frmst_x, const UINT16 frmst_y);
int aDSC_exOVL1_write_string(const UINT8 *string, const UINT16 st_x, const UINT16 st_y,
const UINT16 frmst_x, const UINT16 frmst_y);
int aDSC_exOVL1_write_bit16(const UINT16 num, const UINT16 st_x, const UINT16 st_y,
const UINT16 frmst_x, const UINT16 frmst_y);
void aDSC_exOVL1_mov(const UINT16 frmst_x, const UINT16 frmst_y);
void aDSC_exOVL1_on(void);
void aDSC_exOVL1_off(void);
int aDSC_exOVL2_size(const UINT16 st_x, const UINT16 st_y, const UINT16 xsize, const UINT16 ysize );
int aDSC_exOVL2_write_rgb(const UINT16 *pExOSD, const UINT16 st_x, const UINT16 st_y,
const UINT16 xsize, const UINT16 ysize, const UINT16 frmst_x, const UINT16 frmst_y);
int aDSC_exOVL2_write_string(const UINT8 *string, const UINT16 st_x, const UINT16 st_y,
const UINT16 frmst_x, const UINT16 frmst_y);
int aDSC_exOVL2_write_bit16(const UINT16 num, const UINT16 st_x, const UINT16 st_y,
const UINT16 frmst_x, const UINT16 frmst_y);
void aDSC_exOVL2_mov(const UINT16 frmst_x, const UINT16 frmst_y);
void aDSC_exOVL2_on(void);
void aDSC_exOVL2_off(void);
#endif
int aDSC_data_trans_st(const UINT16 st_x, const UINT16 st_y, const UINT16 xsize, const UINT16 ysize);
int aDSC_CameraEncode(UINT16 *start_add, UINT32 * jpeg_size, const CAMSET * cam, const UINT16 je_q, const UINT16 je_hflip);
#if 0
int aDSC_lcdaccess_set(const int access);
/* ***** jpeg ***** */
int aDSC_FrameEncode(UINT16 *start_add, UINT32 * jpeg_size, const UINT16 st_x, const UINT16 st_y, const UINT16 xsize, const UINT16 ysize, const UINT16 je_q);
int aDSC_FrameEncode2(MJMOVWIN *mjwin, UINT32 *jpeg_size, const UINT16 st_x, const UINT16 st_y,
const UINT16 xsize, const UINT16 ysize, const UINT16 je_q);
int aDSC_Decode(UINT16 *start_add, UINT32 *const jpeg_size, const CAMSET *cam );
//add below declarations into Buxx_aDSC.h
int aDSC_MjEncode_st(MJSET *mjset, const CAMSET *cam, const UINT16 je_q, const UINT16 je_hflip);
int aDSC_MjEncode_next( MJSET *mjset, const UINT16 je_q, const UINT16 hflip);
int aDSC_MjEncode_ed( MJSET *mjset );
int aDSC_MjDecode_st( MJSET *mjset, CAMSET cam );
int aDSC_MjDecode_next(MJSET *mjset );
int aDSC_MjDecode_prev(MJSET *mjset );
int aDSC_MjDecode_ed( void );
int aDSC_MjFrameCount( MJSET *mjset );
int aDSC_Decode_to_SRAM(UINT16 *start_addr, UINT32 *jpeg_size, const CAMSET *cam, UINT16 *sram_addr);
void aDSC_Jpegsize_Chk(UINT8 * const jpeg, UINT32 const jpeg_size, UINT16 *xsize, UINT16 *ysize);
int aDSC_thumb_save(UINT16 *start_add, UINT16 * xsize, UINT16* ysize);
int aDSC_thumb_size_set(UINT8 bThumb32);
// led
int aDSC_redled_set(const UINT16 ledon, const UINT16 ledoff, const UINT16 slope, const UINT16 duty);
int aDSC_greenled_set(const UINT16 ledon, const UINT16 ledoff, const UINT16 slope, const UINT16 duty);
int aDSC_blueled_set(const UINT16 ledon, const UINT16 ledoff, const UINT16 slope, const UINT16 duty);
int aDSC_3cled_on_off(const UINT16 rsw, const UINT16 gsw, const UINT16 bsw, const UINT16 pwmclk, const UINT16 mode);
int aDSC_whiteled_on_off(const UINT16 pwmwht_en, const UINT16 pwmwht_peri, const UINT16 pwmwht_duty);
#endif
#endif /* BUXX_ADSC_H_INCLUDED */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -