mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-03 03:56:44 -04: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:
parent
2cd28fcc0c
commit
aaa1bc3a09
4 changed files with 37 additions and 21 deletions
|
@ -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)>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue