Working prop rf driver
This commit is contained in:
parent
0102628245
commit
56721d13cf
@ -522,21 +522,21 @@ transmit(unsigned short transmit_len)
|
||||
cmd_tx_adv->pPkt = tx_buf;
|
||||
|
||||
// TODO: Register callback
|
||||
RF_CmdHandle txHandle = RF_postCmd(rfHandle, (RF_Op*)&cmd_tx_adv, RF_PriorityNormal, NULL, 0);
|
||||
if (txHandle == RF_ALLOC_ERROR)
|
||||
{
|
||||
/* Failure sending the CMD_PROP_TX command */
|
||||
PRINTF("transmit: PROP_TX_ERR ret=%d, CMDSTA=0x%08lx, status=0x%04x\n",
|
||||
ret, cmd_status, cmd_tx_adv->status);
|
||||
return RADIO_TX_ERR;
|
||||
}
|
||||
|
||||
ENERGEST_ON(ENERGEST_TYPE_TRANSMIT);
|
||||
|
||||
// watchdog_periodic();
|
||||
|
||||
/* Idle away while the command is running */
|
||||
RF_pendCmd(rfHandle, txHandle, 0);
|
||||
RF_runCmd(rfHandle, (RF_Op*)cmd_tx_adv, RF_PriorityNormal, NULL, 0);
|
||||
// if (txHandle == RF_ALLOC_ERROR)
|
||||
// {
|
||||
// /* Failure sending the CMD_PROP_TX command */
|
||||
// PRINTF("transmit: PROP_TX_ERR ret=%d, CMDSTA=0x%08lx, status=0x%04x\n",
|
||||
// ret, cmd_status, cmd_tx_adv->status);
|
||||
// return RADIO_TX_ERR;
|
||||
// }
|
||||
//
|
||||
// ENERGEST_ON(ENERGEST_TYPE_TRANSMIT);
|
||||
//
|
||||
// // watchdog_periodic();
|
||||
//
|
||||
// /* Idle away while the command is running */
|
||||
// RF_pendCmd(rfHandle, txHandle, RF_EventLastCmdDone);
|
||||
|
||||
if(cmd_tx_adv->status == PROP_DONE_OK) {
|
||||
/* Sent OK */
|
||||
|
@ -204,7 +204,7 @@ rfc_CMD_PROP_TX_ADV_t smartrf_settings_cmd_prop_tx_adv =
|
||||
.status = 0x0000,
|
||||
.pNextOp = 0,
|
||||
.startTime = 0x00000000,
|
||||
.startTrigger.triggerType = 0x0,
|
||||
.startTrigger.triggerType = TRIG_NOW,
|
||||
.startTrigger.bEnaCmd = 0x0,
|
||||
.startTrigger.triggerNo = 0x0,
|
||||
.startTrigger.pastTrig = 0x0,
|
||||
@ -219,7 +219,7 @@ rfc_CMD_PROP_TX_ADV_t smartrf_settings_cmd_prop_tx_adv =
|
||||
.startConf.bExtTxTrig = 0x0,
|
||||
.startConf.inputMode = 0x0,
|
||||
.startConf.source = 0x0,
|
||||
.preTrigger.triggerType = TRIG_REL_START,
|
||||
.preTrigger.triggerType = TRIG_NOW,
|
||||
.preTrigger.bEnaCmd = 0x0,
|
||||
.preTrigger.triggerNo = 0x0,
|
||||
.preTrigger.pastTrig = 0x1,
|
||||
|
@ -60,7 +60,7 @@
|
||||
#include "leds.h"
|
||||
//#include "gpio-interrupt.h"
|
||||
#include "ieee-addr.h"
|
||||
//#include "uart.h"
|
||||
#include "uart0-arch.h"
|
||||
#include "sys/clock.h"
|
||||
#include "sys/rtimer.h"
|
||||
#include "sys/node-id.h"
|
||||
@ -130,6 +130,9 @@ platform_init_stage_one()
|
||||
Board_initGeneral();
|
||||
GPIO_init();
|
||||
|
||||
// Only enables interrupts
|
||||
NoRTOS_start();
|
||||
|
||||
// /* Enable flash cache and prefetch. */
|
||||
// ti_lib_vims_mode_set(VIMS_BASE, VIMS_MODE_ENABLED);
|
||||
// ti_lib_vims_configure(VIMS_BASE, true, true);
|
||||
@ -200,9 +203,6 @@ platform_init_stage_three()
|
||||
//
|
||||
// process_start(&sensors_process, NULL);
|
||||
fade(Board_GPIO_LED1);
|
||||
|
||||
// Finally enable hardware interrupts
|
||||
NoRTOS_start();
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
|
@ -122,20 +122,20 @@ main(void)
|
||||
|
||||
platform_init_stage_three();
|
||||
|
||||
//#if BUILD_WITH_RPL_BORDER_ROUTER
|
||||
// rpl_border_router_init();
|
||||
// LOG_DBG("With RPL Border Router\n");
|
||||
//#endif /* BUILD_WITH_RPL_BORDER_ROUTER */
|
||||
//
|
||||
//#if BUILD_WITH_ORCHESTRA
|
||||
// orchestra_init();
|
||||
// LOG_DBG("With Orchestra\n");
|
||||
//#endif /* BUILD_WITH_ORCHESTRA */
|
||||
//
|
||||
//#if BUILD_WITH_SHELL
|
||||
// serial_shell_init();
|
||||
// LOG_DBG("With Shell\n");
|
||||
//#endif /* BUILD_WITH_SHELL */
|
||||
#if BUILD_WITH_RPL_BORDER_ROUTER
|
||||
rpl_border_router_init();
|
||||
LOG_DBG("With RPL Border Router\n");
|
||||
#endif /* BUILD_WITH_RPL_BORDER_ROUTER */
|
||||
|
||||
#if BUILD_WITH_ORCHESTRA
|
||||
orchestra_init();
|
||||
LOG_DBG("With Orchestra\n");
|
||||
#endif /* BUILD_WITH_ORCHESTRA */
|
||||
|
||||
#if BUILD_WITH_SHELL
|
||||
serial_shell_init();
|
||||
LOG_DBG("With Shell\n");
|
||||
#endif /* BUILD_WITH_SHELL */
|
||||
|
||||
#if BUILD_WITH_COAP
|
||||
coap_engine_init();
|
||||
|
Loading…
Reference in New Issue
Block a user