資源簡介
PSOC 官方例程 賽普拉斯 RTC 實時時鐘 cypress 開發板

代碼片段和文件信息
/*******************************************************************************
*?File?Name:?main.c
*
*?Version:?3.10
*
*?Description:
*??This?is?source?code?for?the?datasheet?example?of?the?Real?Time?Clock?(RTC)
*??component.
*
*??The?PrintDecNumber()?function?is?implemented?in?the?utils.c?file.?It?displays
*??decimal?numbers?(first?parameter)?on?a?specific?row?(second?parameter)?and
*??column?(the?third?parameter)?on?the?Character?LCD?component?named?LCD.?If
*??the?Character?LCD?component‘s?name?is?changed?it?also?should?be?updated?in
*??this?function.
*
*??There?are?interrupt?stubs?in?the?RTC?ISR.?The?every?second?interrupt?for?this
*??example?project?is?listed?below.?The?active?alarm?DST?AM/PM?and?leap?year
*??statuses?renew?code?is?removed?from?the?listing?below?as?it?is?the?same?as
*??in?the?main()?function?and?are?described?above.?The?only?second?value?update
*??code?is?shown?below.
*
********************************************************************************
*?Copyright?2012?Cypress?Semiconductor?Corporation.?All?rights?reserved.
*?This?software?is?owned?by?Cypress?Semiconductor?Corporation?and?is?protected
*?by?and?subject?to?worldwide?patent?and?copyright?laws?and?treaties.
*?Therefore?you?may?use?this?software?only?as?provided?in?the?license?agreement
*?accompanying?the?software?package?from?which?you?obtained?this?software.
*?CYPRESS?AND?ITS?SUPPLIERS?MAKE?NO?WARRANTY?OF?ANY?KIND?EXPRESS?OR?IMPLIED
*?WITH?REGARD?TO?THIS?SOFTWARE?INCLUDING?BUT?NOT?LIMITED?TO?NONINFRINGEMENT
*?IMPLIED?WARRANTIES?OF?MERCHANTABILITY?AND?FITNESS?FOR?A?PARTICULAR?PURPOSE.
*******************************************************************************/
#include?
#include?“utils.h“
/*******************************************************************************
*?Function?Name:?main
********************************************************************************
*
*?Summary:
*??Main?function?performs?following?functions:
*???1.?Declares?date?and?time?structure?and?fill?it?with?the?initial?values
*???2.?Enables?global?interrupts
*???3.?Sets?initial?time?and?date?values
*???4.?Sets?alarm?date?time?and?mask
*???5.?Sets?interval?mask
*???6.?Sets?DST?start?and?stop?configuration
*???7.?Prints?current?date?and?time?values.
*???8.?Afterwards?device?is?continuosly?switched?to?the?Sleep?low?power?mode.
*??????When?the?1PPS?event?occurs?device?wakes?up?ISR?is?executed?and?device
*??????is?switched?to?the?Sleep?mode?again?till?the?next?1PPS?event.?This
*??????applies?only?to?PSoC?3?device.?
*??????For?more?information?refer?to?the?device?TRM?and?System
*??????Reference?Guide.
*
*???The?information?on?the?display?is?updated?in?the?ISR.
*
*?Parameters:
*??None
*
*?Return:
*??None
*
*******************************************************************************/
void?main()
{
????uint8?tmpVar?=?0u;
????RTC_TIME_DATE?Start;??//RTC_TIME_DATE???datasheet中可查到?是一個結構體
????/
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-12-15?16:07??RtcDesign01\
?????目錄???????????0??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\
?????目錄???????????0??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\
?????文件???????39959??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\bitstream.txt
?????文件???????11472??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\CyBootAsmKeil.a51
?????文件??????242911??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\cydevice.h
?????文件??????217177??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\cydevicekeil.inc
?????文件??????194725??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\cydevicekeil_trm.inc
?????文件??????220459??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\cydevice_trm.h
?????文件???????34512??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\CyDmac.c
?????文件????????8042??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\CyDmac.h
?????文件????????6707??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\cyfitter.h
?????文件????????6084??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\cyfitterkeil.inc
?????文件???????12390??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\cyfitter_cfg.c
?????文件?????????954??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\cyfitter_cfg.h
?????文件???????20872??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\CyFlash.c
?????文件????????7071??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\CyFlash.h
?????文件???????90049??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\CyLib.c
?????文件???????35257??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\CyLib.h
?????文件???????15814??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\cymem.a51
?????文件????????8957??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\cypins.h
?????文件???????92086??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\cyPm.c
?????文件???????29092??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\cyPm.h
?????文件???????23924??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\CySpc.c
?????文件????????7155??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\CySpc.h
?????文件???????13969??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\cytypes.h
?????文件????????1635??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\cyutils.c
?????文件???????56254??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\device.lib
?????文件???????13054??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\elab_dependencies.txt
?????文件????????4599??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\generated_files.txt
?????文件???????13453??2014-12-15?16:13??RtcDesign01\RtcDesign01.cydsn\codegentemp\KeilStart.a51
............此處省略131個文件信息
評論
共有 條評論