root/trunk/libffado/src/dice/focusrite/saffire_pro40.cpp

Revision 1766, 1.7 kB (checked in by arnonym, 11 years ago)

Start some cleanup in the dice-code.

No need for the EAP to be defined inside Dice::Device.

Line 
1 /*
2  * Copyright (C) 2009 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 #include "saffire_pro40.h"
25
26 #include "focusrite_eap.h"
27
28 namespace Dice {
29 namespace Focusrite {
30
31 SaffirePro40::SaffirePro40( DeviceManager& d,
32                                         std::auto_ptr<ConfigRom>( configRom ))
33     : Dice::Device( d , configRom)
34 {
35     debugOutput( DEBUG_LEVEL_VERBOSE, "Created Dice::Focusrite::SaffirePro40 (NodeID %d)\n",
36                  getConfigRom().getNodeId() );
37 }
38
39 SaffirePro40::~SaffirePro40()
40 {
41 }
42
43 void
44 SaffirePro40::showDevice()
45 {
46     debugOutput(DEBUG_LEVEL_VERBOSE, "This is a Dice::Focusrite::SaffirePro40\n");
47     Dice::Device::showDevice();
48 }
49
50 bool SaffirePro40::setNickName(std::string name) {
51     return getEAP()->writeRegBlock(Dice::EAP::eRT_Application, 0x44, (quadlet_t*)name.c_str(), name.size());
52 }
53 std::string SaffirePro40::getNickName() {
54     char name[16];
55     getEAP()->readRegBlock(Dice::EAP::eRT_Application, 0x44, (quadlet_t*)name, 16);
56     return std::string(name);
57 }
58
59 }
60 }
61 // vim: et
Note: See TracBrowser for help on using the browser.