Working prop rf driver

This commit is contained in:
Richard Weickelt 2018-02-09 14:39:40 +01:00 committed by Edvard Pettersen
parent 0102628245
commit 56721d13cf
4 changed files with 35 additions and 35 deletions

View File

@ -522,21 +522,21 @@ transmit(unsigned short transmit_len)
cmd_tx_adv->pPkt = tx_buf; cmd_tx_adv->pPkt = tx_buf;
// TODO: Register callback // TODO: Register callback
RF_CmdHandle txHandle = RF_postCmd(rfHandle, (RF_Op*)&cmd_tx_adv, RF_PriorityNormal, NULL, 0); RF_runCmd(rfHandle, (RF_Op*)cmd_tx_adv, RF_PriorityNormal, NULL, 0);
if (txHandle == RF_ALLOC_ERROR) // if (txHandle == RF_ALLOC_ERROR)
{ // {
/* Failure sending the CMD_PROP_TX command */ // /* Failure sending the CMD_PROP_TX command */
PRINTF("transmit: PROP_TX_ERR ret=%d, CMDSTA=0x%08lx, status=0x%04x\n", // PRINTF("transmit: PROP_TX_ERR ret=%d, CMDSTA=0x%08lx, status=0x%04x\n",
ret, cmd_status, cmd_tx_adv->status); // ret, cmd_status, cmd_tx_adv->status);
return RADIO_TX_ERR; // return RADIO_TX_ERR;
} // }
//
ENERGEST_ON(ENERGEST_TYPE_TRANSMIT); // ENERGEST_ON(ENERGEST_TYPE_TRANSMIT);
//
// watchdog_periodic(); // // watchdog_periodic();
//
/* Idle away while the command is running */ // /* Idle away while the command is running */
RF_pendCmd(rfHandle, txHandle, 0); // RF_pendCmd(rfHandle, txHandle, RF_EventLastCmdDone);
if(cmd_tx_adv->status == PROP_DONE_OK) { if(cmd_tx_adv->status == PROP_DONE_OK) {
/* Sent OK */ /* Sent OK */

View File

@ -204,7 +204,7 @@ rfc_CMD_PROP_TX_ADV_t smartrf_settings_cmd_prop_tx_adv =
.status = 0x0000, .status = 0x0000,
.pNextOp = 0, .pNextOp = 0,
.startTime = 0x00000000, .startTime = 0x00000000,
.startTrigger.triggerType = 0x0, .startTrigger.triggerType = TRIG_NOW,
.startTrigger.bEnaCmd = 0x0, .startTrigger.bEnaCmd = 0x0,
.startTrigger.triggerNo = 0x0, .startTrigger.triggerNo = 0x0,
.startTrigger.pastTrig = 0x0, .startTrigger.pastTrig = 0x0,
@ -219,7 +219,7 @@ rfc_CMD_PROP_TX_ADV_t smartrf_settings_cmd_prop_tx_adv =
.startConf.bExtTxTrig = 0x0, .startConf.bExtTxTrig = 0x0,
.startConf.inputMode = 0x0, .startConf.inputMode = 0x0,
.startConf.source = 0x0, .startConf.source = 0x0,
.preTrigger.triggerType = TRIG_REL_START, .preTrigger.triggerType = TRIG_NOW,
.preTrigger.bEnaCmd = 0x0, .preTrigger.bEnaCmd = 0x0,
.preTrigger.triggerNo = 0x0, .preTrigger.triggerNo = 0x0,
.preTrigger.pastTrig = 0x1, .preTrigger.pastTrig = 0x1,

View File

@ -60,7 +60,7 @@
#include "leds.h" #include "leds.h"
//#include "gpio-interrupt.h" //#include "gpio-interrupt.h"
#include "ieee-addr.h" #include "ieee-addr.h"
//#include "uart.h" #include "uart0-arch.h"
#include "sys/clock.h" #include "sys/clock.h"
#include "sys/rtimer.h" #include "sys/rtimer.h"
#include "sys/node-id.h" #include "sys/node-id.h"
@ -130,6 +130,9 @@ platform_init_stage_one()
Board_initGeneral(); Board_initGeneral();
GPIO_init(); GPIO_init();
// Only enables interrupts
NoRTOS_start();
// /* Enable flash cache and prefetch. */ // /* Enable flash cache and prefetch. */
// ti_lib_vims_mode_set(VIMS_BASE, VIMS_MODE_ENABLED); // ti_lib_vims_mode_set(VIMS_BASE, VIMS_MODE_ENABLED);
// ti_lib_vims_configure(VIMS_BASE, true, true); // ti_lib_vims_configure(VIMS_BASE, true, true);
@ -200,9 +203,6 @@ platform_init_stage_three()
// //
// process_start(&sensors_process, NULL); // process_start(&sensors_process, NULL);
fade(Board_GPIO_LED1); fade(Board_GPIO_LED1);
// Finally enable hardware interrupts
NoRTOS_start();
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
void void

View File

@ -122,20 +122,20 @@ main(void)
platform_init_stage_three(); platform_init_stage_three();
//#if BUILD_WITH_RPL_BORDER_ROUTER #if BUILD_WITH_RPL_BORDER_ROUTER
// rpl_border_router_init(); rpl_border_router_init();
// LOG_DBG("With RPL Border Router\n"); LOG_DBG("With RPL Border Router\n");
//#endif /* BUILD_WITH_RPL_BORDER_ROUTER */ #endif /* BUILD_WITH_RPL_BORDER_ROUTER */
//
//#if BUILD_WITH_ORCHESTRA #if BUILD_WITH_ORCHESTRA
// orchestra_init(); orchestra_init();
// LOG_DBG("With Orchestra\n"); LOG_DBG("With Orchestra\n");
//#endif /* BUILD_WITH_ORCHESTRA */ #endif /* BUILD_WITH_ORCHESTRA */
//
//#if BUILD_WITH_SHELL #if BUILD_WITH_SHELL
// serial_shell_init(); serial_shell_init();
// LOG_DBG("With Shell\n"); LOG_DBG("With Shell\n");
//#endif /* BUILD_WITH_SHELL */ #endif /* BUILD_WITH_SHELL */
#if BUILD_WITH_COAP #if BUILD_WITH_COAP
coap_engine_init(); coap_engine_init();