From 64dbf5cdd5c16ab6ccdadcfd66949aba5b8fa1e2 Mon Sep 17 00:00:00 2001 From: Xavier ASUS Date: Sun, 25 Nov 2018 18:02:18 +0100 Subject: 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 --- Source/Serial.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'Source/Serial.c') 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); } -- cgit v1.2.3