Version 2.0.0-0

rtc Reference

File
core/xeos/include/xeos/hal/rtc.h
Date
Wednesday, June 25, 2014
Includes
  • <stdint.h>
  • <stdbool.h>
  • <time.h>

Tasks

XEOS_HAL_RTC_DateTimeGetCentury Top

Gets the century number

uint8_t XEOS_HAL_RTC_DateTimeGetCentury( XEOS_HAL_RTC_DateTimeRef time );

Parameters
  • time
    The RTC time object
Return value

The century number

XEOS_HAL_RTC_DateTimeGetDayOfMonth Top

Gets the day of month

uint8_t XEOS_HAL_RTC_DateTimeGetDayOfMonth( XEOS_HAL_RTC_DateTimeRef time );

Parameters
  • time
    The RTC time object
Return value

The day of month

XEOS_HAL_RTC_DateTimeGetHours Top

Gets the number of hours

uint8_t XEOS_HAL_RTC_DateTimeGetHours( XEOS_HAL_RTC_DateTimeRef time );

Parameters
  • time
    The RTC time object
Return value

The number of hours

XEOS_HAL_RTC_DateTimeGetMinutes Top

Gets the number of minutes

uint8_t XEOS_HAL_RTC_DateTimeGetMinutes( XEOS_HAL_RTC_DateTimeRef time );

Parameters
  • time
    The RTC time object
Return value

The number of minutes

XEOS_HAL_RTC_DateTimeGetMonth Top

Gets the month number

uint8_t XEOS_HAL_RTC_DateTimeGetMonth( XEOS_HAL_RTC_DateTimeRef time );

Parameters
  • time
    The RTC time object
Return value

The month number

XEOS_HAL_RTC_DateTimeGetSeconds Top

Gets the number of seconds

uint8_t XEOS_HAL_RTC_DateTimeGetSeconds( XEOS_HAL_RTC_DateTimeRef time );

Parameters
  • time
    The RTC time object
Return value

The number of seconds

XEOS_HAL_RTC_DateTimeGetSystemTime Top

Sets the RTC time (writes values back to CMOS)

XEOS_HAL_RTC_DateTimeRef XEOS_HAL_RTC_DateTimeGetSystemTime( void );

Return value

The RTC time object

XEOS_HAL_RTC_DateTimeGetTM Top

Converts RTC time to a tm struct (time.h)

void XEOS_HAL_RTC_DateTimeGetTM( XEOS_HAL_RTC_DateTimeRef time, struct tm *t );

Parameters
  • time
    The RTC time object
  • t
    A pointer to a valid tm structure that will be filled

XEOS_HAL_RTC_DateTimeGetWeekday Top

Gets the weekday

uint8_t XEOS_HAL_RTC_DateTimeGetWeekday( XEOS_HAL_RTC_DateTimeRef time );

Parameters
  • time
    The RTC time object
Return value

The weekday

XEOS_HAL_RTC_DateTimeGetYear Top

Gets the year number

uint8_t XEOS_HAL_RTC_DateTimeGetYear( XEOS_HAL_RTC_DateTimeRef time );

Parameters
  • time
    The RTC time object
Return value

The year number

XEOS_HAL_RTC_DateTimeSetCentury Top

Sets the century number

void XEOS_HAL_RTC_DateTimeSetCentury( XEOS_HAL_RTC_DateTimeRef time, uint8_t value );

Parameters
  • time
    The RTC time object
  • value
    The century number

XEOS_HAL_RTC_DateTimeSetDayOfMonth Top

Sets the day of month

void XEOS_HAL_RTC_DateTimeSetDayOfMonth( XEOS_HAL_RTC_DateTimeRef time, uint8_t value );

Parameters
  • time
    The RTC time object
  • value
    The day of month

XEOS_HAL_RTC_DateTimeSetHours Top

Sets the number of hours

void XEOS_HAL_RTC_DateTimeSetHours( XEOS_HAL_RTC_DateTimeRef time, uint8_t value );

Parameters
  • time
    The RTC time object
  • value
    The number of hours

XEOS_HAL_RTC_DateTimeSetMinutes Top

Sets the number of minutes

void XEOS_HAL_RTC_DateTimeSetMinutes( XEOS_HAL_RTC_DateTimeRef time, uint8_t value );

Parameters
  • time
    The RTC time object
  • value
    The number of minutes

XEOS_HAL_RTC_DateTimeSetMonth Top

Sets the month number

void XEOS_HAL_RTC_DateTimeSetMonth( XEOS_HAL_RTC_DateTimeRef time, uint8_t value );

Parameters
  • time
    The RTC time object
  • value
    The month number

XEOS_HAL_RTC_DateTimeSetSeconds Top

Sets the number of seconds

void XEOS_HAL_RTC_DateTimeSetSeconds( XEOS_HAL_RTC_DateTimeRef time, uint8_t value );

Parameters
  • time
    The RTC time object
  • value
    The number of seconds

XEOS_HAL_RTC_DateTimeSetSystemTime Top

Sets the RTC time (writes values back to CMOS)

XEOS_HAL_RTC_DateTimeRef XEOS_HAL_RTC_DateTimeGetSystemTime( void );

Return value

The RTC time object

XEOS_HAL_RTC_DateTimeSetWeekday Top

Sets the weekday

void XEOS_HAL_RTC_DateTimeSetWeekday( XEOS_HAL_RTC_DateTimeRef time, uint8_t value );

Parameters
  • time
    The RTC time object
  • value
    The weekday

XEOS_HAL_RTC_DateTimeSetYear Top

Sets the year number

void XEOS_HAL_RTC_DateTimeSetYear( XEOS_HAL_RTC_DateTimeRef time, uint8_t value );

Parameters
  • time
    The RTC time object
  • value
    The year number

XEOS_HAL_RTC_DisablePeriodicInterrupts Top

Disables RTC periodic interrupts (IRQ8)

void XEOS_HAL_RTC_DisablePeriodicInterrupts( void );

XEOS_HAL_RTC_EnablePeriodicInterrupts Top

Enables RTC periodic interrupts (IRQ8)

void XEOS_HAL_RTC_EnablePeriodicInterrupts( void );

XEOS_HAL_RTC_GetRate Top

Gets the RTC rate

uint8_t XEOS_HAL_RTC_GetRate( void );

Return value

The RTC rate divider

XEOS_HAL_RTC_SetRate Top

Sets the RTC rate

void XEOS_HAL_RTC_SetRate( uint8_t rate );

Parameters
  • rate
    The RTC rate divider

XEOS_HAL_RTC_UpdateInProgress Top

Checks if a RTC update is in progress

bool XEOS_HAL_RTC_UpdateInProgress( void );

Return value

True if a RTC update is in progress, otherwise false

Types

XEOS_HAL_RTC_DateTimeRef Top

Opaque type for the RTC time object

typedef struct __XEOS_HAL_RTC_DateTime * XEOS_HAL_RTC_DateTimeRef;

Macros

__XEOS_HAL_RTC_H__ Top

#define __XEOS_HAL_RTC_H__