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

#include <DS3231.hh>

Collaboration diagram for DS3231::alarm1_t:
Collaboration graph

Public Types

enum  {
  ONCE_PER_SEC = 0x0f, WHEN_SEC_MATCH = 0x0e, WHEN_MIN_SEC_MATCH = 0x0c, WHEN_TIME_MATCH = 0x08,
  WHEN_DATE_TIME_MATCH = 0x00, WHEN_DAY_TIME_MATCH = 0x10
}
 

Public Member Functions

void to_binary ()
 
void to_bcd ()
 

Public Attributes

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

Detailed Description

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

Definition at line 55 of file DS3231.hh.

Member Enumeration Documentation

anonymous enum
Enumerator
ONCE_PER_SEC 
WHEN_SEC_MATCH 
WHEN_MIN_SEC_MATCH 
WHEN_TIME_MATCH 
WHEN_DATE_TIME_MATCH 
WHEN_DAY_TIME_MATCH 

Definition at line 56 of file DS3231.hh.

Member Function Documentation

void DS3231::alarm1_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 87 of file DS3231.hh.

void DS3231::alarm1_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 77 of file DS3231.hh.

Member Data Documentation

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

Definition at line 69 of file DS3231.hh.

uint8_t DS3231::alarm1_t::day

Definition at line 68 of file DS3231.hh.

uint8_t DS3231::alarm1_t::hours

Definition at line 66 of file DS3231.hh.

uint8_t DS3231::alarm1_t::minutes

Definition at line 65 of file DS3231.hh.

uint8_t DS3231::alarm1_t::seconds

Definition at line 64 of file DS3231.hh.


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