| 전자부품 데이터시트 검색엔진 |
|
AN2284 데이터시트(PDF) 37 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2284 데이터시트(HTML) 37 Page - STMicroelectronics |
|
37 / 40 page ![]() AN2284 10 SC Reader Example 37/40 SC_Handler (SC_SELECT_FILE, (u8 *) PrivateFile, NULL_PARAM, NULL_PARAM,NULL_PARAM, &SC_state, &u16_status, response); Once the selected path is accessed, the user has to define the 16bit offset where he wants to read and the number of bytes he wants to read: offset_low=1; offset_high=0; byte_number=3; SC_Handler (SC_READ_BINARY, (u8 *) PrivateFile, byte_number, offset_high, offset_low, &SC_state, &u16_status, response); 10.2.3 Writing a File at a Specified Path Suppose the user wants to write the PublicFile in the MasterRoot. He has to define the 16bits offset where he wants to read and the number of bytes he wants to read. In the example, FileParamST array will store the sequence the user wants to write. offset_low=1; offset_high=0; byte_number=18; FileParamST[40]="SmartCardDemo"; SC_Handler (SC_UPDATE_BINARY, (u8 *) FileParamST, byte_number, offset_high,offset_low, &SC_state, &u16_status, response); 10.2.4 Creating a File at a Specified Path Suppose the user wants to create a file in the MasterRoot. SC_Handler (SC_SELECT_FILE, (u8 *) MasterRoot, NULL_PARAM, NULL_PARAM, NULL_PARAM, &SC_state, &u16_status, card); SC_Handler (SC_CREATE_FILE, (u8 *) PublicFile, 20,NULL_PARAM, NULL_PARAM, &SC_state, &u16_status, response); Where 20 is the size (in byte) of PublicFile. 10.2.5 Creating a File at a Specified Path With Pin Protection Suppose the user wants to create a file in the MasterRoot/PublicDir directory. SC_Handler (SC_SELECT_FILE, (u8 *) MasterRoot, NULL_PARAM, NULL_PARAM, NULL_PARAM, &SC_state, &u16_status, card); SC_Handler (SC_CREATE_FILE, (u8 *) PublicDir, NULL_PARAM, NULL_PARAM,NULL_PARAM, &SC_state, &u16_status, response); SC_Handler (SC_SELECT_FILE, (u8 *) PublicDir, NULL_PARAM, NULL_PARAM,NULL_PARAM, &SC_state, &u16_status, response); |
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |