LibDriver PCF8563
Loading...
Searching...
No Matches
pcf8563 base driver function

pcf8563 base driver modules More...

Collaboration diagram for pcf8563 base driver function:

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...

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

Detailed Description

pcf8563 base driver modules

Typedef Documentation

◆ pcf8563_handle_t

pcf8563 handle structure definition

◆ pcf8563_info_t

pcf8563 information structure definition

◆ pcf8563_time_t

pcf8563 time structure definition

Enumeration Type Documentation

◆ pcf8563_bool_t

pcf8563 bool enumeration definition

Enumerator
PCF8563_BOOL_FALSE 

disable

PCF8563_BOOL_TRUE 

enable

Definition at line 62 of file driver_pcf8563.h.

◆ pcf8563_clock_out_t

pcf8563 clock out enumeration definition

Enumerator
PCF8563_CLOCK_OUT_32P768KHZ 

32.768khz

PCF8563_CLOCK_OUT_1P024KHZ 

1.024khz

PCF8563_CLOCK_OUT_32HZ 

32hz

PCF8563_CLOCK_OUT_1HZ 

1hz

Definition at line 71 of file driver_pcf8563.h.

◆ pcf8563_interrupt_event_t

pcf8563 interrupt event enumeration definition

Enumerator
PCF8563_INTERRUPT_EVENT_TIMER 

timer

PCF8563_INTERRUPT_EVENT_ALARM 

alarm

Definition at line 102 of file driver_pcf8563.h.

◆ pcf8563_interrupt_mode_t

pcf8563 interrupt mode enumeration definition

Enumerator
PCF8563_INTERRUPT_MODE_LEVEL 

level mode

PCF8563_INTERRUPT_MODE_PULSE 

pulse mode

Definition at line 93 of file driver_pcf8563.h.

◆ pcf8563_timer_freq_t

pcf8563 timer freq enumeration definition

Enumerator
PCF8563_TIMER_FREQ_4P096KHZ 

4.096khz

PCF8563_TIMER_FREQ_64HZ 

64hz

PCF8563_TIMER_FREQ_1HZ 

1hz

PCF8563_TIMER_FREQ_1_DIV_60HZ 

1/60hz

Definition at line 82 of file driver_pcf8563.h.

Function Documentation

◆ pcf8563_clear_status()

uint8_t pcf8563_clear_status ( pcf8563_handle_t * handle,
pcf8563_interrupt_event_t event )

clear status

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]eventset event
Returns
status code
  • 0 success
  • 1 clear status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2009 of file driver_pcf8563.c.

◆ pcf8563_deinit()

uint8_t pcf8563_deinit ( pcf8563_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to a pcf8563 handle structure
Returns
status code
  • 0 success
  • 1 iic deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2127 of file driver_pcf8563.c.

◆ pcf8563_get_alarm_interrupt()

uint8_t pcf8563_get_alarm_interrupt ( pcf8563_handle_t * handle,
pcf8563_bool_t * enable )

get alarm interrupt status

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get alarm interrupt failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1831 of file driver_pcf8563.c.

◆ pcf8563_get_clock_out()

uint8_t pcf8563_get_clock_out ( pcf8563_handle_t * handle,
pcf8563_clock_out_t * clk )

get clock out

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*clkpointer to a clock buffer
Returns
status code
  • 0 success
  • 1 get clock out failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1431 of file driver_pcf8563.c.

◆ pcf8563_get_clock_out_enable()

uint8_t pcf8563_get_clock_out_enable ( pcf8563_handle_t * handle,
pcf8563_bool_t * enable )

get clock out enable status

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get clock out enable failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1349 of file driver_pcf8563.c.

◆ pcf8563_get_day_alarm()

uint8_t pcf8563_get_day_alarm ( pcf8563_handle_t * handle,
uint8_t * day )

get day alarm

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*daypointer to a day buffer
Returns
status code
  • 0 success
  • 1 get day alarm failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1096 of file driver_pcf8563.c.

◆ pcf8563_get_day_alarm_enable()

uint8_t pcf8563_get_day_alarm_enable ( pcf8563_handle_t * handle,
pcf8563_bool_t * enable )

get the day alarm status

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get day alarm enable failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1007 of file driver_pcf8563.c.

◆ pcf8563_get_hour_alarm()

uint8_t pcf8563_get_hour_alarm ( pcf8563_handle_t * handle,
uint8_t * hour )

get hour alarm

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*hourpointer to an hour buffer
Returns
status code
  • 0 success
  • 1 get hour alarm failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 925 of file driver_pcf8563.c.

◆ pcf8563_get_hour_alarm_enable()

uint8_t pcf8563_get_hour_alarm_enable ( pcf8563_handle_t * handle,
pcf8563_bool_t * enable )

get the hour alarm status

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get hour alarm enable failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 836 of file driver_pcf8563.c.

◆ pcf8563_get_interrupt_mode()

uint8_t pcf8563_get_interrupt_mode ( pcf8563_handle_t * handle,
pcf8563_interrupt_mode_t * mode )

get the interrupt mode

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*modepointer to a mode buffer
Returns
status code
  • 0 success
  • 1 get interrupt mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1913 of file driver_pcf8563.c.

◆ pcf8563_get_minute_alarm()

uint8_t pcf8563_get_minute_alarm ( pcf8563_handle_t * handle,
uint8_t * minute )

get minute alarm

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*minutepointer to a minute buffer
Returns
status code
  • 0 success
  • 1 get minute alarm failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 754 of file driver_pcf8563.c.

◆ pcf8563_get_minute_alarm_enable()

uint8_t pcf8563_get_minute_alarm_enable ( pcf8563_handle_t * handle,
pcf8563_bool_t * enable )

get the minute alarm status

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get minute alarm enable failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 665 of file driver_pcf8563.c.

◆ pcf8563_get_power_on_reset()

uint8_t pcf8563_get_power_on_reset ( pcf8563_handle_t * handle,
pcf8563_bool_t * enable )

get the power on reset status

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get the power on reset failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 583 of file driver_pcf8563.c.

◆ pcf8563_get_rtc_stop()

uint8_t pcf8563_get_rtc_stop ( pcf8563_handle_t * handle,
pcf8563_bool_t * enable )

get the rtc stop status

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get rtc stop failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 501 of file driver_pcf8563.c.

◆ pcf8563_get_test_mode()

uint8_t pcf8563_get_test_mode ( pcf8563_handle_t * handle,
pcf8563_bool_t * enable )

get the test mode status

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get test mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 419 of file driver_pcf8563.c.

◆ pcf8563_get_time()

uint8_t pcf8563_get_time ( pcf8563_handle_t * handle,
pcf8563_time_t * t )

get the current time

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*tpointer to a time structure
Returns
status code
  • 0 success
  • 1 get time failed
  • 2 handle or time is NULL
  • 3 handle is not initialized
  • 4 clock integrity is not guaranteed
Note
sunday is 0 not 7

Definition at line 313 of file driver_pcf8563.c.

◆ pcf8563_get_timer_enable()

uint8_t pcf8563_get_timer_enable ( pcf8563_handle_t * handle,
pcf8563_bool_t * enable )

get timer enable status

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get timer enable failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1513 of file driver_pcf8563.c.

◆ pcf8563_get_timer_freq()

uint8_t pcf8563_get_timer_freq ( pcf8563_handle_t * handle,
pcf8563_timer_freq_t * freq )

get timer freq

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*freqpointer to a freq buffer
Returns
status code
  • 0 success
  • 1 get timer freq failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1595 of file driver_pcf8563.c.

◆ pcf8563_get_timer_interrupt()

uint8_t pcf8563_get_timer_interrupt ( pcf8563_handle_t * handle,
pcf8563_bool_t * enable )

get timer interrupt status

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get timer interrupt failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1749 of file driver_pcf8563.c.

◆ pcf8563_get_timer_value()

uint8_t pcf8563_get_timer_value ( pcf8563_handle_t * handle,
uint8_t * value )

get timer value

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*valuepointer to a value buffer
Returns
status code
  • 0 success
  • 1 get timer value failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1669 of file driver_pcf8563.c.

◆ pcf8563_get_week_alarm()

uint8_t pcf8563_get_week_alarm ( pcf8563_handle_t * handle,
uint8_t * week )

get week alarm

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*weekpointer to a week buffer
Returns
status code
  • 0 success
  • 1 get week alarm failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1267 of file driver_pcf8563.c.

◆ pcf8563_get_week_alarm_enable()

uint8_t pcf8563_get_week_alarm_enable ( pcf8563_handle_t * handle,
pcf8563_bool_t * enable )

get the week alarm status

Parameters
[in]*handlepointer to a pcf8563 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get week alarm enable failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1178 of file driver_pcf8563.c.

◆ pcf8563_info()

uint8_t pcf8563_info ( pcf8563_info_t * info)

get chip's information

Parameters
[out]*infopointer to a pcf8563 info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 2221 of file driver_pcf8563.c.

◆ pcf8563_init()

uint8_t pcf8563_init ( pcf8563_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to a pcf8563 handle structure
Returns
status code
  • 0 success
  • 1 iic initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
Note
none

Definition at line 2059 of file driver_pcf8563.c.

◆ pcf8563_irq_handler()

uint8_t pcf8563_irq_handler ( pcf8563_handle_t * handle)

irq handler

Parameters
[in]*handlepointer to a pcf8563 handle structure
Returns
status code
  • 0 success
  • 1 run failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1949 of file driver_pcf8563.c.

◆ pcf8563_set_alarm_interrupt()

uint8_t pcf8563_set_alarm_interrupt ( pcf8563_handle_t * handle,
pcf8563_bool_t enable )

enable or disable alarm interrupt

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set alarm interrupt failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1786 of file driver_pcf8563.c.

◆ pcf8563_set_clock_out()

uint8_t pcf8563_set_clock_out ( pcf8563_handle_t * handle,
pcf8563_clock_out_t clk )

set clock out

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]clkset clock
Returns
status code
  • 0 success
  • 1 set clock out failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1386 of file driver_pcf8563.c.

◆ pcf8563_set_clock_out_enable()

uint8_t pcf8563_set_clock_out_enable ( pcf8563_handle_t * handle,
pcf8563_bool_t enable )

enable or disable clock out enable

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set clock out enable failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1304 of file driver_pcf8563.c.

◆ pcf8563_set_day_alarm()

uint8_t pcf8563_set_day_alarm ( pcf8563_handle_t * handle,
uint8_t day )

set day alarm

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]dayset day
Returns
status code
  • 0 success
  • 1 set day alarm failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 day can't be zero or over than 31
