分支自 DSP/ADSP21569/DSP-21569

graydon
2023-09-20 d40b58b3ecbfb79e015f55755127849335e289b7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 * messageproc.h
 *
 *  Created on: 2021Äê11ÔÂ1ÈÕ
 *      Author: graydon
 */
 
#ifndef MESSAGEPROC_H_
#define MESSAGEPROC_H_
 
#include <stdint.h>
#include "protocol.h"
#include "typedefs.h"
#include "queue.h"
 
class Message{
private:
    Queue<MSG>* txQueue;
 
    s32 PresetProcess(MSG* pmsg);
 
    s32 TopoProcess(MSG* pmsg);
 
    s32 ParamCtrl(MSG* pmsg);
 
    s32 SystemConfigSetProcess(MSG* pmsg);
 
    s32 RxMessageHandler(MSG* pmsg);
public:
    Message(u32 num)
    {
        txQueue = new Queue<MSG>(num);
    }
    ~Message()
    {
        delete []txQueue;
    }
 
    s32 Send(MSG* pmsg );
    s32 Send(MsgType msg_type, uvoidptr buffer, u32 len);
    s32 DSPStatusProcess(MSG* pmsg);
 
    uvoid Proc();
};
 
#endif /* MESSAGEPROC_H_ */