aboutsummaryrefslogtreecommitdiff
path: root/Source/Serial.c
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-07-27 07:41:25 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2017-07-27 07:41:25 +0200
commit153f078ec20cc442dd4dbe802dbd5fcb1748fcca (patch)
treedb82fe5fe9f6165b2239f3523d5f02ec8d9fa02b /Source/Serial.c
parentcb1c0345c766fada621b521ca39aac02ae25056b (diff)
downloadairport-153f078ec20cc442dd4dbe802dbd5fcb1748fcca.tar.gz
* Added comments on System.
* Files needed for Game are now only loaded once, except from LEVEL1.PLT. * Added DevMenu to get debug info. * ISR_LoadMenuVBlank() does not stop when accessing SIO. * On fopen() and SERIAL_INTERFACE defined, "#" is prepended and "@" is appended to filename string.
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, ...)
{