📄 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 */
/* */
/* ************************************************************************ */
#if !defined BUXX_DRV_H_INCLUDED
#define BUXX_DRV_H_INCLUDED
/* ************************************************** */
/* INCLUDE FILES */
/* ************************************************** */
#include <stdarg.h>
#include <string.h>
#include "BUxx_aDSC.h"
/* ************************************************** */
/* TYPEDEF */
/* ************************************************** */
/* ************************************************** */
/* DEFINES */
/* ************************************************** */
/**************** bu15xx ACCESS ***************/
#define CMD 0 //
#define PDAT 1 // A22,A21 0x100000
#define INDEX 2 //A22,A21 0x200000
#define REG 3 //A22,A21 0x300000
#if BUSACCESS_BIT == 16
#define reg_write(a,b) (*(LCD_CMD_WRITE + a) = b)
#define reg_read(a) (*(LCD_CMD_WRITE + a))
#else
#define reg_write(a,b) reg_write8(a,b)
#define reg_read(a) reg_read8(a)
#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, const UINT16 value);
UINT16 data_read(const UINT16 idx);
UINT16 bit_read(const UINT16 idx, const UINT16 bit);
/* ************************* */
/* ***** DRV ***** */
/* ************************* */
void clk_cnt_set(const UINT16 data);
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);
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);
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 * const 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 xstart, const UINT16 ystart,
const UINT16 xsize, const UINT16 ysize, const UINT16 alpha_color);
/* ***** 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);
/* ************************* */
/* ***** low level DRV ***** */
/* ************************* */
void reg_write8(const UINT16 reg, const UINT16 para);
UINT16 reg_read8(const UINT16 reg);
void cam_module_setup(void);
void tmd_22a_init(void);
void tmd_18a_init(void);
void nec_lcd_init(void);
void lcd_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 + -