mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-22 01:37:46 +00:00
Transmit ChannelSpectrum data through separate FIFO.
Allows handling of data during LCD "vertical retrace", independent of other baseband->application messages. A bit kludgy still...
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "baseband_packet.hpp"
|
||||
#include "ert_packet.hpp"
|
||||
#include "dsp_fir_taps.hpp"
|
||||
#include "fifo.hpp"
|
||||
|
||||
#include "utility.hpp"
|
||||
|
||||
@@ -44,7 +45,7 @@ public:
|
||||
RSSIStatistics = 0,
|
||||
BasebandStatistics = 1,
|
||||
ChannelStatistics = 2,
|
||||
ChannelSpectrum = 3,
|
||||
|
||||
AudioStatistics = 4,
|
||||
BasebandConfiguration = 5,
|
||||
TPMSPacket = 6,
|
||||
@@ -55,6 +56,7 @@ public:
|
||||
NBFMConfigure = 11,
|
||||
WFMConfigure = 12,
|
||||
AMConfigure = 13,
|
||||
FIFONotify = 14,
|
||||
MAX
|
||||
};
|
||||
|
||||
@@ -207,15 +209,7 @@ struct ChannelSpectrum {
|
||||
uint32_t channel_filter_stop_frequency { 0 };
|
||||
};
|
||||
|
||||
class ChannelSpectrumMessage : public Message {
|
||||
public:
|
||||
constexpr ChannelSpectrumMessage(
|
||||
) : Message { ID::ChannelSpectrum }
|
||||
{
|
||||
}
|
||||
|
||||
ChannelSpectrum spectrum;
|
||||
};
|
||||
using ChannelSpectrumFIFO = FIFO<ChannelSpectrum, 2>;
|
||||
|
||||
class AISPacketMessage : public Message {
|
||||
public:
|
||||
@@ -333,6 +327,18 @@ public:
|
||||
const fir_taps_real<32> channel_filter;
|
||||
};
|
||||
|
||||
class FIFONotifyMessage : public Message {
|
||||
public:
|
||||
constexpr FIFONotifyMessage(
|
||||
void* const fifo
|
||||
) : Message { ID::FIFONotify },
|
||||
fifo { fifo }
|
||||
{
|
||||
}
|
||||
|
||||
void* const fifo;
|
||||
};
|
||||
|
||||
class MessageHandlerMap {
|
||||
public:
|
||||
using MessageHandler = std::function<void(Message* const p)>;
|
||||
|
Reference in New Issue
Block a user