--------------------------------------------------------------------------------
    Copyright (c) 2018,'19 Kenji Arai / JH1PJL
        http://www.page.sannet.ne.jp/kenjia/index.html
        https://os.mbed.com/users/kenjiArai/
            Created:    April     10th, 2018
            Revised:    December  31st, 2019
--------------------------------------------------------------------------------
  
////////////// SUMMARY /////////////////////////////////////////////////////////
mbed-os_TYBLE16 Library is intended to apply only for AE-TYBLE16 Module.

Hardware
ONLY FOR "TYBLE-16"
    Akizuki BLE Module AE-TYBLE16
    http://akizukidenshi.com/catalog/g/gK-12339/

This library consisted following contents.
1)  mbed-os-5.15.0 source files
    https://github.com/ARMmbed/mbed-os/releases/tag/mbed-os-5.15.0
2)  Deleted unused directories and files
3)  Modified only three files, (1) mbed.h, (2) PinNames.h, and (3) targets.json.
4)  Added two files, (1) TYBLE16_Base.h, (2) Check_TYBLE16.cpp

Mbed On-line compiler -> Target board: choose "Nordic nRF51-DK"
    https://os.mbed.com/platforms/Nordic-nRF51-DK/

The compiled HEX file will not work on the original board, nRF51-DK.
It can be operated only with TYBLE-16.
The reason is that it forcibly produces the following conditions.
1) Use 32MHz External Crystal as HFCLK
2) LFCLK is not an external crystal but an Internal RC oscillation
    
////////////// MUST items //////////////////////////////////////////////////////
//..............................................................................
\mbed-os\
mbed.h
------ original
    see original_files directory mbed.h.txt

------ Modify   added TARGET_NRF51_DK line
#ifndef MBED_H
#define MBED_H

#if !defined(TARGET_NRF51_DK)
#error "Please select Nordic nRF51-DK (Use as TYBLE16)"
// Please refer following page 
// https://os.mbed.com/platforms/Nordic-nRF51-DK/
#endif

//..............................................................................
\mbed-os5_TYBLE16_BASE\targets\targets.json
------ original
    see original_files directory targets.json.txt

line7235
------ original("value": "NRF_LF_SRC_XTAL")
        "config": {
            "lf_clock_src": {
                "value": "NRF_LF_SRC_XTAL",
                "macro_name": "MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC"
            },
            "uart_hwfc": {
                "help": "Value: 1 for enable, 0 for disable",
                "value": 1,
                "macro_name": "MBED_CONF_NORDIC_UART_HWFC"
            }
        },

------ Modify  ("value": "NRF_LF_SRC_RC")
        "config": {
            "lf_clock_src": {
                "value": "NRF_LF_SRC_RC",
                "macro_name": "MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC"
            },
            "uart_hwfc": {
                "help": "Value: 1 for enable, 0 for disable",
                "value": 1,
                "macro_name": "MBED_CONF_NORDIC_UART_HWFC"
            }
        },

line7280
------ original
    "NRF51_DK": {
        "supported_form_factors": ["ARDUINO"],
        "inherits": ["MCU_NRF51_32K_UNIFIED"],
        "device_has": [
            "USTICKER",
            "LPTICKER",
            "ANALOGIN",
            "I2C",
            "I2C_ASYNCH",
            "INTERRUPTIN",
            "PORTIN",
            "PORTINOUT",
            "PORTOUT",
            "PWMOUT",
            "SERIAL",
            "SERIAL_ASYNCH",
            "SERIAL_FC",
            "SLEEP",
            "SPI",
            "SPI_ASYNCH",
            "SPISLAVE"
        ],
        "release_versions": ["2", "5"],
        "device_name": "nRF51822_xxAA"
    },
    
------ Modify  (modified all line)
    "NRF51_DK": {
        "inherits": ["MCU_NRF51_32K_UNIFIED"],
        "macros_add": ["TARGET_NRF_32MHZ_XTAL"],
        "overrides": {"lf_clock_src": "NRF_LF_SRC_RC"},
        "device_has": [
            "USTICKER",
            "LPTICKER",
            "ANALOGIN",
            "I2C",
            "I2C_ASYNCH",
            "INTERRUPTIN",
            "PORTIN",
            "PORTINOUT",
            "PORTOUT",
            "PWMOUT",
            "SERIAL",
            "SERIAL_ASYNCH",
            "SERIAL_FC",
            "SLEEP",
            "SPI",
            "SPI_ASYNCH",
            "SPISLAVE"
        ],
        "detect_code": ["1019"],
        "release_versions": ["2", "5"],
        "overrides": {"uart_hwfc": 0},
        "device_name": "nRF51822_xxAA"
    },

//..............................................................................
\mbed-os5_TYBLE16_BASE\targets\TERGET_NORDIC\TARGET_NRF5x\TARGET_NRF51\TERGET_MCU_NRF51822_UNIFIED\TARGET_NRF51_DK\PinNames.h
------ original
    see original_files directory PinNames.h.txt

line121
------ original
    LED1    = p21,
    LED2    = p22,
    LED3    = p23,
    LED4    = p24,

    BUTTON1 = p17,
    BUTTON2 = p18,
    BUTTON3 = p19,
    BUTTON4 = p20,

    RX_PIN_NUMBER  = p11,
    TX_PIN_NUMBER  = p9,
    CTS_PIN_NUMBER = p10,
    RTS_PIN_NUMBER = p8,

    // mBed interface Pins
    USBTX = TX_PIN_NUMBER,
    USBRX = RX_PIN_NUMBER,

    SPI_PSELMOSI0 = p25,
    SPI_PSELMISO0 = p28,
    SPI_PSELSS0   = p24,
    SPI_PSELSCK0  = p29,

    SPI_PSELMOSI1 = p13,
    SPI_PSELMISO1 = p14,
    SPI_PSELSS1   = p12,
    SPI_PSELSCK1  = p15,

    SPIS_PSELMOSI = p13,
    SPIS_PSELMISO = p14,
    SPIS_PSELSS   = p12,
    SPIS_PSELSCK  = p15,

    I2C_SDA0 = p30,
    I2C_SCL0 = p7,

    D0  = p12,
    D1  = p13,
    D2  = p14,
    D3  = p15,
    D4  = p16,
    D5  = p17,
    D6  = p18,
    D7  = p19,

    D8  = p20,
    D9  = p23,
    D10 = p24,
    D11 = p25,
    D12 = p28,
    D13 = p29,

    D14 = p30,
    D15 = p7,

    A0  = p1,
    A1  = p2,
    A2  = p3,
    A3  = p4,
    A4  = p5,
    A5  = p6,

------ Modify  (modified all line)
    LED1    = p19,
    LED2    = p19,
    LED3    = p19,
    LED4    = p19,

    BUTTON1 = p0,
    BUTTON2 = p0,
    BUTTON3 = p0,
    BUTTON4 = p0,

    RX_PIN_NUMBER  = p3,
    TX_PIN_NUMBER  = p1,
    CTS_PIN_NUMBER = p2,
    RTS_PIN_NUMBER = p0,

    // mBed interface Pins
    USBTX = TX_PIN_NUMBER,
    USBRX = RX_PIN_NUMBER,

    SPI_PSELMOSI0 = p21,
    SPI_PSELMISO0 = p4,
    SPI_PSELSS0   = p6,
    SPI_PSELSCK0  = p5,

    SPIS_PSELMOSI = p21,
    SPIS_PSELMISO = p4,
    SPIS_PSELSS   = p6,
    SPIS_PSELSCK  = p5,

    I2C_SDA = p23,
    I2C_SCL = p17,

    D0  = p6,
    D1  = p4,
    D2  = p21,
    D3  = p23,
    D4  = p17,
    D5  = p0,
    D6  = p1,
    D7  = p3,
    D8  = p25,
    D9  = p19,

    A0  = p5,
    A1  = p2,
