rtc5 2.0.0.0
main.c File Reference

Rtc5 Click example. More...

#include "board.h"
#include "log.h"
#include "rtc5.h"

Functions

void display_log_day_of_the_week (uint8_t w_day)
 
void application_init (void)
 
void application_task (void)
 
int main (void)
 

Variables

rtc5_timedate_t time_date_data
 

Detailed Description

Rtc5 Click example.

Description

This is a example which demonstrates the use of RTC 5 Click board.

The demo application is composed of two sections :

Application Init

Initializes GPIO, SPI and LOG structures, sets CS pin as output and INT pin as input. Initialization driver enable's - SPI, clear RTCC and SRAM memory, sets starting time and date, enable counting and start write log.

Application Task

RTC 5 Click communicates with register via SPI by write to register and read from register, display RTC time and date.

note: Additional Functions: void display_log_day_of_the_week( uint8_t w_day ) - Write day of the week log.

Author
MikroE Team

Function Documentation

◆ application_init()

void application_init ( void )

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ display_log_day_of_the_week()

void display_log_day_of_the_week ( uint8_t w_day)

◆ main()

int main ( void )

Variable Documentation

◆ time_date_data

rtc5_timedate_t time_date_data