1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Driver for Rockchip Smart Card Reader Controller 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Copyright (C) 2012-2016 ROCKCHIP, Inc. 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * This software is licensed under the terms of the GNU General Public 7*4882a593Smuzhiyun * License version 2, as published by the Free Software Foundation, and 8*4882a593Smuzhiyun * may be copied, distributed, and modified under those terms. 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * This program is distributed in the hope that it will be useful, 11*4882a593Smuzhiyun * but WITHOUT ANY WARRANTY; without even the implied warranty of 12*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13*4882a593Smuzhiyun * GNU General Public License for more details. 14*4882a593Smuzhiyun */ 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun #ifndef __RK_SCR_API_H__ 17*4882a593Smuzhiyun #define __RK_SCR_API_H__ 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun int scr_open(void); 20*4882a593Smuzhiyun int scr_close(void); 21*4882a593Smuzhiyun int scr_check_card_insert(void); 22*4882a593Smuzhiyun int scr_reset(void); 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun int scr_get_atr_data(unsigned char *atr_buf, unsigned char *atr_len); 25*4882a593Smuzhiyun ssize_t scr_write(unsigned char *buf, unsigned int write_cnt, 26*4882a593Smuzhiyun unsigned int *to_read_cnt); 27*4882a593Smuzhiyun ssize_t scr_read(unsigned char *buf, unsigned int to_read_cnt, 28*4882a593Smuzhiyun unsigned int *have_read_cnt); 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun void scr_set_etu_duration(unsigned int F, unsigned int D); 31*4882a593Smuzhiyun void scr_set_work_waitingtime(unsigned char wi); 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun #endif /* __RK_SCR_API_H__ */ 34