AVR library
Macros | Functions | Variables
rtc_mcp79410.c File Reference

RTC implementation with MCO79410. More...

#include <inttypes.h>
#include <avr/io.h>
#include <string.h>
#include <util/delay.h>
#include <avr/pgmspace.h>
#include "time.h"
#include "i2c.h"

Macros

#define RTC_I2C_ADR   0xde
 
#define RTC_VBATEN   3
 
#define RTC_OSCEN   7
 
#define RTC_24H   6
 

Functions

void fatal (PGM_P)
 
void rtc_error (PGM_P p)
 
uint8_t rtc_bcd2dec (const uint8_t b)
 
uint8_t rtc_dec2bcd (const uint8_t b)
 
uint8_t rtc_writebyte2 (const uint8_t adr, const uint8_t data1, const uint8_t data2)
 
void rtc_stop (void)
 
void rtc_start (uint8_t sec)
 
uint8_t rtc_getsec (void)
 
void rtc_gettime1 (struct rtc_t *t)
 
void rtc_gettime (struct rtc_t *t)
 
void rtc_settime (const struct rtc_t *t)
 
void rtc_init (void)
 
int8_t rtc_getcal (void)
 
void rtc_setcal (int8_t c)
 

Variables

const char RTC_IMPL[] PROGMEM = "MCP"
 

Detailed Description

RTC implementation with MCO79410.

Author
Matej Kogovsek (matej.nosp@m.@ham.nosp@m.radio.nosp@m..si)
Note
This file is part of mat-avr-lib