Loading...
Searching...
No Matches
max31343_internal.h File Reference

MAX31343 internal register map and bit field definitions. More...

Detailed Description

MAX31343 internal register map and bit field definitions.

Author
Jakob Müller ja.mu.nosp@m.elle.nosp@m.r@tuh.nosp@m.h.de

Definition in file max31343_internal.h.

#include <stdint.h>
+ Include dependency graph for max31343_internal.h:

Go to the source code of this file.

Macros

#define MAX31343_I2C_ADDR   (0x68U)
 7-bit I2C device address (slave byte = 0xD0)
 
#define MAX31343_REG_STATUS   (0x00U)
 Status register.
 
#define MAX31343_REG_INT_EN   (0x01U)
 Interrupt enable register.
 
#define MAX31343_REG_RTC_RESET   (0x02U)
 RTC reset register.
 
#define MAX31343_REG_RTC_CFG1   (0x03U)
 RTC configuration register 1.
 
#define MAX31343_REG_RTC_CFG2   (0x04U)
 RTC configuration register 2.
 
#define MAX31343_REG_TIMER_CFG   (0x05U)
 Timer configuration register.
 
#define MAX31343_REG_TEMP_MSB   (0x1AU)
 Temperature MSB register.
 
#define MAX31343_REG_TEMP_LSB   (0x1BU)
 Temperature LSB register.
 
#define MAX31343_REG_TS_CONFIG   (0x1CU)
 Temperature sensor configuration register.
 
#define MAX31343_REG_TIME0   (0x06U)
 First time register (seconds)
 
#define MAX31343_TIME_LEN   (7U)
 Number of time registers (sec..year)
 
#define MAX31343_RTC_CFG1_ENOSC   (1U << 1)
 Enable oscillator bit in RTC_CFG1.
 
#define MAX31343_RTC_CFG2_SQW_HZ_MASK   (0x07U)
 SQW frequency field mask in RTC_CFG2.
 
#define MAX31343_MONTH_CENTURY   (1U << 7)
 Century bit in month register.
 
#define MAX31343_TS_AUTOMODE   (1U << 7)
 Automatic temperature conversion enable bit.
 
#define MAX31343_TS_TTSINT_MASK   (0x38U)
 Temperature conversion interval field mask.
 
#define MAX31343_TS_TTSINT_SHIFT   (3U)
 Temperature conversion interval field shift.
 
#define MAX31343_REG_ALM1_SEC   (0x0DU)
 Alarm 1 seconds register.
 
#define MAX31343_REG_ALM1_MIN   (0x0EU)
 Alarm 1 minutes register.
 
#define MAX31343_REG_ALM1_HRS   (0x0FU)
 Alarm 1 hours register.
 
#define MAX31343_REG_ALM1_DAY_DATE   (0x10U)
 Alarm 1 day/date register.
 
#define MAX31343_REG_ALM1_MON   (0x11U)
 Alarm 1 month register.
 
#define MAX31343_REG_ALM1_YEAR   (0x12U)
 Alarm 1 year register.
 
#define MAX31343_ALM1_LEN   (6U)
 Number of alarm 1 registers.
 
#define MAX31343_ALM_MASK_BIT   (1U << 7)
 Alarm mask bit (disables field matching)
 
#define MAX31343_ALM_DY_DT   (1U << 6)
 Day/date select bit in alarm day register.
 
#define MAX31343_STATUS_A1F   (1U << 0)
 Alarm 1 flag in status register.
 
#define MAX31343_STATUS_A2F   (1U << 1)
 Alarm 2 flag in status register.
 
#define MAX31343_STATUS_OSF   (1U << 6)
 Oscillator stop flag; set on power-on, cleared by writing time registers.
 
#define MAX31343_INTEN_A1IE   (1U << 0)
 Alarm 1 interrupt enable bit.
 
#define MAX31343_INTEN_A2IE   (1U << 1)
 Alarm 2 interrupt enable bit.
 
#define MAX31343_REG_TRICKLE   (0x19U)
 Trickle charger configuration register.
 
#define MAX31343_TRICKLE_TCHE_SHIFT   (4U)
 TCHE field shift in trickle register.
 
#define MAX31343_TRICKLE_TCHE_MASK   (0xF0U)
 TCHE field mask in trickle register.
 
#define MAX31343_TRICKLE_TCHE_ENABLE   (0x5U)
 Only value that enables trickle charger; all other values disable it.
 
#define MAX31343_TRICKLE_D_MASK   (0x0FU)
 D_TRICKLE field mask.
 
#define MAX31343_TRICKLE_D_CHARGER_OFF   (1U << 3)
 Charger path disable bit (0=ON, 1=OFF)
 
#define MAX31343_TRICKLE_D_DIODE   (1U << 2)
 Diode select bit (0=no diode, 1=with diode)
 
#define MAX31343_TRICKLE_D_RES_MASK   (0x03U)
 Resistor selection field mask.
 

Macro Definition Documentation

◆ MAX31343_ALM1_LEN

#define MAX31343_ALM1_LEN   (6U)

Number of alarm 1 registers.

Definition at line 53 of file max31343_internal.h.

◆ MAX31343_ALM_DY_DT

#define MAX31343_ALM_DY_DT   (1U << 6)

Day/date select bit in alarm day register.

Definition at line 56 of file max31343_internal.h.

◆ MAX31343_ALM_MASK_BIT

#define MAX31343_ALM_MASK_BIT   (1U << 7)

Alarm mask bit (disables field matching)

Definition at line 55 of file max31343_internal.h.

◆ MAX31343_I2C_ADDR

#define MAX31343_I2C_ADDR   (0x68U)

7-bit I2C device address (slave byte = 0xD0)

Definition at line 21 of file max31343_internal.h.

◆ MAX31343_INTEN_A1IE

#define MAX31343_INTEN_A1IE   (1U << 0)

Alarm 1 interrupt enable bit.

Definition at line 63 of file max31343_internal.h.

◆ MAX31343_INTEN_A2IE

#define MAX31343_INTEN_A2IE   (1U << 1)

Alarm 2 interrupt enable bit.

Definition at line 64 of file max31343_internal.h.

◆ MAX31343_MONTH_CENTURY

#define MAX31343_MONTH_CENTURY   (1U << 7)

Century bit in month register.

Definition at line 41 of file max31343_internal.h.

◆ MAX31343_REG_ALM1_DAY_DATE

#define MAX31343_REG_ALM1_DAY_DATE   (0x10U)

Alarm 1 day/date register.

Definition at line 50 of file max31343_internal.h.

◆ MAX31343_REG_ALM1_HRS

#define MAX31343_REG_ALM1_HRS   (0x0FU)

Alarm 1 hours register.

Definition at line 49 of file max31343_internal.h.

◆ MAX31343_REG_ALM1_MIN

#define MAX31343_REG_ALM1_MIN   (0x0EU)

Alarm 1 minutes register.

Definition at line 48 of file max31343_internal.h.

◆ MAX31343_REG_ALM1_MON

#define MAX31343_REG_ALM1_MON   (0x11U)

Alarm 1 month register.

Definition at line 51 of file max31343_internal.h.

◆ MAX31343_REG_ALM1_SEC

#define MAX31343_REG_ALM1_SEC   (0x0DU)

Alarm 1 seconds register.

Definition at line 47 of file max31343_internal.h.

◆ MAX31343_REG_ALM1_YEAR

#define MAX31343_REG_ALM1_YEAR   (0x12U)

Alarm 1 year register.

Definition at line 52 of file max31343_internal.h.

◆ MAX31343_REG_INT_EN

#define MAX31343_REG_INT_EN   (0x01U)

Interrupt enable register.

Definition at line 25 of file max31343_internal.h.

◆ MAX31343_REG_RTC_CFG1

#define MAX31343_REG_RTC_CFG1   (0x03U)

RTC configuration register 1.

Definition at line 27 of file max31343_internal.h.

◆ MAX31343_REG_RTC_CFG2

#define MAX31343_REG_RTC_CFG2   (0x04U)

RTC configuration register 2.

Definition at line 28 of file max31343_internal.h.

◆ MAX31343_REG_RTC_RESET

#define MAX31343_REG_RTC_RESET   (0x02U)

RTC reset register.

Definition at line 26 of file max31343_internal.h.

◆ MAX31343_REG_STATUS

#define MAX31343_REG_STATUS   (0x00U)

Status register.

Definition at line 24 of file max31343_internal.h.

◆ MAX31343_REG_TEMP_LSB

#define MAX31343_REG_TEMP_LSB   (0x1BU)

Temperature LSB register.

Definition at line 31 of file max31343_internal.h.

◆ MAX31343_REG_TEMP_MSB

#define MAX31343_REG_TEMP_MSB   (0x1AU)

