资源简介

RTC DS1307驱动源码。环境为atmel公司的开发板

资源截图

代码片段和文件信息

//*----------------------------------------------------------------------------
//*         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           : init.c
//* object              : Low level initialisations written in C
//* Creation            : ODi   06/26/2002
//*
//*----------------------------------------------------------------------------

#include “AT91RM9200.h“
#include “lib_AT91RM9200.h“
//#include “main.h“

//*----------------------------------------------------------------------------
//* \fn    AT91F_DBGU_Printk
//* \brief This function is used to send a string through the DBGU channel (Very low level debugging)
//*----------------------------------------------------------------------------
void AT91F_DBGU_Printk(
char *buffer) // \arg pointer to a string ending by \0
{
while(*buffer != ‘\0‘) {
while (!AT91F_US_TxReady((AT91PS_USART)AT91C_base_DBGU));
AT91F_US_PutChar((AT91PS_USART)AT91C_base_DBGU *buffer++);
}
}

//*----------------------------------------------------------------------------
//* \fn    AT91F_LowLevelInit
//* \brief This function performs very low level HW initialization
//*----------------------------------------------------------------------------
void AT91F_LowLevelInit()
{

// Open PIO for DBGU
AT91F_DBGU_CfgPIO();

// Configure DBGU
AT91F_US_Configure (
(AT91PS_USART) AT91C_base_DBGU          // DBGU base address
59904000            // +- 59904 MHz with PLLA selected
AT91C_US_ASYNC_MODE       // mode Register to be programmed
115200                    // baudrate to be programmed
0);                        // timeguard to be programmed

// Enable Transmitter
AT91F_US_EnableTx((AT91PS_USART) AT91C_base_DBGU);
// Enable Receiver
AT91F_US_EnableRx((AT91PS_USART) AT91C_base_DBGU);
AT91F_DBGU_Printk(“AT91F_LowLevelInit()\n\r“);
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2402  2006-01-27 07:17  AT91RM9200-DS1307\init.c

     文件       3708  2006-01-27 07:17  AT91RM9200-DS1307\main.c

     文件       1201  2006-01-27 07:17  AT91RM9200-DS1307\main.h

     文件        495  2006-01-27 07:17  AT91RM9200-DS1307\main.html

     文件       3269  2006-01-27 07:17  AT91RM9200-DS1307\twi.c

     文件       1084  2006-01-27 07:17  AT91RM9200-DS1307\twi.h

     文件        408  2006-01-27 07:17  AT91RM9200-DS1307\compil\AT91RM9200DK.cfg

     文件        184  2006-01-27 07:17  AT91RM9200-DS1307\compil\AT91RM9200DK.ini

     文件      10221  2006-01-27 07:17  AT91RM9200-DS1307\compil\cstartup_ads.s

     文件      43320  2006-01-27 07:17  AT91RM9200-DS1307\compil\DS1307.mcp

     文件      19548  2006-01-27 07:17  AT91RM9200-DS1307\compil\I2C-Timer.bin

     文件       2287  2006-01-27 07:17  AT91RM9200-DS1307\compil\printfk.c

     文件        300  2006-01-27 07:17  AT91RM9200-DS1307\compil\printfk.h

     文件      20414  2006-01-27 07:17  AT91RM9200-DS1307\compil\tools.html

     文件        305  2006-01-27 07:16  AT91RM9200-DS1307\compil\cvs\Entries

     文件         37  2006-01-27 07:16  AT91RM9200-DS1307\compil\cvs\Repository

     文件         58  2006-01-27 07:16  AT91RM9200-DS1307\compil\cvs\Root

     文件       3409  2006-01-27 07:17  AT91RM9200-DS1307\compil\DS1307_Data\CWSettingsWindows.stg

     文件        275  2006-01-27 07:17  AT91RM9200-DS1307\cvs\Entries

     文件         27  2006-01-27 07:17  AT91RM9200-DS1307\cvs\Repository

     文件         58  2006-01-27 07:17  AT91RM9200-DS1307\cvs\Root

     文件      11094  2006-01-27 07:17  AT91RM9200-DS1307\html\AT91RM9200-Basic.html

     文件      24475  2006-01-27 07:17  AT91RM9200-DS1307\html\AT91RM9200-Download.html

     文件        489  2006-01-27 07:17  AT91RM9200-DS1307\html\AT91_title.html

     文件       1335  2006-01-27 07:17  AT91RM9200-DS1307\html\orange_degrade_top.gif

     文件        228  2006-01-27 07:17  AT91RM9200-DS1307\html\cvs\Entries

     文件         32  2006-01-27 07:17  AT91RM9200-DS1307\html\cvs\Repository

     文件         58  2006-01-27 07:17  AT91RM9200-DS1307\html\cvs\Root

     文件         48  2006-01-27 07:17  cvs\Entries

     文件          0  2006-01-27 07:17  cvs\Entries.Static

............此处省略62个文件信息

评论

共有 条评论