/*
|
* messageproc.h
|
*
|
* Created on: 2021Äê11ÔÂ1ÈÕ
|
* Author: graydon
|
*/
|
|
#ifndef MESSAGEPROC_H_
|
#define MESSAGEPROC_H_
|
|
#include <stdint.h>
|
#include <heapnew>
|
#include "protocol.h"
|
#include "typedefs.h"
|
#include "queue.h"
|
#include "dsp_report.h"
|
#include "../drv/memory.h"
|
|
class Message{
|
private:
|
Queue<MSG>* txQueue;
|
|
ReportStatus dsp_status_q;
|
s16* Levels;
|
|
s32 PresetProcess(MSG* pmsg);
|
|
s32 ParamCtrl(MSG* pmsg);
|
|
s32 HandshakeMessageProcess(MSG* pmsg);
|
|
s32 RxMessageHandler(MSG* pmsg);
|
|
void param_init(ptag_device_config pDevCfg);
|
|
public:
|
Message(u32 num)
|
{
|
txQueue = new Queue<MSG>(num);
|
Levels = new(SRAM_DDR) s16[300];
|
}
|
~Message()
|
{
|
delete []txQueue;
|
}
|
|
inline uvoid DspStatusPush(DSPStatusID ID , s16* value, s32 num)
|
{
|
dsp_status_q.device_status_push(ID, value, num);
|
}
|
|
s32 Send(MSG* pmsg );
|
s32 Send(MsgType msg_type, uvoidptr buffer, u32 len);
|
|
uvoid Proc();
|
|
uvoid ReportDspStatus(MSG* pmsg);
|
uvoid ReportLevel(MSG* pmsg);
|
};
|
|
#endif /* MESSAGEPROC_H_ */
|