📄 buxx_drv.h
字号:
/* ************************************************************************ */
/* */
/* ROHM BU15xx demo firmware on MD2306 */
/* Client : ROHM Co., Ltd.丂丂丂丂丂丂 */
/* End User : */
/* */
/* Processor: ARM-7TDMI(THUMB Mode) */
/* Dev.Env. : ARM-SDTv2.51 */
/* */
/* DRIVER:BU15xx control & low level driver Routines Header */
/* */
/* file : BUxx_DVR.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_DRV_H_INCLUDED
#define BUXX_DRV_H_INCLUDED
/* ************************************************** */
/* INCLUDE FILES */
/* ************************************************** */
#include <stdarg.h>
#include <string.h>
#include "kernel/system.h"
//#include "BUxx_setuptable.h"
//#include "BUxx_aDSC.h"
/* ************************************************** */
/* TYPEDEF */
/* ************************************************** */
/* ************************************************** */
/* DEFINES */
/* ************************************************** */
/**************** bu15xx ACCESS ***************/
#if BUSACCESS_BIT == 16
#define CMD 0
#define PDAT 1
#define INDEX 2
#define REG 3
#define reg_write(a,b) (*(LCD_CMD_WRITE + a) = b)
#define reg_read(a) (*(LCD_CMD_WRITE + a))
#else
#define CMD 0
#define PDAT 0x2000
#define INDEX 0x4000
#define REG 0x6000
#if 0
#define reg_write(a,b) reg_write8(a,b)
#define reg_read(a) reg_read8(a)
#else
#define reg_write(a,b) {*(LCD_CMD_WRITE + a) = (b & 0xff00) >> 8;\
*(LCD_CMD_WRITE + a) = (b & 0x00ff);}
#define reg_read(a) ((UINT16)((*(LCD_CMD_WRITE + a) & 0x00ff) << 8)|(*(LCD_CMD_WRITE + a) & 0x00ff))
#endif
#endif
/* ************************************************** */
/* GLOBAL VARIABLE */
/* ************************************************** */
/* ************************************************** */
/* GLOBAL FUNCTIONS */
/* ************************************************** */
//function prototypes
UINT16 data_write( const UINT16 idx, const UINT16 para);
void bit_write( const UINT16 idx, const UINT16 bit_value, const UINT16 value);
UINT16 data_read( const UINT16 idx);
UINT16 bit_read( const UINT16 idx, const UINT16 bit_value);
/* ************************* */
/* ***** DRV ***** */
/* ************************* */
void clk_cnt_set( const UINT16 data_value);
int clk_div1_set( const UINT16 sckdv);
int clk_div2_set( const UINT16 lcdfrdv, const UINT16 lcdbsytmg);
int clk_div3_set( const UINT16 cmckdv);
/* ***** mode change ***** */
void hwmode_write( const UINT16 mode);
UINT16 hwmode_read( void);
void hostcnt_write( const UINT16 write_data);
void hostcnt_bitwrite( const UINT16 write_data, const UINT16 bit_value);
UINT16 hostcnt_bitread( const UINT16 read_data);
void mode_change(const int mode);
/* ***** interrupt ***** */
void wait_int0(const UINT16 para);
void wait_int0_jpeg(const UINT16 para);
/* ***** cam ***** */
void cam_if_set( const UINT16 data_value );
int cam_tim_set( const UINT16 cxs, const UINT16 cys );
int cam_size_set( UINT16 xsize, UINT16 ysize );
int cam_shrink_set( const UINT16 cxsrk, const UINT16 cysrk );
int cam_cut_set( const UINT16 st_x, const UINT16 st_y, const UINT16 ed_x, const UINT16 ed_y );
//capture set
int cam_capture_set(const CAMSET * cam);
void cam_lowpathfilter_set( void);
/* ***** memory ***** */
int mem_point_set( const UINT16 st_x, const UINT16 st_y );
int mem_adrst_ed_set( const UINT16 st_x, const UINT16 st_y, const UINT16 ed_x, const UINT16 ed_y);
void mem_acs_read_st( const UINT16 idx);
void mem_acs_write_st( const UINT16 idx);
void mem_adr_abs_set( const UINT32 address);
int mem_maskmemory_set( const UINT16 st_x, const UINT16 st_y, const UINT16 xsize, const UINT16 ysize, UINT16 trans_color );
int mem_write_memory(UINT16 *data_value, const UINT16 memacs , \
const UINT16 st_x, const UINT16 ed_x, const UINT16 st_y, const UINT16 ed_y);
int mem_read_memory( UINT16 *data_value, const UINT16 memacs , \
const UINT16 st_x, const UINT16 ed_x, const UINT16 st_y, const UINT16 ed_y);
/* ***** lcd ***** */
int lcd_size_set( const UINT16 xsize, const UINT16 ysize );
int lcd_point_set( const UINT16 st_x, const UINT16 st_y, const UINT16 ed_x, const UINT16 ed_y );
int lcd_wav_set( const UINT16 lcdwl, const UINT16 lcdwh );
int lcd_cmd_set(const int access);
int lcd_trans_set(const UINT16 st_x, const UINT16 st_y, const UINT16 xsize, const UINT16 ysize);
/* ***** jpeg ***** */
UINT32 read_je_size(void);
void oscrdy_wait(void);
void tv_encoder_setup(UINT16 stx, UINT16 sty, UINT16 xsize, UINT16 ysize, UINT16 rot);
void tv_enc_sw(int type, int frm_sel, UINT16 rot);
void preview_cam_setup(CAMSET *cam);
void moviepreview_cam_setup(UINT16 JpegW, UINT16 JpegH, CAMSET *cam);
void decode_cam_setup(UINT16 JpegW, UINT16 JpegH, CAMSET *cam);
void zoom_cam_setup(int type, CAMSET *cam);
/* ************************* */
/* ***** low level DRV ***** */
/* ************************* */
void reg_write8( const UINT16 reg, const UINT16 para);
UINT16 reg_read8( const UINT16 reg);
void cam_module_setup(void);
void mainlcd_module_setup(void);
void sublcd_module_setup(void);
void wait(const UINT16 wtime);
void column_page_set(const UINT16 column_s, const UINT16 column_e, const UINT16 page_s, const UINT16 page_e);
#endif /* BUXX_DRV_H_INCLUDED */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -