| Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
AN2284 Datasheet(PDF) 37 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2284 Datasheet(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); |
|
Enlace URL |
| ¿ALLDATASHEET es útil para Ud.? [ DONATE ] |
Todo acerca de Alldatasheet | Publicidad | Contáctenos | Política de Privacidad | Enlace a la hoja de datos | Intercambio de Enlaces | Lista de Fabricantes 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 |