mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-30 01:59:13 -04:00
Take processor as argument to BasebandThread.
Remove lots of dependency on specific processors. Reduce state by removing processor switching from BasebandThread.
This commit is contained in:
parent
bb32ef5321
commit
74c8429f75
2 changed files with 14 additions and 61 deletions
|
@ -30,10 +30,12 @@
|
|||
|
||||
class BasebandThread : public ThreadBase {
|
||||
public:
|
||||
BasebandThread(const tprio_t priority);
|
||||
BasebandThread(
|
||||
uint32_t sampling_rate,
|
||||
BasebandProcessor* const baseband_processor,
|
||||
const tprio_t priority
|
||||
);
|
||||
~BasebandThread();
|
||||
|
||||
void on_message(const Message* const message);
|
||||
|
||||
// This getter should die, it's just here to leak information to code that
|
||||
// isn't in the right place to begin with.
|
||||
|
@ -45,14 +47,9 @@ private:
|
|||
static Thread* thread;
|
||||
|
||||
BasebandProcessor* baseband_processor { nullptr };
|
||||
|
||||
BasebandConfiguration baseband_configuration;
|
||||
uint32_t sampling_rate;
|
||||
|
||||
void run() override;
|
||||
|
||||
BasebandProcessor* create_processor(const int32_t mode);
|
||||
|
||||
void set_configuration(const BasebandConfiguration& new_configuration);
|
||||
};
|
||||
|
||||
#endif/*__BASEBAND_THREAD_H__*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue