📄 sci_atom.h
字号:
/*---------------------------------------------------------------------------+| This source code has been made available to you by IBM on an AS-IS| basis. Anyone receiving this source is licensed under IBM| copyrights to use it in any way he or she deems fit, including| copying it, modifying it, compiling it, and redistributing it either| with or without modifications. No license under IBM patents or| patent applications is to be implied by the copyright license.|| Any user of this software should understand that IBM cannot provide| technical support for this software and will not be responsible for| any consequences resulting from the use of this software.|| Any person who transfers this source code or any derivative work| must include the IBM copyright notice, this paragraph, and the| preceding two paragraphs in the transferred software.|| COPYRIGHT I B M CORPORATION 1997, 1999, 2001| LICENSED MATERIAL - PROGRAM PROPERTY OF I B M+----------------------------------------------------------------------------*//*----------------------------------------------------------------------------+| Author: Mike Lepore| Component: sci| File: sci_atom.c| Purpose: Atom function prototype for smart card interface control| Changes:|| Date: Author Comment:| ---------- ---------------- -----------------------------------------------| 03/22/2001 MAL Initial check-in.| 03/26/2001 Zongwei Liu Port to Linux| 09/26/2001 Zongwei Liu Port to pallas| 10/10/2001 Zongwei Liu Port to OS-Adaption layer| 12/13/2001 MAL, Zongwei Liu Added EMV2000 support+----------------------------------------------------------------------------*/#ifndef _sci_atom_h_#define _sci_atom_h_#include "sci_local.h"#include "os/os-types.h"/****************************************************************************** Function: sci_atom_assign_reg_address**** Purpose: assign the register addresses**** Parameters: sci_id: zero-based number to identify smart card controller****************************************************************************/void sci_atom_assign_reg_address(ULONG sci_id);/******************************************************************************* Function: sci_atom_reg_init**** Purpose: Initialize the registers of Smart Card Interface**** Parameters: sci_id: zero-based number to identify smart card controller*****************************************************************************/void sci_atom_reg_init(ULONG sci_id);/****************************************************************************** Function: sci_atom_set_chip_connection**** Purpose: Configure the cic0_cr register.****************************************************************************/void sci_atom_set_chip_connection(void);/****************************************************************************** Name: sci_atom_clear_UICSR**** Purpose: clear the UIC status****************************************************************************/void sci_atom_clear_UICSR(ULONG sci_id);/****************************************************************************** Name: sci_atom_get_interrupt_status**** Purpose: get the status of interrrupt**** Parameters: sci_id: zero-based number to identify smart card controller**** Returns the value of interrupt status register****************************************************************************/USHORT sci_atom_get_interrupt_status(ULONG sci_id);/****************************************************************************** Name: sci_atom_clear_interrupt_status**** Purpose: clear the specified bits of interrrupt**** Parameters: sci_id: zero-based number to identify smart card controller** bits: bit mask****************************************************************************/void sci_atom_clear_interrupt_status(ULONG sci_id, USHORT bits);/****************************************************************************** Name: sci_atom_check_rx_data_pending**** Purpose: check any pending recieve data **** Parameters: sci_id: zero-based number to identify smart card controller**** Returns 0: if no data available** 1: if any recieve data is pending****************************************************************************/INT sci_atom_check_rx_data_pending(ULONG sci_id);/****************************************************************************** Name: sci_atom_check_tx_fifo_half_full**** Purpose: check the status of TX FIFO if under half full**** Parameters: sci_id: zero-based number to identify smart card controller**** Returns 0: if FIFO < 1/2 full** 1: if FIFO >= 1/2 full****************************************************************************/INT sci_atom_check_tx_fifo_half_full(ULONG sci_id);/****************************************************************************** Name: sci_atom_enable_tx_interrupts**** Purpose: enable Tx related interrupts**** Parameters: sci_id: zero-based number to identify smart card controller****************************************************************************/void sci_atom_enable_tx_interrupts(ULONG sci_id);/****************************************************************************** Name: sci_atom_enable_tx_threshold_interrupts**** Purpose: enable Tx threshold interrupts**** Parameters: sci_id: zero-based number to identify smart card controller****************************************************************************/void sci_atom_enable_tx_threshold_interrupts(ULONG sci_id);/****************************************************************************** Name: sci_atom_disable_tx_threshold_interrupts**** Purpose: disable Tx threshold interrupts**** Parameters: sci_id: zero-based number to identify smart card controller****************************************************************************/void sci_atom_disable_tx_threshold_interrupts(ULONG sci_id);/****************************************************************************** Name: sci_atom_set_rx_threshold_interrupts**** Purpose: Set Rx threshold interrupts according to num_bytes**** Parameters: sci_id: zero-based number to identify smart card controller** num_bytes: number of bytes to be read****************************************************************************/void sci_atom_set_rx_threshold_interrupts(ULONG sci_id, ULONG num_bytes);/****************************************************************************** Function: sci_atom_HW_reset**** Purpose: Initiate a reset (enter atr state).**** Parameters: sci_id: zero-based number to identify smart card controller****************************************************************************/void sci_atom_HW_reset(ULONG sci_id, SCI_RESET_TYPE reset_type);/******************************************************************************* Function: sci_atom_clock_stop**** Purpose: Stop the SCI/Smart Card clock at a given polarity.**** Parameters: sci_id: zero-based number to identify smart card controller*****************************************************************************/void sci_atom_clock_stop(ULONG sci_id);/******************************************************************************* Function: sci_atom_clock_start**** Purpose: Start the SCI/Smart Card clock.**** Parameters: sci_id: zero-based number to identify smart card controller*****************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -