Enocean RPS報文發送例程

#include "EO3000I_API.h"
#include "EO3000I_CFG.h"

/************************************************************************-
EVA Board:
    EVA300-3 

Input PIN:

Output PIN:
    RSDADIO3    LMI LED

Description:
    Project template to start your own project.

Notes:
	1. Ensure to add the correct radio settings assembler file according your HW module. 
	2. use DolphinStudio to configure the API
	3. modify main()....

-************************************************************************/
#include <stdio.h>


// ------------------------------------------------------------------
code uint8 VERSION_APP[] = {0xE0,'V','E','R','S','I','O','N',
                            1,0,1,0,                                  // change APP Version here  
                            'A',
                            'T','E','M','P','L','A','T','E',          // change APP Description here (max. 15 chars)
                            0x00,0xE0};
// ------------------------------------------------------------------
void main()
{		
	TEL_RADIO_TYPE rTel;
	TEL_PARAM_TYPE pTel;
	pTel.p_tx.u8SubTelNum = 3;
	pTel.p_tx.u32DestinationId = 0;	 
	
	mainInit();	                                                      // API initialisation
	
	rTel.trps.u8Choice = RADIO_CHOICE_RPS;

        rTel.trps.u32Id = 0;
        rTel.trps.u8Status = 0;
        rTel.trps.u8Data = 0;
        rTel.trps.u8Length = RADIO_DEC_LENGTH_RPS; 

 	while(1)
	{			
                io_togDigital(RSDADIO_3);                                     // toggle LMI LED
		radio_ulpPrepareTelegram(&rTel,NULL);
                radio_ulpSend3SubTels();
		time_wait(2000);                                               // wait 500ms
		CLR_WDT();
	}
}

發佈了109 篇原創文章 · 獲贊 39 · 訪問量 51萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章