Temperature MSB register.

Definition at line 30 of file max31343_internal.h.

◆ MAX31343_REG_TIME0

#define MAX31343_REG_TIME0   (0x06U)

First time register (seconds)

Definition at line 34 of file max31343_internal.h.

◆ MAX31343_REG_TIMER_CFG

#define MAX31343_REG_TIMER_CFG   (0x05U)

Timer configuration register.

Definition at line 29 of file max31343_internal.h.

◆ MAX31343_REG_TRICKLE

#define MAX31343_REG_TRICKLE   (0x19U)

Trickle charger configuration register.

Definition at line 66 of file max31343_internal.h.

◆ MAX31343_REG_TS_CONFIG

#define MAX31343_REG_TS_CONFIG   (0x1CU)

Temperature sensor configuration register.

Definition at line 32 of file max31343_internal.h.

◆ MAX31343_RTC_CFG1_ENOSC

#define MAX31343_RTC_CFG1_ENOSC   (1U << 1)

Enable oscillator bit in RTC_CFG1.

Definition at line 37 of file max31343_internal.h.

◆ MAX31343_RTC_CFG2_SQW_HZ_MASK

#define MAX31343_RTC_CFG2_SQW_HZ_MASK   (0x07U)

SQW frequency field mask in RTC_CFG2.

Definition at line 39 of file max31343_internal.h.

◆ MAX31343_STATUS_A1F

#define MAX31343_STATUS_A1F   (1U << 0)

Alarm 1 flag in status register.

Definition at line 58 of file max31343_internal.h.

◆ MAX31343_STATUS_A2F

#define MAX31343_STATUS_A2F   (1U << 1)

Alarm 2 flag in status register.

Definition at line 59 of file max31343_internal.h.

◆ MAX31343_STATUS_OSF

#define MAX31343_STATUS_OSF   (1U << 6)

Oscillator stop flag; set on power-on, cleared by writing time registers.

Definition at line 60 of file max31343_internal.h.

◆ MAX31343_TIME_LEN

#define MAX31343_TIME_LEN   (7U)

Number of time registers (sec..year)

Definition at line 35 of file max31343_internal.h.

◆ MAX31343_TRICKLE_D_CHARGER_OFF

#define MAX31343_TRICKLE_D_CHARGER_OFF   (1U << 3)

Charger path disable bit (0=ON, 1=OFF)

Definition at line 72 of file max31343_internal.h.

◆ MAX31343_TRICKLE_D_DIODE

#define MAX31343_TRICKLE_D_DIODE   (1U << 2)

Diode select bit (0=no diode, 1=with diode)

Definition at line 73 of file max31343_internal.h.

◆ MAX31343_TRICKLE_D_MASK

#define MAX31343_TRICKLE_D_MASK   (0x0FU)

D_TRICKLE field mask.

Definition at line 71 of file max31343_internal.h.

◆ MAX31343_TRICKLE_D_RES_MASK

#define MAX31343_TRICKLE_D_RES_MASK   (0x03U)

Resistor selection field mask.

Definition at line 75 of file max31343_internal.h.

◆ MAX31343_TRICKLE_TCHE_ENABLE

#define MAX31343_TRICKLE_TCHE_ENABLE   (0x5U)

Only value that enables trickle charger; all other values disable it.

Definition at line 69 of file max31343_internal.h.

◆ MAX31343_TRICKLE_TCHE_MASK

#define MAX31343_TRICKLE_TCHE_MASK   (0xF0U)

TCHE field mask in trickle register.

Definition at line 68 of file max31343_internal.h.

◆ MAX31343_TRICKLE_TCHE_SHIFT

#define MAX31343_TRICKLE_TCHE_SHIFT   (4U)

TCHE field shift in trickle register.

Definition at line 67 of file max31343_internal.h.

◆ MAX31343_TS_AUTOMODE

#define MAX31343_TS_AUTOMODE   (1U << 7)

Automatic temperature conversion enable bit.

Definition at line 43 of file max31343_internal.h.

◆ MAX31343_TS_TTSINT_MASK

#define MAX31343_TS_TTSINT_MASK   (0x38U)

Temperature conversion interval field mask.

Definition at line 44 of file max31343_internal.h.

◆ MAX31343_TS_TTSINT_SHIFT

#define MAX31343_TS_TTSINT_SHIFT   (3U)

Temperature conversion interval field shift.

Definition at line 45 of file max31343_internal.h.