|  | LibDriver PCF8563
    | 
driver pcf8563 header file More...
#include <stdio.h>#include <stdint.h>#include <string.h>Go to the source code of this file.
| Data Structures | |
| struct | pcf8563_time_s | 
| pcf8563 time structure definition  More... | |
| struct | pcf8563_handle_s | 
| pcf8563 handle structure definition  More... | |
| struct | pcf8563_info_s | 
| pcf8563 information structure definition  More... | |
| Macros | |
| #define | DRIVER_PCF8563_LINK_INIT(HANDLE, STRUCTURE) | 
| initialize pcf8563_handle_t structure | |
| #define | DRIVER_PCF8563_LINK_IIC_INIT(HANDLE, FUC) | 
| link iic_init function | |
| #define | DRIVER_PCF8563_LINK_IIC_DEINIT(HANDLE, FUC) | 
| link iic_deinit function | |
| #define | DRIVER_PCF8563_LINK_IIC_READ(HANDLE, FUC) | 
| link iic_read function | |
| #define | DRIVER_PCF8563_LINK_IIC_WRITE(HANDLE, FUC) | 
| link iic_write function | |
| #define | DRIVER_PCF8563_LINK_DELAY_MS(HANDLE, FUC) | 
| link delay_ms function | |
| #define | DRIVER_PCF8563_LINK_DEBUG_PRINT(HANDLE, FUC) | 
| link debug_print function | |
| #define | DRIVER_PCF8563_LINK_RECEIVE_CALLBACK(HANDLE, FUC) | 
| link receive_callback function | |
| Typedefs | |
| typedef struct pcf8563_time_s | pcf8563_time_t | 
| pcf8563 time structure definition | |
| typedef struct pcf8563_handle_s | pcf8563_handle_t | 
| pcf8563 handle structure definition | |
| typedef struct pcf8563_info_s | pcf8563_info_t | 
| pcf8563 information structure definition | |
| Enumerations | |
| enum | pcf8563_bool_t { PCF8563_BOOL_FALSE = 0x00 , PCF8563_BOOL_TRUE = 0x01 } | 
| pcf8563 bool enumeration definition  More... | |
| enum | pcf8563_clock_out_t { PCF8563_CLOCK_OUT_32P768KHZ = 0x00 , PCF8563_CLOCK_OUT_1P024KHZ = 0x01 , PCF8563_CLOCK_OUT_32HZ = 0x02 , PCF8563_CLOCK_OUT_1HZ = 0x03 } | 
| pcf8563 clock out enumeration definition  More... | |
| enum | pcf8563_timer_freq_t { PCF8563_TIMER_FREQ_4P096KHZ = 0x00 , PCF8563_TIMER_FREQ_64HZ = 0x01 , PCF8563_TIMER_FREQ_1HZ = 0x02 , PCF8563_TIMER_FREQ_1_DIV_60HZ = 0x03 } | 
| pcf8563 timer freq enumeration definition  More... | |
| enum | pcf8563_interrupt_mode_t { PCF8563_INTERRUPT_MODE_LEVEL = 0x00 , PCF8563_INTERRUPT_MODE_PULSE = 0x01 } | 
| pcf8563 interrupt mode enumeration definition  More... | |
| enum | pcf8563_interrupt_event_t { PCF8563_INTERRUPT_EVENT_TIMER = 0x00 , PCF8563_INTERRUPT_EVENT_ALARM = 0x01 } | 
| pcf8563 interrupt event enumeration definition  More... | |
| Functions | |
| uint8_t | pcf8563_info (pcf8563_info_t *info) | 
| get chip's information | |
| uint8_t | pcf8563_irq_handler (pcf8563_handle_t *handle) | 
| irq handler | |
| 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_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_clear_status (pcf8563_handle_t *handle, pcf8563_interrupt_event_t event) | 
| clear status | |
| 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 | |
driver pcf8563 header 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.h.