aboutsummaryrefslogtreecommitdiff
path: root/Source/Serial.c
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-08-30 23:29:57 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2017-08-30 23:29:57 +0200
commit69027a04e3d2eb10708243295dec3655c4ccdca5 (patch)
tree62f03f16d4fab87392757e621b3d394a592b615f /Source/Serial.c
parent0cfdfaf95927f0bc25d34744292c41d0d344c5e2 (diff)
downloadairport-69027a04e3d2eb10708243295dec3655c4ccdca5.tar.gz
* Minor changes (spaces between "if"/"for"... instructions).
+ Added output ELF file with debugging symbols for nocash.
Diffstat (limited to 'Source/Serial.c')
-rw-r--r--Source/Serial.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/Serial.c b/Source/Serial.c
index c7b085a..8711245 100644
--- a/Source/Serial.c
+++ b/Source/Serial.c
@@ -43,7 +43,7 @@ void SerialInit(void)
bool SerialRead(uint8_t* ptrArray, size_t nBytes)
{
- if(nBytes == 0)
+ if (nBytes == 0)
{
dprintf("SerialRead: invalid size %d\n", nBytes);
return false;
@@ -53,10 +53,10 @@ bool SerialRead(uint8_t* ptrArray, size_t nBytes)
{
//uint16_t timeout = SERIAL_TX_RX_TIMEOUT;
- while( (SIOCheckInBuffer() == SERIAL_RX_FIFO_EMPTY)); // Wait for RX FIFO not empty
+ while ( (SIOCheckInBuffer() == SERIAL_RX_FIFO_EMPTY)); // Wait for RX FIFO not empty
*(ptrArray++) = SIOReadByte();
- }while(--nBytes);
+ }while (--nBytes);
return true;
}
@@ -65,7 +65,7 @@ bool SerialWrite(void* ptrArray, size_t nBytes)
{
serial_busy = true;
- if(nBytes == 0)
+ if (nBytes == 0)
{
dprintf("SerialWrite: invalid size %d\n", nBytes);
return false;
@@ -75,11 +75,11 @@ bool SerialWrite(void* ptrArray, size_t nBytes)
{
//uint16_t timeout = SERIAL_TX_RX_TIMEOUT;
- while( (SIOCheckOutBuffer() == SERIAL_TX_NOT_READY)); // Wait for TX FIFO empty.
+ while ( (SIOCheckOutBuffer() == SERIAL_TX_NOT_READY)); // Wait for TX FIFO empty.
SIOSendByte(*(uint8_t*)ptrArray++);
- }while(--nBytes);
+ }while (--nBytes);
serial_busy = false;
@@ -108,4 +108,3 @@ void Serial_printf(const char* str, ...)
SerialWrite(internal_buffer, result);
}
#endif // SERIAL_INTERFACE
-