summaryrefslogtreecommitdiffstats
path: root/mcc_generated_files/uart1.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mcc_generated_files/uart1.c (renamed from mcc_generated_files/uart1.cpp)22
1 files changed, 15 insertions, 7 deletions
diff --git a/mcc_generated_files/uart1.cpp b/mcc_generated_files/uart1.c
index 96ed3e3..bf35ee3 100644
--- a/mcc_generated_files/uart1.cpp
+++ b/mcc_generated_files/uart1.c
@@ -47,7 +47,11 @@
Section: Included Files
*/
-#include "uart1.hpp"
+#include "uart1.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
/**
Section: Data Type Definitions
@@ -59,7 +63,7 @@
Defines the object required for the status of the queue.
*/
-union UART_BYTEQ_STATUS
+typedef union
{
struct
{
@@ -68,7 +72,7 @@ union UART_BYTEQ_STATUS
uint8_t reserved:6;
} s;
uint8_t status;
-};
+} UART_BYTEQ_STATUS;
/** UART Driver Hardware Instance Object
@@ -76,7 +80,7 @@ union UART_BYTEQ_STATUS
Defines the object required for the maintenance of the hardware instance.
*/
-struct UART_OBJECT
+typedef struct
{
/* RX Byte Q */
uint8_t *rxTail;
@@ -88,7 +92,7 @@ struct UART_OBJECT
UART_BYTEQ_STATUS rxStatus;
UART_BYTEQ_STATUS txStatus;
-};
+} UART_OBJECT;
static UART_OBJECT uart1_obj;
@@ -326,7 +330,7 @@ UART1_TRANSFER_STATUS UART1_TransferStatusGet (void)
status |= UART1_TRANSFER_STATUS_RX_DATA_PRESENT;
}
- return static_cast<UART1_TRANSFER_STATUS>(status);
+ return (UART1_TRANSFER_STATUS) status;
}
@@ -380,7 +384,7 @@ bool UART1_TransmitBufferIsFull(void)
UART1_STATUS UART1_StatusGet (void)
{
- return static_cast<UART1_STATUS>(U1STA);
+ return (UART1_STATUS) U1STA;
}
@@ -388,3 +392,7 @@ UART1_STATUS UART1_StatusGet (void)
/**
End of File
*/
+
+#ifdef __cplusplus
+}
+#endif \ No newline at end of file