mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-01-12 12:53:37 +00:00
Move baseband working buffers from member variables to stack.
It's temporary, after all...
This commit is contained in:
parent
e7be7c5121
commit
fea5dd536f
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
WORKING_AREA(baseband_thread_wa, 2048);
|
WORKING_AREA(baseband_thread_wa, 4096);
|
||||||
|
|
||||||
Thread* BasebandThread::start(const tprio_t priority) {
|
Thread* BasebandThread::start(const tprio_t priority) {
|
||||||
return chThdCreateStatic(baseband_thread_wa, sizeof(baseband_thread_wa),
|
return chThdCreateStatic(baseband_thread_wa, sizeof(baseband_thread_wa),
|
||||||
|
@ -36,6 +36,7 @@ AISProcessor::AISProcessor() {
|
|||||||
void AISProcessor::execute(const buffer_c8_t& buffer) {
|
void AISProcessor::execute(const buffer_c8_t& buffer) {
|
||||||
/* 2.4576MHz, 2048 samples */
|
/* 2.4576MHz, 2048 samples */
|
||||||
|
|
||||||
|
std::array<complex16_t, 512> dst;
|
||||||
const buffer_c16_t dst_buffer {
|
const buffer_c16_t dst_buffer {
|
||||||
dst.data(),
|
dst.data(),
|
||||||
dst.size()
|
dst.size()
|
||||||
|
@ -47,7 +47,6 @@ public:
|
|||||||
void execute(const buffer_c8_t& buffer) override;
|
void execute(const buffer_c8_t& buffer) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::array<complex16_t, 512> dst;
|
|
||||||
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0;
|
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0;
|
||||||
dsp::decimate::FIRC16xR16x32Decim8 decim_1;
|
dsp::decimate::FIRC16xR16x32Decim8 decim_1;
|
||||||
dsp::matched_filter::MatchedFilter mf { baseband::ais::rrc_taps_38k4_4t_p, 2 };
|
dsp::matched_filter::MatchedFilter mf { baseband::ais::rrc_taps_38k4_4t_p, 2 };
|
||||||
|
@ -46,6 +46,7 @@ NarrowbandAMAudio::NarrowbandAMAudio() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NarrowbandAMAudio::execute(const buffer_c8_t& buffer) {
|
void NarrowbandAMAudio::execute(const buffer_c8_t& buffer) {
|
||||||
|
std::array<complex16_t, 512> dst;
|
||||||
const buffer_c16_t dst_buffer {
|
const buffer_c16_t dst_buffer {
|
||||||
dst.data(),
|
dst.data(),
|
||||||
dst.size()
|
dst.size()
|
||||||
|
@ -45,7 +45,6 @@ public:
|
|||||||
void on_update_spectrum() override { channel_spectrum.update(); }
|
void on_update_spectrum() override { channel_spectrum.update(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::array<complex16_t, 512> dst;
|
|
||||||
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0;
|
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0;
|
||||||
dsp::decimate::FIRC16xR16x32Decim8 decim_1;
|
dsp::decimate::FIRC16xR16x32Decim8 decim_1;
|
||||||
dsp::decimate::FIRAndDecimateComplex channel_filter;
|
dsp::decimate::FIRAndDecimateComplex channel_filter;
|
||||||
|
@ -79,6 +79,7 @@ void NarrowbandFMAudio::set_mode(const Mode mode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NarrowbandFMAudio::execute(const buffer_c8_t& buffer) {
|
void NarrowbandFMAudio::execute(const buffer_c8_t& buffer) {
|
||||||
|
std::array<complex16_t, 512> dst;
|
||||||
const buffer_c16_t dst_buffer {
|
const buffer_c16_t dst_buffer {
|
||||||
dst.data(),
|
dst.data(),
|
||||||
dst.size()
|
dst.size()
|
||||||
|
@ -51,7 +51,6 @@ public:
|
|||||||
void on_update_spectrum() override { channel_spectrum.update(); }
|
void on_update_spectrum() override { channel_spectrum.update(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::array<complex16_t, 512> dst;
|
|
||||||
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0;
|
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0;
|
||||||
dsp::decimate::FIRC16xR16x32Decim8 decim_1;
|
dsp::decimate::FIRC16xR16x32Decim8 decim_1;
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@ TPMSProcessor::TPMSProcessor() {
|
|||||||
void TPMSProcessor::execute(const buffer_c8_t& buffer) {
|
void TPMSProcessor::execute(const buffer_c8_t& buffer) {
|
||||||
/* 2.4576MHz, 2048 samples */
|
/* 2.4576MHz, 2048 samples */
|
||||||
|
|
||||||
|
std::array<complex16_t, 512> dst;
|
||||||
const buffer_c16_t dst_buffer {
|
const buffer_c16_t dst_buffer {
|
||||||
dst.data(),
|
dst.data(),
|
||||||
dst.size()
|
dst.size()
|
||||||
|
@ -59,7 +59,6 @@ public:
|
|||||||
void execute(const buffer_c8_t& buffer) override;
|
void execute(const buffer_c8_t& buffer) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::array<complex16_t, 512> dst;
|
|
||||||
dsp::decimate::FIRC8xR16x24FS4Decim4 decim_0;
|
dsp::decimate::FIRC8xR16x24FS4Decim4 decim_0;
|
||||||
dsp::decimate::FIRC16xR16x16Decim2 decim_1;
|
dsp::decimate::FIRC16xR16x16Decim2 decim_1;
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ WidebandFMAudio::WidebandFMAudio() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WidebandFMAudio::execute(const buffer_c8_t& buffer) {
|
void WidebandFMAudio::execute(const buffer_c8_t& buffer) {
|
||||||
|
std::array<complex16_t, 512> dst;
|
||||||
const buffer_c16_t dst_buffer {
|
const buffer_c16_t dst_buffer {
|
||||||
dst.data(),
|
dst.data(),
|
||||||
dst.size()
|
dst.size()
|
||||||
|
@ -38,7 +38,6 @@ public:
|
|||||||
void execute(const buffer_c8_t& buffer) override;
|
void execute(const buffer_c8_t& buffer) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::array<complex16_t, 512> dst;
|
|
||||||
dsp::decimate::FIRC8xR16x24FS4Decim4 decim_0;
|
dsp::decimate::FIRC8xR16x24FS4Decim4 decim_0;
|
||||||
dsp::decimate::FIRC16xR16x16Decim2 decim_1;
|
dsp::decimate::FIRC16xR16x16Decim2 decim_1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user