Several examples run on only mbed-os5.13.0 (not 5.14.0)

Dependencies:   BD_SD_DISCO_F769NI BSP_DISCO_F769NI LCD_DISCO_F769NI TS_DISCO_F769NI USBHost_F769NI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers check_revision.cpp Source File

check_revision.cpp

00001 /*
00002  * Check Mbed revision
00003  *
00004  * Copyright (c) 2019 Kenji Arai / JH1PJL
00005  *  http://www.page.sannet.ne.jp/kenjia/index.html
00006  *  https://os.mbed.com/users/kenjiArai/
00007  *      Created:    July      17th, 2019
00008  *      Revised:    October   14th, 2019
00009  */
00010 
00011 #include "mbed.h"
00012 
00013 #if 0   // as of Oct.14th, Latest revision does not work for DISCO-F769
00014 // #1 RTC -> NG -> pc.readable() does not work
00015 // #2 LCD -> NG -> LCD screen is not stable
00016 // #3 Tiuch -> NG -> LCD screen is not stable
00017 // #4 & beyond -> Gave up for checking
00018 
00019 //    RUN ONLY ON mbed-os5.14.0
00020 #if (MBED_MAJOR_VERSION == 5) &&\
00021     (MBED_MINOR_VERSION == 14) &&\
00022     (MBED_PATCH_VERSION == 0)
00023     #if defined(TARGET_STM32F769NI)
00024         // correct mbed-os version
00025     #else
00026         #error "Not DISCO-F769NI"
00027     #endif
00028 #else
00029     //#warning "Please use Mbed-os5.14.0"
00030     #error "Please use Mbed-os5.14.0"
00031 #endif
00032 
00033 #else   // Only works well this revision
00034 
00035 //    RUN ONLY ON mbed-os5.13.0
00036 #if (MBED_MAJOR_VERSION == 5) &&\
00037     (MBED_MINOR_VERSION == 13) &&\
00038     (MBED_PATCH_VERSION == 0)
00039     #if defined(TARGET_STM32F769NI)
00040         // correct mbed-os version
00041     #else
00042         #error "Not DISCO-F769NI"
00043     #endif
00044 #else
00045     //#warning "Please use Mbed-os5.13.0"
00046     #error "Please use Mbed-os5.13.0(7482462434 25 Jun 2019 Martin Kojtal)"
00047 #endif
00048 
00049 #endif