📄 rtc_utility.c
字号:
//*----------------------------------------------------------------------------
//* ATMEL Microcontroller Software Support - ROUSSET -
//*----------------------------------------------------------------------------
//* The software is delivered "AS IS" without warranty or condition of any
//* kind, either express, implied or statutory. This includes without
//* limitation any warranty or condition with respect to merchantability or
//* fitness for any particular purpose, or against the infringements of
//* intellectual property rights of others.
//*----------------------------------------------------------------------------
//* File Name : rtc_utility.c
//* Object : Allow to convert date in duration and inversely
//*
//* 1.0 08/22/01 S.C : Creation
//*----------------------------------------------------------------------------
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "parts/m55800/lib_m55800.h"
#include "drivers/time_rtc/time_rtc.h"
#include "targets/eb55/eb55.h"
#include "rtc_utility.h"
extern TimeDescRtc rtc;
static unsigned int days_from_year_start[12] =
{
0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
};
/************************************************************************************/
/* String character Function *****************************************************/
/************************************************************************************/
char *strncpy0(char *destination, const char *source, int n)
/* Cette fonction s'appelle avec la m阭e syntaxe que la fonction
strncpy de la biblioth鑡ue LLIBCA.LIB, la seule diff閞ence est que
strncpy0 tronque la string_var r閏eptrice
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -