📄 ioctl_its_ds7.h
字号:
//
// Copyright(C) Renesas Technology Corp. 2002-2003. All rights reserved.
//
// Definitions of the common parameter of each driver for ITS-DS7 Ver.1.0.0 (IOCTL_XXX etc.)
//
// FILE : IOCTL_ITS_DS7.H
// CREATED : 2002.04.10
// MODIFIED : 2003.06.20
// AUTHOR : Renesas Technology Corp.
// HARDWARE : RENESAS ITS-DS7
// HISTORY :
// 2003.06.20
// - Created release code.
// (based on RENESAS ITS-DS4 Source Kit Ver.1.2.0 for WCE4.2)
#ifndef _IOCTL_ITS_DS7_H_
#define _IOCTL_ITS_DS7_H_
/*
* This definition is definition for the application which uses the I2C driver.
*/
/** (1) IOCTL_I2C_SET_MODE
* Sets the operation mode of I2C module.
* The mode of I2C module of operation is set as either
* master mode or slave mode.
* Default is master mode.
*
* InBuf : PDWORD
* DWORD I2C_MASTER_MODE -> master mode
* I2C_SLAVE_MODE -> slave mode
* OutBuf : None
*/
#define IOCTL_I2C_SET_MODE 0x12c1 // set mode, master or slave
#define I2C_MASTER_MODE 0x0001 // master mode
#define I2C_SLAVE_MODE 0x0002 // slave mode
/** (2) IOCTL_I2C_SET_BAUDRATE
* Sets the baud rate of I2C module.
* Refer to the manual of I2C for setting value.
*
* InBuf : PDWORD
* DWORD bit7 - bit2 : SCGD
* bit1 - bit0 : CDF
* OutBuf : None
*/
#define IOCTL_I2C_SET_BAUDRATE 0x12c2 // set baudrate
/** (3) IOCTL_I2C_SET_BUFFER_MODE
* Sets the buffer mode.
* The mode of I2C module of operation is set as either
* single stage mode or double buffer mode.
* Default is single stage.
*
* InBuf : PDWORD
* DWORD I2C_SINGLE_STAGE -> single stage
* I2C_DOUBLE_STAGE -> double buffer
* OutBuf : None
*/
#define IOCTL_I2C_SET_BUFFER_MODE 0x12c3 // set buffer mode, single or double
#define I2C_SINGLE_STAGE 0x0001 // single stage
#define I2C_DOUBLE_STAGE 0x0002 // double buffer
/*
* It is the error code which an I2C driver sets up.
* Application programs gets error code with GetLastError function.
*/
#define I2C_MASTER_ARBITRATION_LOST 0x00000001 // I2c master arbitration lost
#define I2C_MASTER_NACK_RECEIVED 0x00000002 // I2c master nack received
#define I2C_TIMEOUT 0x00000003 // I2c timeout
#define I2C_BUS_BUSY 0x00000004 // I2c bus busy
/*
* This definition is definition for the application which uses the Video-In driver.
*/
/** (1) IOCTL_VIN_SET_PRECLIPSIZE
* Sets the preclipping size to SPPrC,EPPrC,SLPrC and ELPrC register.
*
* InBuf : DWORD
* OutBuf : None
*/
#define IOCTL_VIN_SET_PRECLIPSIZE 0x0510
/** (2) IOCTL_VIN_SET_POSTCLIPSIZE
* Sets the preclipping size to SPPoC,EPPoC,SLPoC and ELPoC register.
*
* InBuf : DWORD
* OutBuf : None
*/
#define IOCTL_VIN_SET_POSTCLIPSIZE 0x0511
/** (3) IOCTL_VIN_SET_SCALESIZE
* Sets the scale size to XS and YS register.
*
* InBuf : DWORD
* OutBuf : None
*/
#define IOCTL_VIN_SET_SCALESIZE 0x0512
/** (4) IOCTL_VIN_SET_WINDOWSIZE
* Sets the videowindow size to VSIZER_X and VSIZER_Y register.
*
* InBuf : DWORD
* OutBuf : None
*/
#define IOCTL_VIN_SET_WINDOWSIZE 0x0513
/** (5) IOCTL_VIN_SET_WINDOWPOSITION
* Sets the videowindow size to VSIZER_X and VSIZER_Y register.
*
* InBuf : DWORD
* OutBuf : None
*/
#define IOCTL_VIN_SET_WINDOWPOSITION 0x0514
/** (6) IOCTL_VIN_SET_CAPTUREMODE
* Sets the capture mode to FC register.
*
* InBuf : PDWORD
* DWORD VIN_SINGLE_CAPTURE -> Single capture mode. Use MB1 only.
* When interlacemode is oddeven_mode,
* don't set.
* VIN_CONTINUOUS_CAPTURE -> Continuous capture mode. Use MB1,2,3.
* OutBuf : None
*/
#define IOCTL_VIN_SET_CAPTUREMODE 0x0515
#define VIN_SINGLE_CAPTURE 0x0001
#define VIN_CONTINUOUS_CAPTURE 0x0002
/** (7) IOCTL_VIN_SET_INTERLACEMODE
* Sets the interlace mode to MC register.
*
* InBuf : PDWORD
* DWORD VIN_ODD_FIELD -> odd field capture mode.
* VIN_EVEN_FIELD -> even field capture mode.
* VIN_ODDEVEN_FIELD -> odd/wvwn field capture mode. When
* capture mode is single mode, don't set.
* VIN_FULL_INTERLACEMODE -> full interlace mode.
* OutBuf : None
*/
#define IOCTL_VIN_SET_INTERLACEMODE 0x0516
#define VIN_ODD_FIELD 0x0000
#define VIN_EVEN_FIELD 0x0010
#define VIN_ODDEVEN_FIELD 0x0008
#define VIN_FULL_INTERLACEMODE 0x0018
/** (8) IOCTL_VIN_CONTROL
* Controls videoin driver, start and end.
*
* InBuf : PDWORD
* DWORD VIN_START -> videoin driver start.
* VIN_END -> videoin driver end.
* OutBuf : None
*/
#define IOCTL_VIN_CONTROL 0x0517
#define VIN_START 0
#define VIN_END 1
/*
* This definition is definition for the application which uses the GPIO driver.
*/
/** (1) IOCTL_GPIO_SET_PORT
* Sets the port number.
* The port number exists from 0 to 31.
* If this code is passed, sets dwFlag 1.
*
* InBuf : PGPIO_OPEN_INFO
* DWORD dwPort -> Sets the port number.
* DWORD dwLock -> no used.
* DWORD dwFlag -> Set 1.
* OutBuf : None
* Output : GPIO_PORT_ERROR -> The port doesn't exist.
*/
#define IOCTL_GPIO_SET_PORT 0x0610 //Sets the port number.
#define GPIO_PORT_LOCKED 20 //The port is locked.
#define GPIO_PORT_ERROR 21 //The port doesn't exist.
/** (2) IOCTL_GPIO_SET_LOCK
* Sets the port,lock or unlock.
*
* InBuf : PGPIO_OPEN_INFO
* DWORD dwPort -> no used.
* DWORD dwLock -> GPIO_PORT_LOCK :Set lock.
GPIO_PORT_UNLOCK :Set unlock.
* DWORD dwFlag -> no used.
* OutBuf : None
* Output : GPIO_PORT_ERROR -> The port doesn't exist.
*/
#define IOCTL_GPIO_SET_LOCK 0x0611 //set port,lock or unlock
#define GPIO_PORT_LOCK 0x00000001 //lock
#define GPIO_PORT_UNLOCK 0x00000002 //unlock
/** (3) IOCTL_GPIO_SET_POSNEG
* Sets the port,positive logic or negative logic.
*
* InBuf : DWORD dwPosneg -> GPIO_POSNEG_POSITIVE : Sets the port positive logic.
* -> GPIO_POSNEG_NEGATIVE : Sets the port negative logic.
* OutBuf : None
* Output : GPIO_PORT_LOCKED -> The port is locked.
* GPIO_PORT_ERROR -> The port doesn't exist.
*/
#define IOCTL_GPIO_SET_POSNEG 0x0612 //set port,positive or negative
#define GPIO_POSNEG_POSITIVE 0x00000004 //positive
#define GPIO_POSNEG_NEGATIVE 0x00000008 //negative
/** (4) IOCTL_GPIO_SET_EDGLEVEL
* Sets the port,edge or level.
*
* InBuf : DWORD dwEdglev -> GPIO_EDGLEV_EDGE : Sets the port edge.
* -> GPIO_EDGLEV_LEVEL : Sets the port level.
* OutBuf : None
* Output : GPIO_PORT_LOCKED -> The port is locked.
* GPIO_PORT_ERROR -> The port doesn't exist.
*/
#define IOCTL_GPIO_SET_EDGLEVEL 0x0613 //set port,edge or level
#define GPIO_EDGLEV_EDGE 0x00000010 //edge
#define GPIO_EDGLEV_LEVEL 0x00000020 //level
/** (5) IOCTL_GPIO_SET_FILTER
* Sets the filter ,on or off.
*
* InBuf : DWORD dwFilter -> GPIO_FILONOFF_ON : Sets the filter on.
* -> GPIO_FILONOFF_OFF : Sets the filter off.
* OutBuf : None
* Output : GPIO_PORT_LOCKED -> The port is locked.
* GPIO_PORT_ERROR -> The port doesn't exist.
*/
#define IOCTL_GPIO_SET_FILTER 0x0614 //set filter, on or off
#define GPIO_FILONOFF_ON 0x00000040 //filter on
#define GPIO_FILONOFF_OFF 0x00000080 //filter off
/** (6) IOCTL_GPIO_SET_IOINT
* Sets the port,inout mode or interrupt mode.
*
* InBuf : DWORD dwIoint -> GPIO_IOINT_INOUT : Sets the port inout mode.
* -> GPIO_IOINT_INTERRUPT : Sets the port interrupt mode.
* OutBuf : None
* Output : GPIO_PORT_LOCKED -> The port is locked.
* GPIO_PORT_ERROR -> The port doesn't exist.
*/
#define IOCTL_GPIO_SET_IOINT 0x0615 //set mode,inout or interrupt
#define GPIO_IOINT_INOUT 0x00000100 //inout mode
#define GPIO_IOINT_INTERRUPT 0x00000200 //interrupt mode
/** (7) IOCTL_GPIO_SET_INTMSK
* Interrupt mask.
*
* InBuf : None
* OutBuf : None
* Output : GPIO_PORT_LOCKED -> The port is locked.
* GPIO_PORT_ERROR -> The port doesn't exist.
*/
#define IOCTL_GPIO_SET_INTMSK 0x0616
/** (8) IOCTL_GPIO_SET_INTCLR
* Interrupt data clear.
*
* InBuf : None
* OutBuf : None
* Output : GPIO_PORT_LOCKED -> The port is locked.
* GPIO_PORT_ERROR -> The port doesn't exist.
*/
#define IOCTL_GPIO_SET_INTCLR 0x0617
/** (9) IOCTL_GPIO_SET_MSKCLR
* Mask clear.
*
* InBuf : None
* OutBuf : None
* Output : GPIO_PORT_LOCKED -> The port is locked.
* GPIO_PORT_ERROR -> The port doesn't exist.
*/
#define IOCTL_GPIO_SET_MSKCLR 0x0618
/** (10) IOCTL_GPIO_SET_INOUT
* Sets the port,input mode or output mode.
*
* InBuf : DWORD dwInout -> GPIO_INOUT_IN : Sets the port input mode.
* -> GPIO_INOUT_OUT : Sets the port output mode.
* OutBuf : None
* Output : GPIO_PORT_LOCKED -> The port is locked.
* GPIO_PORT_ERROR -> The port doesn't exist.
*/
#define IOCTL_GPIO_SET_INOUT 0x0619 //set mode,input or output
#define GPIO_INOUT_IN 0x00000400 //input mode
#define GPIO_INOUT_OUT 0x00000800 //output mode
/** (11) IOCTL_GPIO_WRITE_PORT
* Write the port, high(1) or low(0).
*
* InBuf : DWORD dwWrite -> GPIO_OUT_HIGH : Write the port high.
* -> GPIO_OUT_LOW : Write the port low.
* OutBuf : None
* Output : GPIO_PORT_LOCKED -> The port is locked.
* GPIO_PORT_ERROR -> The port doesn't exist.
*/
#define IOCTL_GPIO_WRITE_PORT 0x061A //Write port, high or low
#define GPIO_OUT_HIGH 0x00001000 //write high
#define GPIO_OUT_LOW 0x00002000 //write low
/** (12) IOCTL_GPIO_READ_PORT
* Read port and get the port status.
*
* InBuf : None
* OutBuf : DWORD dwRead -> 1 : 1 received
* 0 : 0 received
* Output : GPIO_PORT_LOCKED -> The port is locked.
* GPIO_PORT_ERROR -> The port doesn't exist.
* GPIO_PORT_SUCCESS -> Success
*/
#define IOCTL_GPIO_READ_PORT 0x061B //read port
/** (13) IOCTL_GPIO_GET_EVENT
* Wait inerrupt and get event.
*
* InBuf : DWORD dwTimeout -> Sets wait time.
* OutBuf : DWORD dwInterrupt -> WAIT_OBJECT_0 :Object is Signal.
* WAIT_TIMEOUT :Timeout.
* Output : GPIO_PORT_LOCKED -> The port is locked.
* GPIO_PORT_ERROR -> The port doesn't exist.
* GPIO_PORT_SUCCESS -> Success
*/
#define IOCTL_GPIO_GET_EVENT 0x061C //get event
/*
* This definition is definition for the drivers which uses the HSPDIF driver.
*/
/** (1) IOCTL_SPDIF_TRANSMITTING_DATA
* Transmitting PCM data.
* By this command, DMA and SPDIF are started
* at the time of the first transmission.
*
* InBuf : PVOID
* Pointer of PCM data buffer
* OutBuf : None
* Output : Transmitted length
*/
#define IOCTL_SPDIF_TRANSMITTING_DATA 0x1f01
/** (2) IOCTL_SPDIF_RECEIVING_DATA
* Receiving PCM data.
* By this command, DMA and SPDIF are started
* at the time of the first transmission.
*
* InBuf : None
* OutBuf :
* Pointer of PCM data Buffer
* Output : Received length
*/
#define IOCTL_SPDIF_RECEIVING_DATA 0x1f02
/** (3) IOCTL_SPDIF_STOP_TRANSMIT
* Continuation transmission is stopped.
*
* InBuf : None
* OutBuf : None
* Output : None
*/
#define IOCTL_SPDIF_STOP_TRANSMIT 0x1f03
/** (4) IOCTL_SPDIF_STOP_RECEIVE
* Continuation reception is stopped.
*
* InBuf : None
* OutBuf : None
* Output : None
*/
#define IOCTL_SPDIF_STOP_RECEIVE 0x1f04
/** (5) IOCTL_SPDIF_GET_TXSAMPLE_SIZE
* Gets the sampling size in the transmitting mode.
*
* InBuf : None
* OutBuf : PDWORD
* DWORD IOCTL_SAMPLE_BIT_SIZE_16 - 16 bits
* IOCTL_SAMPLE_BIT_SIZE_20 - 20 bits
* IOCTL_SAMPLE_BIT_SIZE_24 - 24 bits
* Output : None
*/
#define IOCTL_SPDIF_GET_TXSAMPLE_SIZE 0x1f05
#define SPDIF_SAMPLE_BIT_SIZE_16 0x00
#define SPDIF_SAMPLE_BIT_SIZE_20 0x01
#define SPDIF_SAMPLE_BIT_SIZE_24 0x02
/** (6) IOCTL_SPDIF_SET_TXSAMPLE_SIZE
* Sets the sampling size in the transmitting mode.
*
* InBuf : PDWORD
* DWORD IOCTL_SAMPLE_BIT_SIZE_16 - 16 bits
* IOCTL_SAMPLE_BIT_SIZE_20 - 20 bits
* IOCTL_SAMPLE_BIT_SIZE_24 - 24 bits
* OutBuf : None
* Output : None
*/
#define IOCTL_SPDIF_SET_TXSAMPLE_SIZE 0x1f06
/** (7) IOCTL_SPDIF_GET_RXSAMPLE_SIZE
* Gets the sampling size in the receiving mode.
*
* InBuf : None
* OutBuf : PDWORD
* DWORD IOCTL_SAMPLE_BIT_SIZE_16 - 16 bits
* IOCTL_SAMPLE_BIT_SIZE_20 - 20 bits
* IOCTL_SAMPLE_BIT_SIZE_24 - 24 bits
* Output : None
*/
#define IOCTL_SPDIF_GET_RXSAMPLE_SIZE 0x1f07
/** (8) IOCTL_SPDIF_SET_RXSAMPLE_SIZE
* Sets the sampling size in the receiving mode.
*
* InBuf : PDWORD
* DWORD IOCTL_SAMPLE_BIT_SIZE_16 - 16 bits
* IOCTL_SAMPLE_BIT_SIZE_20 - 20 bits
* IOCTL_SAMPLE_BIT_SIZE_24 - 24 bits
* OutBuf : None
* Output : None
*/
#define IOCTL_SPDIF_SET_RXSAMPLE_SIZE 0x1f08
#endif //_IOCTL_ITS_DS7_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -