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