
XPeRiPheRaLMoDuLes8(CaLC):CaLCuLationMoDuLe
s1C33L17teChniCaLManuaL
ePson
X-1-11
X
CALC
X.1.5headerFile
“calc.h”
/**************************************************************************
*
Function:
Calculation module interface
*
Description:
*
User can calculate 32bit integer or 16bit fixed point arithmetics
*
with a hardware accelerator.
*
COPYRIGHT (C) 2007/2008, SEIKO EPSON CORP. All Rights Reserved
*
***************************************************************************
*/
#ifndef ___CALC_H___
#define ___CALC_H___
//*************************************************************************
*****
// Define macro
//*************************************************************************
*****
// Function table address
#define CALC_API_BASE
((unsigned long*)0x00023000)
// Calculation mode
#define CALC_UINT32
0x002
#define CALC_SINT32
0x002
#define CALC_FIXED16_Q13
0x012
#define CALC_FIXED16_Q14
0x112
//*************************************************************************
*****
// Function
//*************************************************************************
*****
#define CalcOpen \
(*((void (*)(long))CALC_API_BASE[0]))
#define CalcClose \
(*((void (*)(void))CALC_API_BASE[1]))
#define CalcMatrix2 \
( * ( ( v o i d
( * ) ( l o n g * ,
l o n g * ,
l o n g * , u n s i g n e d
long))CALC_API_BASE[2]))
#define CalcMatrix3 \
( * ( ( v o i d
( * ) ( l o n g * ,
l o n g * ,
l o n g * , u n s i g n e d
long))CALC_API_BASE[3]))
#define CalcMatrix4 \
( * ( ( v o i d
( * ) ( l o n g * ,
l o n g * ,
l o n g * , u n s i g n e d
long))CALC_API_BASE[4]))
#define CalcAffine2 \
(*((void (*)(long*, long*, long*, long*, unsigned
long))CALC_API_BASE[5]))
#define CalcAffine3 \
(*((void (*)(long*, long*, long*, long*, unsigned
long))CALC_API_BASE[6]))
#define CalcMac4 \
(*((long (*)(long*, long*))CALC_API_BASE[7]))
#define CalcMac8 \
(*((long (*)(long*, long*))CALC_API_BASE[8]))
#define CalcMac16 \
(*((long (*)(long*, long*))CALC_API_BASE[9]))
#define CalcButterfly \
(*((void (*)(long*, long*, long*, unsigned long))CALC_API_BASE[
10]))