command.c
来自「Source code for driving RFM01 fm radio r」· C语言 代码 · 共 37 行
C
37 行
/************************************************************************/
/* */
/* 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 + =
减小字号Ctrl + -
显示快捷键?