|  | LibDriver PCF8563
    | 
driver pcf8563 source file More...
#include "driver_pcf8563.h"Go to the source code of this file.
| Macros | |
| #define | CHIP_NAME "NXP PCF8563" | 
| chip information definition | |
| #define | MANUFACTURER_NAME "NXP" | 
| #define | SUPPLY_VOLTAGE_MIN 1.9f | 
| #define | SUPPLY_VOLTAGE_MAX 5.5f | 
| #define | MAX_CURRENT 0.80f | 
| #define | TEMPERATURE_MIN -40.0f | 
| #define | TEMPERATURE_MAX 85.0f | 
| #define | DRIVER_VERSION 1000 | 
| #define | PCF8563_REG_CONTROL_STATUS1 0x00 | 
| chip register definition | |
| #define | PCF8563_REG_CONTROL_STATUS2 0x01 | 
| #define | PCF8563_REG_SECOND 0x02 | 
| #define | PCF8563_REG_MINUTE 0x03 | 
| #define | PCF8563_REG_HOUR 0x04 | 
| #define | PCF8563_REG_DAY 0x05 | 
| #define | PCF8563_REG_WEEK 0x06 | 
| #define | PCF8563_REG_MONTH 0x07 | 
| #define | PCF8563_REG_YEAR 0x08 | 
| #define | PCF8563_REG_MINUTE_ALARM 0x09 | 
| #define | PCF8563_REG_HOUR_ALARM 0x0A | 
| #define | PCF8563_REG_DAY_ALARM 0x0B | 
| #define | PCF8563_REG_WEEK_ALARM 0x0C | 
| #define | PCF8563_REG_CLKOUT_CONTROL 0x0D | 
| #define | PCF8563_REG_TIMER_CONTROL 0x0E | 
| #define | PCF8563_REG_TIMER 0x0F | 
| #define | PCF8563_ADDRESS 0xA2 | 
| chip address definition | |
| Functions | |
| uint8_t | pcf8563_set_time (pcf8563_handle_t *handle, pcf8563_time_t *t) | 
| set the current time | |
| uint8_t | pcf8563_get_time (pcf8563_handle_t *handle, pcf8563_time_t *t) | 
| get the current time | |
| uint8_t | pcf8563_set_test_mode (pcf8563_handle_t *handle, pcf8563_bool_t enable) | 
| enable or disable test mode | |
| uint8_t | pcf8563_get_test_mode (pcf8563_handle_t *handle, pcf8563_bool_t *enable) | 
| get the test mode status | |
| uint8_t | pcf8563_set_rtc_stop (pcf8563_handle_t *handle, pcf8563_bool_t enable) | 
| enable or disable rtc stop | |
| uint8_t | pcf8563_get_rtc_stop (pcf8563_handle_t *handle, pcf8563_bool_t *enable) | 
| get the rtc stop status | |
| uint8_t | pcf8563_set_power_on_reset (pcf8563_handle_t *handle, pcf8563_bool_t enable) | 
| enable or disable power on reset | |
| uint8_t | pcf8563_get_power_on_reset (pcf8563_handle_t *handle, pcf8563_bool_t *enable) | 
| get the power on reset status | |
| uint8_t | pcf8563_set_minute_alarm_enable (pcf8563_handle_t *handle, pcf8563_bool_t enable) | 
| enable or disable minute alarm | |
| uint8_t | pcf8563_get_minute_alarm_enable (pcf8563_handle_t *handle, pcf8563_bool_t *enable) | 
| get the minute alarm status | |
| uint8_t | pcf8563_set_minute_alarm (pcf8563_handle_t *handle, uint8_t minute) | 
| set minute alarm | |
| uint8_t | pcf8563_get_minute_alarm (pcf8563_handle_t *handle, uint8_t *minute) | 
| get minute alarm | |
| uint8_t | pcf8563_set_hour_alarm_enable (pcf8563_handle_t *handle, pcf8563_bool_t enable) | 
| enable or disable hour alarm | |
| uint8_t | pcf8563_get_hour_alarm_enable (pcf8563_handle_t *handle, pcf8563_bool_t *enable) | 
| get the hour alarm status | |
| uint8_t | pcf8563_set_hour_alarm (pcf8563_handle_t *handle, uint8_t hour) | 
| set hour alarm | |
| uint8_t | pcf8563_get_hour_alarm (pcf8563_handle_t *handle, uint8_t *hour) | 
| get hour alarm | |
| uint8_t | pcf8563_set_day_alarm_enable (pcf8563_handle_t *handle, pcf8563_bool_t enable) | 
| enable or disable day alarm | |
| uint8_t | pcf8563_get_day_alarm_enable (pcf8563_handle_t *handle, pcf8563_bool_t *enable) | 
| get the day alarm status | |
| uint8_t | pcf8563_set_day_alarm (pcf8563_handle_t *handle, uint8_t day) | 
| set day alarm | |
| uint8_t | pcf8563_get_day_alarm (pcf8563_handle_t *handle, uint8_t *day) | 
| get day alarm | |
| uint8_t | pcf8563_set_week_alarm_enable (pcf8563_handle_t *handle, pcf8563_bool_t enable) | 
| enable or disable week alarm | |
| uint8_t | pcf8563_get_week_alarm_enable (pcf8563_handle_t *handle, pcf8563_bool_t *enable) | 
| get the week alarm status | |
| uint8_t | pcf8563_set_week_alarm (pcf8563_handle_t *handle, uint8_t week) | 
| set week alarm | |
| uint8_t | pcf8563_get_week_alarm (pcf8563_handle_t *handle, uint8_t *week) | 
| get week alarm | |
| uint8_t | pcf8563_set_clock_out_enable (pcf8563_handle_t *handle, pcf8563_bool_t enable) | 
| enable or disable clock out enable | |
| uint8_t | pcf8563_get_clock_out_enable (pcf8563_handle_t *handle, pcf8563_bool_t *enable) | 
| get clock out enable status | |
| uint8_t | pcf8563_set_clock_out (pcf8563_handle_t *handle, pcf8563_clock_out_t clk) | 
| set clock out | |
| uint8_t | pcf8563_get_clock_out (pcf8563_handle_t *handle, pcf8563_clock_out_t *clk) | 
| get clock out | |
| uint8_t | pcf8563_set_timer_enable (pcf8563_handle_t *handle, pcf8563_bool_t enable) | 
| enable or disable timer enable | |
| uint8_t | pcf8563_get_timer_enable (pcf8563_handle_t *handle, pcf8563_bool_t *enable) | 
| get timer enable status | |
| uint8_t | pcf8563_set_timer_freq (pcf8563_handle_t *handle, pcf8563_timer_freq_t freq) | 
| set timer freq | |
| uint8_t | pcf8563_get_timer_freq (pcf8563_handle_t *handle, pcf8563_timer_freq_t *freq) | 
| get timer freq | |
| uint8_t | pcf8563_set_timer_value (pcf8563_handle_t *handle, uint8_t value) | 
| set timer value | |
| uint8_t | pcf8563_get_timer_value (pcf8563_handle_t *handle, uint8_t *value) | 
| get timer value | |
| uint8_t | pcf8563_set_timer_interrupt (pcf8563_handle_t *handle, pcf8563_bool_t enable) | 
| enable or disable timer interrupt | |
| uint8_t | pcf8563_get_timer_interrupt (pcf8563_handle_t *handle, pcf8563_bool_t *enable) | 
| get timer interrupt status | |
| uint8_t | pcf8563_set_alarm_interrupt (pcf8563_handle_t *handle, pcf8563_bool_t enable) | 
| enable or disable alarm interrupt | |
| uint8_t | pcf8563_get_alarm_interrupt (pcf8563_handle_t *handle, pcf8563_bool_t *enable) | 
| get alarm interrupt status | |
| uint8_t | pcf8563_set_interrupt_mode (pcf8563_handle_t *handle, pcf8563_interrupt_mode_t mode) | 
| set the interrupt mode | |
| uint8_t | pcf8563_get_interrupt_mode (pcf8563_handle_t *handle, pcf8563_interrupt_mode_t *mode) | 
| get the interrupt mode | |
| uint8_t | pcf8563_irq_handler (pcf8563_handle_t *handle) | 
| irq handler | |
| uint8_t | pcf8563_clear_status (pcf8563_handle_t *handle, pcf8563_interrupt_event_t event) | 
| clear status | |
| uint8_t | pcf8563_init (pcf8563_handle_t *handle) | 
| initialize the chip | |
| uint8_t | pcf8563_deinit (pcf8563_handle_t *handle) | 
| close the chip | |
| uint8_t | pcf8563_set_reg (pcf8563_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len) | 
| set the chip register | |
| uint8_t | pcf8563_get_reg (pcf8563_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len) | 
| get the chip register | |
| uint8_t | pcf8563_info (pcf8563_info_t *info) | 
| get chip's information | |
driver pcf8563 source file
Copyright (c) 2015 - present LibDriver All rights reserved
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Date | Version | Author | Description | 
|---|---|---|---|
| 2024/11/30 | 1.0 | Shifeng Li | first upload | 
Definition in file driver_pcf8563.c.
| #define CHIP_NAME "NXP PCF8563" | 
| #define DRIVER_VERSION 1000 | 
driver version
Definition at line 49 of file driver_pcf8563.c.
| #define MANUFACTURER_NAME "NXP" | 
manufacturer name
Definition at line 43 of file driver_pcf8563.c.
| #define MAX_CURRENT 0.80f | 
chip max current
Definition at line 46 of file driver_pcf8563.c.
| #define PCF8563_ADDRESS 0xA2 | 
| #define PCF8563_REG_CLKOUT_CONTROL 0x0D | 
clkout control register
Definition at line 67 of file driver_pcf8563.c.
| #define PCF8563_REG_CONTROL_STATUS1 0x00 | 
| #define PCF8563_REG_CONTROL_STATUS2 0x01 | 
control status2 register
Definition at line 55 of file driver_pcf8563.c.
| #define PCF8563_REG_DAY 0x05 | 
day register
Definition at line 59 of file driver_pcf8563.c.
| #define PCF8563_REG_DAY_ALARM 0x0B | 
day alarm register
Definition at line 65 of file driver_pcf8563.c.
| #define PCF8563_REG_HOUR 0x04 | 
hour register
Definition at line 58 of file driver_pcf8563.c.
| #define PCF8563_REG_HOUR_ALARM 0x0A | 
hour alarm register
Definition at line 64 of file driver_pcf8563.c.
| #define PCF8563_REG_MINUTE 0x03 | 
minute register
Definition at line 57 of file driver_pcf8563.c.
| #define PCF8563_REG_MINUTE_ALARM 0x09 | 
minute alarm register
Definition at line 63 of file driver_pcf8563.c.
| #define PCF8563_REG_MONTH 0x07 | 
month register
Definition at line 61 of file driver_pcf8563.c.
| #define PCF8563_REG_SECOND 0x02 | 
second register
Definition at line 56 of file driver_pcf8563.c.
| #define PCF8563_REG_TIMER 0x0F | 
timer register
Definition at line 69 of file driver_pcf8563.c.
| #define PCF8563_REG_TIMER_CONTROL 0x0E | 
timer control register
Definition at line 68 of file driver_pcf8563.c.
| #define PCF8563_REG_WEEK 0x06 | 
week register
Definition at line 60 of file driver_pcf8563.c.
| #define PCF8563_REG_WEEK_ALARM 0x0C | 
week alarm register
Definition at line 66 of file driver_pcf8563.c.
| #define PCF8563_REG_YEAR 0x08 | 
year register
Definition at line 62 of file driver_pcf8563.c.
| #define SUPPLY_VOLTAGE_MAX 5.5f | 
chip max supply voltage
Definition at line 45 of file driver_pcf8563.c.
| #define SUPPLY_VOLTAGE_MIN 1.9f | 
chip min supply voltage
Definition at line 44 of file driver_pcf8563.c.
| #define TEMPERATURE_MAX 85.0f | 
chip max operating temperature
Definition at line 48 of file driver_pcf8563.c.
| #define TEMPERATURE_MIN -40.0f | 
chip min operating temperature
Definition at line 47 of file driver_pcf8563.c.