Source
data[RTC_HOUR_ADDR] |= (tmp->tm_year - CONFIG_SYS_M41T11_BASE_YEAR) > 100 ? 0x40 : 0;
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2002
* Andrew May, Viasat Inc, amay@viasat.com
*/
/*
* M41T11 Serial Access Timekeeper(R) SRAM
* can you believe a trademark on that?
*/
/* #define DEBUG 1 */
/*
I Don't have an example config file but this
is what should be done.
#define CONFIG_RTC_M41T11 1
#define CONFIG_SYS_I2C_RTC_ADDR 0x68
#if 0
#define CONFIG_SYS_M41T11_EXT_CENTURY_DATA
#else
#define CONFIG_SYS_M41T11_BASE_YEAR 2000
#endif
*/
/* ------------------------------------------------------------------------- */
/*
these are simple defines for the chip local to here so they aren't too
verbose
DAY/DATE aren't nice but that is how they are on the data sheet
*/
/*
you only get 00-99 for the year we will asume you
want from the year 2000 if you don't set the config
*/