Note
none

Definition at line 1045 of file driver_pcf8563.c.

◆ pcf8563_set_day_alarm_enable()

uint8_t pcf8563_set_day_alarm_enable ( pcf8563_handle_t * handle,
pcf8563_bool_t enable )

enable or disable day alarm

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set day alarm enable failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 962 of file driver_pcf8563.c.

◆ pcf8563_set_hour_alarm()

uint8_t pcf8563_set_hour_alarm ( pcf8563_handle_t * handle,
uint8_t hour )

set hour alarm

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]hourset hour
Returns
status code
  • 0 success
  • 1 set hour alarm failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 hour can't be over than 23
Note
none

Definition at line 874 of file driver_pcf8563.c.

◆ pcf8563_set_hour_alarm_enable()

uint8_t pcf8563_set_hour_alarm_enable ( pcf8563_handle_t * handle,
pcf8563_bool_t enable )

enable or disable hour alarm

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set hour alarm enable failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 791 of file driver_pcf8563.c.

◆ pcf8563_set_interrupt_mode()

uint8_t pcf8563_set_interrupt_mode ( pcf8563_handle_t * handle,
pcf8563_interrupt_mode_t mode )

set the interrupt mode

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]modeset mode
Returns
status code
  • 0 success
  • 1 set interrupt mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1868 of file driver_pcf8563.c.

