rtc10 2.0.0.0
Public function

Functions

void rtc10_cfg_setup (rtc10_cfg_t *cfg)
 Config Object Initialization function.
 
RTC10_RETVAL rtc10_init (rtc10_t *ctx, rtc10_cfg_t *cfg)
 Initialization function.
 
void rtc10_default_cfg (rtc10_t *ctx)
 Click Default Configuration function.
 
void rtc10_generic_write (rtc10_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void rtc10_generic_read (rtc10_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void rtc10_hw_reset (rtc10_t *ctx)
 Hardware reset function.
 
uint8_t rtc10_check_interrupt (rtc10_t *ctx)
 Check the state of interrupt function.
 
uint8_t rtc10_read_byte (rtc10_t *ctx, uint8_t reg_address)
 Generic read function.
 
void rtc10_write_byte (rtc10_t *ctx, uint8_t reg_address, uint8_t write_data)
 Generic read function.
 
uint8_t rtc10_get_time_seconds (rtc10_t *ctx)
 Get seconds function.
 
void rtc10_set_time_seconds (rtc10_t *ctx, uint8_t seconds)
 Generic read function.
 
uint8_t rtc10_get_time_minutes (rtc10_t *ctx)
 Get seconds function.
 
void rtc10_set_time_minutes (rtc10_t *ctx, uint8_t minutes)
 Generic read function.
 
uint8_t rtc10_get_century_flag (rtc10_t *ctx)
 Get century flag function.
 
void rtc10_set_century_flag (rtc10_t *ctx)
 Set century flag function.
 
uint8_t rtc10_get_time_hours (rtc10_t *ctx)
 Get hours function.
 
void rtc10_set_time_hours (rtc10_t *ctx, uint8_t hours)
 Set hours function.
 
uint8_t rtc10_get_day_of_the_week (rtc10_t *ctx)
 Get day of the week function.
 
void rtc10_set_day_of_the_week (rtc10_t *ctx, uint8_t w_day)
 Set day of the week function.
 
uint8_t rtc10_get_date_day (rtc10_t *ctx)
 Get date function.
 
void rtc10_set_date_day (rtc10_t *ctx, uint8_t date_day)
 Set date function.
 
uint8_t rtc10_get_date_month (rtc10_t *ctx)
 Get month function.
 
void rtc10_set_date_month (rtc10_t *ctx, uint8_t date_month)
 Set month function.
 
uint8_t rtc10_get_date_year (rtc10_t *ctx)
 Get year function.
 
void rtc10_set_date_year (rtc10_t *ctx, uint16_t date_year)
 Set month function.
 
void rtc10_set_time (rtc10_t *ctx, uint8_t time_hours, uint8_t time_minutes, uint8_t time_seconds)
 Set time: hours, minutes and seconds function.
 
void rtc10_get_time (rtc10_t *ctx, uint8_t *time_hours, uint8_t *time_minutes, uint8_t *time_seconds)
 Get time hours, minutes and seconds function.
 
void rtc10_set_date (rtc10_t *ctx, uint8_t day_of_the_week, uint8_t date_day, uint8_t date_month, uint16_t date_year)
 Set date hours, minutes and seconds function.
 
void rtc10_get_date (rtc10_t *ctx, uint8_t *day_of_the_week, uint8_t *date_day, uint8_t *date_month, uint8_t *date_year)
 Get time hours, minutes and seconds function.
 
uint8_t rtc10_get_alarm_time_seconds (rtc10_t *ctx)
 Get alarm time seconds function.
 
void rtc10_set_alarm_time_seconds (rtc10_t *ctx, uint8_t seconds)
 Set alarm time seconds function.
 
uint8_t rtc10_get_alarm_time_minutes (rtc10_t *ctx)
 Get alarm time minutes function.
 
void rtc10_set_alarm_time_minutes (rtc10_t *ctx, uint8_t minutes)
 Set alarm time seconds function.
 
uint8_t rtc10_get_alarm_time_hours (rtc10_t *ctx)
 Get alarm time hours function.
 
void rtc10_set_alarm_time_hours (rtc10_t *ctx, uint8_t hours)
 Set alarm time seconds function.
 
uint8_t rtc10_get_alarm_date_day (rtc10_t *ctx)
 Get alarm days function.
 
void rtc10_set_alarm_date_day (rtc10_t *ctx, uint8_t date_day)
 Set alarm days function.
 
void rtc10_set_first_alarm (rtc10_t *ctx, uint8_t time_days, uint8_t time_hours, uint8_t time_minutes, uint8_t time_seconds)
 Set Alarm 1 time: hours, minutes and seconds function.
 
void rtc10_get_first_alarm (rtc10_t *ctx, uint8_t *time_days, uint8_t *time_hours, uint8_t *time_minutes, uint8_t *time_seconds)
 Get Alarm 1 time hours, minutes and seconds function.
 
void rtc10_set_second_alarm (rtc10_t *ctx, uint8_t time_days, uint8_t time_hours, uint8_t time_minutes)
 Set Alarm 2 time: hours, minutes and seconds function.
 
void rtc10_get_second_alarm (rtc10_t *ctx, uint8_t *time_days, uint8_t *time_hours, uint8_t *time_minutes)
 Set Alarm 2 time: hours, minutes and seconds function.
 
void rtc10_enable_counting (rtc10_t *ctx)
 Enable counting function.
 
void rtc10_set_config (rtc10_t *ctx, uint8_t config_data)
 Set configuration function.
 
uint8_t rtc10_get_status (rtc10_t *ctx)
 Get configuration status function.
 
float rtc10_get_temperature (rtc10_t *ctx)
 Get temperature function.
 

Detailed Description

Function Documentation

◆ rtc10_cfg_setup()

void rtc10_cfg_setup ( rtc10_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.

◆ rtc10_check_interrupt()

uint8_t rtc10_check_interrupt ( rtc10_t * ctx)

Check the state of interrupt function.

Parameters
ctxClick object.

@description Function check the state of interrupt ( INT ) pin of RTC 10 Click.

◆ rtc10_default_cfg()

void rtc10_default_cfg ( rtc10_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Rtc10 click.

◆ rtc10_enable_counting()

void rtc10_enable_counting ( rtc10_t * ctx)

Enable counting function.

Parameters
ctxClick object.

@description This function enable counting on RTC 10 Click by set bit 7 of the targets ( _RTC10_CONTROL ) registers address of DS3231M I2C realtime clock.

◆ rtc10_generic_read()

void rtc10_generic_read ( rtc10_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.

◆ rtc10_generic_write()

void rtc10_generic_write ( rtc10_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.

◆ rtc10_get_alarm_date_day()

uint8_t rtc10_get_alarm_date_day ( rtc10_t * ctx)

Get alarm days function.

Parameters
ctxClick object.

@description This function gets alarm days data from the target ( _RTC10_ALM1DATE or _RTC10_ALM2DATE ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_alarm_time_hours()

uint8_t rtc10_get_alarm_time_hours ( rtc10_t * ctx)

Get alarm time hours function.

Parameters
ctxClick object.

@description This function sets alarm time hours data from the target ( _RTC10_ALM1HOUR or _RTC10_ALM2HOUR ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_alarm_time_minutes()

uint8_t rtc10_get_alarm_time_minutes ( rtc10_t * ctx)

Get alarm time minutes function.

Parameters
ctxClick object.

@description This function sets alarm time minutes data from the target ( _RTC10_ALM1MIN or _RTC10_ALM2MIN ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_alarm_time_seconds()

uint8_t rtc10_get_alarm_time_seconds ( rtc10_t * ctx)

Get alarm time seconds function.

Parameters
ctxClick object.

@description This function gets alarm time seconds data from the target ( _RTC10_ALM1SEC ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_century_flag()

uint8_t rtc10_get_century_flag ( rtc10_t * ctx)

Get century flag function.

Parameters
ctxClick object.

@description This function gets century flag ( bit 7 ) from the target ( _RTC10_RTCMIN ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_date()

void rtc10_get_date ( rtc10_t * ctx,
uint8_t * day_of_the_week,
uint8_t * date_day,
uint8_t * date_month,
uint8_t * date_year )

Get time hours, minutes and seconds function.

Parameters
ctxClick object.
day_of_the_weekpointer of date of the week data [ 1 : 7 ]
date_daypointer of date day data [ 1 : 31 ]
date_monthpointer of date month data [ 1 : 12 ]
date_yearpointer of date year data [ 0 : 99 ]

@description This function gets date: day of the week, day, month and year data from the targets ( _RTC10_RTCWKDAY, _RTC10_RTCDATE, _RTC10_RTCMTH and _RTC10_RTCYEAR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_date_day()

uint8_t rtc10_get_date_day ( rtc10_t * ctx)

Get date function.

Parameters
ctxClick object.

@description This function gets date data from the target ( _RTC10_RTCDATE ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_date_month()

uint8_t rtc10_get_date_month ( rtc10_t * ctx)

Get month function.

Parameters
ctxClick object.

@description This function gets month data from the target ( _RTC10_RTCMTH ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_date_year()

uint8_t rtc10_get_date_year ( rtc10_t * ctx)

Get year function.

Parameters
ctxClick object.

@description This function gets year data from the target ( _RTC10_RTCYEAR ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_day_of_the_week()

uint8_t rtc10_get_day_of_the_week ( rtc10_t * ctx)

Get day of the week function.

Parameters
ctxClick object.

@description This function gets day of the week data from the target ( _RTC10_RTCWKDAY ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_first_alarm()

void rtc10_get_first_alarm ( rtc10_t * ctx,
uint8_t * time_days,
uint8_t * time_hours,
uint8_t * time_minutes,
uint8_t * time_seconds )

Get Alarm 1 time hours, minutes and seconds function.

Parameters
ctxClick object.
time_dayspointer of time days [ 1 : 31 ]
time_hourspointer of time hours [ 0 h : 23 h ]
time_minutespointer of time minutes [ 0 min : 59 min ]
time_secondspointer of time seconds [ 0 sec : 59 sec ]

@description This function gets Alarm 1 time: hours, minutes and seconds data from the targets ( _RTC10_ALM1SEC, _RTC10_ALM1MIN and _RTC10_ALM1HOUR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_second_alarm()

void rtc10_get_second_alarm ( rtc10_t * ctx,
uint8_t * time_days,
uint8_t * time_hours,
uint8_t * time_minutes )

Set Alarm 2 time: hours, minutes and seconds function.

Parameters
ctxClick object.
time_dayspointer of time days [ 1 : 31 ]
time_hourspointer of time hours [ 0 h : 23 h ]
time_minutespointer of time minutes [ 0 min : 59 min ]

@description This function gets Alarm 2 time: hours, minutes and seconds data from the targets ( _RTC10_ALM2SEC, _RTC10_ALM2MIN and _RTC10_ALM2HOUR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_status()

uint8_t rtc10_get_status ( rtc10_t * ctx)

Get configuration status function.

Parameters
ctxClick object.
config_data* - bit [ 7 ] : EOscillator stop flag. A logic 1 in this bit indicates that the oscillator either is stopped or was stopped for some period and could be used to judge the validity of the timekeeping data. This bit is set to logic 1 any time that the oscillator stops. This bit remains at logic 1 until written to logic 0. The following are examples of conditions that can cause the OSF bit to be set:
  • 1 : The first time power is applied;
  • 2 : The voltages present on both VCC and VBAT are insufficient to support the oscillator;
  • 3 : The EOSC bit is turned off in battery-backed mode;
  • 4 : External influences on the oscillator (i.e., noise, leakage, etc.).
  • bit [ 6 : 4 ] : Unused ( 0 ). These bits have no meaning and are fixed at 0 when read.
  • bit [ 3 ] : Enabled 32.768kHz output. This bit enables and disables the 32KHZ output. When set to a logic 0, the 32KHZ output is high impedance. On initial power-up, this bit is set to a logic 1 and the 32KHZ output is enabled and produces a 32.768kHz square wave if the oscillator is enabled. These bits have no affect on the device and can be set to either 0 or 1.
  • bit [ 2 ] : Busy. This bit indicates the device is busy executing temperature conversion function. It goes to logic 1 when the conversion signal to the temperature sensor is asserted, and then it is cleared when the device has completed the temperature conversion.
  • bit [ 1 ] : Alarm 2 flag. A logic 1 in the alarm 2 flag bit indicates that the time matched the alarm 2 registers. If the A2IE bit is logic 1 and the INTCN bit is set to logic 1, INT/SQW is also asserted. A2F is cleared when written to logic 0. This bit can only be written to logic 0. Attempting to write to logic 1 leaves the value unchanged.
  • bit [ 0 ] : Alarm 1 flag. A logic 1 in the alarm 1 flag bit indicates that the time matched the alarm 1 registers. If the A1IE bit is logic 1 and the INTCN bit is set to logic 1, INT/SQW is also asserted. A1F is cleared when written to logic 0. This bit can only be written to logic 0. Attempting to write to logic 1 leaves the value unchanged. The A1IE bit is disabled (logic 0) when power is first applied.

@description This function get configuration status value from the target ( _RTC10_STATUS ) registers address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_temperature()

float rtc10_get_temperature ( rtc10_t * ctx)

Get temperature function.

Parameters
ctxClick object.

@description This function get value of temperature [ �C ] from the targets ( _RTC10_TEMPERATURE_MSB and _RTC10_TEMPERATURE_LSB ) registers address of DS3231M I2C realtime clock.

◆ rtc10_get_time()

void rtc10_get_time ( rtc10_t * ctx,
uint8_t * time_hours,
uint8_t * time_minutes,
uint8_t * time_seconds )

Get time hours, minutes and seconds function.

Parameters
ctxClick object.
time_minutespointer of time minutes [ 0 min : 59 min ]
time_hourspointer of time hours [ 0 h : 23 h ]
time_secondspointer of time seconds [ 0 sec : 59 sec ]

@description This function gets time: hours, minutes and seconds data from the targets ( _RTC10_RTCHOUR, _RTC10_RTCMIN and _RTC10_RTCHOUR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_time_hours()

uint8_t rtc10_get_time_hours ( rtc10_t * ctx)

Get hours function.

Parameters
ctxClick object.

@description This function gets hours data from the target ( _RTC10_RTCHOUR ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_time_minutes()

uint8_t rtc10_get_time_minutes ( rtc10_t * ctx)

Get seconds function.

Parameters
ctxClick object.

@description This function gets seconds data from the target ( _RTC10_RTCMIN ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_get_time_seconds()

uint8_t rtc10_get_time_seconds ( rtc10_t * ctx)

Get seconds function.

Parameters
ctxClick object.

@description This function gets seconds data from the target ( _RTC10_RTCSEC ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_hw_reset()

void rtc10_hw_reset ( rtc10_t * ctx)

Hardware reset function.

Parameters
ctxClick object.

@description This function hardware reset the DS3231M I2C realtime clock on RTC 10 Click by cleared to '0' state of the RST pin, wait the 100 ms, sets to '1' state of the RST pin and wait another the 100 ms..

◆ rtc10_init()

RTC10_RETVAL rtc10_init ( rtc10_t * ctx,
rtc10_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ rtc10_read_byte()

uint8_t rtc10_read_byte ( rtc10_t * ctx,
uint8_t reg_address )

Generic read function.

Parameters
ctxClick object.
reg_address8-bit register address.

@description This Function write the 8-bit of data to the target 8-bit register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_alarm_date_day()

void rtc10_set_alarm_date_day ( rtc10_t * ctx,
uint8_t date_day )

Set alarm days function.

Parameters
ctxClick object.
date_dayDate days data [ 1 : 31 ]

@description This function sets alarm time minutes data from the target ( _RTC10_ALM1DATE or _RTC10_ALM2DATE ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_alarm_time_hours()

void rtc10_set_alarm_time_hours ( rtc10_t * ctx,
uint8_t hours )

Set alarm time seconds function.

Parameters
ctxClick object.
hourshours [ 0 h : 23 h ]

@description This function sets alarm time hours data from the target ( _RTC10_ALM1HOUR or _RTC10_ALM2HOUR ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_alarm_time_minutes()

void rtc10_set_alarm_time_minutes ( rtc10_t * ctx,
uint8_t minutes )

Set alarm time seconds function.

Parameters
ctxClick object.
minutesAlarm time minutes [ 0 min : 59 min ]

@description This function sets alarm time minutes data to the target ( _RTC10_ALM1MIN or _RTC10_ALM2MIN ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_alarm_time_seconds()

void rtc10_set_alarm_time_seconds ( rtc10_t * ctx,
uint8_t seconds )

Set alarm time seconds function.

Parameters
ctxClick object.
secondsAlarm time seconds [ 0 sec : 59 sec ]

@description This function gets alarm time seconds data to the target ( _RTC10_ALM1SEC ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_century_flag()

void rtc10_set_century_flag ( rtc10_t * ctx)

Set century flag function.

Parameters
ctxClick object.

@description This function sets century flag ( bit 7 ) to the target ( _RTC10_RTCMIN ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_config()

void rtc10_set_config ( rtc10_t * ctx,
uint8_t config_data )

Set configuration function.

Parameters
ctxClick object.
config_data- bit [ 7 ] : Enable oscillator. When set to logic 0, the oscillator is started. When set to logic 1, the oscillator is stopped when the device switches to VBAT. This bit is clear (logic 0) when power is first applied. When the device is powered by VCC, the oscillator is always on regardless of the status of the EOSC bit. When the oscillator is disabled, all register data is static
  • bit [ 6 ] : Battery-backed square-wave enable. When set to logic 1 with INTCN = 0 and VCC < VPF, this bit enables the 1Hz square wave. When BBSQW is logic 0, INT/SQW goes high impedance when VCC falls below VPF. This bit is disabled (logic 0) when power is first applied.
  • bit [ 5 ] : Convert temperature. Setting this bit to 1 forces the temperature sensor to convert the temperature into digital code and execute the temperature compensate algorithm to update the oscillator�s accuracy. The device cannot be forced to execute the temperature-compensate algorithm faster than once per second. A user-initiated temperature conversion does not affect the internal update cycle. The CONV bit remains at a 1 from the time it is written until the temperature conversion is completed, at which time both CONV and BSY go to 0. The CONV bit should be used when monitoring the status of a user-initiated conversion. See Figure 7 for more details.
  • bit [ 4 : 3 ] : Not applicable. These bits have no affect on the device and can be set to either 0 or 1.
  • bit [ 2 ] : Interrupt control. This bit controls the INT/SQW output signal. When the INTCN bit is set to logic 0, a 1Hz square wave is output on INT/SQW. When the INTCN bit is set to logic 1, a match between the timekeeping registers and either of the alarm registers activates the INT/SQW output (if the alarm is also enabled). The corresponding alarm flag is always set regardless of the state of the INTCN bit. The INTCN bit is set to a logic 1 when power is first applied.
  • bit [ 1 ] : Alarm 2 interrupt enable. When set to logic 1, this bit permits the alarm 2 flag (A2F) bit in the status register to assert INT/SQW (when INTCN = 1). When the A2IE bit is set to logic 0 or INTCN is set to logic 0, the A2F bit does not initiate an interrupt signal. The A2IE bit is disabled (logic 0) when power is first applied.
  • bit [ 0 ] : Alarm 1 interrupt enable. When set to logic 1, this bit permits the alarm 1 flag (A1F) bit in the status register to assert INT/SQW (when INTCN = 1). When the A1IE bit is set to logic 0 or INTCN is set to logic 0, the A1F bit does not initiate an interrupt signal. The A1IE bit is disabled (logic 0) when power is first applied.

@description This function sets configuration value to the targets ( _RTC10_CONTROL ) registers address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_date()

void rtc10_set_date ( rtc10_t * ctx,
uint8_t day_of_the_week,
uint8_t date_day,
uint8_t date_month,
uint16_t date_year )

Set date hours, minutes and seconds function.

Parameters
ctxClick object.
day_of_the_weekDate of the week data [ 1 : 7 ]
date_dayDate day data [ 1 : 31 ]
date_monthDate month data [ 1 : 12 ]
date_yearDate year data [ 0 : 99 ]

@description This function sets date: day of the week, day, month and year data to the targets ( _RTC10_RTCWKDAY, _RTC10_RTCDATE, _RTC10_RTCMTH and _RTC10_RTCYEAR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_date_day()

void rtc10_set_date_day ( rtc10_t * ctx,
uint8_t date_day )

Set date function.

Parameters
ctxClick object.
date_dayDate day data [ 1 : 31 ]

@description This function sets date data from the target ( _RTC10_RTCDATE ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_date_month()

void rtc10_set_date_month ( rtc10_t * ctx,
uint8_t date_month )

Set month function.

Parameters
ctxClick object.
date_monthDate month data [ 1 : 12 ]

@description This function sets month data from the target ( _RTC10_RTCMTH ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_date_year()

void rtc10_set_date_year ( rtc10_t * ctx,
uint16_t date_year )

Set month function.

Parameters
ctxClick object.
date_yearDate year data [ xx00 : xx99 ]

@description This function sets year data to the target ( _RTC10_RTCYEAR ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_day_of_the_week()

void rtc10_set_day_of_the_week ( rtc10_t * ctx,
uint8_t w_day )

Set day of the week function.

Parameters
ctxClick object.
w_dayDay of the week data [ 1 : 7 ]
  • 1 : Monday;
  • 2 : Tuesday;
  • 3 : Wednesday;
  • 4 : Thursday;
  • 5 : Friday;
  • 6 : Saturday;
  • 7 : Sunday;

@description This function sets day of the week data to the target ( _RTC10_RTCWKDAY ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_first_alarm()

void rtc10_set_first_alarm ( rtc10_t * ctx,
uint8_t time_days,
uint8_t time_hours,
uint8_t time_minutes,
uint8_t time_seconds )

Set Alarm 1 time: hours, minutes and seconds function.

Parameters
ctxClick object.
time_daysTime days data [ 1 : 31 ]
time_hoursTime hours [ 0 h : 23 h ]
time_minutesTime minutes [ 0 min : 59 min ]
time_secondsTime seconds [ 0 sec : 59 sec ]

@description This function sets Alarm 1 time: hours, minutes and seconds data to the targets ( _RTC10_ALM1SEC, _RTC10_ALM1MIN and _RTC10_ALM1HOUR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_second_alarm()

void rtc10_set_second_alarm ( rtc10_t * ctx,
uint8_t time_days,
uint8_t time_hours,
uint8_t time_minutes )

Set Alarm 2 time: hours, minutes and seconds function.

Parameters
ctxClick object.
time_daysTime days [ 1 : 31 ]
time_hoursTime hours [ 0 h : 23 h ]
time_minutesTime minutes [ 0 min : 59 min ]

@description This function sets Alarm 2 time: hours, minutes and seconds data to the targets ( _RTC10_ALM2SEC, _RTC10_ALM2MIN and _RTC10_ALM2HOUR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_time()

void rtc10_set_time ( rtc10_t * ctx,
uint8_t time_hours,
uint8_t time_minutes,
uint8_t time_seconds )

Set time: hours, minutes and seconds function.

Parameters
ctxClick object.
time_minutesTime minutes [ 0 min : 59 min ]
time_hoursTime hours [ 0 h : 23 h ]
time_secondsTime seconds [ 0 sec : 59 sec ]

@description This function sets time: hours, minutes and seconds data to the targets ( _RTC10_RTCHOUR, _RTC10_RTCMIN and _RTC10_RTCHOUR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_time_hours()

void rtc10_set_time_hours ( rtc10_t * ctx,
uint8_t hours )

Set hours function.

Parameters
ctxClick object.
hoursTime hours [ 0 h : 23 h ]

@description This function sets hours data to the target ( _RTC10_RTCHOUR ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_time_minutes()

void rtc10_set_time_minutes ( rtc10_t * ctx,
uint8_t minutes )

Generic read function.

Parameters
ctxClick object.
minutesTime minutes [ 0 min : 59 min ]

@description This function sets minutes data to the target ( _RTC10_RTCMIN ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_set_time_seconds()

void rtc10_set_time_seconds ( rtc10_t * ctx,
uint8_t seconds )

Generic read function.

Parameters
ctxClick object.
secondstime seconds [ 0 sec : 59 sec ]

@description This function sets seconds data to the target ( _RTC10_RTCSEC ) register address of DS3231M I2C realtime clock on RTC 10 Click.

◆ rtc10_write_byte()

void rtc10_write_byte ( rtc10_t * ctx,
uint8_t reg_address,
uint8_t write_data )

Generic read function.

Parameters
ctxClick object.
reg_address8-bit register address.
write_data8-bit data to write

@description This function write the 8-bit of data to thetarget 8-bit register address of DS3231M I2C realtime clock on RTC 10 Click..