/** ****************************************************************************** * @file platform_rtc.c * @author William Xu * @version V1.0.0 * @date 05-May-2014 * @brief This file provide RTC driver functions. ****************************************************************************** * UNPUBLISHED PROPRIETARY SOURCE CODE * Copyright (c) 2016 MXCHIP Inc. * * The contents of this file may not be disclosed to third parties, copied or * duplicated in any form, in whole or in part, without the prior written * permission of MXCHIP Corporation. ****************************************************************************** */ #include "platform.h" #include "platform_peripheral.h" /****************************************************** * Macros ******************************************************/ #define MICO_VERIFY_TIME(time, valid) \ if( (time->sec > 60) || ( time->min > 60 ) || (time->hr > 24) || ( time->date > 31 ) || ( time->month > 12 )) \ { \ valid= false; \ } \ else \ { \ valid= true; \ } /****************************************************** * Constants ******************************************************/ /****************************************************** * Enumerations ******************************************************/ /****************************************************** * Type Definitions ******************************************************/ /****************************************************** * Structures ******************************************************/ /****************************************************** * Variables Definitions ******************************************************/ platform_rtc_time_t mico_default_time = { /* set it to 12:20:30 08/04/2013 monday */ .sec = 30, .min = 20, .hr = 12, .weekday = 1, .date = 8, .month = 4, .year = 13 }; /****************************************************** * Function Declarations ******************************************************/ /****************************************************** * Function Definitions ******************************************************/ OSStatus platform_rtc_init(void) { //platform_log("unimplemented"); return kUnsupportedErr; } OSStatus platform_rtc_get_time( platform_rtc_time_t* time) { UNUSED_PARAMETER(time); platform_log("unimplemented"); return kUnsupportedErr; } OSStatus platform_rtc_set_time( const platform_rtc_time_t* time ) { UNUSED_PARAMETER(time); platform_log("unimplemented"); return kUnsupportedErr; }