COSA
An Object-Oriented Platform for Arduino Programming
DS3231::alarm2_t Struct Reference

#include <DS3231.hh>

Collaboration diagram for DS3231::alarm2_t:
Collaboration graph

Public Types

enum  {
  ONCE_PER_MIN = 0x07, WHEN_MIN_MATCH = 0x06, WHEN_TIME_MATCH = 0x04, WHEN_DATE_TIME_MATCH = 0x00,
  WHEN_DAY_TIME_MATCH = 0x08
}
 

Public Member Functions

void to_binary ()
 
void to_bcd ()
 

Public Attributes

uint8_t minutes
 
uint8_t hours
 
union {
   uint8_t   day
 
   uint8_t   date
 
}; 
 

Detailed Description

Alarm2 register sub-set type and mask bits (Table 2, pp. 12).

Definition at line 96 of file DS3231.hh.

Member Enumeration Documentation

anonymous enum
Enumerator
ONCE_PER_MIN 
WHEN_MIN_MATCH 
WHEN_TIME_MATCH 
WHEN_DATE_TIME_MATCH 
WHEN_DAY_TIME_MATCH 

Definition at line 97 of file DS3231.hh.

Member Function Documentation

void DS3231::alarm2_t::to_bcd ( )
inline

Convert alarm time to BCD representation (from binary). Apply after setting new value and writing to the device. Note that output stream operator requires BCD form.

Definition at line 126 of file DS3231.hh.

void DS3231::alarm2_t::to_binary ( )
inline

Convert alarm time to binary representation (from BCD). Apply after reading from device and before any calculation. Note that output stream operator requires BCD form.

Definition at line 116 of file DS3231.hh.

Member Data Documentation

union { ... }
uint8_t DS3231::alarm2_t::date

Definition at line 108 of file DS3231.hh.

uint8_t DS3231::alarm2_t::day

Definition at line 107 of file DS3231.hh.

uint8_t DS3231::alarm2_t::hours

Definition at line 105 of file DS3231.hh.

uint8_t DS3231::alarm2_t::minutes

Definition at line 104 of file DS3231.hh.


The documentation for this struct was generated from the following file: