Fujitsu DTV/STB solution driver (FAPex driver) Documentation [V01L00R00]


fapex/abst_libicc.h File Reference

abstraction library header file (ICC driver) More...

Data Structures

struct  FAPEX_ICC_OpenParamStrT
struct  FAPEX_ICC_OpenSubIdParamStrT
 open parameters for the ICC driver More...
struct  FAPEX_ICC_IOportParamStrT
 ioport parameters for the ICC driver More...
struct  FAPEX_ICC_AtrParamStrT
 ATR parameters for the ICC driver. More...
struct  FAPEX_ICC_DataParamStrT
 data parameters sent and received for the ICC driver More...

Defines

#define FAPEX_ICC_ERR_BASE   (FAPEX_ICC_MODULE_BASE + FAPEX_RET_ERR_BASE)
#define FAPEX_ICC_ERR_BAD_PARAMETER   (FAPEX_ICC_ERR_BASE + FAPEX_ERR_BAD_PARAMETER)
#define FAPEX_ICC_ERR_OUT_OF_MEMORY   (FAPEX_ICC_ERR_BASE + FAPEX_ERR_OUT_OF_MEMORY)
#define FAPEX_ICC_ERR_TIMEOUT   (FAPEX_ICC_ERR_BASE + FAPEX_ERR_TIMEOUT)
#define FAPEX_ICC_ERR_INVALID_STATUS   (FAPEX_ICC_ERR_BASE + FAPEX_ERR_INVALID_HANDLE)
#define FAPEX_ICC_ERR_SEMAPHORE_CREATE   (FAPEX_ICC_ERR_BASE + FAPEX_ERR_SEMAPHORE_CREATE)
#define FAPEX_ICC_STATUS_NORMAL   0x0000
 normal status
#define FAPEX_ICC_STATUS_CARD_IN   0x0001
#define FAPEX_ICC_STATUS_CARD_OUT   0x0002
#define FAPEX_ICC_STATUS_FINISHED_RESET_COLD   0x0004
#define FAPEX_ICC_STATUS_FINISHED_RESET_WARM   0x0008
#define FAPEX_ICC_STATUS_CLOSED   0x0010
#define FAPEX_ICC_STATUS_ERR_SLOT_EMPTY   0x0100
#define FAPEX_ICC_STATUS_ERR_RUNNING   0x0200
#define FAPEX_ICC_STATUS_ERR_OVERFLOW   0x0400
#define FAPEX_ICC_STATUS_ERR_NO_ANSWER   0x0800
#define FAPEX_ICC_STATUS_ERR_TIMEOUT   0x1000
#define FAPEX_ICC_STATUS_ERR_UNKNOWN   0x2000
#define FAPEX_ICC_STATUS_CARD_IN_OUT   (FAPEX_ICC_STATUS_CARD_IN | FAPEX_ICC_STATUS_CARD_OUT)
#define FAPEX_ICC_STATUS_FINISHED_RESET   (FAPEX_ICC_STATUS_FINISHED_RESET_COLD | FAPEX_ICC_STATUS_FINISHED_RESET_WARM)
#define FAPEX_ICC_STATUS_NORMAL_CAHNGE   (FAPEX_ICC_STATUS_CARD_IN_OUT | FAPEX_ICC_STATUS_FINISHED_RESET)
#define FAPEX_ICC_STATUS_WARNING   (FAPEX_ICC_STATUS_CLOSED)
#define FAPEX_ICC_STATUS_ERROR
#define FAPEX_ICC_RESET_MODE_WARM   (0)
 Requests a warm reset of the ICC.
#define FAPEX_ICC_RESET_MODE_COLD   (1)
 Requests a cold reset of the ICC.
#define FAPEX_ICC_ATR_MAX_SIZE   33
 Maximum size of ATR byte array.
#define FAPEX_ICC_ATR_MAX_HIST_SIZE   15
 Maximum number of historical bytes.
#define FAPEX_ICC_CARD_THREAD_STACKSIZE   1024
#define FAPEX_ICC_CARD_THREAD_PRIORITY   FAPEX_SYS_PRIORITY_MEDIUM
#define FAPEX_ICC_CARD_THREAD_NAME   "abst:ICCcardpoll"
#define FAPEX_ICC_CONVENTION_INVERSE   0
#define FAPEX_ICC_CONVENTION_DIRECT   1
#define FAPEX_ICC_PARITY_ODD   0
#define FAPEX_ICC_PARITY_EVEN   1
#define FAPEX_ICC_PARITY_NON   2
#define FAPEX_IOCCOM_ICC_OPEN   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_ICC + 0, FAPEX_ICC_OpenParamStrT)
 ioctl specific command for the ICC driver
#define FAPEX_IOCCOM_ICC_OPEN_SUBID   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_SUBID_ICC, FAPEX_ICC_OpenSubIdParamStrT)
#define FAPEX_IOCCOM_ICC_SET_IOPORT   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_ICC + 1, FAPEX_ICC_IOportParamStrT)
#define FAPEX_IOCCOM_ICC_GET_IOPORT   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_ICC + 1, FAPEX_ICC_IOportParamStrT)
#define FAPEX_IOCCOM_ICC_GET_ATR   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_ICC + 2, FAPEX_ICC_AtrParamStrT)
#define FAPEX_IOCCOM_ICC_GET_DATA   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_ICC + 3, FAPEX_ICC_DataParamStrT)
#define FAPEX_IOCCOM_ICC_GET_STATUS   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_ICC + 4, uint32_t)
#define FAPEX_IOCCOM_ICC_GET_CARDNOTIFY   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_ICC + 5, uint32_t)

Typedefs

typedef void(* FAPEX_ICC_CardNotifierCALLBACK_T )(void)
 open parameters for the ICC driver

Functions

FAPEXOPENRET_T FAPEX_ICC_Open (FAPEXOPENARG1_T id, FAPEXOPENARG2_T flags, FAPEXOPENARG3_T argptr)
 open method. This function is called with the systemcall "open".
FAPEXRELRET_T FAPEX_ICC_Close (FAPEXRELARG1_T id)
 release method. This function is called with the systemcall "close".
FAPEXREADRET_T FAPEX_ICC_Read (FAPEXREADARG1_T id, FAPEXREADARG2_T buf, FAPEXREADARG3_T count)
 read method. This function is called with the systemcall "read".
FAPEXWRTRET_T FAPEX_ICC_Write (FAPEXWRTARG1_T id, FAPEXWRTARG2_T buf, FAPEXWRTARG3_T count)
 write method. This function is called with the systemcall "write".
FAPEXIOCRET_T FAPEX_ICC_Ioctl (FAPEXIOCARG1_T id, FAPEXIOCARG2_T cmd, FAPEXIOCARG3_T pArg)
 ioctl method. This function is called with the systemcall "ioctl".

Detailed Description

abstraction library header file (ICC driver)

Attention:
This program is provided as is. You can redistribute it and/or modify it. Fujitsu Semiconductor Limited accepts no responsibility or liability for any errors or omissions.

Copyright (C) 2008-2010 Fujitsu Semiconductor Limited, All Rights Reserved.


Define Documentation

#define FAPEX_ICC_ERR_BASE   (FAPEX_ICC_MODULE_BASE + FAPEX_RET_ERR_BASE)

FAPex ICC error code base value

#define FAPEX_ICC_ERR_BAD_PARAMETER   (FAPEX_ICC_ERR_BASE + FAPEX_ERR_BAD_PARAMETER)

Bad parameter passed.

#define FAPEX_ICC_ERR_OUT_OF_MEMORY   (FAPEX_ICC_ERR_BASE + FAPEX_ERR_OUT_OF_MEMORY)

Memory allocation failed.

#define FAPEX_ICC_ERR_TIMEOUT   (FAPEX_ICC_ERR_BASE + FAPEX_ERR_TIMEOUT)

Timeout occured.

#define FAPEX_ICC_ERR_INVALID_STATUS   (FAPEX_ICC_ERR_BASE + FAPEX_ERR_INVALID_HANDLE)

Invalid status.

#define FAPEX_ICC_ERR_SEMAPHORE_CREATE   (FAPEX_ICC_ERR_BASE + FAPEX_ERR_SEMAPHORE_CREATE)

Semaphore could not be created.

#define FAPEX_ICC_STATUS_NORMAL   0x0000

normal status

#define FAPEX_ICC_STATUS_CARD_IN   0x0001
#define FAPEX_ICC_STATUS_CARD_OUT   0x0002
#define FAPEX_ICC_STATUS_FINISHED_RESET_COLD   0x0004
#define FAPEX_ICC_STATUS_FINISHED_RESET_WARM   0x0008
#define FAPEX_ICC_STATUS_CLOSED   0x0010
#define FAPEX_ICC_STATUS_ERR_SLOT_EMPTY   0x0100
#define FAPEX_ICC_STATUS_ERR_RUNNING   0x0200
#define FAPEX_ICC_STATUS_ERR_OVERFLOW   0x0400
#define FAPEX_ICC_STATUS_ERR_NO_ANSWER   0x0800
#define FAPEX_ICC_STATUS_ERR_TIMEOUT   0x1000
#define FAPEX_ICC_STATUS_ERR_UNKNOWN   0x2000
#define FAPEX_ICC_STATUS_CARD_IN_OUT   (FAPEX_ICC_STATUS_CARD_IN | FAPEX_ICC_STATUS_CARD_OUT)
#define FAPEX_ICC_STATUS_FINISHED_RESET   (FAPEX_ICC_STATUS_FINISHED_RESET_COLD | FAPEX_ICC_STATUS_FINISHED_RESET_WARM)
#define FAPEX_ICC_STATUS_NORMAL_CAHNGE   (FAPEX_ICC_STATUS_CARD_IN_OUT | FAPEX_ICC_STATUS_FINISHED_RESET)
#define FAPEX_ICC_STATUS_WARNING   (FAPEX_ICC_STATUS_CLOSED)
#define FAPEX_ICC_RESET_MODE_WARM   (0)

Requests a warm reset of the ICC.

#define FAPEX_ICC_RESET_MODE_COLD   (1)

Requests a cold reset of the ICC.

#define FAPEX_ICC_ATR_MAX_SIZE   33

Maximum size of ATR byte array.

#define FAPEX_ICC_ATR_MAX_HIST_SIZE   15

Maximum number of historical bytes.

#define FAPEX_ICC_CARD_THREAD_STACKSIZE   1024
#define FAPEX_ICC_CARD_THREAD_PRIORITY   FAPEX_SYS_PRIORITY_MEDIUM
#define FAPEX_ICC_CARD_THREAD_NAME   "abst:ICCcardpoll"
#define FAPEX_ICC_CONVENTION_INVERSE   0
#define FAPEX_ICC_CONVENTION_DIRECT   1
#define FAPEX_ICC_PARITY_ODD   0
#define FAPEX_ICC_PARITY_EVEN   1
#define FAPEX_ICC_PARITY_NON   2
#define FAPEX_IOCCOM_ICC_OPEN   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_ICC + 0, FAPEX_ICC_OpenParamStrT)

ioctl specific command for the ICC driver

#define FAPEX_IOCCOM_ICC_OPEN_SUBID   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_SUBID_ICC, FAPEX_ICC_OpenSubIdParamStrT)
#define FAPEX_IOCCOM_ICC_SET_IOPORT   _IOW(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_ICC + 1, FAPEX_ICC_IOportParamStrT)
#define FAPEX_IOCCOM_ICC_GET_IOPORT   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_ICC + 1, FAPEX_ICC_IOportParamStrT)
#define FAPEX_IOCCOM_ICC_GET_ATR   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_ICC + 2, FAPEX_ICC_AtrParamStrT)
#define FAPEX_IOCCOM_ICC_GET_DATA   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_ICC + 3, FAPEX_ICC_DataParamStrT)
#define FAPEX_IOCCOM_ICC_GET_STATUS   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_ICC + 4, uint32_t)
#define FAPEX_IOCCOM_ICC_GET_CARDNOTIFY   _IOR(FAPEX_DEV_TYPE, FAPEX_IOCCOM_NB_ICC + 5, uint32_t)

Typedef Documentation

typedef void(* FAPEX_ICC_CardNotifierCALLBACK_T)(void)

open parameters for the ICC driver

See also:
FAPEX_ICC_Open the card in/out notifier function signature type

Function Documentation

FAPEXOPENRET_T FAPEX_ICC_Open ( FAPEXOPENARG1_T  id,
FAPEXOPENARG2_T  flags,
FAPEXOPENARG3_T  argptr 
)

open method. This function is called with the systemcall "open".

Parameters:
idThe identifier for ICC block descriptor (common descriptor).
flagsThis parameter indicate a open mode (read only/write only/read-write).
This implementation supports only read-write mode.
argptrargument pointer (FAPEX_ICC_OpenParamStrT)
If descriptor for this 'id' has already been opened, this 'argptr' will be invalid.
Return values:
>=0process OK, new file descriptor is returned.
<0process fails, its value is set to errno.
FAPEXRELRET_T FAPEX_ICC_Close ( FAPEXRELARG1_T  id )

release method. This function is called with the systemcall "close".

Parameters:
idThe identifier for ICC block descriptor (common descriptor).
Return values:
0process OK
<0process fails, its value is set to errno.
FAPEXREADRET_T FAPEX_ICC_Read ( FAPEXREADARG1_T  id,
FAPEXREADARG2_T  buf,
FAPEXREADARG3_T  count 
)

read method. This function is called with the systemcall "read".

Parameters:
idThe identifier for ICC card descriptor (sub descriptor).
bufThe pointer to the destination buffer which is in the user space.
countThe data size.
Return values:
>=0process OK, its value is the number of bytes actually read.
<0process fails, its value is set to errno.
FAPEXWRTRET_T FAPEX_ICC_Write ( FAPEXWRTARG1_T  id,
FAPEXWRTARG2_T  buf,
FAPEXWRTARG3_T  count 
)

write method. This function is called with the systemcall "write".

Parameters:
idThe identifier for ICC card descriptor (sub descriptor).
bufThe pointer to the source buffer which is in the user space.
countThe data size.
Return values:
>=0process OK, its value is the number of bytes actually write.
<0process fails, its value is set to errno.
FAPEXIOCRET_T FAPEX_ICC_Ioctl ( FAPEXIOCARG1_T  id,
FAPEXIOCARG2_T  cmd,
FAPEXIOCARG3_T  pArg 
)

ioctl method. This function is called with the systemcall "ioctl".

Parameters:
idThe identifier for this descriptor.
cmdThe ioctl command.
pArgThe pointer to the argument of the ioctl command.
Return values:
0process OK
<0process fails, its value is set to errno.

ioctl command(cmd) type:



Copyright © 2006-2010 by Fujitsu Semiconductor Europe GmbH
Copyright © 2008-2010 by Fujitsu Semiconductor Limited

Disclaimer:
Please note that the use of this has been based on the terms and conditions of "DK Consent Letter (For Linux)" agreement between you and Fujitsu Semiconductor Limited.
The contents of this document may be revised without prior notice. Contact our sales department for confirmation. The information in this document are presented as is, no license is granted by implication or otherwise.
More...

FUJITSU sales representatives