ATSHA204 开发源码


ATSHA204开发源码,以及说明文档,供大家学习参考。
资源截图
代码片段和文件信息
/* ----------------------------------------------------------------------------
 *         ATMEL Microcontroller Software Support
 * ----------------------------------------------------------------------------
 * Copyright (c) 2008 Atmel Corporation
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms with or without
 * modification are permitted provided that the following conditions are met:
 *
 * - Redistributions of source code must retain the above copyright notice
 * this list of conditions and the disclaimer below.
 *
 * Atmel‘s name may not be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL “AS IS“ AND ANY EXPRESS OR
 * IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
 * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT INDIRECT
 * INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT
 * LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA
 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * ----------------------------------------------------------------------------
 */

/** file
 *  rief  Example of an Application That Uses the SHA204 Library
 *  author Atmel Crypto Products
 *  date   November 9 2010
 *   odo   Add time measuring function to use it for measuring the
 *          time between sending a command to the SHA204 device and
 *          receiving a response.
*/


#include                     // declarations for I/O functions
#include                    // declarations for string functions

#include                 // declarations for debug functions
#include            // declarations for assert functions
#include             // declarations for trace functions
#include   // declarations for timer functions
#include   // declarations of function return codes
#include    // definitions and declarations for the Command module


/** rief This function evaluates a function return code
 *         and puts the device to sleep if the return code
 *         indicates that the device is awake.
 * param[in] ret_code return code of the last call to a SHA204 library function
 */
void evaluate_ret_code(uint8_t ret_code)
{
if ((ret_code == SHA204_PARSE_ERROR)
|| (ret_code == SHA204_CMD_FAIL)
|| (ret_code == SHA204_RX_FAIL))
// We got some kind of response. Return codes of
// SHA20

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-02-26 14:56  SHA204LibraryDistributabledoc
     文件       76631  2009-10-15 16:40  SHA204LibraryDistributabledocLicenseAgreement.rtf
     文件      506895  2011-02-26 14:55  SHA204LibraryDistributabledocSHA204Library.pdf
     文件      585251  2011-02-26 14:56  SHA204LibraryDistributabledocSHA204LibraryExampleAT90USB1287.pdf
     文件      553639  2011-02-26 14:56  SHA204LibraryDistributabledocSHA204LibraryExampleAT91SAM9G45.pdf
     目录           0  2011-02-26 15:03  SHA204LibraryDistributableprojects
     文件        4707  2011-02-07 14:52  SHA204LibraryDistributableprojectssha204_gpio.aps
     文件         278  2011-02-07 14:53  SHA204LibraryDistributableprojectssha204_gpio.aws
     文件        3920  2011-02-07 14:35  SHA204LibraryDistributableprojectssha204_i2c.aps
     文件         217  2011-02-07 14:42  SHA204LibraryDistributableprojectssha204_i2c.aws
     目录           0  2011-02-26 15:06  SHA204LibraryDistributableprojectsSHA204_SAM9G45
     文件      144411  2011-02-08 20:43  SHA204LibraryDistributableprojectsSHA204_SAM9G45.cproject
     文件        2676  2011-02-08 20:43  SHA204LibraryDistributableprojectsSHA204_SAM9G45.project
     目录           0  2011-02-08 17:00  SHA204LibraryDistributableprojectsSHA204_SAM9G45oards
     目录           0  2011-02-08 17:00  SHA204LibraryDistributableprojectsSHA204_SAM9G45oardsat91sam9m10-ek
     目录           0  2011-02-08 17:00  SHA204LibraryDistributableprojectsSHA204_SAM9G45oardsat91sam9m10-ekat91sam9m10
     文件      587343  2010-11-08 18:21  SHA204LibraryDistributableprojectsSHA204_SAM9G45oardsat91sam9m10-ekat91sam9m10AT91SAM9M10.h
     文件        4395  2010-11-08 18:21  SHA204LibraryDistributableprojectsSHA204_SAM9G45oardsat91sam9m10-ekat91sam9m10chip.h
     文件        1715  2010-11-08 18:21  SHA204LibraryDistributableprojectsSHA204_SAM9G45oardsat91sam9m10-ekat91sam9m10chip.mak
     文件        2868  2010-11-08 18:21  SHA204LibraryDistributableprojectsSHA204_SAM9G45oardsat91sam9m10-ekat91sam9m10ddram.lds
     文件        2165  2010-11-08 18:21  SHA204LibraryDistributableprojectsSHA204_SAM9G45oardsat91sam9m10-ekat91sam9m10ddram.sct
     文件        2998  2010-11-08 18:21  SHA204LibraryDistributableprojectsSHA204_SAM9G45oardsat91sam9m10-ekat91sam9m10sram.lds
     文件        2263  2010-11-08 18:21  SHA204LibraryDistributableprojectsSHA204_SAM9G45oardsat91sam9m10-ekat91sam9m10sram.sct
     文件       30525  2010-11-08 18:21  SHA204LibraryDistributableprojectsSHA204_SAM9G45oardsat91sam9m10-ekoard.h
     文件        6604  2010-11-08 18:21  SHA204LibraryDistributableprojectsSHA204_SAM9G45oardsat91sam9m10-ekoard_cstartup.S
     文件        7337  2010-11-08 18:21  SHA204LibraryDistributableprojectsSHA204_SAM9G45oardsat91sam9m10-ekoard_lowlevel.c
     文件       36676  2010-11-08 18:21  SHA204LibraryDistributableprojectsSHA204_SAM9G45oardsat91sam9m10-ekoard_memories.c
     文件        2861  2010-11-08 18:21  SHA204LibraryDistributableprojectsSHA204_SAM9G45oardsat91sam9m10-ekoard_memories.h
     目录           0  2011-02-08 17:00  SHA204LibraryDistributableprojectsSHA204_SAM9G45drivers
     目录           0  2011-02-08 17:00  SHA204LibraryDistributableprojectsSHA204_SAM9G45driversasync
     文件        2366  2010-11-08 18:21  SHA204LibraryDistributableprojectsSHA204_SAM9G45driversasyncasync.c
............此处省略70个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)