/* * Copyright (c) 2008-2012, Freescale Semiconductor, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * o Redistributions of source code must retain the above copyright notice, this list * of conditions and the following disclaimer. * * o Redistributions in binary form must reproduce the above copyright notice, this * list of conditions and the following disclaimer in the documentation and/or * other materials provided with the distribution. * * o Neither the name of Freescale Semiconductor, Inc. nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*! * @file print_version.c * @brief Contains function to print out the app release version. */ #include "sdk.h" #include "sdk_version.h" #include "board_id/board_id.h" //////////////////////////////////////////////////////////////////////////////// // Code //////////////////////////////////////////////////////////////////////////////// /*! * print out the diag release version info * */ void print_version(void) { char chip_str[64] = { 0 }; char chip_rev_str[64] = { 0 }; char board_str[64] = { 0 }; char board_rev_str[64] = { 0 }; fsl_board_id_t fsl_board_id = get_board_id(); chip_name(chip_str, fsl_board_id.B.CHIP_TYPE_ID, false); chip_revision(chip_rev_str, fsl_board_id.B.CHIP_REV_MAJOR, fsl_board_id.B.CHIP_REV_MINOR); board_name(board_str, BOARD_TYPE); board_revision(board_rev_str, BOARD_REVISION); printf("\n\n\n\n"); printf("**************************************************************************\n"); printf(" Platform SDK (%s) for %s %s %s %s\n", k_sdk_version, chip_str, chip_rev_str, board_str, board_rev_str); printf(" Build: %s, %s\n", __DATE__, __TIME__); printf(" %s\n", k_sdk_copyright); printf("**************************************************************************\n\n"); } //////////////////////////////////////////////////////////////////////////////// // EOF ////////////////////////////////////////////////////////////////////////////////