]> git.donarmstrong.com Git - qmk_firmware.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L0/stm32l0xx_hal_gpio.c
Merge commit '1fe4406f374291ab2e86e95a97341fd9c475fcb8'
[qmk_firmware.git] / tmk_core / tool / mbed / mbed-sdk / libraries / mbed / targets / cmsis / TARGET_STM / TARGET_STM32L0 / stm32l0xx_hal_gpio.c
1 /**
2   ******************************************************************************
3   * @file    stm32l0xx_hal_gpio.c
4   * @author  MCD Application Team
5   * @version V1.2.0
6   * @date    06-February-2015
7   * @brief   GPIO HAL module driver.  
8   *          This file provides firmware functions to manage the following 
9   *          functionalities of the General Purpose Input/Output (GPIO) peripheral:
10   *           + Initialization and de-initialization functions
11   *           + IO operation functions
12   *         
13   @verbatim
14   ==============================================================================
15                     ##### GPIO Peripheral features #####
16   ==============================================================================
17   [..] 
18     (+) Each port bit of the general-purpose I/O (GPIO) ports can be individually 
19   configured by software in several modes:
20         (++) Input mode 
21         (++) Analog mode
22         (++) Output mode
23         (++) Alternate function mode
24         (++) External interrupt/event lines
25  
26     (+) During and just after reset, the alternate functions and external interrupt  
27   lines are not active and the I/O ports are configured in input floating mode.
28   
29     (+) All GPIO pins have weak internal pull-up and pull-down resistors, which can be 
30   activated or not.
31
32     (+) In Output or Alternate mode, each IO can be configured on open-drain or push-pull
33   type and the IO speed can be selected depending on the VDD value.
34   
35     (+) The microcontroller IO pins are connected to onboard peripherals/modules through a 
36         multiplexer that allows only one peripheral alternate function (AF) connected 
37   to an IO pin at a time. In this way, there can be no conflict between peripherals 
38   sharing the same IO pin. 
39
40     (+) All ports have external interrupt/event capability. To use external interrupt 
41   lines, the port must be configured in input mode. All available GPIO pins are 
42   connected to the 16 external interrupt/event lines from EXTI0 to EXTI15.
43   
44     (+) The external interrupt/event controller consists of up to 28 edge detectors
45   (16 lines are connected to GPIO) for generating event/interrupt requests (each 
46   input line can be independently configured to select the type (interrupt or event) 
47   and the corresponding trigger event (rising or falling or both). Each line can 
48   also be masked independently. 
49   
50                      ##### How to use this driver #####
51   ==============================================================================  
52   [..]             
53     (#) Enable the GPIO IOPORT clock using the following function: __HAL_RCC_GPIOx_CLK_ENABLE(). 
54
55     (#) Configure the GPIO pin(s) using HAL_GPIO_Init().
56         (++) Configure the IO mode using "Mode" member from GPIO_InitTypeDef structure
57         (++) Activate Pull-up, Pull-down resistor using "Pull" member from GPIO_InitTypeDef 
58              structure.
59         (++) In case of Output or alternate function mode selection: the speed is 
60              configured through "Speed" member from GPIO_InitTypeDef structure.
61         (++) In alternate mode is selection, the alternate function connected to the IO
62              is configured through "Alternate" member from GPIO_InitTypeDef structure.
63         (++) Analog mode is required when a pin is to be used as ADC channel 
64              or DAC output.
65         (++) In case of external interrupt/event selection the "Mode" member from 
66              GPIO_InitTypeDef structure select the type (interrupt or event) and 
67              the corresponding trigger event (rising or falling or both).
68    
69     (#) In case of external interrupt/event mode selection, configure NVIC IRQ priority 
70         mapped to the EXTI line using HAL_NVIC_SetPriority() and enable it using
71         HAL_NVIC_EnableIRQ().
72          
73    (#) HAL_GPIO_DeInit allows to set register values to their reset value. This function
74        is also to be used when unconfiguring pin which was used as an external interrupt
75        or in event mode. That is the only way to reset the corresponding bit in
76        EXTI & SYSCFG registers.
77
78     (#) To get the level of a pin configured in input mode use HAL_GPIO_ReadPin().
79             
80     (#) To set/reset the level of a pin configured in output mode use 
81         HAL_GPIO_WritePin()/HAL_GPIO_TogglePin().
82
83     (#) To lock pin configuration until next reset use HAL_GPIO_LockPin().
84
85     (#) During and just after reset, the alternate functions are not 
86         active and the GPIO pins are configured in input floating mode (except JTAG
87         pins).
88   
89     (#) The LSE oscillator pins OSC32_IN and OSC32_OUT can be used as general purpose 
90         (PC14 and PC15, respectively) when the LSE oscillator is off. The LSE has 
91         priority over the GPIO function.
92   
93     (#) The HSE oscillator pins OSC_IN/OSC_OUT can be used as 
94         general purpose PH0 and PH1, respectively, when the HSE oscillator is off. 
95         The HSE has priority over the GPIO function.
96   
97   @endverbatim
98   ******************************************************************************
99   * @attention
100   *
101   * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
102   *
103   * Redistribution and use in source and binary forms, with or without modification,
104   * are permitted provided that the following conditions are met:
105   *   1. Redistributions of source code must retain the above copyright notice,
106   *      this list of conditions and the following disclaimer.
107   *   2. Redistributions in binary form must reproduce the above copyright notice,
108   *      this list of conditions and the following disclaimer in the documentation
109   *      and/or other materials provided with the distribution.
110   *   3. Neither the name of STMicroelectronics nor the names of its contributors
111   *      may be used to endorse or promote products derived from this software
112   *      without specific prior written permission.
113   *
114   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
115   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
116   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
117   * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
118   * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
119   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
120   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
121   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
122   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
123   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
124   *
125   ******************************************************************************  
126   */ 
127
128 /* Includes ------------------------------------------------------------------*/
129 #include "stm32l0xx_hal.h"
130
131 /** @addtogroup STM32L0xx_HAL_Driver
132   * @{
133   */
134
135 /** @addtogroup GPIO
136   * @brief GPIO HAL module driver
137   * @{
138   */
139
140 #ifdef HAL_GPIO_MODULE_ENABLED
141
142 /* Private typedef -----------------------------------------------------------*/
143 /* Private define ------------------------------------------------------------*/
144 /* Private macro -------------------------------------------------------------*/
145
146  
147 #define GPIO_MODE             ((uint32_t)0x00000003)
148 #define EXTI_MODE             ((uint32_t)0x10000000)
149 #define GPIO_MODE_IT          ((uint32_t)0x00010000)
150 #define GPIO_MODE_EVT         ((uint32_t)0x00020000)
151 #define RISING_EDGE           ((uint32_t)0x00100000) 
152 #define FALLING_EDGE          ((uint32_t)0x00200000) 
153 #define GPIO_OUTPUT_TYPE      ((uint32_t)0x00000010)
154
155 #define GPIO_NUMBER           ((uint32_t)16)
156 /* Private variables ---------------------------------------------------------*/
157 /* Private function prototypes -----------------------------------------------*/
158 /* Private functions ---------------------------------------------------------*/
159
160 /** @addtogroup GPIO_Exported_Functions
161   * @{
162   */
163
164 /** @addtogroup GPIO_Exported_Functions_Group1
165  *  @brief    Initialization and de-initialization functions
166  *
167 @verbatim
168  ===============================================================================
169               ##### Initialization and de-initialization functions #####
170  ===============================================================================
171  
172 @endverbatim
173   * @{
174   */
175
176 /**
177   * @brief  Initializes the GPIOx peripheral according to the specified parameters in the GPIO_Init.
178   * @param  GPIOx: where x can be (A..E and H) to select the GPIO peripheral for STM32L0XX family devices.
179   *                Note that GPIOE is not available on all devices.
180   * @param  GPIO_Init: pointer to a GPIO_InitTypeDef structure that contains
181   *                    the configuration information for the specified GPIO peripheral.
182   * @retval None
183   */
184 void HAL_GPIO_Init(GPIO_TypeDef  *GPIOx, GPIO_InitTypeDef *GPIO_Init)
185 {
186   uint32_t position = 0x00;
187   uint32_t ioposition = 0x00;
188   uint32_t iocurrent = 0x00;
189   uint32_t temp = 0x00;
190  
191   /* Check the parameters */
192   assert_param(IS_GPIO_MODE(GPIO_Init->Mode));
193   assert_param(IS_GPIO_PULL(GPIO_Init->Pull));
194   assert_param(IS_GPIO_PIN_AVAILABLE(GPIOx,(GPIO_Init->Pin)));
195
196   /* Configure the port pins */
197   for(position = 0; position < GPIO_NUMBER; position++)
198   {
199     /* Get the IO position */
200     ioposition = ((uint32_t)0x01) << position;
201     /* Get the current IO position */
202     iocurrent = (uint32_t)(GPIO_Init->Pin) & ioposition;
203     
204     if(iocurrent == ioposition)
205     {
206       /*--------------------- GPIO Mode Configuration ------------------------*/
207       /* In case of Alternate function mode selection */
208       if((GPIO_Init->Mode == GPIO_MODE_AF_PP) || (GPIO_Init->Mode == GPIO_MODE_AF_OD)) 
209       {
210         /* Check the Alternate function parameter */
211         assert_param(IS_GPIO_AF(GPIO_Init->Alternate));
212         /* Check if the Alternate function is compliant with the GPIO in use */
213         assert_param(IS_GPIO_AF_AVAILABLE(GPIOx,(GPIO_Init->Alternate)));
214         /* Configure Alternate function mapped with the current IO */ 
215         temp = GPIOx->AFR[position >> 3];
216         temp &= ~((uint32_t)0xF << ((uint32_t)(position & (uint32_t)0x07) * 4)) ;
217         temp |= ((uint32_t)(GPIO_Init->Alternate) << (((uint32_t)position & (uint32_t)0x07) * 4)) ;
218         GPIOx->AFR[position >> 3] = temp;
219       } 
220
221       /* In case of Output or Alternate function mode selection */
222       if((GPIO_Init->Mode == GPIO_MODE_OUTPUT_PP) || (GPIO_Init->Mode == GPIO_MODE_AF_PP) ||
223          (GPIO_Init->Mode == GPIO_MODE_OUTPUT_OD) || (GPIO_Init->Mode == GPIO_MODE_AF_OD))
224       {
225         /* Check the Speed parameter */
226         assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
227         /* Configure the IO Speed */
228         temp = GPIOx->OSPEEDR;
229         temp &= ~(GPIO_OSPEEDER_OSPEED0 << (position * 2));
230         temp |= (GPIO_Init->Speed << (position * 2));
231         GPIOx->OSPEEDR = temp;
232
233         /* Configure the IO Output Type */
234         temp= GPIOx->OTYPER;
235         temp &= ~(GPIO_OTYPER_OT_0 << position) ;
236         temp |= (((GPIO_Init->Mode & GPIO_OUTPUT_TYPE) >> 4) << position);
237         GPIOx->OTYPER = temp;
238       }
239
240       /* Configure IO Direction mode (Input, Output, Alternate or Analog) */
241       temp = GPIOx->MODER;
242       temp &= ~(GPIO_MODER_MODE0 << (position * 2));
243       temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2));
244       GPIOx->MODER = temp;
245
246       /* Activate the Pull-up or Pull down resistor for the current IO */
247       temp = GPIOx->PUPDR;
248       temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2));
249       temp |= ((GPIO_Init->Pull) << (position * 2)); 
250       GPIOx->PUPDR = temp;
251
252       /*--------------------- EXTI Mode Configuration ------------------------*/
253       /* Configure the External Interrupt or event for the current IO */
254       if((GPIO_Init->Mode & EXTI_MODE) == EXTI_MODE) 
255       {
256         /* Enable SYSCFG Clock */
257         __HAL_RCC_SYSCFG_CLK_ENABLE();
258
259         temp = SYSCFG->EXTICR[position >> 2];
260         temp &= ~(((uint32_t)0x0F) << (4 * (position & 0x03)));
261         temp |= ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4 * (position & 0x03)));
262         SYSCFG->EXTICR[position >> 2] = temp;
263
264         /* Clear EXTI line configuration */
265         temp = EXTI->IMR;
266         temp &= ~((uint32_t)iocurrent);
267         if((GPIO_Init->Mode & GPIO_MODE_IT) == GPIO_MODE_IT)
268         {
269           temp |= iocurrent;
270         }
271         EXTI->IMR = temp;
272
273         temp = EXTI->EMR;
274         temp &= ~((uint32_t)iocurrent);
275         if((GPIO_Init->Mode & GPIO_MODE_EVT) == GPIO_MODE_EVT)
276         {
277           temp |= iocurrent;
278         }
279         EXTI->EMR = temp;
280
281         /* Clear Rising Falling edge configuration */
282         temp = EXTI->RTSR;
283         temp &= ~((uint32_t)iocurrent);
284         if((GPIO_Init->Mode & RISING_EDGE) == RISING_EDGE)
285         {
286           temp |= iocurrent;
287         }
288         EXTI->RTSR = temp;
289
290         temp = EXTI->FTSR;
291         temp &= ~((uint32_t)iocurrent);
292         if((GPIO_Init->Mode & FALLING_EDGE) == FALLING_EDGE)
293         {
294           temp |= iocurrent;
295         }
296         EXTI->FTSR = temp;
297       }
298     }
299   }
300 }
301
302 /**
303   * @brief  De-initializes the GPIOx peripheral registers to their default reset values.
304   * @param  GPIOx: where x can be (A..E and H) to select the GPIO peripheral for STM32L0XX family devices.
305   *                Note that GPIOE is not available on all devices.
306   * @param  GPIO_Pin: specifies the port bit to be written.
307   *                   This parameter can be one of GPIO_PIN_x where x can be (0..15).
308   *                   All port bits are not necessarily available on all GPIOs.
309   * @retval None
310   */
311 void HAL_GPIO_DeInit(GPIO_TypeDef  *GPIOx, uint32_t GPIO_Pin)
312
313   uint32_t position = 0x00;
314   uint32_t ioposition = 0x00;
315   uint32_t iocurrent = 0x00;
316   uint32_t tmp = 0x00;
317
318   /* Check the parameters */
319    assert_param(IS_GPIO_PIN_AVAILABLE(GPIOx,GPIO_Pin));
320
321   /* Configure the port pins */
322   for(position = 0; position < GPIO_NUMBER; position++)
323   {
324     /* Get the IO position */
325     ioposition = ((uint32_t)0x01) << position;
326     /* Get the current IO position */
327     iocurrent = (GPIO_Pin) & ioposition;
328     
329     if(iocurrent == ioposition)
330     {
331       /*------------------------- GPIO Mode Configuration --------------------*/
332       /* Configure IO Direction in Input Floting Mode */
333       GPIOx->MODER &= ~(GPIO_MODER_MODE0 << (position * 2));
334       
335       /* Configure the default Alternate Function in current IO */ 
336       GPIOx->AFR[position >> 3] &= ~((uint32_t)0xF << ((uint32_t)(position & (uint32_t)0x07) * 4)) ;
337       
338       /* Configure the default value for IO Speed */
339       GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEED0 << (position * 2));
340       
341       /* Configure the default value IO Output Type */
342       GPIOx->OTYPER  &= ~(GPIO_OTYPER_OT_0 << position) ;
343       
344       /* Deactivate the Pull-up oand Pull-down resistor for the current IO */
345       GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPD0 << (position * 2));
346       
347       
348       /*------------------------- EXTI Mode Configuration --------------------*/
349       /* Configure the External Interrupt or event for the current IO */
350       tmp = ((uint32_t)0x0F) << (4 * (position & 0x03));
351       SYSCFG->EXTICR[position >> 2] &= ~tmp;
352       
353       /* Clear EXTI line configuration */
354       EXTI->IMR &= ~((uint32_t)iocurrent);
355       EXTI->EMR &= ~((uint32_t)iocurrent);
356       
357       /* Clear Rising Falling edge configuration */
358       EXTI->RTSR &= ~((uint32_t)iocurrent);
359       EXTI->FTSR &= ~((uint32_t)iocurrent);
360     }
361   }
362 }
363
364 /**
365   * @}
366   */
367
368 /** @addtogroup GPIO_Exported_Functions_Group2
369  *  @brief   GPIO Read and Write
370  *
371 @verbatim
372  ===============================================================================
373                        ##### IO operation functions #####
374  ===============================================================================
375
376 @endverbatim
377   * @{
378   */
379
380 /**
381   * @brief  Reads the specified input port pin.
382   * @param  GPIOx: where x can be (A..E and H) to select the GPIO peripheral for STM32L0xx family devices.
383   *                Note that GPIOE is not available on all devices.
384   * @param  GPIO_Pin: specifies the port bit to read.
385   *                   This parameter can be GPIO_PIN_x where x can be (0..15).
386   *                   All port bits are not necessarily available on all GPIOs.
387   * @retval The input port pin value.
388   */
389 GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
390 {
391   GPIO_PinState bitstatus;
392   
393   /* Check the parameters */
394   assert_param(IS_GPIO_PIN_AVAILABLE(GPIOx,GPIO_Pin));
395   
396   if((GPIOx->IDR & GPIO_Pin) != (uint32_t)GPIO_PIN_RESET)
397   {
398     bitstatus = GPIO_PIN_SET;
399   }
400   else
401   {
402     bitstatus = GPIO_PIN_RESET;
403   }
404   return bitstatus;
405 }
406
407 /**
408   * @brief  Sets or clears the selected data port bit.
409   * 
410   * @note   This function uses GPIOx_BSRR register to allow atomic read/modify 
411   *         accesses. In this way, there is no risk of an IRQ occurring between
412   *         the read and the modify access.
413   *               
414   * @param  GPIOx: where x can be (A..E and H) to select the GPIO peripheral for STM32L0xx family devices.
415   *                Note that GPIOE is not available on all devices.
416   * @param  GPIO_Pin: specifies the port bit to be written.
417   *                   This parameter can be one of GPIO_PIN_x where x can be (0..15).
418   *                   All port bits are not necessarily available on all GPIOs.
419   * @param  PinState: specifies the value to be written to the selected bit.
420   *                   This parameter can be one of the GPIO_PinState enum values:
421   *                        GPIO_PIN_RESET: to clear the port pin
422   *                        GPIO_PIN_SET: to set the port pin
423   * @retval None
424   */
425 void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)
426 {
427   /* Check the parameters */
428   assert_param(IS_GPIO_PIN_AVAILABLE(GPIOx,GPIO_Pin));
429   assert_param(IS_GPIO_PIN_ACTION(PinState));
430   
431   if(PinState != GPIO_PIN_RESET)
432   {
433     GPIOx->BSRR = GPIO_Pin;
434   }
435   else
436   {
437     GPIOx->BRR = GPIO_Pin ;
438   }
439 }
440
441 /**
442   * @brief  Toggles the specified GPIO pins.
443   * @param  GPIOx: Where x can be (A..E and H) to select the GPIO peripheral for STM32L0xx family devices.
444   *                Note that GPIOE is not available on all devices.
445   *                All port bits are not necessarily available on all GPIOs.
446   * @param  GPIO_Pin: Specifies the pins to be toggled.
447   * @retval None
448   */
449 void HAL_GPIO_TogglePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
450 {
451   /* Check the parameters */
452   assert_param(IS_GPIO_PIN_AVAILABLE(GPIOx,GPIO_Pin));
453
454   GPIOx->ODR ^= GPIO_Pin;
455 }
456
457 /**
458 * @brief  Locks GPIO Pins configuration registers.
459 * @note   The locked registers are GPIOx_MODER, GPIOx_OTYPER, GPIOx_OSPEEDR,
460 *         GPIOx_PUPDR, GPIOx_AFRL and GPIOx_AFRH.
461 * @note   The configuration of the locked GPIO pins can no longer be modified
462 *         until the next reset.
463 * @param  GPIOx: where x can be (A..E and H) to select the GPIO peripheral for STM32L0xx family.
464 *                Note that GPIOE is not available on all devices.
465 * @param  GPIO_Pin: specifies the port bit to be locked.
466 *         This parameter can be any combination of GPIO_Pin_x where x can be (0..15).
467 *         All port bits are not necessarily available on all GPIOs.
468 * @retval None
469 */
470 HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
471 {
472   __IO uint32_t tmp = GPIO_LCKR_LCKK;
473
474   /* Check the parameters */
475   assert_param(IS_GPIO_PIN_AVAILABLE(GPIOx,GPIO_Pin));
476
477   /* Apply lock key write sequence */
478   tmp |= GPIO_Pin;
479   /* Set LCKx bit(s): LCKK='1' + LCK[15-0] */
480   GPIOx->LCKR = tmp;
481   /* Reset LCKx bit(s): LCKK='0' + LCK[15-0] */
482   GPIOx->LCKR = GPIO_Pin;
483   /* Set LCKx bit(s): LCKK='1' + LCK[15-0] */
484   GPIOx->LCKR = tmp;
485   /* Read LCKK bit*/
486   tmp = GPIOx->LCKR;
487
488   if((GPIOx->LCKR & GPIO_LCKR_LCKK) != RESET)
489   {
490     return HAL_OK;
491   }
492   else
493   {
494     return HAL_ERROR;
495   }
496 }
497 /**
498   * @brief  This function handles EXTI interrupt request.
499   * @param  GPIO_Pin: Specifies the pins connected to the EXTI line.
500   * @retval None
501   */
502 void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin)
503 {
504   /* EXTI line interrupt detected */
505   if(__HAL_GPIO_EXTI_GET_IT(GPIO_Pin) != RESET) 
506   { 
507     __HAL_GPIO_EXTI_CLEAR_IT(GPIO_Pin);
508     HAL_GPIO_EXTI_Callback(GPIO_Pin);
509   }
510 }
511
512 /**
513   * @brief  EXTI line detection callbacks.
514   * @param  GPIO_Pin: Specifies the pins connected to the EXTI line.
515   * @retval None
516   */
517 __weak void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
518 {
519   /* NOTE: This function Should not be modified, when the callback is needed,
520            the HAL_GPIO_EXTI_Callback could be implemented in the user file
521    */ 
522 }
523
524 /**
525   * @}
526   */
527
528
529 /**
530   * @}
531   */
532
533 #endif /* HAL_GPIO_MODULE_ENABLED */
534 /**
535   * @}
536   */
537
538 /**
539   * @}
540   */
541
542 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
543