]> git.sur5r.net Git - freertos/blob - Demo/CORTEX_M0_STM32F0518_IAR/Libraries/STM32F0xx_StdPeriph_Driver/src/stm32f0xx_pwr.c
Start to re-arrange files to include FreeRTOS+ in main download.
[freertos] / Demo / CORTEX_M0_STM32F0518_IAR / Libraries / STM32F0xx_StdPeriph_Driver / src / stm32f0xx_pwr.c
1 /**\r
2   ******************************************************************************\r
3   * @file    stm32f0xx_pwr.c\r
4   * @author  MCD Application Team\r
5   * @version V1.0.0RC1\r
6   * @date    27-January-2012\r
7   * @brief   This file provides firmware functions to manage the following \r
8   *          functionalities of the Power Controller (PWR) peripheral:\r
9   *           + Backup Domain Access\r
10   *           + PVD configuration\r
11   *           + WakeUp pins configuration\r
12   *           + Low Power modes configuration\r
13   *           + Flags management\r
14   *\r
15   ******************************************************************************\r
16   * @attention\r
17   *\r
18   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS\r
19   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE\r
20   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY\r
21   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING\r
22   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE\r
23   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.\r
24   *\r
25   * FOR MORE INFORMATION PLEASE READ CAREFULLY THE LICENSE AGREEMENT FILE\r
26   * LOCATED IN THE ROOT DIRECTORY OF THIS FIRMWARE PACKAGE.\r
27   *\r
28   * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>\r
29   ******************************************************************************\r
30   */\r
31 \r
32 /* Includes ------------------------------------------------------------------*/\r
33 #include "stm32f0xx_pwr.h"\r
34 #include "stm32f0xx_rcc.h"\r
35 \r
36 /** @addtogroup STM32F0xx_StdPeriph_Driver\r
37   * @{\r
38   */\r
39 \r
40 /** @defgroup PWR \r
41   * @brief PWR driver modules\r
42   * @{\r
43   */ \r
44 \r
45 /* Private typedef -----------------------------------------------------------*/\r
46 /* Private define ------------------------------------------------------------*/\r
47 \r
48 /* ------------------ PWR registers bit mask ------------------------ */\r
49 \r
50 /* CR register bit mask */\r
51 #define CR_DS_MASK               ((uint32_t)0xFFFFFFFC)\r
52 #define CR_PLS_MASK              ((uint32_t)0xFFFFFF1F)\r
53 \r
54 /* Private macro -------------------------------------------------------------*/\r
55 /* Private variables ---------------------------------------------------------*/\r
56 /* Private function prototypes -----------------------------------------------*/\r
57 /* Private functions ---------------------------------------------------------*/\r
58 \r
59 /** @defgroup PWR_Private_Functions\r
60   * @{\r
61   */\r
62 \r
63 /** @defgroup PWR_Group1 Backup Domain Access function \r
64  *  @brief   Backup Domain Access function\r
65  *\r
66 @verbatim\r
67   ==============================================================================\r
68                    ##### Backup Domain Access function #####\r
69   ==============================================================================\r
70 \r
71     [..] After reset, the Backup Domain Registers (RCC BDCR Register, RTC registers\r
72          and RTC backup registers) are protected against possible stray write accesses.\r
73     [..] To enable access to Backup domain use the PWR_BackupAccessCmd(ENABLE) function.\r
74 \r
75 @endverbatim\r
76   * @{\r
77   */\r
78 \r
79 /**\r
80   * @brief  Deinitializes the PWR peripheral registers to their default reset values.\r
81   * @param  None\r
82   * @retval None\r
83   */\r
84 void PWR_DeInit(void)\r
85 {\r
86   RCC_APB1PeriphResetCmd(RCC_APB1Periph_PWR, ENABLE);\r
87   RCC_APB1PeriphResetCmd(RCC_APB1Periph_PWR, DISABLE);\r
88 }\r
89 \r
90 /**\r
91   * @brief  Enables or disables access to the Backup domain registers.\r
92   * @note   If the HSE divided by 32 is used as the RTC clock, the \r
93   *         Backup Domain Access should be kept enabled.\r
94   * @param  NewState: new state of the access to the Backup domain registers.\r
95   *         This parameter can be: ENABLE or DISABLE.\r
96   * @retval None\r
97   */\r
98 void PWR_BackupAccessCmd(FunctionalState NewState)\r
99 {\r
100   /* Check the parameters */\r
101   assert_param(IS_FUNCTIONAL_STATE(NewState));\r
102   \r
103   if (NewState != DISABLE)\r
104   {\r
105     /* Enable the Backup Domain Access */\r
106     PWR->CR |= PWR_CR_DBP;\r
107   }\r
108   else\r
109   {\r
110     /* Disable the Backup Domain Access */\r
111     PWR->CR &= (uint32_t)~((uint32_t)PWR_CR_DBP);\r
112   } \r
113 }\r
114 \r
115 /**\r
116   * @}\r
117   */\r
118 \r
119 /** @defgroup PWR_Group2 PVD configuration functions\r
120  *  @brief   PVD configuration functions \r
121  *\r
122 @verbatim\r
123   ==============================================================================\r
124                     ##### PVD configuration functions #####\r
125   ==============================================================================\r
126   [..]\r
127   (+) The PVD is used to monitor the VDD power supply by comparing it to a threshold\r
128       selected by the PVD Level (PLS[2:0] bits in the PWR_CR).\r
129   (+) A PVDO flag is available to indicate if VDD/VDDA is higher or lower than the \r
130       PVD threshold. This event is internally connected to the EXTI line16\r
131       and can generate an interrupt if enabled through the EXTI registers.\r
132   (+) The PVD is stopped in Standby mode.\r
133 \r
134 @endverbatim\r
135   * @{\r
136   */\r
137 \r
138 /**\r
139   * @brief  Configures the voltage threshold detected by the Power Voltage Detector(PVD).\r
140   * @param  PWR_PVDLevel: specifies the PVD detection level\r
141   *         This parameter can be one of the following values:\r
142   *             @arg PWR_PVDLevel_0: PVD detection level set to 1.9V\r
143   *             @arg PWR_PVDLevel_1: PVD detection level set to 2.1V\r
144   *             @arg PWR_PVDLevel_2: PVD detection level set to 2.3V\r
145   *             @arg PWR_PVDLevel_3: PVD detection level set to 2.5V\r
146   *             @arg PWR_PVDLevel_4: PVD detection level set to 2.7V\r
147   *             @arg PWR_PVDLevel_5: PVD detection level set to 2.9V\r
148   *             @arg PWR_PVDLevel_6: PVD detection level set to 3.1V\r
149   *             @arg PWR_PVDLevel_7: PVD detection level set to 3.3V\r
150   * @retval None\r
151   */\r
152 void PWR_PVDLevelConfig(uint32_t PWR_PVDLevel)\r
153 {\r
154   uint32_t tmpreg = 0;\r
155   \r
156   /* Check the parameters */\r
157   assert_param(IS_PWR_PVD_LEVEL(PWR_PVDLevel));\r
158   \r
159   tmpreg = PWR->CR;\r
160   \r
161   /* Clear PLS[7:5] bits */\r
162   tmpreg &= CR_PLS_MASK;\r
163   \r
164   /* Set PLS[7:5] bits according to PWR_PVDLevel value */\r
165   tmpreg |= PWR_PVDLevel;\r
166   \r
167   /* Store the new value */\r
168   PWR->CR = tmpreg;\r
169 }\r
170 \r
171 /**\r
172   * @brief  Enables or disables the Power Voltage Detector(PVD).\r
173   * @param  NewState: new state of the PVD.\r
174   *         This parameter can be: ENABLE or DISABLE.\r
175   * @retval None\r
176   */\r
177 void PWR_PVDCmd(FunctionalState NewState)\r
178 {\r
179   /* Check the parameters */\r
180   assert_param(IS_FUNCTIONAL_STATE(NewState));\r
181   \r
182   if (NewState != DISABLE)\r
183   {\r
184     /* Enable the PVD */\r
185     PWR->CR |= PWR_CR_PVDE;\r
186   }\r
187   else\r
188   {\r
189     /* Disable the PVD */\r
190     PWR->CR &= (uint32_t)~((uint32_t)PWR_CR_PVDE);\r
191   } \r
192 }\r
193 \r
194 /**\r
195   * @}\r
196   */\r
197 \r
198 /** @defgroup PWR_Group3 WakeUp pins configuration functions\r
199  *  @brief   WakeUp pins configuration functions \r
200  *\r
201 @verbatim\r
202   ==============================================================================\r
203                ##### WakeUp pin configuration functions #####\r
204   ==============================================================================\r
205 \r
206   (+) WakeUp pins are used to wakeup the system from Standby mode. These pins are \r
207       forced in input pull down configuration and are active on rising edges.\r
208   (+) There are three WakeUp pins: WakeUp Pin 1 on PA.00 and WakeUp Pin 2 on PC.13.\r
209 \r
210 @endverbatim\r
211   * @{\r
212   */\r
213 \r
214 /**\r
215   * @brief  Enables or disables the WakeUp Pin functionality.\r
216   * @param  PWR_WakeUpPin: specifies the WakeUpPin.\r
217   *         This parameter can be: PWR_WakeUpPin_1 or PWR_WakeUpPin_2.\r
218   * @param  NewState: new state of the WakeUp Pin functionality.\r
219   *         This parameter can be: ENABLE or DISABLE.\r
220   * @retval None\r
221   */\r
222 void PWR_WakeUpPinCmd(uint32_t PWR_WakeUpPin, FunctionalState NewState)\r
223 {\r
224   /* Check the parameters */\r
225   assert_param(IS_PWR_WAKEUP_PIN(PWR_WakeUpPin));\r
226   assert_param(IS_FUNCTIONAL_STATE(NewState));\r
227 \r
228   if (NewState != DISABLE)\r
229   {\r
230     /* Enable the EWUPx pin */\r
231     PWR->CSR |= PWR_WakeUpPin;\r
232   }\r
233   else\r
234   {\r
235     /* Disable the EWUPx pin */\r
236     PWR->CSR &= ~PWR_WakeUpPin;\r
237   }\r
238 }\r
239 \r
240 /**\r
241   * @}\r
242   */\r
243 \r
244 \r
245 /** @defgroup PWR_Group4 Low Power modes configuration functions\r
246  *  @brief   Low Power modes configuration functions \r
247  *\r
248 @verbatim\r
249   ==============================================================================\r
250               ##### Low Power modes configuration functions #####\r
251   ==============================================================================\r
252 \r
253     [..] The devices feature three low-power modes:\r
254     (+) Sleep mode: Cortex-M0 core stopped, peripherals kept running.\r
255     (+) Stop mode: all clocks are stopped, regulator running, regulator in low power mode\r
256     (+) Standby mode: VCORE domain powered off\r
257 \r
258   *** Sleep mode *** \r
259   ==================\r
260   [..] \r
261     (+) Entry:\r
262         (++) The Sleep mode is entered by executing the WFE() or WFI() instructions.\r
263     (+) Exit:\r
264         (++) Any peripheral interrupt acknowledged by the nested vectored interrupt \r
265              controller (NVIC) can wake up the device from Sleep mode.\r
266 \r
267   *** Stop mode *** \r
268   =================\r
269   [..] In Stop mode, all clocks in the VCORE domain are stopped, the PLL, the HSI,\r
270        the HSI14 and the HSE RC oscillators are disabled. Internal SRAM and register \r
271        contents are preserved.\r
272        The voltage regulator can be configured either in normal or low-power mode.\r
273 \r
274     (+) Entry:\r
275         (++) The Stop mode is entered using the PWR_EnterSTOPMode(PWR_Regulator_LowPower,) \r
276              function with regulator in LowPower or with Regulator ON.\r
277     (+) Exit:\r
278         (++) Any EXTI Line (Internal or External) configured in Interrupt/Event mode\r
279              or any internal IPs (I2C, UASRT or CEC) wakeup event.\r
280 \r
281   *** Standby mode *** \r
282   ====================\r
283   [..] The Standby mode allows to achieve the lowest power consumption. It is based \r
284        on the Cortex-M0 deepsleep mode, with the voltage regulator disabled. \r
285        The VCORE domain is consequently powered off. The PLL, the HSI, the HSI14 \r
286        oscillator and the HSE oscillator are also switched off. SRAM and register \r
287        contents are lost except for the Backup domain (RTC registers, RTC backup \r
288        registers and Standby circuitry).\r
289    \r
290   [..] The voltage regulator is OFF.\r
291 \r
292     (+) Entry:\r
293         (++) The Standby mode is entered using the PWR_EnterSTANDBYMode() function.\r
294     (+) Exit:\r
295         (++) WKUP pin rising edge, RTC alarm (Alarm A and Alarm B), RTC wakeup,\r
296              tamper event, time-stamp event, external reset in NRST pin, IWDG reset.\r
297 \r
298   *** Auto-wakeup (AWU) from low-power mode *** \r
299   =============================================\r
300   [..] The MCU can be woken up from low-power mode by an RTC Alarm event, a tamper \r
301        event, a time-stamp event, or a comparator event, without depending on an \r
302        external interrupt (Auto-wakeup mode).\r
303 \r
304     (+) RTC auto-wakeup (AWU) from the Stop mode\r
305         (++) To wake up from the Stop mode with an RTC alarm event, it is necessary to:\r
306              (+++) Configure the EXTI Line 17 to be sensitive to rising edges (Interrupt \r
307                    or Event modes) using the EXTI_Init() function.\r
308              (+++) Enable the RTC Alarm Interrupt using the RTC_ITConfig() function\r
309              (+++) Configure the RTC to generate the RTC alarm using the RTC_SetAlarm() \r
310                    and RTC_AlarmCmd() functions.\r
311         (++) To wake up from the Stop mode with an RTC Tamper or time stamp event, it \r
312              is necessary to:\r
313              (+++) Configure the EXTI Line 19 to be sensitive to rising edges (Interrupt \r
314                    or Event modes) using the EXTI_Init() function.\r
315              (+++) Enable the RTC Tamper or time stamp Interrupt using the RTC_ITConfig() \r
316                    function.\r
317              (+++) Configure the RTC to detect the tamper or time stamp event using the\r
318                    RTC_TimeStampConfig(), RTC_TamperTriggerConfig() and RTC_TamperCmd()\r
319                    functions.\r
320 \r
321     (+) RTC auto-wakeup (AWU) from the Standby mode\r
322         (++) To wake up from the Standby mode with an RTC alarm event, it is necessary to:\r
323              (+++) Enable the RTC Alarm Interrupt using the RTC_ITConfig() function.\r
324              (+++) Configure the RTC to generate the RTC alarm using the RTC_SetAlarm() \r
325                    and RTC_AlarmCmd() functions.\r
326         (++) To wake up from the Standby mode with an RTC Tamper or time stamp event, it \r
327              is necessary to:\r
328              (+++) Enable the RTC Tamper or time stamp Interrupt using the RTC_ITConfig() \r
329                    function.\r
330              (+++) Configure the RTC to detect the tamper or time stamp event using the\r
331                    RTC_TimeStampConfig(), RTC_TamperTriggerConfig() and RTC_TamperCmd()\r
332                    functions.\r
333 \r
334     (+) Comparator auto-wakeup (AWU) from the Stop mode\r
335         (++) To wake up from the Stop mode with an comparator 1 or comparator 2 wakeup\r
336              event, it is necessary to:\r
337              (+++) Configure the EXTI Line 21 for comparator 1 or EXTI Line 22 for comparator 2 \r
338                    to be sensitive to to the selected edges (falling, rising or falling \r
339                    and rising) (Interrupt or Event modes) using the EXTI_Init() function.\r
340              (+++) Configure the comparator to generate the event.\r
341 \r
342 @endverbatim\r
343   * @{\r
344   */\r
345 \r
346 /**\r
347   * @brief  Enters Sleep mode.\r
348   * @note   In Sleep mode, all I/O pins keep the same state as in Run mode.\r
349   * @param  PWR_SLEEPEntry: specifies if SLEEP mode in entered with WFI or WFE instruction.\r
350   *         This parameter can be one of the following values:\r
351   *             @arg PWR_SLEEPEntry_WFI: enter SLEEP mode with WFI instruction\r
352   *             @arg PWR_SLEEPEntry_WFE: enter SLEEP mode with WFE instruction\r
353   * @retval None\r
354   */\r
355 void PWR_EnterSleepMode(uint8_t PWR_SLEEPEntry)\r
356 {\r
357   /* Check the parameters */\r
358   assert_param(IS_PWR_SLEEP_ENTRY(PWR_SLEEPEntry));\r
359 \r
360   /* Clear SLEEPDEEP bit of Cortex-M0 System Control Register */\r
361   SCB->SCR &= (uint32_t)~((uint32_t)SCB_SCR_SLEEPDEEP_Msk);\r
362   \r
363   /* Select SLEEP mode entry -------------------------------------------------*/\r
364   if(PWR_SLEEPEntry == PWR_SLEEPEntry_WFI)\r
365   {\r
366     /* Request Wait For Interrupt */\r
367     __WFI();\r
368   }\r
369   else\r
370   {\r
371     /* Request Wait For Event */\r
372     __WFE();\r
373   }\r
374 }\r
375 \r
376 /**\r
377   * @brief  Enters STOP mode.\r
378   * @note   In Stop mode, all I/O pins keep the same state as in Run mode.\r
379   * @note   When exiting Stop mode by issuing an interrupt or a wakeup event, \r
380   *         the HSI RC oscillator is selected as system clock.\r
381   * @note   When the voltage regulator operates in low power mode, an additional \r
382   *         startup delay is incurred when waking up from Stop mode. \r
383   *         By keeping the internal regulator ON during Stop mode, the consumption \r
384   *         is higher although the startup time is reduced.\r
385   * @param  PWR_Regulator: specifies the regulator state in STOP mode.\r
386   *         This parameter can be one of the following values:\r
387   *             @arg PWR_Regulator_ON: STOP mode with regulator ON\r
388   *             @arg PWR_Regulator_LowPower: STOP mode with regulator in low power mode\r
389   * @param  PWR_STOPEntry: specifies if STOP mode in entered with WFI or WFE instruction.\r
390   *         This parameter can be one of the following values:\r
391   *             @arg PWR_STOPEntry_WFI: enter STOP mode with WFI instruction\r
392   *             @arg PWR_STOPEntry_WFE: enter STOP mode with WFE instruction\r
393   * @retval None\r
394   */\r
395 void PWR_EnterSTOPMode(uint32_t PWR_Regulator, uint8_t PWR_STOPEntry)\r
396 {\r
397   uint32_t tmpreg = 0;\r
398 \r
399   /* Check the parameters */\r
400   assert_param(IS_PWR_REGULATOR(PWR_Regulator));\r
401   assert_param(IS_PWR_STOP_ENTRY(PWR_STOPEntry));\r
402 \r
403   /* Select the regulator state in STOP mode ---------------------------------*/\r
404   tmpreg = PWR->CR;\r
405   /* Clear PDDS and LPDSR bits */\r
406   tmpreg &= CR_DS_MASK;\r
407 \r
408   /* Set LPDSR bit according to PWR_Regulator value */\r
409   tmpreg |= PWR_Regulator;\r
410 \r
411   /* Store the new value */\r
412   PWR->CR = tmpreg;\r
413 \r
414   /* Set SLEEPDEEP bit of Cortex-M0 System Control Register */\r
415   SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;\r
416 \r
417   /* Select STOP mode entry --------------------------------------------------*/\r
418   if(PWR_STOPEntry == PWR_STOPEntry_WFI)\r
419   {\r
420     /* Request Wait For Interrupt */\r
421     __WFI();\r
422   }\r
423   else\r
424   {\r
425     /* Request Wait For Event */\r
426     __WFE();\r
427   }\r
428   /* Reset SLEEPDEEP bit of Cortex System Control Register */\r
429   SCB->SCR &= (uint32_t)~((uint32_t)SCB_SCR_SLEEPDEEP_Msk);  \r
430 }\r
431 \r
432 /**\r
433   * @brief  Enters STANDBY mode.\r
434   * @note   In Standby mode, all I/O pins are high impedance except for:\r
435   *         Reset pad (still available) \r
436   *         RTC_AF1 pin (PC13) if configured for Wakeup pin 2 (WKUP2), tamper, \r
437   *         time-stamp, RTC Alarm out, or RTC clock calibration out.\r
438   *         WKUP pin 1 (PA0) if enabled.\r
439   * @param  None\r
440   * @retval None\r
441   */\r
442 void PWR_EnterSTANDBYMode(void)\r
443 {\r
444   /* Clear Wakeup flag */\r
445   PWR->CR |= PWR_CR_CWUF;\r
446 \r
447   /* Select STANDBY mode */\r
448   PWR->CR |= PWR_CR_PDDS;\r
449 \r
450   /* Set SLEEPDEEP bit of Cortex-M0 System Control Register */\r
451   SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;\r
452 \r
453   /* Request Wait For Interrupt */\r
454   __WFI();\r
455 }\r
456 \r
457 /**\r
458   * @}\r
459   */\r
460 \r
461 /** @defgroup PWR_Group5 Flags management functions\r
462  *  @brief   Flags management functions \r
463  *\r
464 @verbatim\r
465   ==============================================================================\r
466                        ##### Flags management functions #####\r
467   ==============================================================================\r
468 \r
469 @endverbatim\r
470   * @{\r
471   */\r
472 \r
473 /**\r
474   * @brief  Checks whether the specified PWR flag is set or not.\r
475   * @param  PWR_FLAG: specifies the flag to check.\r
476   *         This parameter can be one of the following values:\r
477   *             @arg PWR_FLAG_WU: Wake Up flag. This flag indicates that a wakeup\r
478   *                  event was received from the WKUP pin or from the RTC alarm \r
479   *                  (Alarm A or Alarm B), RTC Tamper event or RTC TimeStamp event.\r
480   *             @arg PWR_FLAG_SB: StandBy flag. This flag indicates that the \r
481   *                  system was resumed from StandBy mode.\r
482   *             @arg PWR_FLAG_PVDO: PVD Output. This flag is valid only if PVD \r
483   *                  is enabled by the PWR_PVDCmd() function.\r
484   *             @arg PWR_FLAG_VREFINTRDY: Internal Voltage Reference Ready flag. \r
485   *                  This flag indicates the state of the internal voltage \r
486   *                  reference, VREFINT.\r
487   * @retval The new state of PWR_FLAG (SET or RESET).\r
488   */\r
489 FlagStatus PWR_GetFlagStatus(uint32_t PWR_FLAG)\r
490 {\r
491   FlagStatus bitstatus = RESET;\r
492   /* Check the parameters */\r
493   assert_param(IS_PWR_GET_FLAG(PWR_FLAG));\r
494 \r
495   if ((PWR->CSR & PWR_FLAG) != (uint32_t)RESET)\r
496   {\r
497     bitstatus = SET;\r
498   }\r
499   else\r
500   {\r
501     bitstatus = RESET;\r
502   }\r
503   /* Return the flag status */\r
504   return bitstatus;\r
505 }\r
506 \r
507 /**\r
508   * @brief  Clears the PWR's pending flags.\r
509   * @param  PWR_FLAG: specifies the flag to clear.\r
510   *         This parameter can be one of the following values:\r
511   *             @arg PWR_FLAG_WU: Wake Up flag\r
512   *             @arg PWR_FLAG_SB: StandBy flag\r
513   * @retval None\r
514   */\r
515 void PWR_ClearFlag(uint32_t PWR_FLAG)\r
516 {\r
517   /* Check the parameters */\r
518   assert_param(IS_PWR_CLEAR_FLAG(PWR_FLAG));\r
519 \r
520   PWR->CR |=  PWR_FLAG << 2;\r
521 }\r
522 \r
523 /**\r
524   * @}\r
525   */\r
526 \r
527 /**\r
528   * @}\r
529   */\r
530 \r
531 /**\r
532   * @}\r
533   */\r
534 \r
535 /**\r
536   * @}\r
537   */\r
538 \r
539 /******************* (C) COPYRIGHT 2012 STMicroelectronics *****END OF FILE****/\r