◆ pcf8563_set_minute_alarm()

uint8_t pcf8563_set_minute_alarm ( pcf8563_handle_t * handle,
uint8_t minute )

set minute alarm

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]minuteset minute
Returns
status code
  • 0 success
  • 1 set minute alarm failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 minute can't be over than 59
Note
none

Definition at line 703 of file driver_pcf8563.c.

◆ pcf8563_set_minute_alarm_enable()

uint8_t pcf8563_set_minute_alarm_enable ( pcf8563_handle_t * handle,
pcf8563_bool_t enable )

enable or disable minute alarm

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set minute alarm enable failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 620 of file driver_pcf8563.c.

◆ pcf8563_set_power_on_reset()

uint8_t pcf8563_set_power_on_reset ( pcf8563_handle_t * handle,
pcf8563_bool_t enable )

enable or disable power on reset

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set power on reset failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 538 of file driver_pcf8563.c.

◆ pcf8563_set_rtc_stop()

uint8_t pcf8563_set_rtc_stop ( pcf8563_handle_t * handle,
pcf8563_bool_t enable )

enable or disable rtc stop

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set rtc stop failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 456 of file driver_pcf8563.c.

◆ pcf8563_set_test_mode()

uint8_t pcf8563_set_test_mode ( pcf8563_handle_t * handle,
pcf8563_bool_t enable )

enable or disable test mode

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set test mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 374 of file driver_pcf8563.c.

◆ pcf8563_set_time()

uint8_t pcf8563_set_time ( pcf8563_handle_t * handle,
pcf8563_time_t * t )

set the current time

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]*tpointer to a time structure
Returns
status code
  • 0 success
  • 1 set time failed
  • 2 handle or time is NULL
  • 3 handle is not initialized
  • 4 time is invalid
Note
sunday is 0 not 7

Definition at line 164 of file driver_pcf8563.c.

◆ pcf8563_set_timer_enable()

uint8_t pcf8563_set_timer_enable ( pcf8563_handle_t * handle,
pcf8563_bool_t enable )

enable or disable timer enable

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set timer enable failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1468 of file driver_pcf8563.c.

◆ pcf8563_set_timer_freq()

uint8_t pcf8563_set_timer_freq ( pcf8563_handle_t * handle,
pcf8563_timer_freq_t freq )

set timer freq

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]freqset freq
Returns
status code
  • 0 success
  • 1 set timer freq failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1550 of file driver_pcf8563.c.

◆ pcf8563_set_timer_interrupt()

uint8_t pcf8563_set_timer_interrupt ( pcf8563_handle_t * handle,
pcf8563_bool_t enable )

enable or disable timer interrupt

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set timer interrupt failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1704 of file driver_pcf8563.c.

◆ pcf8563_set_timer_value()

uint8_t pcf8563_set_timer_value ( pcf8563_handle_t * handle,
uint8_t value )

set timer value

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]valueset value
Returns
status code
  • 0 success
  • 1 set timer value failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1632 of file driver_pcf8563.c.

◆ pcf8563_set_week_alarm()

uint8_t pcf8563_set_week_alarm ( pcf8563_handle_t * handle,
uint8_t week )

set week alarm

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]weekset week
Returns
status code
  • 0 success
  • 1 set week alarm failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 week can't be over than 6
Note
none

Definition at line 1216 of file driver_pcf8563.c.

◆ pcf8563_set_week_alarm_enable()

uint8_t pcf8563_set_week_alarm_enable ( pcf8563_handle_t * handle,
pcf8563_bool_t enable )

enable or disable week alarm

Parameters
[in]*handlepointer to a pcf8563 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set week alarm enable failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1133 of file driver_pcf8563.c.