aboutsummaryrefslogtreecommitdiff
path: root/Source/Serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Serial.c')
-rw-r--r--Source/Serial.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/Serial.c b/Source/Serial.c
index 714581d..c7b085a 100644
--- a/Source/Serial.c
+++ b/Source/Serial.c
@@ -30,6 +30,7 @@ typedef enum
* *************************************/
static volatile SERIAL_STATE SerialState;
+static volatile bool serial_busy;
/* *************************************
* Local Prototypes
@@ -62,6 +63,7 @@ bool SerialRead(uint8_t* ptrArray, size_t nBytes)
bool SerialWrite(void* ptrArray, size_t nBytes)
{
+ serial_busy = true;
if(nBytes == 0)
{
@@ -79,9 +81,16 @@ bool SerialWrite(void* ptrArray, size_t nBytes)
}while(--nBytes);
+ serial_busy = false;
+
return true;
}
+volatile bool SerialIsBusy(void)
+{
+ return serial_busy;
+}
+
#ifdef SERIAL_INTERFACE
void Serial_printf(const char* str, ...)
{