forked from felis/PTP_2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Oleg Mazurov
committed
Sep 23, 2012
1 parent
707cca7
commit 9a28130
Showing
29 changed files
with
471 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#include "canoneos.h" | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#ifndef __CANONEOS_H__ | ||
#define __CANONEOS_H__ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#include "canonps.h" | ||
|
||
void PSStateHandlers::OnSessionOpenedState(PTP *ptp) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#ifndef __CANONPS_H__ | ||
#define __CANONPS_H__ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#include "eoseventdump.h" | ||
|
||
void EOSEventDump::Parse(const uint16_t len, const uint8_t *pbuf, const uint32_t &offset) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#if !defined(__EOSEVENTDUMP_H__) | ||
#define __EOSEVENTDUMP_H__ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#include "eoseventparser.h" | ||
|
||
bool EOSEventParser::EventRecordParse(uint8_t **pp, uint16_t *pcntdn) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#ifndef __EOSEVENTPARSER_H__ | ||
#define __EOSEVENTPARSER_H__ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#if !defined(__EOSVALUETITLES_H__) | ||
#define __EOSVALUETITLES_H__ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#ifndef __MTPCONST_H__ | ||
#define __MTPCONST_H__ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#include "nikon.h" | ||
|
||
NikonDSLR::NikonDSLR(USB *pusb, PTPStateHandlers *s) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#if !defined(__NIKON_H__) | ||
#define __NIKON_H__ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#include "nkeventparser.h" | ||
|
||
void NKEventParser::Parse(const uint16_t len, const uint8_t *pbuf, const uint32_t &offset) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#ifndef __NKEVENTPARSER_H__ | ||
#define __NKEVENTPARSER_H__ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#if !defined(__NKVALUETITLES_H__) | ||
#define __NKVALUETITLES_H__ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#if !defined(__PSVALUETITLES_H__) | ||
#define __PSVALUETITLES_H__ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,27 @@ | ||
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. | ||
This software may be distributed and modified under the terms of the GNU | ||
General Public License version 2 (GPL2) as published by the Free Software | ||
Foundation and appearing in the file GPL2.TXT included in the packaging of | ||
this file. Please note that GPL2 Section 2[b] requires that all works based | ||
on this software must also be made publicly available under the terms of | ||
the GPL2 ("Copyleft"). | ||
Contact information | ||
------------------- | ||
Circuits At Home, LTD | ||
Web : http://www.circuitsathome.com | ||
e-mail : [email protected] | ||
*/ | ||
#include "ptpconst.h" | ||
#include "ptp.h" | ||
#include "ptpdebug.h" | ||
|
||
void PTP::SetInitialState() | ||
{ | ||
idSession = 0; | ||
idTransaction = ~((trasaction_id_t)0); | ||
idTransaction = ~((transaction_id_t)0); | ||
SetState(PTP_STATE_SESSION_NOT_OPENED); | ||
} | ||
|
||
|
@@ -60,7 +76,7 @@ const uint8_t PTP::epInterruptIndex = 3; | |
PTP::PTP(USB *pusb, PTPStateHandlers *s) : | ||
pUsb(pusb), | ||
theState(0), | ||
idTransaction(~((trasaction_id_t)0)), | ||
idTransaction(~((transaction_id_t)0)), | ||
idSession(0), | ||
devAddress(0), | ||
numConf(0), | ||
|
@@ -289,7 +305,7 @@ uint8_t PTP::Release() | |
|
||
devAddress = 0; | ||
idSession = 0; | ||
idTransaction = ~((trasaction_id_t)0); | ||
idTransaction = ~((transaction_id_t)0); | ||
|
||
return 0; | ||
} | ||
|
@@ -584,7 +600,7 @@ uint16_t PTP::OpenSession() | |
OperFlags flags = { 1, 0, 0, 0, 0, 0 }; | ||
|
||
idSession = 1; | ||
idTransaction = ~((trasaction_id_t)0); | ||
idTransaction = ~((transaction_id_t)0); | ||
|
||
params[0] = idSession; | ||
|
||
|
@@ -750,7 +766,7 @@ uint16_t PTP::CloseSession() | |
if ( (ptp_error = Transaction(PTP_OC_CloseSession, &flags)) == PTP_RC_OK) | ||
{ | ||
idSession = 0; | ||
idTransaction = ~((trasaction_id_t)0); | ||
idTransaction = ~((transaction_id_t)0); | ||
} | ||
return ptp_error; | ||
} | ||
|
Oops, something went wrong.