The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Revision:
160:5571c4ff569f
Parent:
156:ff21514d8981
--- a/TARGET_EFM32GG_STK3700/TARGET_Silicon_Labs/TARGET_EFM32/emlib/inc/em_leuart.h	Thu Nov 23 11:44:04 2017 +0000
+++ b/TARGET_EFM32GG_STK3700/TARGET_Silicon_Labs/TARGET_EFM32/emlib/inc/em_leuart.h	Wed Jan 17 16:13:02 2018 +0000
@@ -2,9 +2,9 @@
  * @file em_leuart.h
  * @brief Low Energy Universal Asynchronous Receiver/Transmitter (LEUART)
  *   peripheral API
- * @version 5.1.2
+ * @version 5.3.3
  *******************************************************************************
- * @section License
+ * # License
  * <b>Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com</b>
  *******************************************************************************
  *
@@ -58,16 +58,13 @@
  ******************************************************************************/
 
 /** Databit selection. */
-typedef enum
-{
+typedef enum {
   leuartDatabits8 = LEUART_CTRL_DATABITS_EIGHT,     /**< 8 databits. */
   leuartDatabits9 = LEUART_CTRL_DATABITS_NINE       /**< 9 databits. */
 } LEUART_Databits_TypeDef;
 
-
 /** Enable selection. */
-typedef enum
-{
+typedef enum {
   /** Disable both receiver and transmitter. */
   leuartDisable  = 0x0,
 
@@ -81,31 +78,25 @@
   leuartEnable   = (LEUART_CMD_RXEN | LEUART_CMD_TXEN)
 } LEUART_Enable_TypeDef;
 
-
 /** Parity selection. */
-typedef enum
-{
+typedef enum {
   leuartNoParity   = LEUART_CTRL_PARITY_NONE,    /**< No parity. */
   leuartEvenParity = LEUART_CTRL_PARITY_EVEN,    /**< Even parity. */
   leuartOddParity  = LEUART_CTRL_PARITY_ODD      /**< Odd parity. */
 } LEUART_Parity_TypeDef;
 
-
 /** Stopbits selection. */
-typedef enum
-{
+typedef enum {
   leuartStopbits1 = LEUART_CTRL_STOPBITS_ONE,           /**< 1 stopbits. */
   leuartStopbits2 = LEUART_CTRL_STOPBITS_TWO            /**< 2 stopbits. */
 } LEUART_Stopbits_TypeDef;
 
-
 /*******************************************************************************
  *******************************   STRUCTS   ***********************************
  ******************************************************************************/
 
 /** Init structure. */
-typedef struct
-{
+typedef struct {
   /** Specifies whether TX and/or RX shall be enabled when init completed. */
   LEUART_Enable_TypeDef   enable;
 
@@ -130,15 +121,14 @@
 
 /** Default config for LEUART init structure. */
 #define LEUART_INIT_DEFAULT                                                                 \
-{                                                                                           \
-  leuartEnable,      /* Enable RX/TX when init completed. */                                \
-  0,                 /* Use current configured reference clock for configuring baudrate. */ \
-  9600,              /* 9600 bits/s. */                                                     \
-  leuartDatabits8,   /* 8 databits. */                                                      \
-  leuartNoParity,    /* No parity. */                                                       \
-  leuartStopbits1    /* 1 stopbit. */                                                       \
-}
-
+  {                                                                                         \
+    leuartEnable,    /* Enable RX/TX when init completed. */                                \
+    0,               /* Use current configured reference clock for configuring baudrate. */ \
+    9600,            /* 9600 bits/s. */                                                     \
+    leuartDatabits8, /* 8 databits. */                                                      \
+    leuartNoParity,  /* No parity. */                                                       \
+    leuartStopbits1  /* 1 stopbit. */                                                       \
+  }
 
 /*******************************************************************************
  *****************************   PROTOTYPES   **********************************
@@ -171,7 +161,6 @@
   leuart->IFC = flags;
 }
 
-
 /***************************************************************************//**
  * @brief
  *   Disable one or more LEUART interrupts.
@@ -188,7 +177,6 @@
   leuart->IEN &= ~flags;
 }
 
-
 /***************************************************************************//**
  * @brief
  *   Enable one or more LEUART interrupts.
@@ -210,7 +198,6 @@
   leuart->IEN |= flags;
 }
 
-
 /***************************************************************************//**
  * @brief
  *   Get pending LEUART interrupt flags.
@@ -230,7 +217,6 @@
   return leuart->IF;
 }
 
-
 /***************************************************************************//**
  * @brief
  *   Get enabled and pending LEUART interrupt flags.
@@ -262,7 +248,6 @@
   return leuart->IF & tmp;
 }
 
-
 /***************************************************************************//**
  * @brief
  *   Set one or more pending LEUART interrupts from SW.
@@ -279,7 +264,6 @@
   leuart->IFS = flags;
 }
 
-
 /***************************************************************************//**
  * @brief
  *   Get LEUART STATUS register.
@@ -302,7 +286,6 @@
 void LEUART_Tx(LEUART_TypeDef *leuart, uint8_t data);
 void LEUART_TxExt(LEUART_TypeDef *leuart, uint16_t data);
 
-
 /***************************************************************************//**
  * @brief
  *   Receive one 8 bit frame, (or part of a 9 bit frame).
@@ -336,7 +319,6 @@
   return (uint8_t)leuart->RXDATA;
 }
 
-
 /***************************************************************************//**
  * @brief
  *   Receive one 8-9 bit frame, with extended information.
@@ -370,7 +352,6 @@
   return (uint16_t)leuart->RXDATAX;
 }
 
-
 /** @} (end addtogroup LEUART) */
 /** @} (end addtogroup emlib) */