Browse Source

HAL_ChibiOS: signal2 does not need to be DMA safe

master
Andrew Tridgell 6 years ago
parent
commit
6c128fcaf2
  1. 4
      libraries/AP_HAL_ChibiOS/SoftSigReader.cpp
  2. 2
      libraries/AP_HAL_ChibiOS/SoftSigReader.h

4
libraries/AP_HAL_ChibiOS/SoftSigReader.cpp

@ -34,10 +34,6 @@ bool SoftSigReader::attach_capture_timer(ICUDriver* icu_drv, icuchannel_t chan, @@ -34,10 +34,6 @@ bool SoftSigReader::attach_capture_timer(ICUDriver* icu_drv, icuchannel_t chan,
if (signal == nullptr) {
return false;
}
signal2 = (uint32_t*)hal.util->malloc_type(sizeof(uint32_t)*SOFTSIG_BOUNCE_BUF_SIZE, AP_HAL::Util::MEM_DMA_SAFE);
if (signal2 == nullptr) {
return false;
}
_icu_drv = icu_drv;
//Setup Burst transfer of period and width measurement
dma = STM32_DMA_STREAM(dma_stream);

2
libraries/AP_HAL_ChibiOS/SoftSigReader.h

@ -40,7 +40,7 @@ public: @@ -40,7 +40,7 @@ public:
private:
uint32_t *signal;
uint32_t *signal2;
uint32_t signal2[SOFTSIG_BOUNCE_BUF_SIZE];
static void _irq_handler(void* self, uint32_t flags);
uint8_t num_timer_channels;
uint8_t enable_chan_mask;

Loading…
Cancel
Save