Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lufa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Strand
lufa
Commits
58f550df
Commit
58f550df
authored
16 years ago
by
Dean Camera
Browse files
Options
Downloads
Patches
Plain Diff
Added new PIMA_DATA_SIZE() define to the Still Image Host demo.
parent
6933f2e1
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Demos/Host/StillImageHost/StillImageCommands.h
+10
-2
10 additions, 2 deletions
Demos/Host/StillImageHost/StillImageCommands.h
LUFA/ChangeLog.txt
+1
-0
1 addition, 0 deletions
LUFA/ChangeLog.txt
with
11 additions
and
2 deletions
Demos/Host/StillImageHost/StillImageCommands.h
+
10
−
2
View file @
58f550df
...
@@ -54,13 +54,21 @@
...
@@ -54,13 +54,21 @@
/** Timeout period between the issuing of a command to a device, and the reception of the first packet */
/** Timeout period between the issuing of a command to a device, and the reception of the first packet */
#define COMMAND_DATA_TIMEOUT_MS 5000
#define COMMAND_DATA_TIMEOUT_MS 5000
/** Used in the DataLength field of a PIMA container, to give the total container size in bytes.
/** Used in the DataLength field of a PIMA container, to give the total container size in bytes for
* a command container.
*
*
* \param params Number of parameters which are to be sent in the Param field of the container
* \param params Number of parameters which are to be sent in the Param field of the container
*/
*/
#define PIMA_COMMAND_SIZE(params) ((sizeof(PIMA_SendBlock) - sizeof(PIMA_SendBlock.Params)) + \
#define PIMA_COMMAND_SIZE(params) ((sizeof(PIMA_SendBlock) - sizeof(PIMA_SendBlock.Params)) + \
(
params
*
sizeof
(
PIMA_SendBlock
.
Params
[
0
])))
(
params
*
sizeof
(
PIMA_SendBlock
.
Params
[
0
])))
/** Used in the DataLength field of a PIMA container, to give the total container size in bytes for
* a data container.
*
* \param datalen Length in bytes of the data in the container
*/
#define PIMA_DATA_SIZE(datalen) ((sizeof(PIMA_SendBlock) - sizeof(PIMA_SendBlock.Params)) + datalen)
/* Type Defines: */
/* Type Defines: */
/** Type define for a PIMA container, use to send commands and receive responses to and from an
/** Type define for a PIMA container, use to send commands and receive responses to and from an
* attached Still Image device.
* attached Still Image device.
...
@@ -71,7 +79,7 @@
...
@@ -71,7 +79,7 @@
uint16_t
Type
;
/**< Container type, a value from the PIMA_Container_Types_t enum */
uint16_t
Type
;
/**< Container type, a value from the PIMA_Container_Types_t enum */
uint16_t
Code
;
/**< Command, event or response code of the container */
uint16_t
Code
;
/**< Command, event or response code of the container */
uint32_t
TransactionID
;
/**< Unique container ID to link blocks together */
uint32_t
TransactionID
;
/**< Unique container ID to link blocks together */
uint32_t
Params
[
4
];
/**< Block parameters to be issued along with the block code */
uint32_t
Params
[
4
];
/**< Block parameters to be issued along with the block code
(command blocks only)
*/
}
PIMA_Container_t
;
}
PIMA_Container_t
;
/* Enums: */
/* Enums: */
...
...
This diff is collapsed.
Click to expand it.
LUFA/ChangeLog.txt
+
1
−
0
View file @
58f550df
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
* - Changed GenericHID device demo to use the LUFA scheduler, added INTERRUPT_DATA_ENDPOINT and INTERRUPT_CONTROL_ENDPOINT compile
* - Changed GenericHID device demo to use the LUFA scheduler, added INTERRUPT_DATA_ENDPOINT and INTERRUPT_CONTROL_ENDPOINT compile
* time options
* time options
* - All comments in the library, bootloaders, demos and projects have now been spell-checked and spelling mistakes/typos corrected
* - All comments in the library, bootloaders, demos and projects have now been spell-checked and spelling mistakes/typos corrected
* - Added new PIMA_DATA_SIZE() define to the Still Image Host demo
*
*
* \section Sec_ChangeLog090401 Version 090401
* \section Sec_ChangeLog090401 Version 090401
*
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment