Project

General

Profile

Revision 234

RTC functional to retrieve date and time

View differences:

utils.h
1 1
#ifndef UTILS_H_INCLUDED
2 2
#define UTILS_H_INCLUDED
3 3

  
4
#define BCD_FIRST(n)     (n >> 4)       /** @brief Get first digit (leftmost digit) of 8-bit BCD */
5
#define BCD_SECOND(n)    (n & 0x0F)     /** @brief Get second digit (rightmost digit) of 8-bit BCD */
6

  
4 7
/**
5 8
 * @brief Gets the least significant byte of a 16-bit variable
6 9
 * @param val 16-bit variable

Also available in: Unified diff