⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 blockstoragec.nc

📁 tinyos2.0版本驱动
💻 NC
字号:
// $Id: BlockStorageC.nc,v 1.4 2006/12/12 18:23:02 vlahan Exp $/* * Copyright (c) 2005-2006 Intel Corporation * All rights reserved. * * This file is distributed under the terms in the attached INTEL-LICENSE      * file. If you do not find these files, copies can be found by writing to * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,  * 94704.  Attention:  Intel License Inquiry. *//** * Implementation of the block storage abstraction from TEP103 for the * Atmel AT45DB serial data flash. * * @param volid Volume to use for block storage * * @author David Gay */#include "Storage.h"generic configuration BlockStorageC(volume_id_t volid) {  provides {    interface BlockWrite;    interface BlockRead;  }}implementation {  enum {    BLOCK_ID = unique(UQ_BLOCK_STORAGE) + uniqueCount(UQ_CONFIG_STORAGE),    RESOURCE_ID = unique(UQ_AT45DB)  };      components BlockStorageP, WireBlockStorageP, At45dbStorageManagerC, At45dbC;  BlockWrite = BlockStorageP.BlockWrite[BLOCK_ID];  BlockRead = BlockStorageP.BlockRead[BLOCK_ID];  BlockStorageP.At45dbVolume[BLOCK_ID] -> At45dbStorageManagerC.At45dbVolume[volid];  BlockStorageP.Resource[BLOCK_ID] -> At45dbC.Resource[RESOURCE_ID];}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -