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

📄 command.c

📁 Source code for RFM01 fm radio receiver
💻 C
字号:
/************************************************************************/
/*                                                                      */
/*        Access Dallas 1-Wire Device with ATMEL AVRs                   */
/*                                                                      */
/*              Author: Peter Dannegger                                 */
/*                      danni@specs.de                                  */
/*                                                                      */
/* modified by Martin Thomas <eversmith@heizung-thomas.de> 9/2004       */
/************************************************************************/

#include "../onewire.h"

void OW_command( uint8_t command, uint8_t *id )
{
  uint8_t i;

  OW_reset();

  if( id ) 
  {
    OW_byte_wr( OW_MATCH_ROM );			// to a single device
    i = OW_ROMCODE_SIZE;
    do 
    {
      OW_byte_wr( *id );
      id++;
    } 
    while( --i );
  } 
  else 
  {
    OW_byte_wr( OW_SKIP_ROM );			// to all devices
  }

  OW_byte_wr( command );
}

⌨️ 快捷键说明

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