//Initialize the RTC
Byte Init();
//Set the RTC Date and Time
Byte SetTimeDate(Byte aDay, Byte aWeekDay, Byte aMonth, Byte aYear, Byte aHour, Byte aMinute, Byte aSecond);
//Get the Day
//Returns day 01 - 31, or -1 if the RTC library was not initialized before
Byte GetDay();
//Get the Weekday
//Returns weekday 00 - 06, or -1 if the RTC library was not initialized before
Byte GetWeekDay();
//Get the Month
//Returns month 01 - 12, or -1 if the RTC library was not initialized before
Byte GetMonth();
//Get the Year
//Returns year 00 - 99, or -1 if the RTC library was not initialized before
Byte GetYear();
//Get the Hour
//Returns hours 01 - 12, or 00 - 23 (depending of 12H/24H mode), or -1 if the RTC library was not initialized before
Byte GetHour();
//Get the Minutes
//Returns minutes 00 - 59, or -1 if the RTC library was not initialized before
Byte GetMinute();
//Get the Seconds
//Returns seconds 00 - 59, or -1 if the RTC library was not initialized before
Byte GetSecond();
//Set the Date and Time by defining the time and date by strings, e.g. "Nov 15 2018", "11:41:02"
Byte SetTimeDateStrings(ArrayByte* aDate, ArrayByte* aTime);
//Initialization of the SPI slave select pin for the RTC chip (RV-2123)
//For experienced users only.
//Returns 0 when succeeded, or -2 if there is not selected proper CONTROLLINO board
Byte RTC_SPI_SLAVE_PIN_INIT();
//Control of SPI slave select pin for the RTC chip (RV-2123)
//mode 0 for RTC chip SPI bus disable, 1 for RTC SPI bus enable
//Returns 0 when succeeded, -1 for unsupported mode, or -2 if there is not selected proper CONTROLLINO board
Byte RTC_SPI_SLAVE_PIN_CONTROL(Byte mode);
//Initialization of the RS485 bus
//Serial3 still needs to be initialized separately. This only inits RE and DE pins.
//Always returns 0
Byte RS485Init();
//Initialization of the RS485 bus with baudrate
//Always returns 0
Byte RS485Init_with_BaudRate(long aBaudrate);
//Enable RS485 bus trasmission
void RS485TxEnable();
//Enable RS485 bus reception
void RS485RxEnable();
//Control of RS485 bus RE signal
//mode 0 for RS485 Receive Enable Active, 1 for Receive Enable Inactive
//Returns 0 when succeeded, -1 for unsupported mode
Byte SwitchRS485RE(Byte mode);
//Control of RS485 bus DE signal
//mode 0 for RS485 Data transmission Enable Inactive, 1 for Data transmission Enable Active
//Returns 0 when succeeded, -1 for unsupported mode
Byte SwitchRS485DE(Byte mode);
//Reads time and date from RTC chip and prints it on serial line
//This function expects that the serial line was initialized before calling it.
//Format is DD/MM/YY HH:MM:SS
//Returns seconds 0, or -1 if the RTC library was not initialized before
Byte PrintTimeAndDate();
//Clears alarm interrupt on the RTC chip (RV-2123)
//Returns 0 when succeeded, or -1 if the RTC library was not initialized before
Byte ClearRTCAlarm();
//Configures an alarm on the RTC chip (RV-2123)
//aHour: 01 - 12, or 00 - 23 (depending of 12H/24H mode)
//aMinute: minutes 00 - 59
//Returns 0 when succeeded, or -1 if the RTC library was not initialized before
Byte SetRTCAlarm(Byte hour, Byte minute);