/************************************************************
**
**     Object name : raspzx-driver.h
**
**     Public      : 
**                   
**
**     Private     : 
**
**
**     Description
**     -- -- -- -- -- -- -- --
**     RASP-ZXのDriverのヘッダファイル
**
**     History
**     -- -- -- -- -- -- -- --
**     2014.10.21 K.Takagi 新規作成
**                         開発環境のリリース用に整備
**
**     Copyright (c) 2014
**     System In Frontier,Inc.
**
**
**
*/


/*=========================================================*/
/*               Special Macro Definition                  */
/*=========================================================*/


/*=========================================================*/
/*                   Include Files                         */
/*=========================================================*/
#include <linux/ioctl.h>


/*=========================================================*/
/*                 Structure Declaration                   */
/*=========================================================*/

typedef struct _SYSTEM_INFO_t_
{
    unsigned short module_id;
    unsigned short version;
} SYSTEM_INFO_t;

typedef struct _CAPTURE_CHANNELS_t_
{
    int board_no;
    int channels;
} CAPTURE_CHANNELS_t;


/*=========================================================*/
/*                   Macro Definition                      */
/*=========================================================*/
#define RASPZX_IOCTL_MAGIC                    0xEA


#define FIO_RASPZX_AD_FIFO_INIT               _IO(RASPZX_IOCTL_MAGIC,  99)
#define FIO_RASPZX_AD_START                   _IO(RASPZX_IOCTL_MAGIC,   1)
#define FIO_RASPZX_AD_STOP                    _IO(RASPZX_IOCTL_MAGIC,   2)

#define FIO_RASPZX_SET_FREQ                   _IOW(RASPZX_IOCTL_MAGIC,  8, int)
#define FIO_RASPZX_GET_FREQ                   _IOR(RASPZX_IOCTL_MAGIC,  9, int)

#define FIO_RASPZX_SET_CAPTURE_CHANNELS       _IOW(RASPZX_IOCTL_MAGIC, 10, CAPTURE_CHANNELS_t)
#define FIO_RASPZX_GET_CAPTURE_CHANNELS       _IOR(RASPZX_IOCTL_MAGIC, 11, CAPTURE_CHANNELS_t)

#define FIO_RASPZX_GET_SYSTEM_INFO            _IOR(RASPZX_IOCTL_MAGIC, 13, SYSTEM_INFO_t)

#define FIO_RASPZX_SET_AD_DATA_FORMAT         _IOW(RASPZX_IOCTL_MAGIC, 14, int)
#define FIO_RASPZX_GET_AD_DATA_FORMAT         _IOR(RASPZX_IOCTL_MAGIC, 15, int)

#define FIO_RASPZX_GET_BOARD_NUM              _IOR(RASPZX_IOCTL_MAGIC, 32, int)

#define FIO_RASPZX_SET_AD_HEADER_MODE         _IOW(RASPZX_IOCTL_MAGIC, 33, int)
#define FIO_RASPZX_GET_AD_HEADER_MODE         _IOR(RASPZX_IOCTL_MAGIC, 34, int)

#define FIO_RASPZX_SET_ORANGE_LED             _IOW(RASPZX_IOCTL_MAGIC, 46, int)
#define FIO_RASPZX_SET_RED_LED                _IOW(RASPZX_IOCTL_MAGIC, 47, int)


/* EOF */
