MAX31341/2 RTC Driver

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Max31341.cpp Source File

Max31341.cpp

00001 /*******************************************************************************
00002 * Copyright (C) 2018 Maxim Integrated Products, Inc., All rights Reserved.
00003 *
00004 * This software is protected by copyright laws of the United States and
00005 * of foreign countries. This material may also be protected by patent laws
00006 * and technology transfer regulations of the United States and of foreign
00007 * countries. This software is furnished under a license agreement and/or a
00008 * nondisclosure agreement and may only be used or reproduced in accordance
00009 * with the terms of those agreements. Dissemination of this information to
00010 * any party or parties not specified in the license agreement and/or
00011 * nondisclosure agreement is expressly prohibited.
00012 *
00013 * The above copyright notice and this permission notice shall be included
00014 * in all copies or substantial portions of the Software.
00015 *
00016 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00017 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00018 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00019 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
00020 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00021 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00022 * OTHER DEALINGS IN THE SOFTWARE.
00023 *
00024 * Except as contained in this notice, the name of Maxim Integrated
00025 * Products, Inc. shall not be used except as stated in the Maxim Integrated
00026 * Products, Inc. Branding Policy.
00027 *
00028 * The mere transfer of this software does not imply any licenses
00029 * of trade secrets, proprietary technology, copyrights, patents,
00030 * trademarks, maskwork rights, or any other form of intellectual
00031 * property whatsoever. Maxim Integrated Products, Inc. retains all
00032 * ownership rights.
00033 *******************************************************************************
00034 */
00035 #include "Max31341.h"
00036 
00037 const RtcBase::regmap_t Max31341::regmap = {
00038     /*.config_reg1         = */MAX31341_REG_CONFIG_REG1_ADDR,
00039     /*.config_reg2         = */MAX31341_REG_CONFIG_REG2_ADDR,
00040     /*.int_ploarity_config = */MAX31341_REG_INT_POLARITY_CONFIG_ADDR,
00041     /*.timer_config        = */MAX31341_REG_TIMER_CONFIG_ADDR,
00042     /*.int_en_reg          = */MAX31341_REG_INT_EN_REG_ADDR,
00043     /*.int_status_reg      = */MAX31341_REG_INT_STATUS_REG_ADDR,
00044     /*.seconds             = */MAX31341_REG_SECONDS_ADDR,
00045     /*.minutes             = */MAX31341_REG_MINUTES_ADDR,
00046     /*.hours               = */MAX31341_REG_HOURS_ADDR,
00047     /*.day                 = */MAX31341_REG_DAY_ADDR,
00048     /*.date                = */MAX31341_REG_DATE_ADDR,
00049     /*.month               = */MAX31341_REG_MONTH_ADDR,
00050     /*.year                = */MAX31341_REG_YEAR_ADDR,
00051     /*.alm1_sec            = */MAX31341_REG_ALM1_SEC_ADDR,
00052     /*.alm1_min            = */MAX31341_REG_ALM1_MIN_ADDR,
00053     /*.alm1_hrs            = */MAX31341_REG_ALM1_HRS_ADDR,
00054     /*.alm1day_date        = */MAX31341_REG_ALM1DAY_DATE_ADDR,
00055     /*.alm1_mon            = */RtcBase::REG_NOT_AVAILABLE,
00056     /*.alm1_year           = */RtcBase::REG_NOT_AVAILABLE,
00057     /*.alm2_min            = */MAX31341_REG_ALM2_MIN_ADDR,
00058     /*.alm2_hrs            = */MAX31341_REG_ALM2_HRS_ADDR,
00059     /*.alm2day_date        = */MAX31341_REG_ALM2DAY_DATE_ADDR,
00060     /*.timer_count         = */MAX31341_REG_TIMER_COUNT_ADDR,
00061     /*.timer_init          = */MAX31341_REG_TIMER_INIT_ADDR,
00062     /*.ram_start           = */MAX31341_REG_RAM_START_ADDR,
00063     /*.ram_end             = */MAX31341_REG_RAM_END_ADDR,
00064     /*.pwr_mgmt_reg        = */MAX31341_REG_PWR_MGMT_REG_ADDR,
00065     /*.trickle_reg         = */MAX31341_REG_TRICKLE_REG_ADDR,
00066     /*.clock_sync_delay    = */MAX31341_REG_CLOCK_SYNC_REG,
00067 };
00068