diff --git a/SDBlockDevice.cpp b/SDBlockDevice.cpp index 3dc70cc128..bba6b2b50e 100644 --- a/SDBlockDevice.cpp +++ b/SDBlockDevice.cpp @@ -148,9 +148,13 @@ #include /* Required version: 5.5.4 and above */ +#ifdef MBED_MAJOR_VERSION #if (MBED_VERSION < MBED_ENCODE_VERSION(5,5,4)) #error "Incompatible mbed-os version detected! Required 5.5.4 and above" #endif +#else +#warning "mbed-os version 5.5.4 or above required" +#endif #define SD_COMMAND_TIMEOUT 5000 /*!< Timeout in ms for response */ #define SD_CMD0_GO_IDLE_STATE_RETRIES 5 /*!< Number of retries for sending CMDO */