Go to the documentation of this file.
42 #define MAX31343_I2C_ADDRESS 0x68
43 #define MAX31343_R_STATUS 0x00
44 #define MAX31343_R_INT_EN 0x01
45 #define MAX31343_R_RTC_RESET 0x02
46 #define MAX31343_R_CFG1 0x03
47 #define MAX31343_R_CFG2 0x04
48 #define MAX31343_R_TIMER_CONFIG 0x05
49 #define MAX31343_R_SECONDS 0x06
50 #define MAX31343_R_MINUTES 0x07
51 #define MAX31343_R_HOURS 0x08
52 #define MAX31343_R_DAY 0x09
53 #define MAX31343_R_DATE 0x0A
54 #define MAX31343_R_MONTH 0x0B
55 #define MAX31343_R_YEAR 0x0C
56 #define MAX31343_R_ALM1_SEC 0x0D
57 #define MAX31343_R_ALM1_MIN 0x0E
58 #define MAX31343_R_ALM1_HRS 0x0F
59 #define MAX31343_R_ALM1DAY_DATE 0x10
60 #define MAX31343_R_ALM1_MON 0x11
61 #define MAX31343_R_ALM1_YEAR 0x12
62 #define MAX31343_R_ALM2_MIN 0x13
63 #define MAX31343_R_ALM2_HRS 0x14
64 #define MAX31343_R_ALM2DAY_DATE 0x15
65 #define MAX31343_R_TIMER_COUNT 0x16
66 #define MAX31343_R_TIMER_INIT 0x17
67 #define MAX31343_R_PWR_MGMT 0x18
68 #define MAX31343_R_TRICKLE 0x19
69 #define MAX31343_R_TEMP_MSB 0x1A
70 #define MAX31343_R_TEMP_LSB 0x1B
71 #define MAX31343_R_TS_CONFIG 0x1C
72 #define MAX31343_R_RAM_REG_START 0x22
73 #define MAX31343_R_RAM_REG_END 0x61
76 #define MAX31343_F_STATUS_A1F NO_OS_BIT(0)
77 #define MAX31343_F_STATUS_A2F NO_OS_BIT(1)
78 #define MAX31343_F_STATUS_TIF NO_OS_BIT(2)
79 #define MAX31343_F_STATUS_TSF NO_OS_BIT(3)
80 #define MAX31343_F_STATUS_PFAIL NO_OS_BIT(5)
81 #define MAX31343_F_STATUS_OSF NO_OS_BIT(6)
82 #define MAX31343_F_STATUS_PSDECT NO_OS_BIT(7)
85 #define MAX31343_F_INT_EN_A1IE NO_OS_BIT(0)
86 #define MAX31343_F_INT_EN_A2IE NO_OS_BIT(1)
87 #define MAX31343_F_INT_EN_TIE NO_OS_BIT(2)
88 #define MAX31343_F_INT_EN_TSIE NO_OS_BIT(3)
89 #define MAX31343_F_INT_EN_PFAILE NO_OS_BIT(5)
90 #define MAX31343_F_INT_EN_DOSF NO_OS_BIT(6)
93 #define MAX31343_F_RTC_RESET_SWRST NO_OS_BIT(0)
96 #define MAX31343_F_CFG1_ENOSC NO_OS_BIT(1)
97 #define MAX31343_F_CFG1_I2C_TIMEOUT NO_OS_BIT(3)
98 #define MAX31343_F_CFG1_DATA_RET NO_OS_BIT(4)
101 #define MAX31343_F_CFG2_SQW_HZ NO_OS_BIT(0)
102 #define MAX31343_F_CFG2_CLKO_HZ NO_OS_BIT(3)
103 #define MAX31343_F_CFG2_ENCLKO NO_OS_BIT(7)
106 #define MAX31343_F_TIMER_CONFIG_TFS NO_OS_BIT(0)
107 #define MAX31343_F_TIMER_CONFIG_TRPT NO_OS_BIT(2)
108 #define MAX31343_F_TIMER_CONFIG_TPAUSE NO_OS_BIT(3)
109 #define MAX31343_F_TIMER_CONFIG_TE NO_OS_BIT(4)
112 #define MAX31343_F_PWR_MGMT_DMAN_SEL NO_OS_BIT(2)
113 #define MAX31343_F_PWR_MGMT_D_VBACK_SEL NO_OS_BIT(3)
114 #define MAX31343_F_PWR_MGMT_PFVT NO_OS_BIT(4)
117 #define MAX31343_F_TRICKLE_D_TRICKLE NO_OS_BIT(0)
118 #define MAX31343_F_TRICKLE_TCHE NO_OS_BIT(4)
121 #define MAX31343_F_TS_CONFIG_TTSINT NO_OS_BIT(3)
122 #define MAX31343_F_TS_CONFIG_ONESHOT_MODE NO_OS_BIT(6)
123 #define MAX31343_F_TS_CONFIG_AUTO_MODE NO_OS_BIT(7)
168 uint8_t mask, uint8_t reg_data);
#define MAX31343_R_DATE
Definition: max31343.h:53
uint8_t hr
Definition: max31343.h:132
#define MAX31343_R_CFG1
Definition: max31343.h:46
int32_t no_os_i2c_write(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Write data to slave device.
Definition: no_os_i2c.c:159
int32_t no_os_i2c_init(struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param)
Initialize the I2C communication peripheral.
Definition: no_os_i2c.c:52
max31343 Device initialization parameters.
Definition: max31343.h:142
int max31343_init(struct max31343_dev **device, struct max31343_init_param init_param)
Initialize the device.
Definition: max31343.c:108
#define MAX31343_R_YEAR
Definition: max31343.h:55
#define MAX31343_R_MINUTES
Definition: max31343.h:50
int max31343_reg_read_time_stamp(struct max31343_dev *dev, struct max31343_time_stamp *ts)
Read time stamp.
Definition: max31343.c:212
#define MAX31343_F_RTC_RESET_SWRST
Definition: max31343.h:93
int32_t no_os_i2c_remove(struct no_os_i2c_desc *desc)
Free the resources allocated by no_os_i2c_init().
Definition: no_os_i2c.c:113
int max31343_update_bits(struct max31343_dev *dev, uint8_t reg_addr, uint8_t mask, uint8_t reg_data)
Update specific register bits.
Definition: max31343.c:85
uint8_t mon
Definition: max31343.h:134
Header file of Delay functions.
struct no_os_gpio_init_param data
Definition: hmc630x.h:299
int max31343_reg_read(struct max31343_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Read device register.
Definition: max31343.c:47
Definition: ad9361_util.h:69
int max31343_remove(struct max31343_dev *dev)
Remove the device and release resources.
Definition: max31343.c:264
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
uint8_t min
Definition: max31343.h:131
struct no_os_i2c_desc * i2c_desc
Definition: max31343.h:154
uint8_t battery_en
Definition: max31343.h:155
struct no_os_i2c_init_param * i2c_init
Definition: max31343.h:144
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
int max31343_reg_read_time_stamp(struct max31343_dev *dev, struct max31343_time_stamp *ts)
Read time stamp.
Definition: max31343.c:212
#define MAX31343_R_SECONDS
Definition: max31343.h:49
int max31343_init(struct max31343_dev **device, struct max31343_init_param init_param)
Initialize the device.
Definition: max31343.c:108
int max31343_set_time_stamp(struct max31343_dev *dev, struct max31343_time_stamp ts)
Set time stamp.
Definition: max31343.c:159
int max31343_reg_write(struct max31343_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Write device register.
Definition: max31343.c:66
uint8_t day
Definition: max31343.h:133
#define MAX31343_R_RTC_RESET
Definition: max31343.h:45
#define MAX31343_F_CFG1_ENOSC
Definition: max31343.h:96
uint8_t battery_en
Definition: max31343.h:145
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:101
uint8_t year
Definition: max31343.h:135
int32_t no_os_i2c_read(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Read data from slave device.
Definition: no_os_i2c.c:190
Header file of I2C Interface.
int max31343_set_time_stamp(struct max31343_dev *dev, struct max31343_time_stamp ts)
Set time stamp.
Definition: max31343.c:159
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
int max31343_reg_write(struct max31343_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Write device register.
Definition: max31343.c:66
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
int max31343_remove(struct max31343_dev *dev)
Remove the device and release resources.
Definition: max31343.c:264
int max31343_update_bits(struct max31343_dev *dev, uint8_t reg_addr, uint8_t mask, uint8_t reg_data)
Update specific register bits.
Definition: max31343.c:85
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
#define no_os_bcd2bin(x)
Definition: no_os_util.h:123
Structure holding the date parameters.
Definition: max31343.h:129
#define MAX31343_R_MONTH
Definition: max31343.h:54
uint8_t sec
Definition: max31343.h:130
#define MAX31343_R_INT_EN
Definition: max31343.h:44
Header file of utility functions.
int max31343_reg_read(struct max31343_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Read device register.
Definition: max31343.c:47
max31343 Device structure.
Definition: max31343.h:152
Error macro definition for ARM Compiler.
#define no_os_bin2bcd(x)
Definition: no_os_util.h:124
#define MAX31343_R_HOURS
Definition: max31343.h:51