]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/ARM7_STR75x_GCC/STLibrary/src/75x_smi.c
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / ARM7_STR75x_GCC / STLibrary / src / 75x_smi.c
1 /******************** (C) COPYRIGHT 2006 STMicroelectronics ********************\r
2 * File Name          : 75x_smi.c\r
3 * Author             : MCD Application Team\r
4 * Date First Issued  : 03/10/2006\r
5 * Description        : This file provides all the SMI software functions.\r
6 ********************************************************************************\r
7 * History:\r
8 * 07/17/2006 : V1.0\r
9 * 03/10/2006 : V0.1\r
10 ********************************************************************************\r
11 * THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS\r
12 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.\r
13 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,\r
14 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE\r
15 * CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING\r
16 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.\r
17 *******************************************************************************/\r
18 \r
19 /* Includes ------------------------------------------------------------------*/\r
20 #include "75x_smi.h"\r
21 \r
22 /* Private typedef -----------------------------------------------------------*/\r
23 /* Private define ------------------------------------------------------------*/\r
24 /* SMI_CR1 mask bits */\r
25 #define SMI_HOLDPRESCTCS_RESET_Mask  0xFF00800F\r
26 #define SMI_Prescaler_MaxValue       0x7F\r
27 #define SMI_DeselectTime_MaxValue    0x0F\r
28 #define SMI_ClockHold_Mask           0x00\r
29 #define SMI_Prescaler_Mask           0x02\r
30 #define SMI_DeselectTime_Mask        0x5\r
31 \r
32 /* SMI_CR2 mask bits */\r
33 #define SMI_BS_RESET_Mask              0xFFFFCFFF\r
34 #define SMI_BS_Bank1_Mask              0x00001000\r
35 #define SMI_BS_Bank2_Mask              0x00002000\r
36 #define SMI_BS_Bank3_Mask              0x00003000\r
37 #define SMI_WEN_Mask                   0x00000800\r
38 #define SMI_RSR_Mask                   0x00000400\r
39 #define SMI_SEND_Mask                  0x00000080\r
40 #define SMI_TRARECLENGTH_RESET_Mask    0xFFFFFF88\r
41 \r
42 /* SMI_SR mask bits */\r
43 #define SMI_STATUSREGISTER_Mask    0xFF\r
44 \r
45 /* Private macro -------------------------------------------------------------*/\r
46 /* Private variables ---------------------------------------------------------*/\r
47 /* Private function prototypes -----------------------------------------------*/\r
48 /* Private functions ---------------------------------------------------------*/\r
49 \r
50 /*******************************************************************************\r
51 * Function Name  : SMI_DeInit\r
52 * Description    : Deinitializes the SMI peripheral registers to their default\r
53 *                  reset values. This function must not be used when booting\r
54 *                  from the SMI external memory.\r
55 * Input          : None\r
56 * Output         : None\r
57 * Return         : None\r
58 *******************************************************************************/\r
59 void SMI_DeInit(void)\r
60 {\r
61   SMI->CR1 = 0x00000250;\r
62   SMI->CR2 = 0x00;\r
63   SMI->SR &= 0xFFFFF0FF;\r
64   SMI->TR = 0x00;\r
65 }\r
66 \r
67 /*******************************************************************************\r
68 * Function Name  : SMI_Init\r
69 * Description    : Initializes the SMI peripheral according to the specified\r
70 *                  parameters in the SMI_InitStruct.\r
71 * Input          : - SMI_InitStruct: pointer to a SMI_InitTypeDef structure that\r
72 *                    contains the configuration information for the specified\r
73 *                    SMI peripheral.\r
74 * Output         : None\r
75 * Return         : None\r
76 *******************************************************************************/\r
77 void SMI_Init(SMI_InitTypeDef* SMI_InitStruct)\r
78 {\r
79   u32 Temp = 0;\r
80  \r
81   /* Clear HOLD[7:0], PRESC[6:0] and TCS[3:0] bits */\r
82   Temp = SMI->CR1 & SMI_HOLDPRESCTCS_RESET_Mask;\r
83 \r
84   /* Set HOLD[7:0] bits according to SMI_ClockHold value */\r
85   Temp |= SMI_InitStruct->SMI_ClockHold << 16;\r
86 \r
87   if(SMI_InitStruct->SMI_Prescaler <= SMI_Prescaler_MaxValue)\r
88   {\r
89     /* Set PRESC[6:0] bits according to SMI_Prescaler value */\r
90     Temp |= SMI_InitStruct->SMI_Prescaler << 8;\r
91   }\r
92 \r
93   if(SMI_InitStruct->SMI_DeselectTime <= SMI_DeselectTime_MaxValue)\r
94   {\r
95     /* Set TCS[3:0] bits according to SMI_DeselectTime value */\r
96     Temp |= SMI_InitStruct->SMI_DeselectTime << 4;\r
97   }\r
98 \r
99   /* Store the new value */\r
100   SMI->CR1 = Temp; \r
101 }\r
102 \r
103 /*******************************************************************************\r
104 * Function Name  : SMI_StructInit\r
105 * Description    : Fills each SMI_InitStruct member with its reset value.\r
106 * Input          : - SMI_InitStruct: pointer to a SMI_InitTypeDef structure which\r
107 *                    will be initialized.\r
108 * Output         : None\r
109 * Return         : None\r
110 *******************************************************************************/\r
111 void SMI_StructInit(SMI_InitTypeDef* SMI_InitStruct)\r
112 {\r
113   /* SMI_CK is sent continuously */\r
114   SMI_InitStruct->SMI_ClockHold = SMI_ClockHold_Mask;\r
115   \r
116   /* SMI_CK = HCLK/2 */\r
117   SMI_InitStruct->SMI_Prescaler = SMI_Prescaler_Mask;\r
118   \r
119   /* Deselect Time set to 6*SMI_CK periods */\r
120   SMI_InitStruct->SMI_DeselectTime = SMI_DeselectTime_Mask;\r
121 }\r
122 \r
123 /*******************************************************************************\r
124 * Function Name  : SMI_ModeConfig\r
125 * Description    : Selects the SMI mode: hardware or software.\r
126 * Input          : - SMI_Mode: specifies the SMI mode.\r
127 *                    This parameter can be one of the following values:\r
128 *                          - SMI_Mode_HW: SMI in hardware mode\r
129 *                          - SMI_Mode_SW: SMI in software mode\r
130 * Output         : None\r
131 * Return         : None\r
132 *******************************************************************************/\r
133 void SMI_ModeConfig(u32 SMI_Mode)\r
134 {\r
135   if(SMI_Mode == SMI_Mode_SW)\r
136   {   \r
137     SMI->CR1 |= SMI_Mode_SW;\r
138   }\r
139   else\r
140   {\r
141     SMI->CR1 &= SMI_Mode_HW;\r
142   }\r
143 }\r
144 \r
145 /*******************************************************************************\r
146 * Function Name  : SMI_TxRxLengthConfig\r
147 * Description    : Configures the number of bytes to be transmitted and received\r
148 *                  to/from external memory. This function is used in Software\r
149 *                  mode only.\r
150 * Input          : - SMI_TxLength: specifies the number of bytes to be transmitted\r
151 *                    to external memory.\r
152 *                    This parameter can be one of the following values:\r
153 *                          - SMI_TxLength_0Bytes: No bytes transmitted  \r
154 *                          - SMI_TxLength_1Byte: 1 byte transmitted\r
155 *                          - SMI_TxLength_2Bytes: 2 bytes transmitted\r
156 *                          - SMI_TxLength_3Bytes: 3 bytes transmitted\r
157 *                          - SMI_TxLength_4Bytes: 4 bytes transmitted\r
158 *                  - SMI_RxLength: specifies the number of bytes to be received\r
159 *                    from external memory.\r
160 *                    This parameter can be one of the following values:\r
161 *                          - SMI_RxLength_0Bytes: No bytes received  \r
162 *                          - SMI_RxLength_1Byte: 1 byte received\r
163 *                          - SMI_RxLength_2Bytes: 2 bytes received\r
164 *                          - SMI_RxLength_3Bytes: 3 bytes received\r
165 *                          - SMI_RxLength_4Bytes: 4 bytes received\r
166 * Output         : None\r
167 * Return         : None\r
168 *******************************************************************************/\r
169 void SMI_TxRxLengthConfig(u32 SMI_TxLength, u32 SMI_RxLength) \r
170 {\r
171   u32 Temp = 0;\r
172  \r
173   /* Clear TRA_LENGTH[2:0] and REC_LENGTH[2:0] bits */\r
174   Temp = SMI->CR2 & SMI_TRARECLENGTH_RESET_Mask;\r
175  \r
176   /* Set TRA_LENGTH[2:0] and REC_LENGTH[2:0] bits according to function parameters */\r
177   Temp |= SMI_TxLength | SMI_RxLength;\r
178  \r
179   /* Store the new value */\r
180   SMI->CR2 = Temp;\r
181 }\r
182 \r
183 /*******************************************************************************\r
184 * Function Name  : SMI_BankCmd\r
185 * Description    : Enables or disables the specified memory Bank.\r
186 * Input          : - SMI_Bank: specifies the memory Bank to be enabled or disabled.\r
187 *                    This parameter can be any combination of the following values:\r
188 *                          - SMI_Bank_0\r
189 *                          - SMI_Bank_1\r
190 *                          - SMI_Bank_2\r
191 *                          - SMI_Bank_3\r
192 *                  - NewState: new state of the specified memory Bank.\r
193 *                    This parameter can be: ENABLE or DISABLE.\r
194 * Output         : None\r
195 * Return         : None\r
196 *******************************************************************************/\r
197 void SMI_BankCmd(u32 SMI_Bank, FunctionalState NewState)\r
198 {\r
199   if(NewState == ENABLE)\r
200   {\r
201     SMI->CR1 |= SMI_Bank;\r
202   }\r
203   else\r
204   {\r
205     SMI->CR1 &= ~SMI_Bank;\r
206   }\r
207 }\r
208 \r
209 /*******************************************************************************\r
210 * Function Name  : SMI_ITConfig\r
211 * Description    : Enables or disables the specified SMI interrupts.\r
212 * Input          : - SMI_IT: specifies the SMI interrupts sources to be\r
213 *                    enabled or disabled. This parameter can be any combination\r
214 *                    of the following values:\r
215 *                          - SMI_IT_WC : Write Complete Interrupt\r
216 *                          - SMI_IT_TF : Transfer Finished Interrupt\r
217 *                  - NewState: new state of the specified SMI interrupts.\r
218 *                    This parameter can be: ENABLE or DISABLE.\r
219 * Output         : None\r
220 * Return         : None\r
221 *******************************************************************************/\r
222 void SMI_ITConfig(u32 SMI_IT, FunctionalState NewState)\r
223 {\r
224   if(NewState == ENABLE)\r
225   {\r
226     SMI->CR2 |= SMI_IT;\r
227   }\r
228   else\r
229   {\r
230     SMI->CR2 &= ~SMI_IT;\r
231   }\r
232 }\r
233 \r
234 /*******************************************************************************\r
235 * Function Name  : SMI_SelectBank\r
236 * Description    : Selects the memory Bank to be accessed. Only one Bank can be\r
237 *                  selected at a time.\r
238 * Input          : - SMI_Bank: specifies the memory Bank to be selected.\r
239 *                    This parameter can be one of the following values:\r
240 *                          - SMI_Bank_0\r
241 *                          - SMI_Bank_1\r
242 *                          - SMI_Bank_2\r
243 *                          - SMI_Bank_3\r
244 * Output         : None\r
245 * Return         : None\r
246 *******************************************************************************/\r
247 void SMI_SelectBank(u32 SMI_Bank)\r
248 {\r
249   /* Clear BS[1:0] bits (Bank0 is selected)*/\r
250   SMI->CR2 &= SMI_BS_RESET_Mask;\r
251 \r
252   switch(SMI_Bank)\r
253   {\r
254     case SMI_Bank_1:\r
255       /* Select Bank1 */\r
256       SMI->CR2 |= SMI_BS_Bank1_Mask;\r
257       break;\r
258 \r
259     case SMI_Bank_2:\r
260       /* Select Bank2 */\r
261       SMI->CR2 |= SMI_BS_Bank2_Mask;\r
262       break;\r
263 \r
264     case SMI_Bank_3:\r
265       /* Select Bank3 */\r
266       SMI->CR2 |= SMI_BS_Bank3_Mask;\r
267       break;\r
268       \r
269     default:\r
270       break;      \r
271   }\r
272 }\r
273 \r
274 /*******************************************************************************\r
275 * Function Name  : SMI_SendWENCmd\r
276 * Description    : Sends a Write Enable command to the selected memory Bank.\r
277 *                  This function is used in Hardware mode only.\r
278 * Input          : None\r
279 * Output         : None\r
280 * Return         : None\r
281 *******************************************************************************/\r
282 void SMI_SendWENCmd(void)\r
283 {\r
284   SMI->CR2 |= SMI_WEN_Mask;\r
285 }\r
286 \r
287 /*******************************************************************************\r
288 * Function Name  : SMI_SendRSRCmd\r
289 * Description    : Sends a Read Status Register Command to the selected memory\r
290 *                  Bank.\r
291 * Input          : None\r
292 * Output         : None\r
293 * Return         : None\r
294 *******************************************************************************/\r
295 void SMI_SendRSRCmd(void)\r
296 {\r
297   SMI->CR2 |= SMI_RSR_Mask;\r
298 }\r
299 \r
300 /*******************************************************************************\r
301 * Function Name  : SMI_SendCmd\r
302 * Description    : Sends command to the selected memory Bank. This function is\r
303 *                  used in Software mode only.\r
304 * Input          : - Command: specifies the command to send to the external memory.\r
305 * Output         : None\r
306 * Return         : None\r
307 *******************************************************************************/\r
308 void SMI_SendCmd(u32 Command)\r
309 {\r
310   /* Load the command in the Transmit Register */\r
311   SMI->TR = Command;\r
312 \r
313   /* Start transfer */    \r
314   SMI->CR2 |= SMI_SEND_Mask;\r
315 }\r
316 \r
317 /*******************************************************************************\r
318 * Function Name  : SMI_FastReadConfig\r
319 * Description    : Enables or disables the Fast Read Mode.\r
320 * Input          : - SMI_FastRead: specifies whether the Fast Read Mode is\r
321 *                    enabled or disabled.\r
322 *                    This parameter can be one of the following values:\r
323 *                          - SMI_FastRead_Disable : Fast Read Mode disabled\r
324 *                          - SMI_FastRead_Enable : Fast Read Mode enabled\r
325 * Output         : None\r
326 * Return         : None\r
327 *******************************************************************************/\r
328 void SMI_FastReadConfig(u32 SMI_FastRead)\r
329 {\r
330   if(SMI_FastRead == SMI_FastRead_Enable)\r
331   {\r
332     SMI->CR1 |= SMI_FastRead_Enable;\r
333   }\r
334   else\r
335   {\r
336     SMI->CR1 &= SMI_FastRead_Disable;\r
337   }\r
338 }\r
339 \r
340 /*******************************************************************************\r
341 * Function Name  : SMI_WriteBurstConfig\r
342 * Description    : Enables or disables the Write Burst Mode.\r
343 * Input          : - SMI_WriteBurst: specifies whether the Write Burst Mode is\r
344 *                    enabled or disabled.\r
345 *                    This parameter can be one of the following values:\r
346 *                          - SMI_WriteBurst_Disable : Write Burst Mode disabled\r
347 *                          - SMI_WriteBurst_Enable : Write Burst Mode enabled\r
348 * Output         : None\r
349 * Return         : None\r
350 *******************************************************************************/\r
351 void SMI_WriteBurstConfig(u32 SMI_WriteBurst)\r
352 {\r
353   if(SMI_WriteBurst == SMI_WriteBurst_Enable)\r
354   {\r
355     SMI->CR1 |= SMI_WriteBurst_Enable;\r
356   }\r
357   else\r
358   {\r
359     SMI->CR1 &= SMI_WriteBurst_Disable;\r
360   }\r
361 }\r
362 \r
363 /*******************************************************************************\r
364 * Function Name  : SMI_WriteByte\r
365 * Description    : Writes a Byte to the selected memory Bank. This function is\r
366 *                  used in Hardware mode only.\r
367 *                  Before calling this function, send a Write Enable command to \r
368 *                  the selected memory Bank using SMI_SendWENCmd() function.\r
369 * Input          : - WriteAddr: external memory address from which the data will\r
370 *                    be written.\r
371 *                  - Data: data to be written to the external memory.\r
372 * Output         : None\r
373 * Return         : None\r
374 *******************************************************************************/\r
375 void SMI_WriteByte(u32 WriteAddr, u8 Data)\r
376 {\r
377   /* Transfer data to the memory */\r
378   *(u8 *) WriteAddr = Data;\r
379 }\r
380 \r
381 /*******************************************************************************\r
382 * Function Name  : SMI_WriteHalfWord\r
383 * Description    : Writes a Half Word to the selected memory Bank. This function\r
384 *                  is used in Hardware mode only.\r
385 *                  Before calling this function, send a Write Enable command to \r
386 *                  the selected memory Bank using SMI_SendWENCmd() function.\r
387 * Input          : - WriteAddr: external memory address from which the data will\r
388 *                    be written.\r
389 *                  - Data: data to be written to the external memory.\r
390 * Output         : None\r
391 * Return         : None\r
392 *******************************************************************************/\r
393 void SMI_WriteHalfWord(u32 WriteAddr, u16 Data)\r
394 {\r
395   /* Transfer data to the memory */\r
396   *(u16 *) WriteAddr = Data;\r
397 }\r
398 \r
399 /*******************************************************************************\r
400 * Function Name  : SMI_WriteWord\r
401 * Description    : Writes a Word to the selected memory Bank. This function is\r
402 *                  used in Hardware mode only.\r
403 *                  Before calling this function, send a Write Enable command to \r
404 *                  the selected memory Bank using SMI_SendWENCmd() function.\r
405 * Input          : - WriteAddr: external memory address from which the data will\r
406 *                    be written.\r
407 *                  - Data: data to be written to the external memory.\r
408 * Output         : None\r
409 * Return         : None\r
410 *******************************************************************************/\r
411 void SMI_WriteWord(u32 WriteAddr, u32 Data)\r
412 {\r
413   /* Transfer data to the memory */\r
414   *(u32 *) WriteAddr = Data;\r
415 }\r
416 \r
417 /*******************************************************************************\r
418 * Function Name  : SMI_ReadByte\r
419 * Description    : Reads a Byte from the selected memory Bank. This function is\r
420 *                  used in Hardware mode only.\r
421 * Input          : - ReadAddr: external memory address to read from.\r
422 * Output         : None\r
423 * Return         : Data read from the external memory.\r
424 *******************************************************************************/\r
425 u8 SMI_ReadByte(u32 ReadAddr)\r
426 {\r
427   return(*(u8 *) ReadAddr);\r
428 }\r
429 \r
430 /*******************************************************************************\r
431 * Function Name  : SMI_ReadHalfWord\r
432 * Description    : Reads a Half Word from the selected memory Bank. This function\r
433 *                  is used in Hardware mode only.\r
434 * Input          : - ReadAddr: external memory address to read from.\r
435 * Output         : None\r
436 * Return         : Data read from the external memory.\r
437 *******************************************************************************/\r
438 u16 SMI_ReadHalfWord(u32 ReadAddr)\r
439 {\r
440   return(*(u16 *) ReadAddr);\r
441 }\r
442 \r
443 /*******************************************************************************\r
444 * Function Name  : SMI_ReadWord\r
445 * Description    : Reads a Word from the selected memory Bank. This function is\r
446 *                  used in Hardware mode only.\r
447 * Input          : - ReadAddr: external memory address to read from.\r
448 * Output         : None\r
449 * Return         : Data read from the external memory.\r
450 *******************************************************************************/\r
451 u32 SMI_ReadWord(u32 ReadAddr)\r
452 {\r
453   return(*(u32 *) ReadAddr);\r
454 }\r
455 \r
456 /*******************************************************************************\r
457 * Function Name  : SMI_ReadMemoryStatusRegister\r
458 * Description    : Reads the status register of the memory connected to the\r
459 *                  selected Bank.\r
460 * Input          : None\r
461 * Output         : None\r
462 * Return         : External memory status register value.\r
463 *******************************************************************************/\r
464 u8 SMI_ReadMemoryStatusRegister(void)\r
465 {\r
466  return((u8) (SMI->SR & SMI_STATUSREGISTER_Mask));\r
467 }\r
468 \r
469 /*******************************************************************************\r
470 * Function Name  : SMI_GetFlagStatus\r
471 * Description    : Checks whether the specified SMI flag is set or not.\r
472 * Input          : - SMI_FLAG: specifies the flag to check.\r
473 *                    This parameter can be one of the following values:\r
474 *                          - SMI_FLAG_Bank3_WM : Memory Bank3 Write Mode flag\r
475 *                          - SMI_FLAG_Bank2_WM : Memory Bank2 Write Mode flag\r
476 *                          - SMI_FLAG_Bank1_WM : Memory Bank1 Write Mode flag\r
477 *                          - SMI_FLAG_Bank0_WM : Memory Bank0 Write Mode flag\r
478 *                          - SMI_FLAG_ERF2 : Error Flag 2: Forbidden Write Request\r
479 *                          - SMI_FLAG_ERF1 : Error Flag 1: Forbidden Access\r
480 *                          - SMI_FLAG_WC : Write Complete flag\r
481 *                          - SMI_FLAG_TF : Transfer Finished flag\r
482 * Output         : None\r
483 * Return         : The new state of SMI_FLAG (SET or RESET).\r
484 *******************************************************************************/\r
485 FlagStatus SMI_GetFlagStatus(u32 SMI_FLAG)\r
486 {\r
487   if((SMI->SR & SMI_FLAG) != RESET)\r
488   {\r
489     return SET;\r
490   }\r
491   else\r
492   {\r
493     return RESET;\r
494   }\r
495 }\r
496 \r
497 /*******************************************************************************\r
498 * Function Name  : SMI_ClearFlag\r
499 * Description    : Clears the SMI\92s pending flags.\r
500 * Input          : - SMI_FLAG: specifies the flag to clear.\r
501 *                    This parameter can be any combination of the following values:\r
502 *                          - SMI_FLAG_ERF2 : Error Flag 2: Forbidden Write Request\r
503 *                          - SMI_FLAG_ERF1 : Error Flag 1: Forbidden Access\r
504 *                          - SMI_FLAG_WC : Write Complete flag\r
505 *                          - SMI_FLAG_TF : Transfer Finished flag\r
506 * Output         : None\r
507 * Return         : None\r
508 *******************************************************************************/\r
509 void SMI_ClearFlag(u32 SMI_FLAG)\r
510 {\r
511   SMI->SR &= ~SMI_FLAG;\r
512 }\r
513 \r
514 /*******************************************************************************\r
515 * Function Name  : SMI_GetITStatus\r
516 * Description    : Checks whether the specified SMI interrupt has occurred or not.\r
517 * Input          : - SMI_FLAG: specifies the interrupt source to check.\r
518 *                    This parameter can be one of the following values:\r
519 *                          - SMI_IT_WC : Write Complete Interrupt\r
520 *                          - SMI_IT_TF : Transfer Finished Interrupt\r
521 * Output         : None\r
522 * Return         : The new state of SMI_IT (SET or RESET).\r
523 *******************************************************************************/\r
524 ITStatus SMI_GetITStatus(u32 SMI_IT)\r
525 {\r
526   if(((SMI->CR2 & SMI_IT) != RESET) && ((SMI->SR & SMI_IT) != RESET))\r
527   {\r
528     return SET;\r
529   }\r
530   else\r
531   {\r
532     return RESET;\r
533   }\r
534 }\r
535 \r
536 /*******************************************************************************\r
537 * Function Name  : SMI_ClearITPendingBit\r
538 * Description    : Clears the SMI\92s interrupt pending bits.\r
539 * Input          : - SMI_FLAG: specifies the interrupts sources to clear.\r
540 *                    This parameter can be any combination of the following values:\r
541 *                          - SMI_IT_WC : Write Complete Interrupt\r
542 *                          - SMI_IT_TF : Transfer Finished Interrupt\r
543 * Output         : None\r
544 * Return         : None\r
545 *******************************************************************************/\r
546 void SMI_ClearITPendingBit(u32 SMI_IT)\r
547 {\r
548   SMI->SR &= ~SMI_IT;\r
549 }\r
550 \r
551 /******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/\r