diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-03-17 11:48:39 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-03-17 11:48:39 +0000 |
commit | 9a5ae36a4f62e0cda37972401c61727c6804a985 (patch) | |
tree | 77452ab5bbd5fc2fa983d8da6d76e2f883d7b02c /Demos/Host | |
parent | 7d51e51c79c3af7791f4c3e8c7e5e8196a2c3f93 (diff) | |
download | lufa-9a5ae36a4f62e0cda37972401c61727c6804a985.tar.gz lufa-9a5ae36a4f62e0cda37972401c61727c6804a985.tar.bz2 lufa-9a5ae36a4f62e0cda37972401c61727c6804a985.zip |
Software PDI mode breaks unless the software USART has 100 cycles between bits.
Diffstat (limited to 'Demos/Host')
-rw-r--r-- | Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c index b6411858a..6339a9239 100644 --- a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c +++ b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c @@ -147,7 +147,7 @@ int main(void) (ReportItem->Attributes.Usage.Usage == USAGE_SCROLL_WHEEL) &&
(ReportItem->ItemType == REPORT_ITEM_TYPE_In))
{
- int16_t WheelDelta = (int16_t)(ReportItem->Value << (16 - ReportItem->Attributes.BitSize));
+ int16_t WheelDelta = HID_ALIGN_DATA(ReportItem->Value, int16_t);
if (WheelDelta)
LEDMask = (LEDS_LED1 | LEDS_LED2 | ((WheelDelta > 0) ? LEDS_LED3 : LEDS_LED4));
@@ -157,7 +157,7 @@ int main(void) (ReportItem->Attributes.Usage.Usage == USAGE_Y)) &&
(ReportItem->ItemType == REPORT_ITEM_TYPE_In))
{
- int16_t DeltaMovement = (int16_t)(ReportItem->Value << (16 - ReportItem->Attributes.BitSize));
+ int16_t DeltaMovement = HID_ALIGN_DATA(ReportItem->Value, int16_t);
if (ReportItem->Attributes.Usage.Usage == USAGE_X)
{
|