root/trunk/libffado/src/fireworks/efc/efc_cmds_flash.h

Revision 864, 3.7 kB (checked in by ppalmers, 15 years ago)

update license to GPLv2 or GPLv3 instead of GPLv2 or any later version. Update copyrights to reflect the new year

Line 
1 /*
2  * Copyright (C) 2005-2008 by Pieter Palmers
3  *
4  * This file is part of FFADO
5  * FFADO = Free Firewire (pro-)audio drivers for linux
6  *
7  * FFADO is based upon FreeBoB
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 2 of the License, or
12  * (at your option) version 3 of the License.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21  *
22  */
23
24 #ifndef FIREWORKS_EFC_CMD_FLASH_H
25 #define FIREWORKS_EFC_CMD_FLASH_H
26
27 #include "efc_cmd.h"
28 // #define EFC_CMD_FLASH_ERASE             0
29 // #define EFC_CMD_FLASH_READ              1
30 // #define EFC_CMD_FLASH_WRITE             2
31 // #define EFC_CMD_FLASH_GET_STATUS        3
32 // #define EFC_CMD_FLASH_GET_SESSION_BASE  4
33 // #define EFC_CMD_FLASH_LOCK              5
34
35 #define EFC_FLASH_SIZE_BYTES            256
36 #define EFC_FLASH_SIZE_QUADS            (EFC_FLASH_SIZE_BYTES / 4)
37
38 namespace FireWorks {
39
40 class EfcFlashEraseCmd : public EfcCmd
41 {
42 public:
43     EfcFlashEraseCmd();
44     virtual ~EfcFlashEraseCmd() {};
45
46     virtual bool serialize( Util::Cmd::IOSSerialize& se );
47     virtual bool deserialize( Util::Cmd::IISDeserialize& de );
48
49     virtual const char* getCmdName() const
50     { return "EfcFlashEraseCmd"; }
51
52     virtual void showEfcCmd();
53
54     uint32_t    m_address;
55 };
56
57 class EfcFlashReadCmd : public EfcCmd
58 {
59 public:
60     EfcFlashReadCmd();
61     virtual ~EfcFlashReadCmd() {};
62
63     virtual bool serialize( Util::Cmd::IOSSerialize& se );
64     virtual bool deserialize( Util::Cmd::IISDeserialize& de );
65
66     virtual const char* getCmdName() const
67     { return "EfcFlashReadCmd"; }
68
69     virtual void showEfcCmd();
70
71     uint32_t    m_address;
72     uint32_t    m_nb_quadlets;
73     uint32_t    m_data[EFC_FLASH_SIZE_QUADS];
74 };
75
76 class EfcFlashWriteCmd : public EfcCmd
77 {
78 public:
79     EfcFlashWriteCmd();
80     virtual ~EfcFlashWriteCmd() {};
81
82     virtual bool serialize( Util::Cmd::IOSSerialize& se );
83     virtual bool deserialize( Util::Cmd::IISDeserialize& de );
84
85     virtual const char* getCmdName() const
86     { return "EfcFlashWriteCmd"; }
87
88     virtual void showEfcCmd();
89
90     uint32_t    m_address;
91     uint32_t    m_nb_quadlets;
92     uint32_t    m_data[EFC_FLASH_SIZE_QUADS];
93 };
94
95 class EfcFlashLockCmd : public EfcCmd
96 {
97 public:
98     EfcFlashLockCmd();
99     virtual ~EfcFlashLockCmd() {};
100
101     virtual bool serialize( Util::Cmd::IOSSerialize& se );
102     virtual bool deserialize( Util::Cmd::IISDeserialize& de );
103
104     virtual const char* getCmdName() const
105     { return "EfcFlashLockCmd"; }
106
107     virtual void showEfcCmd();
108
109     bool     m_lock;
110 };
111
112 class EfcFlashGetStatusCmd : public EfcCmd
113 {
114 public:
115     EfcFlashGetStatusCmd();
116     virtual ~EfcFlashGetStatusCmd() {};
117
118     virtual bool serialize( Util::Cmd::IOSSerialize& se );
119     virtual bool deserialize( Util::Cmd::IISDeserialize& de );
120
121     virtual const char* getCmdName() const
122     { return "EfcFlashGetStatusCmd"; }
123
124     virtual void showEfcCmd();
125
126     bool     m_ready;
127 };
128
129 class EfcFlashGetSessionBaseCmd : public EfcCmd
130 {
131 public:
132     EfcFlashGetSessionBaseCmd();
133     virtual ~EfcFlashGetSessionBaseCmd() {};
134
135     virtual bool serialize( Util::Cmd::IOSSerialize& se );
136     virtual bool deserialize( Util::Cmd::IISDeserialize& de );
137
138     virtual const char* getCmdName() const
139     { return "EfcFlashGetSessionBaseCmd"; }
140
141     virtual void showEfcCmd();
142
143     uint32_t    m_address;
144 };
145
146 } // namespace FireWorks
147
148 #endif // FIREWORKS_EFC_CMD_FLASH_H
Note: See TracBrowser for help on using the browser.