Revision e05848a6 modules/LightRing_1-0/module.c

View differences:

modules/LightRing_1-0/module.c
16 16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 17
*/
18 18

  
19
/**
20
 * @file    
21
 * @brief   Structures and constant for the LightRing module.
22
 *
23
 * @addtogroup lightring_module
24
 * @{
25
 */
26

  
27 19
#include "module.h"
28 20

  
29 21
#include <amiroos.h>
......
35 27
 */
36 28
/*===========================================================================*/
37 29

  
30

  
38 31
/** @} */
39 32

  
40 33
/*===========================================================================*/
......
71 64
  /* CR2                         */ SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN,
72 65
};
73 66

  
74
SPIConfig moduleHalSpiWlConfig = {
67
SPIConfig moduleHalSpiUWBConfig = {
75 68
  /* circular buffer mode        */ false,
76 69
  /* callback function pointer   */ NULL,
77 70
  /* chip select line port       */ GPIOB,
78 71
  /* chip select line pad number */ GPIOB_WL_SS_N,
79
  /* CR1                         */ SPI_CR1_BR_0,
72
  /* CR1                         */ SPI_CR1_BR_0 | SPI_CR1_BR_1,
80 73
  /* CR2                         */ SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN,
81 74
};
82 75

  
......
151 144
  },
152 145
};
153 146

  
147
//INFO WL_GDO2,WL_GDO0 /  -> UWB EXTI config.
148

  
154 149
/**
155 150
 * @brief   WL_GDO2 input signal GPIO.
156 151
 */
......
278 273
  /* laser overcurrent GPIO */ &moduleGpioLaserOc,
279 274
};
280 275

  
276

  
277
DW1000Driver moduleLldDW1000 = {
278
  /* SPI driver */ &MODULE_HAL_SPI_UWB,
279
  /* EXTI GPIO  */ &_gpioWlGdo2,
280
  /* RESET GPIO */ &_gpioWlGdo2,
281

  
282
};
283

  
281 284
/** @} */
282 285

  
283 286
/*===========================================================================*/
......
352 355
  /* data           */ &moduleLldPowerSwitchLaser,
353 356
};
354 357

  
358
/* UWB Module */
359
static int _utShellCmdCb_Dw1000(BaseSequentialStream* stream, int argc, char* argv[])
360
{
361
  (void)argc;
362
  (void)argv;
363
  aosUtRun(stream,&moduleUtAlldDw1000, NULL);
364
  return AOS_OK;
365
}
366
aos_unittest_t moduleUtAlldDw1000 = {
367
  /* info           */ "DW1000",
368
  /* name           */ "UWB Module",
369
  /* test function  */ utAlldDw1000Func,
370
  /* shell command  */ {
371
    /* name     */ "unittest:UWB",
372
    /* callback */ _utShellCmdCb_Dw1000,
373
    /* next     */ NULL,
374
  },
375
  /* data           */ &moduleLldDW1000,
376
};
377

  
355 378
#endif /* AMIROOS_CFG_TESTS_ENABLE == true */
356 379

  
357 380
/** @} */
358
/** @} */

Also available in: Unified diff