rtc9  2.0.0.0
Functions
Public function

Functions

void rtc9_cfg_setup (rtc9_cfg_t *cfg)
 Config Object Initialization function. More...
 
RTC9_RETVAL rtc9_init (rtc9_t *ctx, rtc9_cfg_t *cfg)
 Initialization function. More...
 
void rtc9_generic_write (rtc9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function. More...
 
void rtc9_generic_read (rtc9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function. More...
 
void rtc9_wakeup (rtc9_t *ctx)
 Wake-up process. More...
 
void rtc9_software_reset (rtc9_t *ctx)
 Software reset. More...
 
void rtc9_hardware_reset (rtc9_t *ctx)
 Hardware reset. More...
 
void rtc9_set_time (rtc9_t *ctx, uint8_t hour, uint8_t min, uint8_t sec)
 Set new time - 24 hour format. More...
 
void rtc9_set_date (rtc9_t *ctx, rtc9_set_data_t *set_data)
 Set new date. More...
 
void rtc9_get_time (rtc9_t *ctx, rtc9_get_time_t *get_time)
 Get new time - 24 hour format. More...
 
void rtc9_get_date (rtc9_t *ctx, rtc9_get_date_t *get_data)
 Get new date. More...
 
char * rtc9_current_month (uint8_t month)
 Month in the String format. More...
 
char * rtc9_current_day_of_week (uint8_t day_of_week)
 Day of Week in the String format. More...
 
void rtc9_set_alarm_time (rtc9_t *ctx, uint8_t hour, uint8_t min, uint8_t sec)
 Set new ALARM 1 time - 24 hour format. More...
 
void rtc9_set_alarm_date (rtc9_t *ctx, uint8_t day, uint8_t month, uint8_t year)
 Set new ALARM 1 date. More...
 
void rtc9_read_flag_status (rtc9_t *ctx, uint8_t *read_data)
 Reads FLAGS regiter. More...
 

Detailed Description

Function Documentation

◆ rtc9_cfg_setup()

void rtc9_cfg_setup ( rtc9_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ rtc9_current_day_of_week()

char* rtc9_current_day_of_week ( uint8_t  day_of_week)

Day of Week in the String format.

Parameters
day_of_weekCurrent dey of week
Returns
pointer to string... ( 1 = Sunday... )

◆ rtc9_current_month()

char* rtc9_current_month ( uint8_t  month)

Month in the String format.

Parameters
monthCurrent month
Returns
pointer to string... ( 1 = January... )

◆ rtc9_generic_read()

void rtc9_generic_read ( rtc9_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ rtc9_generic_write()

void rtc9_generic_write ( rtc9_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ rtc9_get_date()

void rtc9_get_date ( rtc9_t ctx,
rtc9_get_date_t get_data 
)

Get new date.

Parameters
rtc9Click object.
get_dataStruct object.

◆ rtc9_get_time()

void rtc9_get_time ( rtc9_t ctx,
rtc9_get_time_t get_time 
)

Get new time - 24 hour format.

Parameters
rtc9Click object.
get_timeStruct object.

◆ rtc9_hardware_reset()

void rtc9_hardware_reset ( rtc9_t ctx)

Hardware reset.

Parameters
rtc9Click object.

◆ rtc9_init()

RTC9_RETVAL rtc9_init ( rtc9_t ctx,
rtc9_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ rtc9_read_flag_status()

void rtc9_read_flag_status ( rtc9_t ctx,
uint8_t *  read_data 
)

Reads FLAGS regiter.

Parameters
rtc9Click object.
read_dataData to be read.

◆ rtc9_set_alarm_date()

void rtc9_set_alarm_date ( rtc9_t ctx,
uint8_t  day,
uint8_t  month,
uint8_t  year 
)

Set new ALARM 1 date.

Parameters
rtc9Click object.
dayNew Day (1 - 31/30/28/29)
monthNew month (1 - 12)
yearNew year (0 - 99) 2000 year ... 2099 year

◆ rtc9_set_alarm_time()

void rtc9_set_alarm_time ( rtc9_t ctx,
uint8_t  hour,
uint8_t  min,
uint8_t  sec 
)

Set new ALARM 1 time - 24 hour format.

Parameters
rtc9Click object.
hourNew Hours (0 - 23)
minNew minutes (0 - 59)
secNew secconds (0 - 59)

◆ rtc9_set_date()

void rtc9_set_date ( rtc9_t ctx,
rtc9_set_data_t set_data 
)

Set new date.

Parameters
rtc9Click object.
set_dataStruct object.

◆ rtc9_set_time()

void rtc9_set_time ( rtc9_t ctx,
uint8_t  hour,
uint8_t  min,
uint8_t  sec 
)

Set new time - 24 hour format.

Parameters
rtc9Click object.
hourNew Hours (0 - 23)
minNew minutes (0 - 59)
secNew secconds (0 - 59)

◆ rtc9_software_reset()

void rtc9_software_reset ( rtc9_t ctx)

Software reset.

Parameters
rtc9Click object.

◆ rtc9_wakeup()

void rtc9_wakeup ( rtc9_t ctx)

Wake-up process.

Parameters
rtc9Click object.
Note
This function must be called at the start of the program