📄 time.c
字号:
/* +-------------------------------------------------------------------+ */
/* | Project : 1920.011 442GA01-M (Ext. Reader RFID 13,56MHz MIFARE) | */
/* | Module : RICReg.h | */
/* | Author : Jaime Rodriguez | */
/* | Company : AVE S.p.A. | */
/* | Released: October, 29 2008 | */
/* | Revision: YZ080.00 (FW - First Official Release) | */
/* | Revision: YZ081.00 (EEPROM - First Official Release) | */
/* | Revised : -------------- | */
/* | Revisor : -------------- | */
/* | Notes : -------------- | */
/* +-------------------------------------------------------------------+ */
/* | Purpose : This module contains functions to read and convert data | */
/* | for the Real Time Clock | */
/* +-------------------------------------------------------------------+ */
/* | Functions: void DS1371_DateToBinary( uint32_t * val ) | */
/* | void DS1371_BinaryToDate( uint32_t binary ) | */
/* | uint8_t bin_to_bcd( uint8_t bin ) | */
/* | uint8_t bcd_to_bin( uint8_t bcd ) | */
/* +-------------------------------------------------------------------+ */
/* +-------------------------------------------------------------------+ */
/* | I N C L U D E S | */
/* +-------------------------------------------------------------------+ */
// G L O B A L
#include <avr/io.h>
// L O C A L S
#include "LetExtDef.h"
/* +-------------------------------------------------------------------+ */
/* | M O D U L E V A R I A B L E S | */
/* +-------------------------------------------------------------------+ */
// This array contains the number of days in a non-leap year at the beginning of each month
uint16_t DaysToMonth[13] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 };
/* +-------------------------------------------------------------------+ */
/* | F U N C T I O N S | */
/* +-------------------------------------------------------------------+ */
/* +-------------------------------------------------------------------+ */
/* | D S 1 3 7 1 _ D a t e T o B i n a r y ( ) 15 Aprile 2008 | */
/* | Funzione per la trasformare i dati BCD di data/ora in un long che | */
/* | contiene i secondi trascorsi dal 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -