Browse Source

boards: cleanup serial RX DMA hrt_call_every

- remove ts_to_abstime dependency
master
Daniel Agar 3 years ago committed by GitHub
parent
commit
bbfaa4694c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      boards/airmind/mindpx-v2/src/init.c
  2. 17
      boards/atl/mantis-edu/src/init.c
  3. 19
      boards/av/x-v1/src/init.c
  4. 20
      boards/bitcraze/crazyflie/src/init.c
  5. 20
      boards/bitcraze/crazyflie21/src/init.c
  6. 17
      boards/cubepilot/cubeyellow/src/init.c
  7. 19
      boards/holybro/can-gps-v1/src/init.c
  8. 20
      boards/holybro/durandal-v1/src/init.c
  9. 20
      boards/holybro/kakutef7/src/init.c
  10. 17
      boards/holybro/pix32v5/src/init.c
  11. 20
      boards/modalai/fc-v1/src/init.c
  12. 20
      boards/modalai/fc-v2/src/init.c
  13. 20
      boards/mro/ctrl-zero-f7-oem/src/init.c
  14. 20
      boards/mro/ctrl-zero-f7/src/init.c
  15. 17
      boards/mro/x21-777/src/init.c
  16. 19
      boards/mro/x21/src/init.c
  17. 19
      boards/nxp/fmuk66-e/src/init.c
  18. 19
      boards/nxp/fmuk66-v3/src/init.c
  19. 19
      boards/nxp/fmurt1062-v1/src/init.c
  20. 19
      boards/omnibus/f4sd/src/init.c
  21. 19
      boards/px4/fmu-v2/src/init.c
  22. 19
      boards/px4/fmu-v3/src/init.c
  23. 19
      boards/px4/fmu-v4/src/init.c
  24. 19
      boards/px4/fmu-v4pro/src/init.c
  25. 17
      boards/px4/fmu-v5/src/init.c
  26. 20
      boards/px4/fmu-v5x/src/init.cpp
  27. 20
      boards/px4/fmu-v6u/src/init.c
  28. 20
      boards/px4/fmu-v6x/src/init.c
  29. 20
      boards/spracing/h7extreme/src/init.c
  30. 19
      boards/uvify/core/src/init.c

19
boards/airmind/mindpx-v2/src/init.c

@ -218,22 +218,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -218,22 +218,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "DMA alloc FAILED\n");
}
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();

17
boards/atl/mantis-edu/src/init.c

@ -218,22 +218,9 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -218,22 +218,9 @@ __EXPORT int board_app_initialize(uintptr_t arg)
}
#if defined(SERIAL_HAVE_RXDMA)
/* set up the serial DMA polling */
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
board_pwr_init(1);

19
boards/av/x-v1/src/init.c

@ -161,22 +161,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -161,22 +161,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "[boot] DMA alloc FAILED\n");
}
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
(void) board_hardfault_init(2, true);

20
boards/bitcraze/crazyflie/src/init.c

@ -131,23 +131,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -131,23 +131,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
{
px4_platform_init();
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();

20
boards/bitcraze/crazyflie21/src/init.c

@ -131,23 +131,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -131,23 +131,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
{
px4_platform_init();
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();

17
boards/cubepilot/cubeyellow/src/init.c

@ -165,22 +165,9 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -165,22 +165,9 @@ __EXPORT int board_app_initialize(uintptr_t arg)
}
#if defined(SERIAL_HAVE_RXDMA)
/* set up the serial DMA polling */
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */

19
boards/holybro/can-gps-v1/src/init.c

@ -167,25 +167,12 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -167,25 +167,12 @@ __EXPORT int board_app_initialize(uintptr_t arg)
#endif // FLASH_BASED_PARAMS
#if defined(SERIAL_HAVE_RXDMA)
/* set up the serial DMA polling */
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
rgb_led(0, 255, 0, 0);
return OK;
}

20
boards/holybro/durandal-v1/src/init.c

@ -248,26 +248,12 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -248,26 +248,12 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "[boot] DMA alloc FAILED\n");
}
#if 0 // serial DMA is not yet implemented in NuttX for stm32h7
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();
led_off(LED_RED);

20
boards/holybro/kakutef7/src/init.c

@ -200,23 +200,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -200,23 +200,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "[boot] DMA alloc FAILED\n");
}
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();

17
boards/holybro/pix32v5/src/init.c

@ -252,22 +252,9 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -252,22 +252,9 @@ __EXPORT int board_app_initialize(uintptr_t arg)
}
#if defined(SERIAL_HAVE_RXDMA)
/* set up the serial DMA polling */
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */

20
boards/modalai/fc-v1/src/init.c

@ -256,23 +256,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -256,23 +256,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "[boot] DMA alloc FAILED\n");
}
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();

20
boards/modalai/fc-v2/src/init.c

@ -231,26 +231,12 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -231,26 +231,12 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "[boot] DMA alloc FAILED\n");
}
#if 0 // serial DMA is not yet implemented in NuttX for stm32h7
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();
led_off(LED_RED);

20
boards/mro/ctrl-zero-f7-oem/src/init.c

@ -205,23 +205,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -205,23 +205,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "[boot] DMA alloc FAILED\n");
}
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();

20
boards/mro/ctrl-zero-f7/src/init.c

@ -205,23 +205,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -205,23 +205,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "[boot] DMA alloc FAILED\n");
}
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();

17
boards/mro/x21-777/src/init.c

@ -195,22 +195,9 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -195,22 +195,9 @@ __EXPORT int board_app_initialize(uintptr_t arg)
}
#if defined(SERIAL_HAVE_RXDMA)
/* set up the serial DMA polling */
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */

19
boards/mro/x21/src/init.c

@ -241,22 +241,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -241,22 +241,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "DMA alloc FAILED\n");
}
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();

19
boards/nxp/fmuk66-e/src/init.c

@ -254,23 +254,10 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -254,23 +254,10 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "DMA alloc FAILED\n");
}
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_DMA) || defined(LPSERIAL_HAVE_DMA)
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)kinetis_lpserial_dma_poll_all,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)kinetis_lpserial_dma_poll_all, NULL);
#endif
/* initial LED state */

19
boards/nxp/fmuk66-v3/src/init.c

@ -254,23 +254,10 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -254,23 +254,10 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "DMA alloc FAILED\n");
}
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_DMA) || defined(LPSERIAL_HAVE_DMA)
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)kinetis_lpserial_dma_poll_all,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)kinetis_lpserial_dma_poll_all, NULL);
#endif
/* initial LED state */

19
boards/nxp/fmurt1062-v1/src/init.c

@ -276,23 +276,10 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -276,23 +276,10 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "[boot] DMA alloc FAILED\n");
}
/* set up the serial DMA polling */
#ifdef SERIAL_HAVE_DMA
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)imxrt_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)imxrt_serial_dma_poll, NULL);
#endif
/* initial LED state */

19
boards/omnibus/f4sd/src/init.c

@ -244,22 +244,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -244,22 +244,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "DMA alloc FAILED\n");
}
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();

19
boards/px4/fmu-v2/src/init.c

@ -432,22 +432,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -432,22 +432,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "DMA alloc FAILED\n");
}
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();

19
boards/px4/fmu-v3/src/init.c

@ -432,22 +432,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -432,22 +432,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "DMA alloc FAILED\n");
}
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();

19
boards/px4/fmu-v4/src/init.c

@ -267,22 +267,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -267,22 +267,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "DMA alloc FAILED\n");
}
// Set up the serial DMA polling.
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/**
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
// Initial LED state.
drv_led_start();

19
boards/px4/fmu-v4pro/src/init.c

@ -288,22 +288,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -288,22 +288,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "DMA alloc FAILED\n");
}
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();

17
boards/px4/fmu-v5/src/init.c

@ -255,22 +255,9 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -255,22 +255,9 @@ __EXPORT int board_app_initialize(uintptr_t arg)
}
#if defined(SERIAL_HAVE_RXDMA)
/* set up the serial DMA polling */
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */

20
boards/px4/fmu-v5x/src/init.cpp

@ -240,23 +240,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -240,23 +240,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "[boot] DMA alloc FAILED\n");
}
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();

20
boards/px4/fmu-v6u/src/init.c

@ -240,26 +240,12 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -240,26 +240,12 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "[boot] DMA alloc FAILED\n");
}
#if 0 // serial DMA is not yet implemented in NuttX for stm32h7
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();
led_off(LED_RED);

20
boards/px4/fmu-v6x/src/init.c

@ -242,26 +242,12 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -242,26 +242,12 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "[boot] DMA alloc FAILED\n");
}
#if 0 // serial DMA is not yet implemented in NuttX for stm32h7
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();
led_off(LED_RED);

20
boards/spracing/h7extreme/src/init.c

@ -205,26 +205,12 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -205,26 +205,12 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "[boot] DMA alloc FAILED\n");
}
#if 0 // serial DMA is not yet implemented in NuttX for stm32h7
/* set up the serial DMA polling */
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
/* initial LED state */
drv_led_start();
led_off(LED_RED);

19
boards/uvify/core/src/init.c

@ -267,22 +267,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) @@ -267,22 +267,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "DMA alloc FAILED\n");
}
// Set up the serial DMA polling.
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
struct timespec ts;
/**
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
// Initial LED state.
drv_led_start();

Loading…
Cancel
Save