Revision 0ecf4119 modules/NUCLEO-F103RB/module.c

View differences:

modules/NUCLEO-F103RB/module.c
51 51

  
52 52
#if defined(AMIROLLD_CFG_DW1000)
53 53

  
54
/*! SPI (high and low speed) configuration for DW1000 */
54
/*! SPI (high speed) configuration for DW1000 */
55 55
SPIConfig moduleHalSpiUwbHsConfig = {
56 56
  /* circular buffer mode        */ false,
57 57
  /* callback function pointer   */ NULL,
58 58
  /* chip select line port       */ GPIOB,
59 59
  /* chip select line pad number */ GPIOB_PIN12,
60
  /* CR1                         */ 0,
61
  /* CR2                         */ 0,
60
  /* CR1                         */ 0,                                  // 32/2 Mbps
61
  /* CR2                         */ SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN,
62 62
};
63 63

  
64
/*! SPI (low speed) configuration for DW1000 */
64 65
SPIConfig moduleHalSpiUwbLsConfig = {
65 66
  /* circular buffer mode        */ false,
66 67
  /* callback function pointer   */ NULL,
67 68
  /* chip select line port       */ GPIOB,
68 69
  /* chip select line pad number */ GPIOB_PIN12,
69
  /* CR1                         */ SPI_CR1_BR_1 | SPI_CR1_BR_0,
70
  /* CR2                         */ 0,
70
  /* CR1                         */ SPI_CR1_BR_1 | SPI_CR1_BR_0,        // 32/16 Mbps
71
  /* CR2                         */ SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN,
71 72
};
72 73

  
73 74
#endif /* defined(AMIROLLD_CFG_DW1000) */
......
97 98
};
98 99

  
99 100
#if defined(AMIROLLD_CFG_DW1000)
100

  
101 101
/**
102 102
 * @brief   DW1000 reset output signal GPIO.
103 103
 */
104 104
static apalGpio_t _gpioDw1000Reset = {
105
  /* line */ PAL_LINE(GPIOA, GPIOA_ARD_A0),
105
  /* line */ LINE_ARD_D15,     // PAL_LINE(GPIOB, GPIOB_ARD_D15)
106 106
};
107 107
ROMCONST apalControlGpio_t moduleGpioDw1000Reset = {
108 108
  /* GPIO */ &_gpioDw1000Reset,
......
113 113
  },
114 114
};
115 115

  
116

  
117 116
/**
118 117
 * @brief   DW1000 interrrupt input signal GPIO.
119 118
 */
120 119
static apalGpio_t _gpioDw1000Irqn = {
121
  /* line */ PAL_LINE(GPIOB, GPIOB_ARD_D6),
120
  /* line */ LINE_ARD_D14,    // PAL_LINE(GPIOB, GPIOB_ARD_D14)
122 121
};
123 122
ROMCONST apalControlGpio_t moduleGpioDw1000Irqn = {
124 123
  /* GPIO */ &_gpioDw1000Irqn,
......
129 128
  },
130 129
};
131 130

  
132

  
133 131
/**
134 132
 * @brief   DW1000 SPI chip select output signal GPIO.
135 133
 */
......
241 239
{
242 240
  (void)argc;
243 241
  (void)argv;
242
  ((ut_dw1000data_t*)moduleUtAlldDw1000.data)->dw1000d = &moduleLldDw1000;
244 243
  aosUtRun(stream, &moduleUtAlldDw1000, NULL);
245 244
  return AOS_OK;
246 245
}
246
static ut_dw1000data_t _utAlldDw1000Data = {
247
  /* dw1000d    */ NULL,
248
};
247 249
aos_unittest_t moduleUtAlldDw1000 = {
248 250
  /* info           */ "DW1000",
249 251
  /* name           */ "UWB System",
......
253 255
    /* callback */ _utShellCmdCb_Dw1000,
254 256
    /* next     */ NULL,
255 257
  },
256
  /* data           */ &moduleLldDw1000,
258
  /* data           */ &_utAlldDw1000Data,  // TODO: &moduleLldDw1000
257 259
};
258 260
#endif /* defined(AMIROLLD_CFG_DW1000) */
259 261

  

Also available in: Unified diff