Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

AN2646 Datasheet(PDF) 29 Page - STMicroelectronics

Part # AN2646
Description  Smartcard interface with the STM8S microcontroller
PDF  43 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2646 Datasheet(HTML) 29 Page - STMicroelectronics

Back Button AN2646 Datasheet HTML 25Page - STMicroelectronics AN2646 Datasheet HTML 26Page - STMicroelectronics AN2646 Datasheet HTML 27Page - STMicroelectronics AN2646 Datasheet HTML 28Page - STMicroelectronics AN2646 Datasheet HTML 29Page - STMicroelectronics AN2646 Datasheet HTML 30Page - STMicroelectronics AN2646 Datasheet HTML 31Page - STMicroelectronics AN2646 Datasheet HTML 32Page - STMicroelectronics AN2646 Datasheet HTML 33Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 29 / 43 page
background image
AN2646 - Application note
Smartcard interface library: description
29/43
typedef struct
{
u8 LC;
/* Data field length */
u8 Data[LCmax];
/* Command parameters */
u8 LE;
/* Expected length of data to be returned */
} SC_Body;
●
LC
Specifies the number of data bytes transferred to the card as part of the [CLA, INS]
instruction execution.
●
Data
Specifies the pointer to the data buffer transferred to the card.
●
LE
Specifies the number of data bytes transferred from the card as part of the [CLA, INS]
instruction execution.
●
SC_Response
Specifies the APDU command response. It is of SC_ADPU_Response type, defined in
the smartcard.h file:
typedef struct
{
u8 Data[LCmax];
/* Data returned from the card */
u8 SW1;
/* Command Processing status */
u8 SW2;
/* Command Processing qualification */
} SC_ADPU_Responce;
●
Data
Specifies the pointer to the data buffer which will contain the returned card data.
●
SW1
Specifies the first status code byte. This byte stores the error category.
●
SW2
Specifies the second status code byte. This byte stores a command-specific status or
error indication.
Example:
/* Select the Master Root MF */
SC_ADPU.Header.CLA = SC_CLA;
SC_ADPU.Header.INS = SC_SELECT_FILE;
SC_ADPU.Header.P1 = 0x00;
SC_ADPU.Header.P2 = 0x00;
SC_ADPU.Body.LC = 0x02;
for(i = 0; i < SC_ADPU.Body.LC; i++)
{
SC_ADPU.Body.Data[i] = MasterRoot[i];
}
while(i < LCmax)
{
SC_ADPU.Body.Data[i++] = 0;
}
SC_ADPU.Body.LE = 0;
SC_Handler(&SCState, &SC_ADPU, &SC_Responce);



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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