mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
ba3088c4bd
into separate patch files
87 lines
3.3 KiB
Diff
87 lines
3.3 KiB
Diff
*** stock_iot-lab_M3/openwsn/board_info.h Thu Apr 24 11:19:39 2014
|
|
--- riot-openwsn-wip/openwsn/board_info.h Thu Apr 24 16:55:54 2014
|
|
***************
|
|
*** 0 ****
|
|
--- 1,81 ----
|
|
+ /**
|
|
+ \brief iot-lab_M3 board information bsp module (based on openmoteSTM32 code).
|
|
+
|
|
+ This module simply defines some strings describing the board, which CoAP uses
|
|
+ to return the board's description.
|
|
+
|
|
+ \author Thomas Watteyne <watteyne@eecs.berkeley.edu>, February 2012.
|
|
+ \author Tengfei Chang <tengfei.chang@gmail.com>, July 2012.
|
|
+ \author Alaeddine Weslati <alaeddine.weslati@inria.fr>, January 2014.
|
|
+ */
|
|
+
|
|
+ #ifndef __BOARD_INFO_H
|
|
+ #define __BOARD_INFO_H
|
|
+
|
|
+ #include "stm32f10x_lib.h"
|
|
+ #include "stdint.h"
|
|
+ #include "string.h"
|
|
+
|
|
+ //=========================== defines =========================================
|
|
+ #define port_INLINE inline
|
|
+
|
|
+ #define PRAGMA(x) _Pragma(#x)
|
|
+ #define PACK(x) pack(x)
|
|
+
|
|
+ //TODO in case previous declaration fails in certain compilers. Remove this
|
|
+ //one if it works with GNU GCC
|
|
+ //#define PACK_START _Pragma("pack(1)")
|
|
+ //#define PACK_END _Pragma("pack()")
|
|
+
|
|
+ #define INTERRUPT_DECLARATION(); //no declaration
|
|
+ #define DISABLE_INTERRUPTS() __disable_irq();
|
|
+ #define ENABLE_INTERRUPTS() __enable_irq();
|
|
+
|
|
+ //===== timer
|
|
+
|
|
+ #define PORT_TIMER_WIDTH uint16_t
|
|
+ #define PORT_RADIOTIMER_WIDTH uint16_t
|
|
+
|
|
+ #define PORT_SIGNED_INT_WIDTH int16_t
|
|
+ #define PORT_TICS_PER_MS 32
|
|
+ #define SCHEDULER_WAKEUP() EXTI->SWIER |= EXTI_Line1;
|
|
+ #define SCHEDULER_ENABLE_INTERRUPT() //enable in board use EXTI_Line1
|
|
+
|
|
+ //===== pinout
|
|
+
|
|
+ // [PA.2] radio SLP_TR_CNTL
|
|
+ #define PORT_PIN_RADIO_SLP_TR_CNTL_HIGH() GPIOA->ODR |= (1<<2);
|
|
+ #define PORT_PIN_RADIO_SLP_TR_CNTL_LOW() GPIOA->ODR &= ~(1<<2);
|
|
+ // radio reset line
|
|
+ // radio /RST
|
|
+ #define PORT_PIN_RADIO_RESET_HIGH() //GPIOC->ODR |= 0X0040;// nothing
|
|
+ #define PORT_PIN_RADIO_RESET_LOW() //GPIOC->ODR &= ~0X0040;// nothing
|
|
+ //#define PORT_PIN_RADIO_RESET_LOW() GPIOC->ODR &= ~(1<<1);
|
|
+
|
|
+ //===== IEEE802154E timing
|
|
+ // time-slot related
|
|
+ #define PORT_TsSlotDuration 491 // counter counts one extra count, see datasheet
|
|
+ // execution speed related
|
|
+ #define PORT_maxTxDataPrepare 66 // 2014us (measured 746us)
|
|
+ #define PORT_maxRxAckPrepare 20 // 305us (measured 83us)
|
|
+ #define PORT_maxRxDataPrepare 33 // 1007us (measured 84us)
|
|
+ #define PORT_maxTxAckPrepare 30 // 305us (measured 219us)
|
|
+ // radio speed related
|
|
+ #define PORT_delayTx 10 // 214us (measured 219us)
|
|
+ #define PORT_delayRx 0 // 0us (can not measure)
|
|
+ // radio watchdog
|
|
+
|
|
+ //=========================== variables =======================================
|
|
+
|
|
+ static const uint8_t rreg_uriquery[] = "h=ucb";
|
|
+ static const uint8_t infoBoardname[] = "IOT-LAB_M3";
|
|
+ static const uint8_t infouCName[] = "STM32F103";
|
|
+ static const uint8_t infoRadioName[] = "AT86RF231";
|
|
+
|
|
+ //=========================== prototypes ======================================
|
|
+
|
|
+ //=========================== public ==========================================
|
|
+
|
|
+ //=========================== private =========================================
|
|
+
|
|
+ #endif
|