Go to the documentation of this file.
34 #ifndef __PCF85263_H__
35 #define __PCF85263_H__
49 #define PCF85263_REG_100TH_SECONDS 0x00
50 #define PCF85263_REG_SECONDS 0x01
51 #define PCF85263_REG_MINUTES 0x02
52 #define PCF85263_REG_HOURS 0x03
53 #define PCF85263_REG_DAYS 0x04
54 #define PCF85263_REG_WEEKDAYS 0x05
55 #define PCF85263_REG_MONTHS 0x06
56 #define PCF85263_REG_YEARS 0x07
57 #define PCF85263_REG_SECOND_ALARM1 0x08
58 #define PCF85263_REG_MINUTE_ALARM1 0x09
59 #define PCF85263_REG_HOUR_ALARM1 0x0A
60 #define PCF85263_REG_DAY_ALARM1 0x0B
61 #define PCF85263_REG_MONTH_ALARM1 0x0C
62 #define PCF85263_REG_MINUTE_ALARM2 0x0D
63 #define PCF85263_REG_HOUR_ALARM2 0x0E
64 #define PCF85263_REG_WEEKDAY_ALARM2 0x0F
65 #define PCF85263_REG_ALARM_ENABLES 0x10
66 #define PCF85263_REG_TSR1_SECONDS 0x11
67 #define PCF85263_REG_TSR1_MINUTES 0x12
68 #define PCF85263_REG_TSR1_HOURS 0x13
69 #define PCF85263_REG_TSR1_DAYS 0x14
70 #define PCF85263_REG_TSR1_MONTHS 0x15
71 #define PCF85263_REG_TSR1_YEARS 0x16
72 #define PCF85263_REG_TSR2_SECONDS 0x17
73 #define PCF85263_REG_TSR2_MINUTES 0x18
74 #define PCF85263_REG_TSR2_HOURS 0x19
75 #define PCF85263_REG_TSR2_DAYS 0x1A
76 #define PCF85263_REG_TSR2_MONTHS 0x1B
77 #define PCF85263_REG_TSR2_YEARS 0x1C
78 #define PCF85263_REG_TSR3_SECONDS 0x1D
79 #define PCF85263_REG_TSR3_MINUTES 0x1E
80 #define PCF85263_REG_TSR3_HOURS 0x1F
81 #define PCF85263_REG_TSR3_DAYS 0x20
82 #define PCF85263_REG_TSR3_MONTHS 0x21
83 #define PCF85263_REG_TSR3_YEARS 0x22
84 #define PCF85263_REG_TSR_MODE 0x23
85 #define PCF85263_REG_OFFSET 0x24
86 #define PCF85263_REG_OSCILLATOR 0x25
87 #define PCF85263_REG_BATTERY_SWITCH 0x26
88 #define PCF85263_REG_PIN_IO 0x27
89 #define PCF85263_REG_FUNCTION 0x28
90 #define PCF85263_REG_INTA_ENABLE 0x29
91 #define PCF85263_REG_INTB_ENABLE 0x2A
92 #define PCF85263_REG_FLAGS 0x2B
93 #define PCF85263_REG_RAM_BYTE 0x2C
94 #define PCF85263_REG_WATCH_DOG 0x2D
95 #define PCF85263_REG_STOP_ENABLE 0x2E
96 #define PCF85263_REG_RESETS 0x2F
98 #define PCF85263_CPR 0xA4
99 #define PCF85263_BATTERY_SW_MSK NO_OS_BIT(4)
152 uint8_t mask, uint8_t reg_data);
167 #endif //__PCF85263_H__
#define PCF85263_REG_MONTHS
Definition: pcf85263.h:55
Structure holding the date parameters.
Definition: pcf85263.h:109
#define PCF85263_REG_BATTERY_SWITCH
Definition: pcf85263.h:87
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
#define PCF85263_CPR
Definition: pcf85263.h:98
#define PCF85263_REG_SECONDS
Definition: pcf85263.h:50
int pcf85263_write(struct pcf85263_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Write device register.
Definition: pcf85263.c:72
#define PCF85263_REG_HOURS
Definition: pcf85263.h:52
uint8_t mon
Definition: pcf85263.h:114
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
uint8_t battery_en
Definition: pcf85263.h:125
#define PCF85263_REG_MINUTES
Definition: pcf85263.h:51
Header file of Delay functions.
uint8_t battery_en
Definition: pcf85263.h:135
#define PCF85263_BATTERY_SW_MSK
Definition: pcf85263.h:99
uint8_t hr
Definition: pcf85263.h:112
#define PCF85263_REG_YEARS
Definition: pcf85263.h:56
Definition: ad9361_util.h:69
int pcf85263_read(struct pcf85263_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Read device register.
Definition: pcf85263.c:54
int pcf85263_remove(struct pcf85263_dev *dev)
Remove the device and release resources.
Definition: pcf85263.c:251
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
struct no_os_i2c_desc * i2c_desc
Definition: pcf85263.h:134
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
uint8_t day
Definition: pcf85263.h:113
#define PCF85263_REG_DAYS
Definition: pcf85263.h:53
PCF85263 Device structure.
Definition: pcf85263.h:132
int pcf85263_init(struct pcf85263_dev **device, struct pcf85263_init_param init_param)
Initialize the device.
Definition: pcf85263.c:113
int pcf85263_set_date(struct pcf85263_dev *dev, struct pcf85263_date date)
Set date.
Definition: pcf85263.c:154
int pcf85263_remove(struct pcf85263_dev *dev)
Remove the device and release resources.
Definition: pcf85263.c:251
Header file of pcf85263 Driver.
int pcf85263_read_ts(struct pcf85263_dev *dev, struct pcf85263_date *ts)
Read time stamp.
Definition: pcf85263.c:203
int pcf85263_update_bits(struct pcf85263_dev *dev, uint8_t reg_addr, uint8_t mask, uint8_t reg_data)
Update specific register bits.
Definition: pcf85263.c:90
uint8_t sec
Definition: pcf85263.h:110
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:101
struct no_os_i2c_init_param * i2c_init
Definition: pcf85263.h:124
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.
uint8_t year
Definition: pcf85263.h:115
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
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
#define PCF85263_REG_STOP_ENABLE
Definition: pcf85263.h:95
#define no_os_bcd2bin(x)
Definition: no_os_util.h:123
#define PCF85263_REG_RESETS
Definition: pcf85263.h:96
int pcf85263_write(struct pcf85263_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Write device register.
Definition: pcf85263.c:72
int pcf85263_read(struct pcf85263_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Read device register.
Definition: pcf85263.c:54
#define PCF85263_REG_100TH_SECONDS
Definition: pcf85263.h:49
int pcf85263_init(struct pcf85263_dev **device, struct pcf85263_init_param init_param)
Initialize the device.
Definition: pcf85263.c:113
Header file of utility functions.
int pcf85263_set_date(struct pcf85263_dev *dev, struct pcf85263_date date)
Set date.
Definition: pcf85263.c:154
int pcf85263_read_ts(struct pcf85263_dev *dev, struct pcf85263_date *ts)
Read time stamp.
Definition: pcf85263.c:203
int pcf85263_update_bits(struct pcf85263_dev *dev, uint8_t reg_addr, uint8_t mask, uint8_t reg_data)
Update specific register bits.
Definition: pcf85263.c:90
PCF85263 Device initialization parameters.
Definition: pcf85263.h:122
uint8_t min
Definition: pcf85263.h:111
Error macro definition for ARM Compiler.
#define no_os_bin2bcd(x)
Definition: no_os_util.h:124