aboutsummaryrefslogtreecommitdiff
path: root/Projects/MissileLauncher
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2009-12-26 04:13:55 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2009-12-26 04:13:55 +0000
commitb247567b522dea8e05813ed2932670278ce8d1ba (patch)
tree79a2ba0fe2bfa14670a489e77f4c201f380de4f0 /Projects/MissileLauncher
parent0c380bdcd15a45b5c58677aeb60f3c478d9e9096 (diff)
Added const where possible to the source functions in the Projects directory.
Added command timeout to the AVRISP project so that incorrectly connected targets no longer freeze the device. Removed string descriptors from the TeensyHID bootloader to reduce its size. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1013 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Projects/MissileLauncher')
-rw-r--r--Projects/MissileLauncher/MissileLauncher.c14
-rw-r--r--Projects/MissileLauncher/MissileLauncher.h6
2 files changed, 6 insertions, 14 deletions
diff --git a/Projects/MissileLauncher/MissileLauncher.c b/Projects/MissileLauncher/MissileLauncher.c
index 26dd077c..29ebd458 100644
--- a/Projects/MissileLauncher/MissileLauncher.c
+++ b/Projects/MissileLauncher/MissileLauncher.c
@@ -1,12 +1,4 @@
/*
- LUFA Library
- Copyright (C) Dean Camera, 2009.
-
- dean [at] fourwalledcubicle [dot] com
- www.fourwalledcubicle.com
-*/
-
-/*
USB Missile Launcher Demo
Copyright (C) Dave Fletcher, 2009.
fletch at fletchtronics dot net
@@ -158,7 +150,7 @@ void Read_Joystick_Status(void)
* \param[in] Report Report data to send.
* \param[in] ReportSize Report length in bytes.
*/
-void Send_Command_Report(uint8_t *Report, uint16_t ReportSize)
+void Send_Command_Report(uint8_t* const Report, const uint16_t ReportSize)
{
memcpy(CmdBuffer, Report, 8);
WriteNextReport(CmdBuffer, ReportSize);
@@ -168,7 +160,7 @@ void Send_Command_Report(uint8_t *Report, uint16_t ReportSize)
*
* \param[in] Command One of the command constants.
*/
-void Send_Command(uint8_t* Command)
+void Send_Command(uint8_t* const Command)
{
if ((CmdState == CMD_STOP && Command != CMD_STOP) ||
(CmdState != CMD_STOP && Command == CMD_STOP))
@@ -252,7 +244,7 @@ void DiscardNextReport(void)
* \param[in] ReportOUTData Buffer containing the report to send to the device
* \param[in] ReportLength Length of the report to send
*/
-void WriteNextReport(uint8_t* ReportOUTData, uint16_t ReportLength)
+void WriteNextReport(uint8_t* const ReportOUTData, const uint16_t ReportLength)
{
/* Select and unfreeze HID data OUT pipe */
Pipe_SelectPipe(HID_DATA_OUT_PIPE);
diff --git a/Projects/MissileLauncher/MissileLauncher.h b/Projects/MissileLauncher/MissileLauncher.h
index e92fe743..400ee26b 100644
--- a/Projects/MissileLauncher/MissileLauncher.h
+++ b/Projects/MissileLauncher/MissileLauncher.h
@@ -82,8 +82,8 @@
void SetupHardware(void);
void Read_Joystick_Status(void);
- void Send_Command_Report(uint8_t* Report, uint16_t ReportSize);
- void Send_Command(uint8_t* Command);
+ void Send_Command_Report(uint8_t* const Report, const uint16_t ReportSize);
+ void Send_Command(uint8_t* const Command);
void HID_Host_Task(void);
@@ -94,6 +94,6 @@
void EVENT_USB_Host_DeviceEnumerationComplete(void);
void DiscardNextReport(void);
- void WriteNextReport(uint8_t* ReportOUTData, uint16_t ReportLength);
+ void WriteNextReport(uint8_t* const ReportOUTData, const uint16_t ReportLength);
#endif