-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FW-866. OpenRadio Implementation for OpenMote-B #516
base: develop
Are you sure you want to change the base?
Conversation
…nrf52840, openmote, python, and silabs-ezr32wg
…y to uint8_t instead of uint16_t
To test this PR, just select each combination of timeslot template and radio setting in ieee154_init function.
If you use the 40ms time slot template, make sure to have a frame size less than 50 (41 works) just to make sure that timeouts are still respected for upper layers. |
|
||
//==== bootstrapping slot info lookup table | ||
void board_init_slot_vars(void){ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initialize the slot_board_vars variable here, i.e. using the memset(&slot_board_vars[0], 0, sizeof(slot_board_vars));
Need to check the value of sizeof(slot_board_vars).
@@ -193,6 +193,10 @@ void radio_reset(void) { | |||
radio_vars.state = RADIOSTATE_STOPPED; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same changes on board.c and board_info.h should apply on nRF52840 port.
bsp/boards/board.h
Outdated
|
||
// available slot templates | ||
typedef enum{ | ||
SLOT_10ms, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the modulation corresponding to SLOT_10ms
bsp/boards/openmote-b-24ghz/board.c
Outdated
//==== bootstrapping slot info lookup table | ||
void board_init_slot_vars(void){ | ||
//10ms slot | ||
slot_board_vars [SLOT_10ms].slotDuration = 328 ; // 10ms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename SLOT_10ms to SLOT_10ms_24GHZ and the following lines
bsp/boards/openmote-b/board.c
Outdated
GPIOPinWrite(BSP_ANTENNA_BASE, BSP_ANTENNA_CC2538_24GHZ, BSP_ANTENNA_CC2538_24GHZ); | ||
GPIOPinWrite(BSP_ANTENNA_BASE, BSP_ANTENNA_AT215_24GHZ, 0); | ||
void antenna_cc2538(void) { | ||
GPIOPinWrite(BSP_ANTENNA_BASE, BSP_ANTENNA_CC2538_24GHZ, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 space for indentation everywhere
bsp/boards/openmote-b/leds.c
Outdated
@@ -140,7 +140,7 @@ void leds_circular_shift(void) { | |||
// incrementally turn LED on | |||
for (i=0;i<10;i++) { | |||
bspLedSet(BSP_LED_1); | |||
for (delay=0xffff;delay>0;delay--); | |||
for (delay=0xffff;delay>0;delay--) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reverse this change.
dyn_funcs [RADIOSETTING_OFDM_OPTION_1_MCS2].radio_getReceivedFrame = radio_getReceivedFrame_at86rf215; | ||
dyn_funcs [RADIOSETTING_OFDM_OPTION_1_MCS2].radio_isr = radio_isr_at86rf215; | ||
|
||
//RADIOSETTING_OFDM_OPTION_1_MCS3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 space indentation
bsp/boards/openmote-b/radio.c
Outdated
//RADIOSETTING_OFDM_OPTION_1_MCS3 | ||
dyn_funcs [RADIOSETTING_OFDM_OPTION_1_MCS3].radio_reset = radio_reset_at86rf215; | ||
dyn_funcs [RADIOSETTING_OFDM_OPTION_1_MCS3].radio_init = radio_init_at86rf215; | ||
dyn_funcs [RADIOSETTING_OFDM_OPTION_1_MCS3].radio_setConfig = radio_setConfig_at86rf215; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
align the "equal"
bsp/boards/openmote-b/radio.c
Outdated
#include "board.h" | ||
#include "cc2538rf.h" | ||
|
||
#include "spi.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This header file is not required here
|
||
#ifdef SPI_IN_INTERRUPT_MODE | ||
void spi_setCb(spi_cbt cb) { | ||
spi_vars.spi_cb = cb; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
|
||
// lower CS signal to have slave listening | ||
if (spi_vars.isFirst==SPI_FIRST) { | ||
GPIOPinWrite(SPI_GPIO_SSI_BASE, SPI_PIN_SSI_FSS, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation here, please check the whole file.
@@ -55,15 +55,6 @@ SECTIONS | |||
_ebss = .; | |||
} > SRAM | |||
|
|||
.heap (COPY): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will those lines create issues? if not, please don't make changes
@@ -149,7 +155,7 @@ void board_init(void) | |||
void rf_interface_init(void) | |||
{ | |||
pinmux_t pinmux; | |||
/* Configure the RF233 SPI Interface */ | |||
//Configure the RF233 SPI Interface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
drivers/common/opentimers.c
Outdated
@@ -8,6 +8,7 @@ at most MAX_NUM_TIMERS timers. | |||
*/ | |||
|
|||
#include "opendefs.h" | |||
#include "board.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is not required.
This reverts commit d0444e1.
…iot-lab_M3/board.c, silabs-ezr32wg/board.c, telosb/board.c, wsn430v13b/board.c, wsn430v14/board.c, and z1/board.c
} | ||
Py_DECREF(result); | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not aligned.
bsp/boards/python/board_obj.c
Outdated
|
||
// Setter/Getter function for slot_board_vars | ||
slot_board_vars_t board_selectSlotTemplate (slotType_t slot_type){ | ||
selected_slot_type = slot_type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 spaces for indentation
No description provided.