diff options
| author | Xavier ASUS <xavi92psx@gmail.com> | 2018-11-25 18:02:18 +0100 |
|---|---|---|
| committer | Xavier ASUS <xavi92psx@gmail.com> | 2018-11-25 18:02:18 +0100 |
| commit | 64dbf5cdd5c16ab6ccdadcfd66949aba5b8fa1e2 (patch) | |
| tree | d408c06ac5573c35eaee8fd451114fd73acde2f8 /Source/Serial.c | |
| parent | 135a1e93cb9b3a859c4269a94ababe33b3558f9a (diff) | |
| download | airport-64dbf5cdd5c16ab6ccdadcfd66949aba5b8fa1e2.tar.gz | |
Bugfix: minutes were not being retrieved from PLT files.
Game.c: parking slots cannot be selected if an aircraft in STATE_PARKED state is on it.
Other fixes and improvements.
Added some tiles from TILESET2.TIM
Diffstat (limited to 'Source/Serial.c')
| -rw-r--r-- | Source/Serial.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/Source/Serial.c b/Source/Serial.c index 57d9bb4..b654412 100644 --- a/Source/Serial.c +++ b/Source/Serial.c @@ -1,11 +1,11 @@ /* ************************************* - * Includes + * Includes * *************************************/ #include "Serial.h" /* ************************************* - * Defines + * Defines * *************************************/ #define SERIAL_BAUDRATE 115200 @@ -15,7 +15,7 @@ #define SERIAL_PRINTF_INTERNAL_BUFFER_SIZE 256 /* ************************************** - * Structs and enums * + * Structs and enums * * *************************************/ typedef enum @@ -26,21 +26,29 @@ typedef enum }SERIAL_STATE; /* ************************************* - * Local Variables + * Local Variables * *************************************/ static volatile SERIAL_STATE SerialState; static volatile bool serial_busy; +static void ISR_Serial(void); /* ************************************* - * Local Prototypes + * Local Prototypes * *************************************/ void SerialInit(void) { + SetSIOHandler(&ISR_Serial); + SIOStart(115200); } +static void ISR_Serial(void) +{ + Serial_printf("SIO\n"); +} + bool SerialRead(uint8_t* ptrArray, size_t nBytes) { if (nBytes == 0) @@ -100,10 +108,10 @@ void Serial_printf(const char* str, ...) va_start(ap, str); - result = vsnprintf( internal_buffer, - SERIAL_PRINTF_INTERNAL_BUFFER_SIZE, - str, - ap ); + result = vsnprintf( internal_buffer, + SERIAL_PRINTF_INTERNAL_BUFFER_SIZE, + str, + ap ); SerialWrite(internal_buffer, result); } |
