diff --git a/FabFTDI Attiny2313/FabFTDI.b#1 b/FabFTDI Attiny2313/FabFTDI.b#1 new file mode 100755 index 0000000000000000000000000000000000000000..718e842cb7b971b9773feb82d3ad4a7e1db8c760 --- /dev/null +++ b/FabFTDI Attiny2313/FabFTDI.b#1 @@ -0,0 +1,705 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<b>SMALL OUTLINE DIODE</b> + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +chip + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + + + +Card-edge USB A connector. + +For boards designed to be plugged directly into a USB slot. If possible, ensure that your PCB is about 2.4mm thick to fit snugly. + + + + + + + + +>Name +>Value + + + + + + + + +1 +>NAME +>VALUE + + +<b>Small Outline Package</b> + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<b>EAGLE Design Rules</b> +<p> +Die Standard-Design-Rules sind so gewählt, dass sie für +die meisten Anwendungen passen. Sollte ihre Platine +besondere Anforderungen haben, treffen Sie die erforderlichen +Einstellungen hier und speichern die Design Rules unter +einem neuen Namen ab. +<b>EAGLE Design Rules</b> +<p> +The default Design Rules have been set to cover +a wide range of applications. Your particular design +may have different requirements, so please make the +necessary adjustments and save your customized +design rules under a new name. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/old version editing/FabFTDI.b#4 b/FabFTDI Attiny2313/FabFTDI.b#2 similarity index 69% rename from old version editing/FabFTDI.b#4 rename to FabFTDI Attiny2313/FabFTDI.b#2 index f4851cbf09524960fcafb2ebca8d7ca3d59787d8..f1c1e731b7956987ad7b98d98659d5f4599ef1b0 100755 --- a/old version editing/FabFTDI.b#4 +++ b/FabFTDI Attiny2313/FabFTDI.b#2 @@ -24,18 +24,18 @@ - + - - + + - + @@ -140,10 +140,10 @@ - - - - + + + + @@ -215,46 +215,6 @@ For boards designed to be plugged directly into a USB slot. If possible, ensure >Name >Value - -<B>Wide Plastic Gull Wing Small Outline Package</B> - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - @@ -266,6 +226,56 @@ For boards designed to be plugged directly into a USB slot. If possible, ensure >NAME >VALUE + +<b>Small Outline Package</b> + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -457,19 +467,19 @@ design rules under a new name. - - - - - - - - + + + + + + + + - - - - + + + + @@ -478,136 +488,96 @@ design rules under a new name. - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - + + + - - - - - - + + + + + + @@ -616,41 +586,74 @@ design rules under a new name. - - - + + - + + - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + - - + + + + + - - + - - + + + + + + + + - - -Since Version 8.3, EAGLE supports URNs for individual library -assets (packages, symbols, and devices). The URNs of those assets -will not be understood (or retained) with this version. - - diff --git a/old version editing/FabFTDI.b#3 b/FabFTDI Attiny2313/FabFTDI.b#3 similarity index 68% rename from old version editing/FabFTDI.b#3 rename to FabFTDI Attiny2313/FabFTDI.b#3 index ee04c276e9af568889686ecf0cccb48286edef73..a091a1d8b97cb8eba3b21163b9b1e19be03e6363 100755 --- a/old version editing/FabFTDI.b#3 +++ b/FabFTDI Attiny2313/FabFTDI.b#3 @@ -24,18 +24,18 @@ - + - - + + - + @@ -140,10 +140,10 @@ - - - - + + + + @@ -215,46 +215,6 @@ For boards designed to be plugged directly into a USB slot. If possible, ensure >Name >Value - -<B>Wide Plastic Gull Wing Small Outline Package</B> - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - @@ -266,6 +226,56 @@ For boards designed to be plugged directly into a USB slot. If possible, ensure >NAME >VALUE + +<b>Small Outline Package</b> + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -457,19 +467,19 @@ design rules under a new name. - - - - - - - - + + + + + + + + - - - - + + + + @@ -478,134 +488,96 @@ design rules under a new name. - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - + + + - - - - - - + + + + + + @@ -614,39 +586,76 @@ design rules under a new name. - - - + + - + + - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + - + - - + + - - -Since Version 8.3, EAGLE supports URNs for individual library -assets (packages, symbols, and devices). The URNs of those assets -will not be understood (or retained) with this version. - - diff --git a/old version editing/FabFTDI.b#2 b/FabFTDI Attiny2313/FabFTDI.b#4 similarity index 73% rename from old version editing/FabFTDI.b#2 rename to FabFTDI Attiny2313/FabFTDI.b#4 index 737f72d59567d326a95ae09df46336267058d71a..395766a85e5c0004856fe3cbd2f4f65e54e4ebb0 100755 --- a/old version editing/FabFTDI.b#2 +++ b/FabFTDI Attiny2313/FabFTDI.b#4 @@ -29,13 +29,13 @@ - - + + - + @@ -140,10 +140,10 @@ - - - - + + + + @@ -215,46 +215,6 @@ For boards designed to be plugged directly into a USB slot. If possible, ensure >Name >Value - -<B>Wide Plastic Gull Wing Small Outline Package</B> - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - @@ -266,6 +226,56 @@ For boards designed to be plugged directly into a USB slot. If possible, ensure >NAME >VALUE + +<b>Small Outline Package</b> + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -459,17 +469,17 @@ design rules under a new name. - + - - - - + + + + - - - - + + + + @@ -478,52 +488,40 @@ design rules under a new name. - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -531,14 +529,13 @@ design rules under a new name. - + - - - - - - + + + + + @@ -550,42 +547,24 @@ design rules under a new name. - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - + + + + + + @@ -594,51 +573,73 @@ design rules under a new name. - - - + + - - + + - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - - - - - + + + + - - + - - - - + + + + + + + + + + - - -Since Version 8.3, EAGLE supports URNs for individual library -assets (packages, symbols, and devices). The URNs of those assets -will not be understood (or retained) with this version. - - diff --git a/old version editing/FabFTDI.b#1 b/FabFTDI Attiny2313/FabFTDI.b#5 similarity index 76% rename from old version editing/FabFTDI.b#1 rename to FabFTDI Attiny2313/FabFTDI.b#5 index 06f3c7d47a0cc3d9902381150b9cb2a62039d9c1..a79d3affe677e4e5d011fcdf7ae04adc1adf227a 100755 --- a/old version editing/FabFTDI.b#1 +++ b/FabFTDI Attiny2313/FabFTDI.b#5 @@ -24,18 +24,18 @@ - + - - - - + + + + - + @@ -140,10 +140,10 @@ - - - - + + + + @@ -215,46 +215,6 @@ For boards designed to be plugged directly into a USB slot. If possible, ensure >Name >Value - -<B>Wide Plastic Gull Wing Small Outline Package</B> - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - @@ -266,6 +226,44 @@ For boards designed to be plugged directly into a USB slot. If possible, ensure >NAME >VALUE + +<b>Small Outline Package</b> + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + @@ -463,13 +461,13 @@ design rules under a new name. - + - - - - + + + + @@ -478,60 +476,53 @@ design rules under a new name. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -564,27 +555,17 @@ design rules under a new name. - - - - - - - - - - - - - - - - + + + + + + @@ -593,68 +574,85 @@ design rules under a new name. - - + + - - - - + + - - + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - + + + + + - - - - - - + + + + + - - + + - - - - - - - + + + + + + + + + + - - -Since Version 8.3, EAGLE supports URNs for individual library -assets (packages, symbols, and devices). The URNs of those assets -will not be understood (or retained) with this version. - - diff --git a/FabFTDI Attiny2313/FabFTDI.brd b/FabFTDI Attiny2313/FabFTDI.brd new file mode 100755 index 0000000000000000000000000000000000000000..6368642b3c577ea08454c8e9b8cfd11e7d7ee96c --- /dev/null +++ b/FabFTDI Attiny2313/FabFTDI.brd @@ -0,0 +1,706 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<b>SMALL OUTLINE DIODE</b> + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +chip + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + + + +Card-edge USB A connector. + +For boards designed to be plugged directly into a USB slot. If possible, ensure that your PCB is about 2.4mm thick to fit snugly. + + + + + + + + +>Name +>Value + + + + + + + + +1 +>NAME +>VALUE + + +<b>Small Outline Package</b> + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<b>EAGLE Design Rules</b> +<p> +Die Standard-Design-Rules sind so gewählt, dass sie für +die meisten Anwendungen passen. Sollte ihre Platine +besondere Anforderungen haben, treffen Sie die erforderlichen +Einstellungen hier und speichern die Design Rules unter +einem neuen Namen ab. +<b>EAGLE Design Rules</b> +<p> +The default Design Rules have been set to cover +a wide range of applications. Your particular design +may have different requirements, so please make the +necessary adjustments and save your customized +design rules under a new name. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/old version editing/FabFTDI.s#1 b/FabFTDI Attiny2313/FabFTDI.s#1 similarity index 77% rename from old version editing/FabFTDI.s#1 rename to FabFTDI Attiny2313/FabFTDI.s#1 index 126574ea5579ddc91bb6c459594fa0ab4eccb902..4464e0d23b6d18f9ee9a6132037b03a00c39b9ea 100755 --- a/old version editing/FabFTDI.s#1 +++ b/FabFTDI Attiny2313/FabFTDI.s#1 @@ -349,57 +349,6 @@ For boards designed to be plugged directly into a USB slot. If possible, ensure >NAME >VALUE - -<B>Wide Plastic Gull Wing Small Outline Package</B> - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - -1 ->NAME ->VALUE - Micro USB Package @@ -440,6 +389,55 @@ For boards designed to be plugged directly into a USB slot. If possible, ensure + + + + + + + +1 +>NAME +>VALUE + + +<b>Small Outline Package</b> + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + @@ -511,47 +509,50 @@ For boards designed to be plugged directly into a USB slot. If possible, ensure - -<h3> ATTINY102/104 </h3> -<p> Symbol for Atmel Attiny102/104</p> - - - - - - - - - - - - -AT102 ->VALUE - >VALUE - -<h3>Symbol for ATMEL TPI Connector </h3> -<p> -Symbol used in AVR TPI device. - -- Prashant Patil </p> - - - - ->NAME -AVRTPI - - - - - - + + + + + +>NAME +>VALUE +MISO +SCK +RST +VCC +MOSI +GND + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -726,63 +727,61 @@ Connector for USB-microB (orAB), USB-mini, and USB-PCB. For USB-micro use Digike - -<h3>ATTINY102/104</h3> -<p>Device for ATTINY102/104 </p> + +<b>SUPPLY SYMBOL</b> - + - - - - - - - - - - - + - -<b>SUPPLY SYMBOL</b> + - + - + + + + + + + + + - -<h3> ATMEL-ICE TPI Connector SMD</h3> -<p> - -This is a TPI programming connector to program Atiny102/104 micro-controllers -prashant.patil@cba.mit.edu - -</p> + +<h3>ATTINY441 </h3> - + - + - - - - - - + + + + + + + + + + + + + + @@ -863,12 +862,12 @@ prashant.patil@cba.mit.edu - + - - + + @@ -879,28 +878,28 @@ prashant.patil@cba.mit.edu - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + @@ -913,97 +912,98 @@ prashant.patil@cba.mit.edu - + - + - + - + - - - + + + - - + + - - + + + - + - + - - + + - + - - - - - + + + + + - - + + - - - - + + + - - - + + + - - - + + + + - + - + - - + + - + - - + + - - + + @@ -1011,94 +1011,119 @@ prashant.patil@cba.mit.edu - - - - - - - - - - - - - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + - - + + + + - - - + + + + + - - - - - - - - + + + + + - + - - - - - - - - - - - - - + + + + + + + + + + + + @@ -1106,11 +1131,4 @@ prashant.patil@cba.mit.edu - - -Since Version 8.3, EAGLE supports URNs for individual library -assets (packages, symbols, and devices). The URNs of those assets -will not be understood (or retained) with this version. - - diff --git a/old version editing/FabFTDI.s#2 b/FabFTDI Attiny2313/FabFTDI.sch similarity index 75% rename from old version editing/FabFTDI.s#2 rename to FabFTDI Attiny2313/FabFTDI.sch index a41ddc342362e0a7d5439b37d0deb84c3b596fc8..ab787e899cad91e52d89b00df26a4e28cd7cb373 100755 --- a/old version editing/FabFTDI.s#2 +++ b/FabFTDI Attiny2313/FabFTDI.sch @@ -349,57 +349,6 @@ For boards designed to be plugged directly into a USB slot. If possible, ensure >NAME >VALUE - -<B>Wide Plastic Gull Wing Small Outline Package</B> - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - - - - - - - - - - - -1 ->NAME ->VALUE - Micro USB Package @@ -440,6 +389,67 @@ For boards designed to be plugged directly into a USB slot. If possible, ensure + + + + + + + +1 +>NAME +>VALUE + + +<b>Small Outline Package</b> + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -511,47 +521,56 @@ For boards designed to be plugged directly into a USB slot. If possible, ensure - -<h3> ATTINY102/104 </h3> -<p> Symbol for Atmel Attiny102/104</p> - - - - - - - - - - - - -AT102 ->VALUE - >VALUE - -<h3>Symbol for ATMEL TPI Connector </h3> -<p> -Symbol used in AVR TPI device. - -- Prashant Patil </p> - - - - ->NAME -AVRTPI - - - - - - + + + + + +>NAME +>VALUE +MISO +SCK +RST +VCC +MOSI +GND + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -726,63 +745,66 @@ Connector for USB-microB (orAB), USB-mini, and USB-PCB. For USB-micro use Digike - -<h3>ATTINY102/104</h3> -<p>Device for ATTINY102/104 </p> + +<b>SUPPLY SYMBOL</b> - + - - - - - - - - - - - + - -<b>SUPPLY SYMBOL</b> + - + - + + + + + + + + + - -<h3> ATMEL-ICE TPI Connector SMD</h3> -<p> - -This is a TPI programming connector to program Atiny102/104 micro-controllers -prashant.patil@cba.mit.edu - -</p> + - + - + - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -863,44 +885,44 @@ prashant.patil@cba.mit.edu - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -908,190 +930,208 @@ prashant.patil@cba.mit.edu - - + - + - + - + - - - + + + - - - + + - - - + + + - - - + + + - + - - - - - + + + + + - - + + - - - - + + + - + - - + + - - - + + + + - + - + - - + + - + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + - + - - - + + + - + - - - - - - - + + + + + + + + + + + + + @@ -1099,11 +1139,4 @@ prashant.patil@cba.mit.edu - - -Since Version 8.3, EAGLE supports URNs for individual library -assets (packages, symbols, and devices). The URNs of those assets -will not be understood (or retained) with this version. - - diff --git a/FabFTDI Attiny2313/eagle.epf b/FabFTDI Attiny2313/eagle.epf new file mode 100755 index 0000000000000000000000000000000000000000..45415113353dc076076ee27d5b284c0178a862f0 --- /dev/null +++ b/FabFTDI Attiny2313/eagle.epf @@ -0,0 +1,89 @@ +[Eagle] +Version="08 03 02" +Platform="Windows" +Globals="Globals" +Desktop="Desktop" + +[Globals] +AutoSaveProject=1 +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/fablab/FAB_Hello.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/fablab/fab.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/fablab/fabPatil.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/fablab/ng.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/fablab/usb_con-update.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/Adafruit/adafruit.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/LilyPad-Wearables.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-Aesthetics.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-AnalogIC.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-Boards.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-Capacitors.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-Connectors.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-DigitalIC.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-DiscreteSemi.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-Displays.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-Electromechanical.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-FreqCtrl.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-LED.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-Passives.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-PowerIC.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-RF.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-Resistors.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-Retired.lbr" +UsedLibrary="C:/Users/Prashant Patil/Dropbox (MIT)/Documents/eagle/Custom Libraries/SparkFun Library/SparkFun-Sensors.lbr" + +[Win_1] +Type="Board Editor" +Loc="0 0 1919 1017" +State=3 +Number=2 +File="FabFTDI.brd" +View="-14.8189 0.8552 43.9371 27.0601" +WireWidths=" 0.0762 0.1016 0.127 0.15 0.2 0.2032 0.254 0.3048 0.508 0.6096 0.8128 1.016 1.27 2.54 0.1524 0.4064" +PadDiameters=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0" +PadDrills=" 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.65 0.7 0.75 0.8 0.85 0.9 1 0.6" +ViaDiameters=" 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2 1.3 0" +ViaDrills=" 0.2 0.25 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 1 0.35 0.3" +HoleDrills=" 0.2 0.25 0.3 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 1 0.35" +TextSizes=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.778" +PolygonSpacings=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.27" +PolygonIsolates=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0" +MiterRadiuss=" 0.254 0.3175 0.635 1.27 2.54 1 2 2.5 5 7.5 10 0" +DimensionWidths=" 0 0.127 0.254 0.1 0.26 0.13" +DimensionExtWidths=" 0.127 0.254 0.1 0.13 0.26 0" +DimensionExtLengths=" 1.27 2.54 1 2 3 0" +DimensionExtOffsets=" 1.27 2.54 1 2 3 0" +SmdSizes=" 0.3048 0.1524 0.4064 0.2032 0.6096 0.3048 0.8128 0.4064 1.016 0.508 1.27 0.6604 1.4224 0.7112 1.6764 0.8128 1.778 0.9144 1.9304 0.9652 2.1844 1.0668 2.54 1.27 3.81 1.9304 5.08 2.54 6.4516 3.2512 1.27 0.635" +WireBend=1 +WireBendSet=0 +WireCap=1 +MiterStyle=0 +PadShape=0 +ViaShape=1 +PolygonPour=0 +PolygonRank=1 +PolygonThermals=1 +PolygonOrphans=0 +TextRatio=8 +DimensionUnit=1 +DimensionPrecision=2 +DimensionShowUnit=0 +PinDirection=3 +PinFunction=0 +PinLength=2 +PinVisible=3 +SwapLevel=0 +ArcDirection=0 +AddLevel=2 +PadsSameType=0 +Layer=1 + +[Win_2] +Type="Control Panel" +Loc="0 0 1919 1017" +State=1 +Number=0 + +[Desktop] +Screen="1920 1080" +Window="Win_1" +Window="Win_2" diff --git a/FabFTDI Attiny441/FabFTDI.brd b/FabFTDI Attiny441/FabFTDI.brd index f93f3438fcfea48a1ba8a877f6be8e198c36cdd7..a79d3affe677e4e5d011fcdf7ae04adc1adf227a 100755 --- a/FabFTDI Attiny441/FabFTDI.brd +++ b/FabFTDI Attiny441/FabFTDI.brd @@ -28,14 +28,14 @@ - - - - + + + + - + @@ -141,9 +141,9 @@ - - - + + + @@ -461,13 +461,13 @@ design rules under a new name. - + - - - - + + + + @@ -484,16 +484,17 @@ design rules under a new name. - - - - - - - - - - + + + + + + + + + + + @@ -511,17 +512,17 @@ design rules under a new name. - - + + - - - - - - - - + + + + + + + + @@ -559,12 +560,12 @@ design rules under a new name. - - - + + + - - + + @@ -573,82 +574,83 @@ design rules under a new name. - - + + - - + + - - - - + + + + - - - + + + - - - - + + + + - - + + - - + + - - - - - - - - - - - - - - - + + - - - + + + - - - + + + + + + + + + + + + + + + + + diff --git a/FabFTDI Attiny441/FabFTDI.sch b/FabFTDI Attiny441/FabFTDI.sch index d19d37286b6c1c2285ad204069327be193c13094..4464e0d23b6d18f9ee9a6132037b03a00c39b9ea 100755 --- a/FabFTDI Attiny441/FabFTDI.sch +++ b/FabFTDI Attiny441/FabFTDI.sch @@ -537,7 +537,7 @@ For boards designed to be plugged directly into a USB slot. If possible, ensure - + @@ -779,7 +779,7 @@ Connector for USB-microB (orAB), USB-mini, and USB-PCB. For USB-micro use Digike - + @@ -1092,24 +1092,6 @@ Connector for USB-microB (orAB), USB-mini, and USB-PCB. For USB-micro use Digike - - - - - - - - - - - - - - - - - - @@ -1128,6 +1110,22 @@ Connector for USB-microB (orAB), USB-mini, and USB-PCB. For USB-micro use Digike + + + + + + + + + + + + + + + + diff --git a/FabFTDI Attiny441/FabFTDIBG.png b/FabFTDI Attiny441/FabFTDIBG.png new file mode 100755 index 0000000000000000000000000000000000000000..221eab0e7ed87fbb904be2dc4b416b7771d1d950 Binary files /dev/null and b/FabFTDI Attiny441/FabFTDIBG.png differ diff --git a/FabFTDI Attiny441/FabFTDIBoard.png b/FabFTDI Attiny441/FabFTDIBoard.png new file mode 100755 index 0000000000000000000000000000000000000000..aaab762d5390ff16bba118edd89f96a31ba2c79e Binary files /dev/null and b/FabFTDI Attiny441/FabFTDIBoard.png differ diff --git a/FabFTDI Attiny441/FabFTDITrace.png b/FabFTDI Attiny441/FabFTDITrace.png new file mode 100755 index 0000000000000000000000000000000000000000..c77ef8b0a0fa44e911f20c08b9e84fd04b52762a Binary files /dev/null and b/FabFTDI Attiny441/FabFTDITrace.png differ diff --git a/FabFTDI Attiny441/Programing/CDC/Changelog.txt b/FabFTDI Attiny441/Programing/CDC/Changelog.txt new file mode 100755 index 0000000000000000000000000000000000000000..f490ebb151682684c53a96b432e7f649213a482a --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/Changelog.txt @@ -0,0 +1,66 @@ +This file documents changes in the firmware-only CDC driver for atmel's AVR +microcontrollers. New entries are always appended to the end of the file. +Scroll down to the bottom to see the most recent changes. + +* Release 2006-06-28 + + - Polling instead of using interrupt at UART processing (ATmega). + - Adapted to higher baud rate setting (ATmega). + - Reduced interrupt cycles in software UART (ATtiny). + - Removed zero-sized receive block in usbFunctionWriteOut(). +* Release 2006-07-18 + + - Added Rx_interrupt version for high speed transfer (ATmega). + - Changed maximum packet size to 6 for stable connection (ATmega). + - Configured USI to transmit data (ATtiny). + - Added test report. +* Release 2006-08-28 + + - Adapted for new AVR-USB and WinAVR20070122. + - Modified to use maximum BULK_IN packet size in main.c. +* Release 2007-04-07 + + - Adapted for new AVR-USB and WinAVR20070525. + - Shortened the polling interval of interrupt endpoint to 2mS. + - Avoided duplicate response at SET_CONTROL_LINE_STATE request. + - Sent zero sized packet on bulk-in endpoint after SETUP request. + - Enforce data toggling to DATA0 on interrupt and bulk-in endpoints after + usbInit(). +* Release 2007-07-07 + + - Released ATtiny2313 version. +* Release 2007-10-03 + + - Fixed bug on ATtiny inverted version. (Thanks to Klaus Weglehner) + - Updated to the newest AVR-USB. +* Release 2008-01-27 + + - Updated to the newest AVR-USB and enabled other clocks. + - Defined all configuration options into Makefile. + - Extended the interrupt polling interval. +* Release 2008-08-25 + + - Expanded the bulk-IN packet size to 8 bytes. (ATtiny2313) + - Remade the data buffering to achieve the higher baudrates. (ATtiny2313) + - Implemented three baudrates using port bits selection. (ATtiny2313) +* Release 2009-01-26 + + - Corrected ATmega8 fuse bit(CKOPT=0). (Thanks to Rene Staffen) + - Merged all AVR versions to one. +* Release 2009-07-20 + + - Stabilized RC oscillator calibration. (ATtiny45) + - Supported the baudrate configuration. (ATtiny2313) + - Added control lines (DTR,RTS,CTS). (ATmega48) + - Added software inverters. (ATmega48) + - Improved performance. (ATmega8/48) + - Updated to the newest V-USB. +* Release 2010-02-28 + + - Fixed UART_INVERT bug. (ATtiny45) + - Added the X'tal version. (ATtiny45xtal) + - Added control lines (DTR,RTS,CTS) at 16/20MHz. (ATtiny2313) + - Updated to the newest V-USB. +* Release 2011-06-24 + + diff --git a/FabFTDI Attiny441/Programing/CDC/License.txt b/FabFTDI Attiny441/Programing/CDC/License.txt new file mode 100755 index 0000000000000000000000000000000000000000..92b37d47423405442739fb1dc719512fb1bc7abd --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/License.txt @@ -0,0 +1,370 @@ + + CDC-232 Software License + + + The CDC-232 performs the CDC (Communication Device Class) connection over + low-speed USB. It provides the RS-232C interface through virtual COM port. + + The CDC-232 is a part of AVR-CDC project, and is developed by + Osamu Tamura @ Recursion Co., Ltd. + + This program (not including usbdrv) is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public License (GPL2) + as published by the Free Software Foundation. A copy of the GPL version 2 + can be found in the appendix of this document. + Since CDC-232 works together with usbdrv, you must follow OBJECTIVE + DEVELOPMENT's license agreement on the occasion of use of this program. + +CAUTION + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + Using the CDC protocol over low-speed USB is NOT allowed by the USB + 1.x and 2.0 standard. Use at your own risk. There is NO GUARANTEE that + current or future operating systems support CDC over low speed USB. + Osamu Tamura, 24 June 2006 President of Recursion Co., Ltd. + URL: http://www.recursion.jp/avrcdc/ + + +APPENDIX + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/FabFTDI Attiny441/Programing/CDC/Readme.txt b/FabFTDI Attiny441/Programing/CDC/Readme.txt new file mode 100755 index 0000000000000000000000000000000000000000..72601de24bdb462adb6ef1829227cd839b396ad2 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/Readme.txt @@ -0,0 +1,136 @@ + + + CDC-232 + + + This is the Readme file to firmware-only CDC driver for Atmel AVR + microcontrollers. For more information please visit + http://www.recursion.jp/avrcdc/ + + +SUMMARY +======= + The CDC-232 performs the CDC (Communication Device Class) connection over + low-speed USB. It provides the RS-232C interface through virtual COM + port. The AVR-CDC is originally developed by Osamu Tamura. + Akira Kitazawa has significantly contributed to improve this software. + + +SPECIFICATION +============= + AVR-CDC with USART (ATmega8/48/88/168) + speed: 600 - 38400bps + datasize: 5-8 + parity: none/even/odd + stopbit: 1/2 + controls: DTR, RTS, CTS + + AVR-CDC with USART (ATtiny2313) + speed: 600 - 38400bps + datasize: 8 + parity: none + stopbit: 1 + + AVR-CDC without USART (ATtiny45/85) + speed: 1200 - 4800bps + datasize: 8 + parity: none + stopbit: 1 + supply current: 8-15mA + + The RTS indicates that the receive buffer is not full, and the CTS stops + sending data at '0' input. These controls cannot be controlled/read by the + host PC (ATmega). + + Internal RC Oscillator is calibrated at startup time on ATtiny45/85. + When the other low speed device is connected under the same host + controller, the ATtiny45/85 may fail to be recognized by the downstream + broadcast packet. + + Although the CDC protocol is supported by Windows 2000/XP/(Vista/7), Mac + OS 9.1/X, and Linux 2.4 or 2.6.31-, low-speed bulk transfer is not allowed + by the USB standard. Use CDC-232 at your own risk. + + +USAGE +===== + [Windows XP/2000/Vista/7] + Download "avrcdc_inf.zip" and read the instruction carefully. + + [Mac OS X] + You'll see the device /dev/cu.usbmodem***. + + [Linux] + The device will be /dev/ttyACM*. + Linux <2.6.31 does not accept low-speed CDC without patching the kernel. + Replace the kernel to 2.6.31 or higher. + + +DEVELOPMENT +=========== + Build your circuit and write firmware (cdcmega*.hex/cdctiny*.hex) into it. + C1:104 means 0.1uF, R3:1K5 means 1.5K ohms. + + This firmware has been developed on AVR Studio 4.18 and WinAVR 20100110. + If you couldn't invoke the project from cdc*.aps, create new GCC project + named "at***" under "cdc232.****-**-**/" without creating initial file. + Select each "default/Makefile" at "Configuration Options" menu. + + There are several options you can configure in + "Project/Configuration Options" menu, or in Makefile + + (General) + Device Select MCU type. + Frequency Select clock. 16.5MHz is the internal RC oscillator. + (ATtiny45/85) + 3.3V Vcc may not be enough for the higher clock operation. + + (Custom Options) add -D*** to select options below. + UART_INVERT Reverse the polarity of TXD and RXD to connect to RS-232C + directly (ATtiny45/85). + Enables software-inverters (PC0 -|>o- PB0, PC1 -|>o- PB1). + Connect RXD to PB0 and TXD to PC1. The baudrate should be + <=2400bps (ATmega48/88/168). + + Rebuild all the codes after modifying Makefile. + + Fuse bits + ext H-L + ATtiny2313 FF CD-FF + ATtiny45/85 FF CE-F1 + ATtiny45/85(Xtal) FF 6E-FF / FF 6E-F1 (PLL) + ATmega8 8F-FF + ATmega48/88/168 FF CE-FF + + SPIEN=0, WDTON=0, CKOPT(mega8)=0, + Crystal: Ex.8MHz/PLL(45,461), BOD: 1.8-2.7V + + * Detach the ISP programmer before restarting the device. + + The code size of AVR-CDC is 2-3KB, and 128B RAM is required at least. + + +USING AVR-CDC FOR FREE +====================== + The AVR-CDC is published under an Open Source compliant license. + See the file "License.txt" for details. + + You may use this driver in a form as it is. However, if you want to + distribute a system with your vendor name, modify these files and recompile + them; + 1. Vendor String in usbconfig.h + 2. COMPANY and MFGNAME strings in avrcdc.inf/lowbulk.inf + + + + Osamu Tamura @ Recursion Co., Ltd. + http://www.recursion.jp/avrcdc/ + 26 June 2006 + 7 April 2007 + 7 July 2007 + 27 January 2008 + 25 August 2008 + 10 April 2009 + 18 July 2009 + 28 February 2010 + diff --git a/FabFTDI Attiny441/Programing/CDC/cdc232-2313.pdf b/FabFTDI Attiny441/Programing/CDC/cdc232-2313.pdf new file mode 100755 index 0000000000000000000000000000000000000000..135c4d9469429ad30ede983fc899f6a098d5fc1e Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/cdc232-2313.pdf differ diff --git a/FabFTDI Attiny441/Programing/CDC/cdc232-if.pdf b/FabFTDI Attiny441/Programing/CDC/cdc232-if.pdf new file mode 100755 index 0000000000000000000000000000000000000000..8ff81db13a3f11792469a8b854a76554712b2c03 Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/cdc232-if.pdf differ diff --git a/FabFTDI Attiny441/Programing/CDC/cdc232-mega.pdf b/FabFTDI Attiny441/Programing/CDC/cdc232-mega.pdf new file mode 100755 index 0000000000000000000000000000000000000000..02ee911486546e6ae7cf03af238cc1098d1033d1 Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/cdc232-mega.pdf differ diff --git a/FabFTDI Attiny441/Programing/CDC/cdc232-t45.pdf b/FabFTDI Attiny441/Programing/CDC/cdc232-t45.pdf new file mode 100755 index 0000000000000000000000000000000000000000..bbb5ba75b4df72683f8fbab5169016522611dc31 Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/cdc232-t45.pdf differ diff --git a/FabFTDI Attiny441/Programing/CDC/cdc232-t45x.pdf b/FabFTDI Attiny441/Programing/CDC/cdc232-t45x.pdf new file mode 100755 index 0000000000000000000000000000000000000000..6bbf366c21fd8415faf3e7d2d357bbff229ba375 Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/cdc232-t45x.pdf differ diff --git a/FabFTDI Attiny441/Programing/CDC/libs-device/Readme.txt b/FabFTDI Attiny441/Programing/CDC/libs-device/Readme.txt new file mode 100755 index 0000000000000000000000000000000000000000..76518dc90944d2d110020cb3f3caa704b7d9d121 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/libs-device/Readme.txt @@ -0,0 +1,22 @@ +This is the Readme file for the libs-device directory. This directory contains +code snippets which may be useful for USB device firmware. + + +WHAT IS INCLUDED IN THIS DIRECTORY? +=================================== + +osccal.c and osccal.h + This module contains a function which calibrates the AVR's built-in RC + oscillator based on the USB frame clock. See osccal.h for a documentation + of the API. + +osctune.h + This header file contains a code snippet for usbconfig.h. With this code, + you can keep the AVR's internal RC oscillator in sync with the USB frame + clock. This is a continuous synchronization, not a single calibration at + USB reset as with osccal.c above. Please note that this code works only + if D- is wired to the interrupt, not D+. + +---------------------------------------------------------------------------- +(c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH. +http://www.obdev.at/ diff --git a/FabFTDI Attiny441/Programing/CDC/libs-device/osccal.c b/FabFTDI Attiny441/Programing/CDC/libs-device/osccal.c new file mode 100755 index 0000000000000000000000000000000000000000..6cfdec4f5307199dbb6b2a42b85c6032b7cd08c2 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/libs-device/osccal.c @@ -0,0 +1,122 @@ +/* Name: osccal.c + * Author: Christian Starkjohann + * Creation Date: 2008-04-10 + * Tabsize: 4 + * Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: osccal.c 762 2009-08-12 17:10:30Z cs $ + */ + +#include +#include +#include "usbdrv.h" + +#if USB_CFG_HAVE_MEASURE_FRAME_LENGTH + +#ifndef uchar +#define uchar unsigned char +#endif + +/* ------------------------------------------------------------------------- */ +/* ------------------------ Oscillator Calibration ------------------------- */ +/* ------------------------------------------------------------------------- */ + +void oscInit(void) +{ +uchar calibrationValue; + + calibrationValue = eeprom_read_byte(0); + if(calibrationValue != 0xff) + OSCCAL0 = calibrationValue; + else { +#if USB_CFG_CLOCK_KHZ==12800 + OSCCAL0 = 232; +#else + OSCCAL0 += 4; /* 8.00 -> 8.25MHz */ +#endif + } +} + +/* Calibrate the RC oscillator. Our timing reference is the Start Of Frame + * signal (a single SE0 bit) repeating every millisecond immediately after + * a USB RESET. We first do a binary search for the OSCCAL value and then + * optimize this value with a neighboorhod search. + */ +void calibrateOscillator(void) +{ +int x, optimumDev, targetValue = (unsigned)(1499 * (double)F_CPU / 10.5e6 + 0.5); +uchar optimumValue; +#if USB_CFG_CLOCK_KHZ==12800 +uchar step = 32; +uchar trialValue = 192; +#else +uchar step = 64; +uchar trialValue = 0; +#endif +uchar org; +int err; + + org = OSCCAL0; /* keep the original value */ + /* keep the current error ... */ + err = usbMeasureFrameLength() - targetValue; + if(err < 0) + err = -err; + +#if USB_CFG_CLOCK_KHZ==16500 + OSCCAL0 = 0x98; /* select a split range - O.Tamura */ + x = usbMeasureFrameLength(); + if(x < targetValue) + trialValue = 128; +#endif + + /* do a binary search: */ + do{ + OSCCAL0 = trialValue + step; + x = usbMeasureFrameLength(); /* proportional to current real frequency */ + if(x < targetValue) /* frequency still too low */ + trialValue += step; + step >>= 1; + }while(step > 0); + + /* + This calibration may fail if the other low-speed device is connected + to the same host controller (by downstream broadcast packet). - O.Tamura + */ + x -= targetValue; + if(x < 0) + x = -x; + if( x>err ) { + OSCCAL0 = org; + return; + } + + /* We have a precision of +/- 2 for optimum OSCCAL here */ + /* now do a neighborhood search for optimum value */ + optimumValue = trialValue; + optimumDev = x; /* this is certainly far away from optimum */ + for(OSCCAL0 = trialValue - 2; OSCCAL0 <= trialValue + 2; OSCCAL0++){ + x = usbMeasureFrameLength() - targetValue; + if(x < 0) + x = -x; + if(x < optimumDev){ + optimumDev = x; + optimumValue = OSCCAL0; + } + } + OSCCAL0 = optimumValue; + + if( eeprom_read_byte(0)!=optimumValue ) + eeprom_write_byte(0, optimumValue); +} +/* +Note: This calibration algorithm may try OSCCAL values of up to 192 even if +the optimum value is far below 192. It may therefore exceed the allowed clock +frequency of the CPU in low voltage designs! +You may replace this search algorithm with any other algorithm you like if +you have additional constraints such as a maximum CPU clock. +For version 5.x RC oscillators (those with a split range of 2x128 steps, e.g. +ATTiny25, ATTiny45, ATTiny85), it may be useful to search for the optimum in +both regions. +*/ + +#endif diff --git a/FabFTDI Attiny441/Programing/CDC/libs-device/osccal.h b/FabFTDI Attiny441/Programing/CDC/libs-device/osccal.h new file mode 100755 index 0000000000000000000000000000000000000000..50d3349bd01896d59c1adf872e0b432904f8996b --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/libs-device/osccal.h @@ -0,0 +1,67 @@ +/* Name: osccal.h + * Author: Christian Starkjohann + * Creation Date: 2008-04-10 + * Tabsize: 4 + * Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: osccal.h 762 2009-08-12 17:10:30Z cs $ + */ + +/* +General Description: +This module contains a function which calibrates the AVR's internal RC +oscillator so that the CPU runs at F_CPU (F_CPU is a macro which must be +defined when the module is compiled, best passed in the compiler command +line). The time reference is the USB frame clock of 1 kHz available +immediately after a USB RESET condition. Timing is done by counting CPU +cycles, so all interrupts must be disabled while the calibration runs. For +low level timing measurements, usbMeasureFrameLength() is called. This +function must be enabled in usbconfig.h by defining +USB_CFG_HAVE_MEASURE_FRAME_LENGTH to 1. It is recommended to call +calibrateOscillator() from the reset hook in usbconfig.h: +*/ +#ifndef __ASSEMBLER__ +#include // for sei() +extern void oscInit(void); +extern void calibrateOscillator(void); + + +#define USB_RESET_HOOK(resetStarts) if(!resetStarts){cli(); calibrateOscillator(); sei();} +/* +This routine is an alternative to the continuous synchronization described +in osctune.h. + +Algorithm used: +calibrateOscillator() first does a binary search in the OSCCAL register for +the best matching oscillator frequency. Then it does a next neighbor search +to find the value with the lowest clock rate deviation. It is guaranteed to +find the best match among neighboring values, but for version 5 oscillators +(which have a discontinuous relationship between OSCCAL and frequency) a +better match might be available in another OSCCAL region. + +Limitations: +This calibration algorithm may try OSCCAL values of up to 192 even if the +optimum value is far below 192. It may therefore exceed the allowed clock +frequency of the CPU in low voltage designs! +Precision depends on the OSCCAL vs. frequency dependency of the oscillator. +Typical precision for an ATMega168 (derived from the OSCCAL vs. F_RC diagram +in the data sheet) should be in the range of 0.4%. Only the 12.8 MHz and +16.5 MHz versions of V-USB (with built-in receiver PLL) can tolerate this +deviation! All other frequency modules require at least 0.2% precision. +*/ + +#ifndef __OSCCAL_H_INCLUDED__ +#define __OSCCAL_H_INCLUDED__ + +void oscInit(void); +void calibrateOscillator(void); +/* This function calibrates the RC oscillator so that the CPU runs at F_CPU. + * It MUST be called immediately after the end of a USB RESET condition! + * Disable all interrupts during the call! + * It is recommended that you store the resulting value in EEPROM so that a + * good guess value is available after the next reset. + */ + + +#endif /* __OSCCAL_H_INCLUDED__ */ +#endif diff --git a/FabFTDI Attiny441/Programing/CDC/libs-device/osctune.h b/FabFTDI Attiny441/Programing/CDC/libs-device/osctune.h new file mode 100755 index 0000000000000000000000000000000000000000..c751648b13fb17524c1d1a146c8f52b7bd93e57c --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/libs-device/osctune.h @@ -0,0 +1,88 @@ +/* Name: osctune.h + * Author: Christian Starkjohann + * Creation Date: 2008-10-18 + * Tabsize: 4 + * Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: osctune.h 692 2008-11-07 15:07:40Z cs $ + */ + +/* +General Description: +This file is declared as C-header file although it is mostly documentation +how the RC oscillator can be kept in sync to the USB frame rate. The code +shown here must be added to usbconfig.h or this header file is included from +there. This code works only if D- is wired to the interrupt, not D+!!! + +This is an alternative to the osccal routine in osccal.c. It has the advantage +that the synchronization is done continuously and that it has more compact +code size. The disadvantages are slow synchronization (it may take a while +until the driver works), that messages immediately after the SOF pulse may be +lost (and need to be retried by the host) and that the interrupt is on D- +contrary to most examples. + +You may want to store a good calibration value in EEPROM for the next startup. +You know that the calibration value is good when the first USB message is +received. Do not store the value on every received message because the EEPROM +has a limited endurance. + +Notes: +(*) You must declare the global character variable "lastTimer0Value" in your +main code. + +(*) Timer 0 must be free running (not written by your code) and the prescaling +must be consistent with the TIMER0_PRESCALING define. + +(*) Good values for Timer 0 prescaling depend on how precise the clock must +be tuned and how far away from the default clock rate the target clock is. +For precise tuning, choose a low prescaler factor, for a broad range of tuning +choose a high one. A prescaler factor of 64 is good for the entire OSCCAL +range and allows a precision of better than +/-1%. A prescaler factor of 8 +allows tuning to slightly more than +/-6% of the default frequency and is +more precise than one step of OSCCAL. It is therefore not suitable to tune an +8 MHz oscillator to 12.5 MHz. + +Thanks to Henrik Haftmann for the idea to this routine! +*/ + +#define TIMER0_PRESCALING 64 /* must match the configuration for TIMER0 in main */ +#define TOLERATED_DEVIATION_PPT 5 /* max clock deviation before we tune in 1/10 % */ +/* derived constants: */ +#define EXPECTED_TIMER0_INCREMENT ((F_CPU / (1000 * TIMER0_PRESCALING)) & 0xff) +#define TOLERATED_DEVIATION (TOLERATED_DEVIATION_PPT * F_CPU / (1000000 * TIMER0_PRESCALING)) + +#ifdef __ASSEMBLER__ +macro tuneOsccal + push YH ;[0] + in YL, TCNT0 ;[2] + lds YH, lastTimer0Value ;[3] + sts lastTimer0Value, YL ;[5] + sub YL, YH ;[7] time passed since last frame + subi YL, EXPECTED_TIMER0_INCREMENT ;[8] +#if OSCCAL > 0x3f /* outside I/O addressable range */ + lds YH, OSCCAL ;[6] +#else + in YH, OSCCAL ;[6] assembler modle uses __SFR_OFFSET == 0 +#endif + cpi YL, TOLERATED_DEVIATION + 1 ;[10] + brmi notTooHigh ;[11] + subi YH, 1 ;[12] clock rate was too high +; brcs tuningOverflow ; optionally check for overflow + rjmp osctuneDone ;[13] +notTooHigh: + cpi YL, -TOLERATED_DEVIATION ;[13] + brpl osctuneDone ;[14] not too low + inc YH ;[15] clock rate was too low +; breq tuningOverflow ; optionally check for overflow +osctuneDone: +#if OSCCAL > 0x3f /* outside I/O addressable range */ + sts OSCCAL, YH ;[12-13] store tuned value +#else + out OSCCAL, YH ;[12-13] store tuned value +#endif +tuningOverflow: + pop YH ;[17] + endm ;[19] max number of cycles +#endif + +#define USB_SOF_HOOK tuneOsccal diff --git a/FabFTDI Attiny441/Programing/CDC/mega48/cdcmega.aps b/FabFTDI Attiny441/Programing/CDC/mega48/cdcmega.aps new file mode 100755 index 0000000000000000000000000000000000000000..6bc1a8fb5418675a3f67c816385c65e1f887dbd0 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/mega48/cdcmega.aps @@ -0,0 +1 @@ +cdcmega20-Mar-2007 23:09:3524-Jun-2011 14:45:55241020-Mar-2007 23:09:3544, 13, 0, 528AVR GCCdefault\cdcmega.elfC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\mega48\AVR SimulatorATmega48.xmlfalseR00R01R02R03R04R05R06R07R08R09R10R11R12R13R14R15R16R17R18R19R20R21R22R23R24R25R26R27R28R29R30R31Auto000uart.cmain.c..\usbdrv\usbdrv.c..\usbdrv\usbdrvasm.S..\usbdrv\oddebug.cusbconfig.huart.h..\usbdrv\oddebug.h..\usbdrv\usbdrv.h..\usbdrv\usbportability.hdefault\cdcmega.lssdefault\MakefiledefaultYESdefault\Makefileatmega48110cdcmega.elfdefault\1.\..\usbdrv\-Wall -gdwarf-2 -DF_CPU=12000000UL -Os -fsigned-chardefault1C:\Program Files\WinAVR\bin\avr-gcc.exeC:\Program Files\WinAVR\utils\bin\make.exeC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\mega48\usbconfig.hC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\mega48\uart.hC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\mega48\..\usbdrv\oddebug.hC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\mega48\..\usbdrv\usbdrv.hC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\mega48\..\usbdrv\usbportability.hC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\mega48\uart.cC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\mega48\main.cC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\mega48\..\usbdrv\usbdrv.cC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\mega48\..\usbdrv\usbdrvasm.SC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\mega48\..\usbdrv\oddebug.c diff --git a/FabFTDI Attiny441/Programing/CDC/mega48/cdcmega.aws b/FabFTDI Attiny441/Programing/CDC/mega48/cdcmega.aws new file mode 100755 index 0000000000000000000000000000000000000000..d5a3213802a5f0ca9d63f01c4c633c146e5c297c --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/mega48/cdcmega.aws @@ -0,0 +1 @@ + diff --git a/FabFTDI Attiny441/Programing/CDC/mega48/default/Makefile b/FabFTDI Attiny441/Programing/CDC/mega48/default/Makefile new file mode 100755 index 0000000000000000000000000000000000000000..f8677735fe99c065c3a1f62b9220d85f25de242b --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/mega48/default/Makefile @@ -0,0 +1,107 @@ +############################################################################### +# Makefile for the project cdcmega +############################################################################### + +## General Flags +PROJECT = cdcmega + +#MCU = atmega8 +#MCU = atmega16 +MCU = atmega48 +#MCU = atmega88 +#MCU = atmega168 +#MCU = atmega328p + +CLK = 12000000UL +#CLK = 15000000UL +#CLK = 16000000UL +#CLK = 18000000UL +#CLK = 20000000UL + +TARGET = cdcmega.elf +CC = avr-gcc + +## Options common to compile, link and assembly rules +COMMON = -mmcu=$(MCU) -DF_CPU=$(CLK) + +## UART_INVERT enables software-inverter (PC0 -|>o- PB0, PC1 -|>o- PB1) +## to connect to RS-232C line directly. ( <= 2400 bps ) +## atmega8 doesn't support this +#COMMON += -DUART_INVERT + +## Compile options common for all C compilation units. +CFLAGS = $(COMMON) +CFLAGS += -Wall -gdwarf-2 -Os -fsigned-char +CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d + +## Assembly specific flags +ASMFLAGS = $(COMMON) +ASMFLAGS += $(CFLAGS) +ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 + +## Linker flags +LDFLAGS = $(COMMON) +LDFLAGS += + + +## Intel Hex file production flags +HEX_FLASH_FLAGS = -R .eeprom -R .fuse -R .lock -R .signature + +HEX_EEPROM_FLAGS = -j .eeprom +HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load" +HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings + + +## Include Directories +INCLUDES = -I".." -I"../../usbdrv" + +## Objects that must be built in order to link +OBJECTS = usbdrv.o usbdrvasm.o oddebug.o uart.o main.o + +## Objects explicitly added by the user +LINKONLYOBJECTS = + +## Build +all: $(TARGET) cdcmega.hex cdcmega.eep cdcmega.lss size + +## Compile +usbdrvasm.o: ../../usbdrv/usbdrvasm.S + $(CC) $(INCLUDES) $(ASMFLAGS) -c $< + +usbdrv.o: ../../usbdrv/usbdrv.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +oddebug.o: ../../usbdrv/oddebug.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +uart.o: ../uart.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +main.o: ../main.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +##Link +$(TARGET): $(OBJECTS) + $(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET) + +%.hex: $(TARGET) + avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@ + +%.eep: $(TARGET) + -avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ || exit 0 + +%.lss: $(TARGET) + avr-objdump -h -S $< > $@ + +size: ${TARGET} + @echo + @avr-size -C --mcu=${MCU} ${TARGET} + +## Clean target +.PHONY: clean +clean: + -rm -rf $(OBJECTS) cdcmega.elf dep/* cdcmega.hex cdcmega.eep cdcmega.lss + +## Other dependencies +-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*) + diff --git a/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega16.hex b/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega16.hex new file mode 100755 index 0000000000000000000000000000000000000000..b73f2801a4ba65603f68c85e9d99d54a619a652c --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega16.hex @@ -0,0 +1,172 @@ +:100000000C9470000C9412020C948D000C948D00D2 +:100010000C948D000C948D000C948D000C948D002C +:100020000C948D000C948D000C948D000C948D001C +:100030000C948D000C948D000C948D000C948D000C +:100040000C948D000C948D000C948D000C948D00FC +:100050000C948D00040309042203770077007700D5 +:100060002E00720065006300750072007300690065 +:100070006F006E002E006A007000100355005300E0 +:1000800042002D0032003300320012011001020044 +:100090000008C016E1050001010200010902430049 +:1000A000020100803209040000010202010005245F +:1000B00000100104240202052406000105240103A6 +:1000C00001070583030800FF09040100020A00007C +:1000D0000007050102080000070581020800000072 +:1000E00011241FBECFE5D4E0DEBFCDBF10E0A0E6F7 +:1000F000B0E0E0EAFAE002C005900D92AC36B1073C +:10010000D9F712E0ACE6B0E001C01D92A434B1070B +:10011000E1F70E9492040C944E050C94000085B700 +:10012000826085BF8BB780648BBF8BE48093810036 +:100130008093AC008AE5809380008093AB000895A3 +:100140001F93CF93DF93DC01162FEA01888184FF90 +:1001500005C0898198E88927898302C08AE5888358 +:10016000AE014E5F5F4F212FFA018D918193215097 +:100170001216DCF3CA01612F0E940E021C5F188365 +:10018000DF91CF911F9108954BEA50E00E94A000AB +:10019000089540E850E00E94A00008951F93CF9377 +:1001A000DF9360919100635067FDB7C080918E002E +:1001B000CCE0D0E0C81BD109CB56DF4F80918D0039 +:1001C000803120F4CE010E947604A1C08D3209F066 +:1001D0008DC0683009F09BC083EC809375008AE580 +:1001E0008093600010926C008881807629F0CE01A7 +:1001F0000E943604282F67C09A8110927E00898160 +:10020000882321F410927F0022E056C0853019F433 +:100210009093920050C08630C1F58B81813041F4BB +:100220008AE890E09093900080938F0022E129C0AB +:10023000823029F4CE010E942104282F22C083306D +:10024000F9F48A81882341F484E590E0909390004A +:1002500080938F0024E015C0813041F488E590E060 +:100260009093900080938F0022E20BC0823041F483 +:100270008AE790E09093900080938F0020E101C086 +:1002800020E080E480936C001EC0883021F421E0DF +:1002900084E990E013C0893019F4909394000BC066 +:1002A0008A3011F421E008C08B3029F48BE480936C +:1002B00081008093AC0020E08EE790E09093900066 +:1002C00080938F0009C02F3F39F4888187FD2E81EC +:1002D00080E880936C0006C08F81882319F48E819A +:1002E000821708F0822F8093610011C080916C000A +:1002F00087FF0DC0CE010E94F4048F3F21F48EE1F0 +:100300008093600004C0882311F0109261008091F6 +:100310009100181614F4109291008091600084FFEF +:100320005AC0809161008F3F09F455C0182F893061 +:1003300008F018E0811B809361008091750098E8B7 +:10034000892780937500112399F180916C0087FFB4 +:1003500009C086E790E0612F0E945E04182F893063 +:10036000A0F526C020918F003091900086FF0DC02F +:10037000A6E7B0E080E090E0F901E80FF91FE49112 +:10038000ED9301961817C1F708C0912FD901E6E740 +:10039000F0E08D9181939150E1F71150812F90E021 +:1003A0001F5F0196820F931F9093900080938F00A0 +:1003B00086E790E0612F0E940E02612F6C5F6C3027 +:1003C00041F08FEF8093610004C08FEF8093610054 +:1003D0006EE16093600094E180B38C7031F49150D1 +:1003E000D9F71092920010928C00DF91CF911F915B +:1003F0000895A82FB92F80E090E041E050EA609581 +:1004000030E009C02D9182279795879510F08427B9 +:100410009527305EC8F36F5FA8F30895EADF8D93E8 +:100420009D930895CF93CFB7CF93C395839BE9F75F +:10043000839B09C0839B07C0839B05C0839B03C02C +:10044000839B01C0A6C0DF93C0918E00DD27CB56F1 +:10045000DF4F839B02C0DF91EBCF2F930F931F934E +:1004600000B32FEF03FB20F94F933F9310B34FEFEF +:10047000012703FB21F93BE031C04E7F012F10B370 +:10048000216028C0102F4D7F2260000000B329C0DA +:100490004B7F2460012F000010B32BC010B3477FA7 +:1004A00028602AC04F7E00B320612CC04F7D10B35E +:1004B00020622FC04F7B00B3206432C0422700B3BC +:1004C00049934FEF0000102713FB20F910B31C7065 +:1004D000C9F1297F91F2012703FB21F900B3237FA2 +:1004E00089F2315058F1102713FB22F910B3277EFF +:1004F00079F2012703FB23F92F7C81F200B3102747 +:1005000013FB24F92F7971F200C010B3012703FB0C +:1005100025F92F7359F200C000B3102713FB26F9F9 +:10052000223040F200C010B3012703FB27F924302A +:1005300028F64F77206810B30000F9CF10E41ABFF7 +:1005400000271CC03B503195C31BD04010E41ABF9C +:100550000881033C11F10B3401F120918C001981C9 +:10056000110F1213EDCF4A81441F093659F10D3294 +:1005700011F0013E29F74F7009F0042F009393000A +:100580003F914F911F910F912F91DF91CAB7C6FDF7 +:100590004CCFCF91CFBFCF911895209193002223BC +:1005A00079F3109191001123C1F53430C2F13093E9 +:1005B000910020938D0010918E003BE0311B309311 +:1005C0008E002DC00091910001303CF50AE54F707E +:1005D00049F43091600034FD24C000936000C5E709 +:1005E000D0E023C0433049F03091800034FD19C081 +:1005F00000938000C1E8D0E018C03091AB0034FD1A +:1006000010C00093AB00CCEAD0E00FC02795A8F44F +:100610005150A9F4220F0000F9CF4AE503C042ED82 +:1006200001C0432FC4E1D0E032E011B31C60939AC3 +:1006300011BB02B320E41CE05F93012756E002BB2C +:10064000279520F4515021F4220FF9CF012756E0CD +:1006500000003B5A02BBD0F2279528F4515029F4F0 +:10066000220F0000F9CF012756E0279502BB20F4A6 +:10067000515021F4220FF9CF012756E0299133235D +:1006800002BB21F6037F10919200110FC651D0409A +:1006900002BB11F010938C0010E41ABF086011B374 +:1006A000137F402F437F5F9100C000C002BB11BB8E +:1006B00042BB66CFBF92CF92DF92EF92FF920F9331 +:1006C0001F936B017C01B42E122F96958795779519 +:1006D0006795605A7C41894E9F4FA70196010E9401 +:1006E0002C052150304040405040599A1AB881E0C2 +:1006F000B81611F440EB04C04B2D4295407F406882 +:10070000802F90E00597880F991F1695110F110FF4 +:10071000110F182B412B40BD29B930BD88E18AB992 +:1007200084BB8FEF85BB1F910F91FF90EF90DF90FF +:10073000CF90BF9008950F931F93309141029091F5 +:1007400042020FC0E92FF0E0E05CFE4F80818CB9DF +:100750009F5F8091910087FF07C0293028F0109299 +:100760009100292F231B01C02F5F5D9B0BC0391700 +:1007700039F43093420290914002E0913F0115C05C +:100780009D99E0CF90934202F6CF391751F08BB18B +:100790002CB18C7171F4F0E0E954FF4F2083E32F0A +:1007A00004C0E0933F01AC9808C0EF5F3E2F3F7755 +:1007B000E1505F99EACFE0933F018091800084FF90 +:1007C0003DC060913F01691721F480914302882365 +:1007D000A9F1162F191B1F77193008F018E0012F07 +:1007E000090F07FF10C00F77A7EBB0E0202F30E014 +:1007F0002A0F3B1F05C0FD01E058FF4F8D918083FC +:10080000A217B307C1F7892F90E089549F4F612F3A +:100810000E94C90000934002112361F0AC9A183085 +:1008200049F490E080913F01801391E081E09827A6 +:10083000892F02C080E090E0809343021F910F91C6 +:100840000895FC018381813049F48AE890E0909317 +:10085000900080938F0080918A0008958CE990E049 +:100860009093900080938F0083E40895FC01208191 +:10087000822F8076803201F59181892F80528230DB +:1008800010F48FEF0895923281F485B392819170C4 +:10089000990F990F990F877F982B95BB80916D00C9 +:1008A000882319F482E080936D0027FD05C081E064 +:1008B0008093430280E0089580E00895FC018091D8 +:1008C00071008083809172008183809173008283A4 +:1008D00080917400838380916E00848380916F0087 +:1008E000858380917000868387E00895DC01909174 +:1008F00042020CC02E2F2F5F291739F0F0E0E05C88 +:10090000FE4F8D918083209341026150E09141021E +:10091000662381F791509E1B993018F48FEF8093D6 +:10092000910008950F932EE088E190E00FB6F894BF +:10093000A89581BD0FBE21BD83EF82BB8CE081BB3A +:10094000A89584EC99E02CE231E0F9013197F1F7B8 +:100950000197D9F711BA80E895E2A0E0B0E0809362 +:10096000710090937200A0937300B0937400109282 +:100970006E0010926F0088E08093700060E875E26E +:1009800080E090E040E020E008E00E945A031092EE +:10099000420210923F0110924002109241020E94C6 +:1009A0008F0010926D00109243027894A8950E94D7 +:1009B000CE000E949B0390916D009923B9F3809122 +:1009C000AB0084FFF3CF923021F482E690E068E040 +:1009D00003C08AE690E062E00E94C40080916D004E +:1009E000815080936D00E2CF0F93FC018081809352 +:1009F0007100818180937200828180937300838172 +:100A000080937400948190936E00858180936F0031 +:100A1000068100937000833010F010926F009130C7 +:100A200011F410926E0060917100709172008091CB +:100A300073009091740040916F0020916E000E94AD +:100A40005A031092420210923F01109240021092FB +:100A5000410281E00F910895A1E21A2EAA1BBB1B4F +:100A6000FD010DC0AA1FBB1FEE1FFF1FA217B3077A +:100A7000E407F50720F0A21BB30BE40BF50B661F90 +:100A8000771F881F991F1A9469F760957095809554 +:100A900090959B01AC01BD01CF010895F894FFCF63 +:0C0AA0005AFFA12000000000020003002B +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega168.hex b/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega168.hex new file mode 100755 index 0000000000000000000000000000000000000000..3218e6f81d5340a946dc0132d07b59d227b36bef --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega168.hex @@ -0,0 +1,176 @@ +:100000000C947A000C941C020C9497000C949700AA +:100010000C9497000C9497000C9497000C94970004 +:100020000C9497000C9497000C9497000C949700F4 +:100030000C9497000C9497000C9497000C949700E4 +:100040000C9497000C9497000C9497000C949700D4 +:100050000C9497000C9497000C9497000C949700C4 +:100060000C9497000C949700040309042203770072 +:10007000770077002E007200650063007500720043 +:10008000730069006F006E002E006A00700010039C +:100090005500530042002D0032003300320012019F +:1000A000100102000008C016E10500010102000174 +:1000B000090243000201008032090400000102022B +:1000C0000100052400100104240202052406000199 +:1000D0000524010301070583030800FF090401004B +:1000E000020A00000007050102080000070581025E +:1000F0000800000011241FBECFEFD4E0DEBFCDBF4B +:1001000011E0A0E0B1E0E6EDFAE002C005900D924A +:10011000AC30B107D9F712E0ACE0B1E001C01D92FC +:10012000A43EB107E1F70E94AB040C9469050C945E +:100130000000E9E6F0E0808182608083E89A8BE449 +:100140008093210180934C018AE580932001809364 +:100150004B0108951F93CF93DF93DC01162FEA0123 +:10016000888184FF05C0898198E88927898302C036 +:100170008AE58883AE014E5F5F4F212FFA018D9192 +:10018000819321501216DCF3CA01612F0E941802DC +:100190001C5F1883DF91CF911F9108954BE451E0CC +:1001A0000E94AA00089540E251E00E94AA0008952A +:1001B0001F93CF93DF9360913101635067FDB7C008 +:1001C00080912E01CCE0D0E0C81BD109CB5CDE4F82 +:1001D00080912D01803120F4CE010E948F04A1C0B6 +:1001E0008D3209F08DC0683009F09BC083EC80939C +:1001F00015018AE58093000110920C0188818076B8 +:1002000029F0CE010E944F04282F67C09A811092D6 +:100210001E018981882321F410921F0122E056C01B +:10022000853019F49093320150C08630C1F58B812E +:10023000813041F48EE990E09093300180932F015A +:1002400022E129C0823029F4CE010E943A04282FED +:1002500022C08330F9F48A81882341F488E690E053 +:100260009093300180932F0124E015C0813041F438 +:100270008CE690E09093300180932F0122E20BC036 +:10028000823041F48EE890E09093300180932F010A +:1002900020E101C020E080E480930C011EC0883082 +:1002A00021F421E084E391E013C0893019F49093A4 +:1002B00034010BC08A3011F421E008C08B3029F4DE +:1002C0008BE48093210180934C0120E08EE191E04A +:1002D0009093300180932F0109C02F3F39F488811A +:1002E00087FD2E8180E880930C0106C08F818823D2 +:1002F00019F48E81821708F0822F8093010111C0BA +:1003000080910C0187FF0DC0CE010E940F058F3F29 +:1003100021F48EE18093000104C0882311F0109233 +:10032000010180913101181614F41092310180916D +:10033000000184FF5AC0809101018F3F09F455C02C +:10034000182F893008F018E0811B809301018091FB +:10035000150198E8892780931501112399F180915F +:100360000C0187FF09C086E191E0612F0E947704AC +:10037000182F8930A0F526C020912F01309130012F +:1003800086FF0DC0A6E1B1E080E090E0F901E80F42 +:10039000F91FE491ED9301961817C1F708C0912F4A +:1003A000D901E6E1F1E08D9181939150E1F711508F +:1003B000812F90E01F5F0196820F931F9093300171 +:1003C00080932F0186E191E0612F0E941802612F36 +:1003D0006C5F6C3041F08FEF8093010104C08FEFB0 +:1003E000809301016EE16093000194E189B18C700A +:1003F00031F49150D9F71092320110922C01DF9113 +:10040000CF911F910895A82FB92F80E090E041E08F +:1004100050EA609530E009C02D9182279795879525 +:1004200010F084279527305EC8F36F5FA8F3089516 +:10043000EADF8D939D930895CF93CFB7CF93C39564 +:100440004B9BE9F74B9B09C04B9B07C04B9B05C0DF +:100450004B9B03C04B9B01C0A6C0DF93C0912E01F4 +:10046000DD27CB5CDE4F4B9B02C0DF91EBCF2F93A0 +:100470000F931F9309B12FEF03FB20F94F933F9385 +:1004800019B14FEF012703FB21F93BE031C04E7F4B +:10049000012F19B1216028C0102F4D7F226000006C +:1004A00009B129C04B7F2460012F000019B12BC076 +:1004B00019B1477F28602AC04F7E09B120612CC046 +:1004C0004F7D19B120622FC04F7B09B1206432C02B +:1004D000422709B149934FEF0000102713FB20F981 +:1004E00019B11C70C9F1297F91F2012703FB21F991 +:1004F00009B1237F89F2315058F1102713FB22F9FB +:1005000019B1277E79F2012703FB23F92F7C81F2B1 +:1005100009B1102713FB24F92F7971F200C019B12A +:10052000012703FB25F92F7359F200C009B11027E9 +:1005300013FB26F9223040F200C019B1012703FB5A +:1005400027F9243028F64F77206819B10000F9CF39 +:1005500011E01CBB00271CC03B503195C31BD04091 +:1005600011E01CBB0881033C11F10B3401F1209117 +:100570002C011981110F1213EDCF4A81441F093646 +:1005800059F10D3211F0013E29F74F7009F0042F97 +:10059000009333013F914F911F910F912F91DF9164 +:1005A000CCB3C0FD4CCFCF91CFBFCF911895209148 +:1005B0003301222379F3109131011123C1F5343035 +:1005C000C2F13093310120932D0110912E013BE0B7 +:1005D000311B30932E012DC00091310101303CF5CB +:1005E0000AE54F7049F43091000134FD24C00093B6 +:1005F0000001C5E1D1E023C0433049F03091200132 +:1006000034FD19C000932001C1E2D1E018C030913F +:100610004B0134FD10C000934B01CCE4D1E00FC07E +:100620002795A8F45150A9F4220F0000F9CF4AE50C +:1006300003C042ED01C0432FC4E1D0E032E01AB163 +:100640001C605B9A1AB90BB120E41CE05F93012790 +:1006500056E00BB9279520F4515021F4220FF9CF21 +:10066000012756E000003B5A0BB9D0F2279528F439 +:10067000515029F4220F0000F9CF012756E02795A9 +:100680000BB920F4515021F4220FF9CF012756E085 +:10069000299133230BB921F6037F10913201110FF9 +:1006A000C651D0400BB911F010932C0111E01CBBC6 +:1006B00008601AB1137F402F437F5F9100C000C0D4 +:1006C0000BB91AB94BB966CFBF92CF92DF92EF92B6 +:1006D000FF920F931F936B017C01B42E122F9695FE +:1006E000879577956795605A7C41894E9F4FA70102 +:1006F00096010E9447052150304040405040809173 +:10070000C00082608093C0001092C10081E0B816E2 +:1007100011F440E303C04B2D4295407F802F90E0C1 +:100720000597880F991F1695110F110F110F182B90 +:10073000412B4093C2002093C4003093C50088E150 +:100740008093C10087B98FEF88B91F910F91FF90F7 +:10075000EF90DF90CF90BF9008950F931F9330914B +:10076000E1029091E20210C0E92FF0E0E052FE4F6A +:1007700080818093C6009F5F8091310187FF07C011 +:10078000293028F010923101292F231B01C02F5F3F +:100790008091C00085FF0BC0391739F43093E20215 +:1007A0009091E002E091DF0117C03599DDCF909381 +:1007B000E202F6CF391761F08091C0002091C600A7 +:1007C0008C7171F4F0E0E95AFE4F2083E32F04C0EE +:1007D000E093DF0144980AC0EF5F3E2F3F77E1507E +:1007E0008091C00087FDE6CFE093DF01809120017A +:1007F00084FF3DC06091DF01691721F48091E3021D +:100800008823A9F1162F191B1F77193008F018E05B +:10081000012F090F07FF10C00F77A7E5B1E0202FC8 +:1008200030E02A0F3B1F05C0FD01E058FF4F8D91BE +:100830008083A217B307C1F7892F90E0895A9E4F92 +:10084000612F0E94D3000093E002112361F0449ACB +:10085000183049F490E08091DF01801391E081E04D +:100860009827892F02C080E090E08093E3021F91D7 +:100870000F910895FC018381813049F48EE990E065 +:100880009093300180932F0180919E00089580EB1A +:1008900090E09093300180932F0183E40895FC0150 +:1008A0002081822F8076803201F59181892F8052BC +:1008B000823010F48FEF0895923281F488B19281E2 +:1008C0009170990F990F990F877F982B98B9809104 +:1008D0000D01882319F482E080930D0127FD05C0E6 +:1008E00081E08093E30280E0089580E00895FC01B8 +:1008F0008091110180838091120181838091130185 +:10090000828380911401838380910E01848380917E +:100910000F01858380911001868387E00895DC01B3 +:100920009091E2020CC02E2F2F5F291739F0F0E0D2 +:10093000E052FE4F8D9180832093E1026150E0915F +:10094000E102662381F791509E1B993018F48FEFD6 +:100950008093310108950F932EE088E190E00FB667 +:10096000F894A895809360000FBE2093600083EFF9 +:100970008BB98CE08AB9A89584EC99E02CE231E03F +:10098000F9013197F1F70197D9F71AB880E895E2A4 +:10099000A0E0B0E08093110190931201A0931301A5 +:1009A000B093140110920E0110920F0188E0809311 +:1009B000100160E875E280E090E040E020E008E0AF +:1009C0000E9464031092E2021092DF011092E00292 +:1009D0001092E1020E94990010920D011092E30220 +:1009E0007894A8950E94D8000E94AD0390910D01C3 +:1009F0009923B9F380914B0184FFF3CF923021F416 +:100A000082E091E068E003C08AE091E062E00E9449 +:100A1000CE0080910D01815080930D01E2CF0F93A4 +:100A2000FC01808180931101818180931201828178 +:100A300080931301838180931401948190930E011C +:100A4000858180930F01068100931001833010F09F +:100A500010920F01913011F410920E01609111016A +:100A600070911201809113019091140140910F0136 +:100A700020910E010E9464031092E2021092DF01A5 +:100A80001092E0021092E10281E00F910895A1E23C +:100A90001A2EAA1BBB1BFD010DC0AA1FBB1FEE1FF8 +:100AA000FF1FA217B307E407F50720F0A21BB30B43 +:100AB000E40BF50B661F771F881F991F1A9469F7BF +:100AC00060957095809590959B01AC01BD01CF011B +:060AD0000895F894FFCF29 +:0C0AD6005AFFA1200000000002000300F5 +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega328p.hex b/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega328p.hex new file mode 100755 index 0000000000000000000000000000000000000000..96ee6c9e3eb7a53334cc7e73f33c0b97d913fbb0 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega328p.hex @@ -0,0 +1,176 @@ +:100000000C947A000C941C020C9497000C949700AA +:100010000C9497000C9497000C9497000C94970004 +:100020000C9497000C9497000C9497000C949700F4 +:100030000C9497000C9497000C9497000C949700E4 +:100040000C9497000C9497000C9497000C949700D4 +:100050000C9497000C9497000C9497000C949700C4 +:100060000C9497000C949700040309042203770072 +:10007000770077002E007200650063007500720043 +:10008000730069006F006E002E006A00700010039C +:100090005500530042002D0032003300320012019F +:1000A000100102000008C016E10500010102000174 +:1000B000090243000201008032090400000102022B +:1000C0000100052400100104240202052406000199 +:1000D0000524010301070583030800FF090401004B +:1000E000020A00000007050102080000070581025E +:1000F0000800000011241FBECFEFD8E0DEBFCDBF47 +:1001000011E0A0E0B1E0E6EDFAE002C005900D924A +:10011000AC30B107D9F712E0ACE0B1E001C01D92FC +:10012000A43EB107E1F70E94AB040C9469050C945E +:100130000000E9E6F0E0808182608083E89A8BE449 +:100140008093210180934C018AE580932001809364 +:100150004B0108951F93CF93DF93DC01162FEA0123 +:10016000888184FF05C0898198E88927898302C036 +:100170008AE58883AE014E5F5F4F212FFA018D9192 +:10018000819321501216DCF3CA01612F0E941802DC +:100190001C5F1883DF91CF911F9108954BE451E0CC +:1001A0000E94AA00089540E251E00E94AA0008952A +:1001B0001F93CF93DF9360913101635067FDB7C008 +:1001C00080912E01CCE0D0E0C81BD109CB5CDE4F82 +:1001D00080912D01803120F4CE010E948F04A1C0B6 +:1001E0008D3209F08DC0683009F09BC083EC80939C +:1001F00015018AE58093000110920C0188818076B8 +:1002000029F0CE010E944F04282F67C09A811092D6 +:100210001E018981882321F410921F0122E056C01B +:10022000853019F49093320150C08630C1F58B812E +:10023000813041F48EE990E09093300180932F015A +:1002400022E129C0823029F4CE010E943A04282FED +:1002500022C08330F9F48A81882341F488E690E053 +:100260009093300180932F0124E015C0813041F438 +:100270008CE690E09093300180932F0122E20BC036 +:10028000823041F48EE890E09093300180932F010A +:1002900020E101C020E080E480930C011EC0883082 +:1002A00021F421E084E391E013C0893019F49093A4 +:1002B00034010BC08A3011F421E008C08B3029F4DE +:1002C0008BE48093210180934C0120E08EE191E04A +:1002D0009093300180932F0109C02F3F39F488811A +:1002E00087FD2E8180E880930C0106C08F818823D2 +:1002F00019F48E81821708F0822F8093010111C0BA +:1003000080910C0187FF0DC0CE010E940F058F3F29 +:1003100021F48EE18093000104C0882311F0109233 +:10032000010180913101181614F41092310180916D +:10033000000184FF5AC0809101018F3F09F455C02C +:10034000182F893008F018E0811B809301018091FB +:10035000150198E8892780931501112399F180915F +:100360000C0187FF09C086E191E0612F0E947704AC +:10037000182F8930A0F526C020912F01309130012F +:1003800086FF0DC0A6E1B1E080E090E0F901E80F42 +:10039000F91FE491ED9301961817C1F708C0912F4A +:1003A000D901E6E1F1E08D9181939150E1F711508F +:1003B000812F90E01F5F0196820F931F9093300171 +:1003C00080932F0186E191E0612F0E941802612F36 +:1003D0006C5F6C3041F08FEF8093010104C08FEFB0 +:1003E000809301016EE16093000194E189B18C700A +:1003F00031F49150D9F71092320110922C01DF9113 +:10040000CF911F910895A82FB92F80E090E041E08F +:1004100050EA609530E009C02D9182279795879525 +:1004200010F084279527305EC8F36F5FA8F3089516 +:10043000EADF8D939D930895CF93CFB7CF93C39564 +:100440004B9BE9F74B9B09C04B9B07C04B9B05C0DF +:100450004B9B03C04B9B01C0A6C0DF93C0912E01F4 +:10046000DD27CB5CDE4F4B9B02C0DF91EBCF2F93A0 +:100470000F931F9309B12FEF03FB20F94F933F9385 +:1004800019B14FEF012703FB21F93BE031C04E7F4B +:10049000012F19B1216028C0102F4D7F226000006C +:1004A00009B129C04B7F2460012F000019B12BC076 +:1004B00019B1477F28602AC04F7E09B120612CC046 +:1004C0004F7D19B120622FC04F7B09B1206432C02B +:1004D000422709B149934FEF0000102713FB20F981 +:1004E00019B11C70C9F1297F91F2012703FB21F991 +:1004F00009B1237F89F2315058F1102713FB22F9FB +:1005000019B1277E79F2012703FB23F92F7C81F2B1 +:1005100009B1102713FB24F92F7971F200C019B12A +:10052000012703FB25F92F7359F200C009B11027E9 +:1005300013FB26F9223040F200C019B1012703FB5A +:1005400027F9243028F64F77206819B10000F9CF39 +:1005500011E01CBB00271CC03B503195C31BD04091 +:1005600011E01CBB0881033C11F10B3401F1209117 +:100570002C011981110F1213EDCF4A81441F093646 +:1005800059F10D3211F0013E29F74F7009F0042F97 +:10059000009333013F914F911F910F912F91DF9164 +:1005A000CCB3C0FD4CCFCF91CFBFCF911895209148 +:1005B0003301222379F3109131011123C1F5343035 +:1005C000C2F13093310120932D0110912E013BE0B7 +:1005D000311B30932E012DC00091310101303CF5CB +:1005E0000AE54F7049F43091000134FD24C00093B6 +:1005F0000001C5E1D1E023C0433049F03091200132 +:1006000034FD19C000932001C1E2D1E018C030913F +:100610004B0134FD10C000934B01CCE4D1E00FC07E +:100620002795A8F45150A9F4220F0000F9CF4AE50C +:1006300003C042ED01C0432FC4E1D0E032E01AB163 +:100640001C605B9A1AB90BB120E41CE05F93012790 +:1006500056E00BB9279520F4515021F4220FF9CF21 +:10066000012756E000003B5A0BB9D0F2279528F439 +:10067000515029F4220F0000F9CF012756E02795A9 +:100680000BB920F4515021F4220FF9CF012756E085 +:10069000299133230BB921F6037F10913201110FF9 +:1006A000C651D0400BB911F010932C0111E01CBBC6 +:1006B00008601AB1137F402F437F5F9100C000C0D4 +:1006C0000BB91AB94BB966CFBF92CF92DF92EF92B6 +:1006D000FF920F931F936B017C01B42E122F9695FE +:1006E000879577956795605A7C41894E9F4FA70102 +:1006F00096010E9447052150304040405040809173 +:10070000C00082608093C0001092C10081E0B816E2 +:1007100011F440E303C04B2D4295407F802F90E0C1 +:100720000597880F991F1695110F110F110F182B90 +:10073000412B4093C2002093C4003093C50088E150 +:100740008093C10087B98FEF88B91F910F91FF90F7 +:10075000EF90DF90CF90BF9008950F931F9330914B +:10076000E1029091E20210C0E92FF0E0E052FE4F6A +:1007700080818093C6009F5F8091310187FF07C011 +:10078000293028F010923101292F231B01C02F5F3F +:100790008091C00085FF0BC0391739F43093E20215 +:1007A0009091E002E091DF0117C03599DDCF909381 +:1007B000E202F6CF391761F08091C0002091C600A7 +:1007C0008C7171F4F0E0E95AFE4F2083E32F04C0EE +:1007D000E093DF0144980AC0EF5F3E2F3F77E1507E +:1007E0008091C00087FDE6CFE093DF01809120017A +:1007F00084FF3DC06091DF01691721F48091E3021D +:100800008823A9F1162F191B1F77193008F018E05B +:10081000012F090F07FF10C00F77A7E5B1E0202FC8 +:1008200030E02A0F3B1F05C0FD01E058FF4F8D91BE +:100830008083A217B307C1F7892F90E0895A9E4F92 +:10084000612F0E94D3000093E002112361F0449ACB +:10085000183049F490E08091DF01801391E081E04D +:100860009827892F02C080E090E08093E3021F91D7 +:100870000F910895FC018381813049F48EE990E065 +:100880009093300180932F0180919E00089580EB1A +:1008900090E09093300180932F0183E40895FC0150 +:1008A0002081822F8076803201F59181892F8052BC +:1008B000823010F48FEF0895923281F488B19281E2 +:1008C0009170990F990F990F877F982B98B9809104 +:1008D0000D01882319F482E080930D0127FD05C0E6 +:1008E00081E08093E30280E0089580E00895FC01B8 +:1008F0008091110180838091120181838091130185 +:10090000828380911401838380910E01848380917E +:100910000F01858380911001868387E00895DC01B3 +:100920009091E2020CC02E2F2F5F291739F0F0E0D2 +:10093000E052FE4F8D9180832093E1026150E0915F +:10094000E102662381F791509E1B993018F48FEFD6 +:100950008093310108950F932EE088E190E00FB667 +:10096000F894A895809360000FBE2093600083EFF9 +:100970008BB98CE08AB9A89584EC99E02CE231E03F +:10098000F9013197F1F70197D9F71AB880E895E2A4 +:10099000A0E0B0E08093110190931201A0931301A5 +:1009A000B093140110920E0110920F0188E0809311 +:1009B000100160E875E280E090E040E020E008E0AF +:1009C0000E9464031092E2021092DF011092E00292 +:1009D0001092E1020E94990010920D011092E30220 +:1009E0007894A8950E94D8000E94AD0390910D01C3 +:1009F0009923B9F380914B0184FFF3CF923021F416 +:100A000082E091E068E003C08AE091E062E00E9449 +:100A1000CE0080910D01815080930D01E2CF0F93A4 +:100A2000FC01808180931101818180931201828178 +:100A300080931301838180931401948190930E011C +:100A4000858180930F01068100931001833010F09F +:100A500010920F01913011F410920E01609111016A +:100A600070911201809113019091140140910F0136 +:100A700020910E010E9464031092E2021092DF01A5 +:100A80001092E0021092E10281E00F910895A1E23C +:100A90001A2EAA1BBB1BFD010DC0AA1FBB1FEE1FF8 +:100AA000FF1FA217B307E407F50720F0A21BB30B43 +:100AB000E40BF50B661F771F881F991F1A9469F7BF +:100AC00060957095809590959B01AC01BD01CF011B +:060AD0000895F894FFCF29 +:0C0AD6005AFFA1200000000002000300F5 +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega48.hex b/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega48.hex new file mode 100755 index 0000000000000000000000000000000000000000..acbdd22946f6bcb974694ae9693c06fed116540b --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega48.hex @@ -0,0 +1,170 @@ +:100000005FC0F4C178C077C076C075C074C073C0DB +:1000100072C071C070C06FC06EC06DC06CC06BC06C +:100020006AC069C068C067C066C065C064C063C09C +:1000300062C061C0040309042203770077007700DF +:100040002E00720065006300750072007300690085 +:100050006F006E002E006A00700010035500530000 +:1000600042002D0032003300320012011001020064 +:100070000008C016E1050001010200010902430069 +:10008000020100803209040000010202010005247F +:1000900000100104240202052406000105240103C6 +:1000A00001070583030800FF09040100020A00009C +:1000B0000007050102080000070581020800000092 +:1000C00011241FBECFEFD2E0DEBFCDBF11E0A0E014 +:1000D000B1E0EAE7FAE002C005900D92AC30B1075A +:1000E000D9F712E0ACE0B1E001C01D92A43EB10727 +:1000F000E1F709D4C0C484CFE9E6F0E080818260F2 +:100100008083E89A8BE48093210180934C018AE5F7 +:100110008093200180934B0108951F93CF93DF9329 +:10012000DC01162FEA01888184FF05C0898198E8E7 +:100130008927898302C08AE58883AE014E5F5F4FBD +:10014000212FFA018D91819321501216DCF3CA01FF +:10015000612F48D11C5F1883DF91CF911F910895C3 +:100160004BE451E0DADF089540E251E0D6DF089534 +:100170001F93CF93DF9360913101635067FDB3C04C +:1001800080912E01CCE0D0E0C81BD109CB5CDE4FC2 +:1001900080912D01803118F4CE0199D39EC08D320B +:1001A00009F08BC0683009F098C083EC809315018A +:1001B0008AE58093000110920C018881807621F0FD +:1001C000CE0145D3282F66C09A8110921E018981E5 +:1001D000882321F410921F0122E055C0853019F4C4 +:1001E000909332014FC08630B9F58B81813041F454 +:1001F0008AE690E09093300180932F0122E128C09D +:10020000823021F4CE010ED3282F22C08330F9F49E +:100210008A81882341F484E390E0909330018093B5 +:100220002F0124E015C0813041F488E390E09093E1 +:10023000300180932F0122E20BC0823041F48AE525 +:1002400090E09093300180932F0120E101C020E0E5 +:1002500080E480930C011EC0883021F421E084E307 +:1002600091E013C0893019F4909334010BC08A30A7 +:1002700011F421E008C08B3029F48BE48093210134 +:1002800080934C0120E08EE191E0909330018093C7 +:100290002F0109C02F3F39F4888187FD2E8180E826 +:1002A00080930C0106C08F81882319F48E818217F8 +:1002B00008F0822F8093010110C080910C0187FF0C +:1002C0000CC0CE017FD38F3F21F48EE180930001DB +:1002D00004C0882311F01092010180913101181699 +:1002E00014F4109231018091000184FF58C0809174 +:1002F00001018F3F09F453C0182F893008F018E02E +:10030000811B809301018091150198E889278093D2 +:100310001501112391F180910C0187FF08C086E13E +:1003200091E0612FBCD2182F893098F526C020911A +:100330002F013091300186FF0DC0A6E1B1E080E0D1 +:1003400090E0F901E80FF91FE491ED930196181779 +:10035000C1F708C0912FD901E6E1F1E08D918193B9 +:100360009150E1F71150812F90E01F5F0196820FAD +:10037000931F9093300180932F0186E191E0612FCC +:1003800031D0612F6C5F6C3041F08FEF80930101B1 +:1003900004C08FEF809301016EE16093000194E14E +:1003A00089B18C7031F49150D9F7109232011092CA +:1003B0002C01DF91CF911F910895A82FB92F80E0D4 +:1003C00090E041E050EA609530E009C02D9182272D +:1003D0009795879510F084279527305EC8F36F5F57 +:1003E000A8F30895EADF8D939D930895CF93CFB737 +:1003F000CF93C3954B9BE9F74B9B09C04B9B07C021 +:100400004B9B05C04B9B03C04B9B01C0A6C0DF9319 +:10041000C0912E01DD27CB5CDE4F4B9B02C0DF91EC +:10042000EBCF2F930F931F9309B12FEF03FB20F90D +:100430004F933F9319B14FEF012703FB21F93BE0A5 +:1004400031C04E7F012F19B1216028C0102F4D7F80 +:100450002260000009B129C04B7F2460012F0000F9 +:1004600019B12BC019B1477F28602AC04F7E09B14E +:1004700020612CC04F7D19B120622FC04F7B09B184 +:10048000206432C0422709B149934FEF0000102782 +:1004900013FB20F919B11C70C9F1297F91F20127D2 +:1004A00003FB21F909B1237F89F2315058F110275C +:1004B00013FB22F919B1277E79F2012703FB23F9F7 +:1004C0002F7C81F209B1102713FB24F92F7971F2E7 +:1004D00000C019B1012703FB25F92F7359F200C0A1 +:1004E00009B1102713FB26F9223040F200C019B1E0 +:1004F000012703FB27F9243028F64F77206819B12C +:100500000000F9CF11E01CBB00271CC03B50319507 +:10051000C31BD04011E01CBB0881033C11F10B341C +:1005200001F120912C011981110F1213EDCF4A8195 +:10053000441F093659F10D3211F0013E29F74F7071 +:1005400009F0042F009333013F914F911F910F91B8 +:100550002F91DF91CCB3C0FD4CCFCF91CFBFCF91C6 +:10056000189520913301222379F310913101112341 +:10057000C1F53430C2F13093310120932D01109137 +:100580002E013BE0311B30932E012DC00091310133 +:1005900001303CF50AE54F7049F43091000134FD1B +:1005A00024C000930001C5E1D1E023C0433049F0ED +:1005B0003091200134FD19C000932001C1E2D1E047 +:1005C00018C030914B0134FD10C000934B01CCE4B6 +:1005D000D1E00FC02795A8F45150A9F4220F0000D4 +:1005E000F9CF4AE503C042ED01C0432FC4E1D0E09A +:1005F00032E01AB11C605B9A1AB90BB120E41CE01E +:100600005F93012756E00BB9279520F4515021F450 +:10061000220FF9CF012756E000003B5A0BB9D0F268 +:10062000279528F4515029F4220F0000F9CF012713 +:1006300056E027950BB920F4515021F4220FF9CF41 +:10064000012756E0299133230BB921F6037F10913E +:100650003201110FC651D0400BB911F010932C018B +:1006600011E01CBB08601AB1137F402F437F5F91DC +:1006700000C000C00BB91AB94BB966CFBF92CF9278 +:10068000DF92EF92FF920F931F936B017C01B42EC8 +:10069000122F9695879577956795605A7C41894E7C +:1006A0009F4FA7019601C5D1215030404040504096 +:1006B0008091C00082608093C0001092C10081E0F0 +:1006C000B81611F440E303C04B2D4295407F802FB4 +:1006D00090E00597880F991F1695110F110F110FB4 +:1006E000182B412B4093C2002093C4003093C500C7 +:1006F00088E18093C10087B98FEF88B91F910F916E +:10070000FF90EF90DF90CF90BF9008950F931F93CD +:100710003091E1029091E20210C0E92FF0E0E05246 +:10072000FE4F80818093C6009F5F8091310187FFDB +:1007300007C0293028F010923101292F231B01C056 +:100740002F5F8091C00085FF0BC0391739F43093BB +:10075000E2029091E002E091DF0117C03599DDCF10 +:100760009093E202F6CF391761F08091C00020919A +:10077000C6008C7171F4F0E0E95AFE4F2083E32F3C +:1007800004C0E093DF0144980AC0EF5F3E2F3F773B +:10079000E1508091C00087FDE6CFE093DF018091BA +:1007A000200184FF3CC06091DF01691721F4809132 +:1007B000E3028823A1F1162F191B1F77193008F0C7 +:1007C00018E0012F090F07FF10C00F77A7E5B1E070 +:1007D000202F30E02A0F3B1F05C0FD01E058FF4FDE +:1007E0008D918083A217B307C1F7892F90E0895AB2 +:1007F0009E4F612FB9DC0093E002112361F0449A0F +:10080000183049F490E08091DF01801391E081E09D +:100810009827892F02C080E090E08093E3021F9127 +:100820000F910895FC018381813049F48AE690E0BC +:100830009093300180932F0180916A0008958CE796 +:1008400090E09093300180932F0183E40895FC01A0 +:100850002081822F8076803201F59181892F80520C +:10086000823010F48FEF0895923281F488B1928132 +:100870009170990F990F990F877F982B98B9809154 +:100880000D01882319F482E080930D0127FD05C036 +:1008900081E08093E30280E0089580E00895FC0108 +:1008A00080911101808380911201818380911301D5 +:1008B000828380911401838380910E0184838091CF +:1008C0000F01858380911001868387E00895DC0104 +:1008D0009091E2020CC02E2F2F5F291739F0F0E023 +:1008E000E052FE4F8D9180832093E1026150E091B0 +:1008F000E102662381F791509E1B993018F48FEF27 +:100900008093310108950F932EE088E190E00FB6B7 +:10091000F894A895809360000FBE2093600083EF49 +:100920008BB98CE08AB9A89584EC99E02CE231E08F +:10093000F9013197F1F70197D9F71AB880E895E2F4 +:10094000A0E0B0E08093110190931201A0931301F5 +:10095000B093140110920E0110920F0188E0809361 +:10096000100160E875E280E090E040E020E008E0FF +:1009700085DE1092E2021092DF011092E0021092E6 +:10098000E102BADB10920D011092E3027894A8956F +:10099000EFDBBCDE90910D019923C9F380914B01EF +:1009A00084FFF5CF923021F482E091E068E003C04B +:1009B0008AE091E062E0D4DB80910D018150809368 +:1009C0000D01E5CF0F93FC0180818093110181819E +:1009D000809312018281809313018381809314019B +:1009E000948190930E01858180930F01068100937D +:1009F0001001833010F010920F01913011F4109219 +:100A00000E0160911101709112018091130190917A +:100A1000140140910F0120910E0130DE1092E2028C +:100A20001092DF011092E0021092E10281E00F913A +:100A30000895A1E21A2EAA1BBB1BFD010DC0AA1F1F +:100A4000BB1FEE1FFF1FA217B307E407F50720F037 +:100A5000A21BB30BE40BF50B661F771F881F991FB2 +:100A60001A9469F760957095809590959B01AC01FB +:0A0A7000BD01CF010895F894FFCFF7 +:0C0A7A005AFFA120000000000200030051 +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega8.hex b/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega8.hex new file mode 100755 index 0000000000000000000000000000000000000000..8078e71a9272f097f8dc27d09b5d84fe895c7eab --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega8.hex @@ -0,0 +1,167 @@ +:1000000058C0EDC171C070C06FC06EC06DC06CC013 +:100010006BC06AC069C068C067C066C065C064C0A4 +:1000200063C062C061C00403090422037700770043 +:1000300077002E0072006500630075007200730087 +:1000400069006F006E002E006A00700010035500FA +:10005000530042002D003200330032001201100123 +:1000600002000008C016E1050001010200010902BA +:100070004300020100803209040000010202010075 +:1000800005240010010424020205240600010524B1 +:10009000010301070583030800FF09040100020AA8 +:1000A00000000007050102080000070581020800A2 +:1000B000000011241FBECFE5D4E0DEBFCDBF10E0AD +:1000C000A0E6B0E0EAE4FAE002C005900D92AC369A +:1000D000B107D9F712E0ACE6B0E001C01D92A4343C +:1000E000B107E1F7FAD3AFC48BCF85B7826085BF84 +:1000F0008BB780648BBF8BE4809381008093AC00CE +:100100008AE5809380008093AB0008951F93CF937E +:10011000DF93DC01162FEA01888184FF05C0898105 +:1001200098E88927898302C08AE58883AE014E5FFB +:100130005F4F212FFA018D91819321501216DCF32C +:10014000CA01612F48D11C5F1883DF91CF911F91A5 +:1001500008954BEA50E0DADF089540E850E0D6DF3A +:1001600008951F93CF93DF9360919100635067FDD3 +:10017000B3C080918E00CCE0D0E0C81BD109CB5633 +:10018000DF4F80918D00803118F4CE018AD39EC05C +:100190008D3209F08BC0683009F098C083EC8093F1 +:1001A00075008AE58093600010926C0088818076EB +:1001B00021F0CE0136D3282F66C09A8110927E009E +:1001C0008981882321F410927F0022E055C0853078 +:1001D00019F4909392004FC08630B9F58B8181302D +:1001E00041F48CE590E09093900080938F0022E1A1 +:1001F00028C0823021F4CE01FFD2282F22C08330C4 +:10020000F9F48A81882341F486E290E0909390008B +:1002100080938F0024E015C0813041F48AE290E0A1 +:100220009093900080938F0022E20BC0823041F4C3 +:100230008CE490E09093900080938F0020E101C0C7 +:1002400020E080E480936C001EC0883021F421E01F +:1002500084E990E013C0893019F4909394000BC0A6 +:100260008A3011F421E008C08B3029F48BE48093AC +:1002700081008093AC0020E08EE790E090939000A6 +:1002800080938F0009C02F3F39F4888187FD2E812C +:1002900080E880936C0006C08F81882319F48E81DA +:1002A000821708F0822F8093610010C080916C004B +:1002B00087FF0CC0CE016ED38F3F21F48EE1809377 +:1002C000600004C0882311F01092610080919100B9 +:1002D000181614F4109291008091600084FF58C0A9 +:1002E000809161008F3F09F453C0182F893008F0C6 +:1002F00018E0811B809361008091750098E8892740 +:1003000080937500112391F180916C0087FF08C0E4 +:1003100086E790E0612FADD2182F893098F526C07E +:1003200020918F003091900086FF0DC0A6E7B0E0CD +:1003300080E090E0F901E80FF91FE491ED93019658 +:100340001817C1F708C0912FD901E6E7F0E08D91A9 +:1003500081939150E1F71150812F90E01F5F01963A +:10036000820F931F9093900080938F0086E790E018 +:10037000612F31D0612F6C5F6C3041F08FEF809333 +:10038000610004C08FEF809361006EE160936000B4 +:1003900094E180B38C7031F49150D9F710929200AF +:1003A00010928C00DF91CF911F910895A82FB92F43 +:1003B00080E090E041E050EA609530E009C02D9186 +:1003C00082279795879510F084279527305EC8F38C +:1003D0006F5FA8F30895EADF8D939D930895CF93FF +:1003E000CFB7CF93C395839BE9F7839B09C0839BCA +:1003F00007C0839B05C0839B03C0839B01C0A6C02D +:10040000DF93C0918E00DD27CB56DF4F839B02C068 +:10041000DF91EBCF2F930F931F9300B32FEF03FBCD +:1004200020F94F933F9310B34FEF012703FB21F9BE +:100430003BE031C04E7F012F10B3216028C0102F48 +:100440004D7F2260000000B329C04B7F2460012F44 +:10045000000010B32BC010B3477F28602AC04F7E26 +:1004600000B320612CC04F7D10B320622FC04F7BA2 +:1004700000B3206432C0422700B349934FEF00001D +:10048000102713FB20F910B31C70C9F1297F91F2DA +:10049000012703FB21F900B3237F89F2315058F182 +:1004A000102713FB22F910B3277E79F2012703FBF3 +:1004B00023F92F7C81F200B3102713FB24F92F7945 +:1004C00071F200C010B3012703FB25F92F7359F215 +:1004D00000C000B3102713FB26F9223040F200C001 +:1004E00010B3012703FB27F9243028F64F77206843 +:1004F00010B30000F9CF10E41ABF00271CC03B5016 +:100500003195C31BD04010E41ABF0881033C11F1A0 +:100510000B3401F120918C001981110F1213EDCFD2 +:100520004A81441F093659F10D3211F0013E29F775 +:100530004F7009F0042F009393003F914F911F914A +:100540000F912F91DF91CAB7C6FD4CCFCF91CFBF8E +:10055000CF91189520919300222379F31091910067 +:100560001123C1F53430C2F13093910020938D00F6 +:1005700010918E003BE0311B30938E002DC0009116 +:10058000910001303CF50AE54F7049F4309160006C +:1005900034FD24C000936000C5E7D0E023C04330A1 +:1005A00049F03091800034FD19C000938000C1E80B +:1005B000D0E018C03091AB0034FD10C00093AB0008 +:1005C000CCEAD0E00FC02795A8F45150A9F4220F2F +:1005D0000000F9CF4AE503C042ED01C0432FC4E15A +:1005E000D0E032E011B31C60939A11BB02B320E457 +:1005F0001CE05F93012756E002BB279520F4515081 +:1006000021F4220FF9CF012756E000003B5A02BB2C +:10061000D0F2279528F4515029F4220F0000F9CF89 +:10062000012756E0279502BB20F4515021F4220FF8 +:10063000F9CF012756E02991332302BB21F6037F2E +:1006400010919200110FC651D04002BB11F01093CF +:100650008C0010E41ABF086011B3137F402F437F52 +:100660005F9100C000C002BB11BB42BB66CFBF920E +:10067000CF92DF92EF92FF920F931F936B017C0159 +:10068000B42E122F9695879577956795605A7C4181 +:10069000894E9F4FA7019601B4D121503040404070 +:1006A0005040599A1AB881E0B81611F440EB04C0D2 +:1006B0004B2D4295407F4068802F90E00597880F32 +:1006C000991F1695110F110F110F182B412B40BDBB +:1006D00029B930BD88E18AB984BB8FEF85BB1F91F2 +:1006E0000F91FF90EF90DF90CF90BF9008950F9300 +:1006F0001F9330914102909142020FC0E92FF0E028 +:10070000E05CFE4F80818CB99F5F8091910087FFF4 +:1007100007C0293028F010929100292F231B01C017 +:100720002F5F5D9B0BC0391739F4309342029091D3 +:100730004002E0913F0115C09D99E0CF90934202A5 +:10074000F6CF391751F08BB12CB18C7171F4F0E008 +:10075000E954FF4F2083E32F04C0E0933F01AC989E +:1007600008C0EF5F3E2F3F77E1505F99EACFE093FB +:100770003F018091800084FF3CC060913F01691778 +:1007800021F4809143028823A1F1162F191B1F77B2 +:10079000193008F018E0012F090F07FF10C00F777C +:1007A000A7EBB0E0202F30E02A0F3B1F05C0FD0172 +:1007B000E058FF4F8D918083A217B307C1F7892FAF +:1007C00090E089549F4F612FC8DC009340021123B1 +:1007D00061F0AC9A183049F490E080913F018013A9 +:1007E00091E081E09827892F02C080E090E080931B +:1007F00043021F910F910895FC018381813049F4D8 +:100800008CE590E09093900080938F0080915C0045 +:1008100008958EE690E09093900080938F0083E49B +:100820000895FC012081822F8076803201F591812C +:10083000892F8052823010F48FEF0895923281F424 +:1008400085B392819170990F990F990F877F982B9B +:1008500095BB80916D00882319F482E080936D0030 +:1008600027FD05C081E08093430280E0089580E089 +:100870000895FC01809171008083809172008183D2 +:1008800080917300828380917400838380916E00D5 +:10089000848380916F00858380917000868387E0D8 +:1008A0000895DC01909142020CC02E2F2F5F291772 +:1008B00039F0F0E0E05CFE4F8D918083209341029F +:1008C0006150E0914102662381F791509E1B99305F +:1008D00018F48FEF8093910008950F932EE088E134 +:1008E00090E00FB6F894A89581BD0FBE21BD83EFAF +:1008F00082BB8CE081BBA89584EC99E02CE231E0CE +:10090000F9013197F1F70197D9F711BA80E895E22B +:10091000A0E0B0E08093710090937200A093730008 +:10092000B093740010926E0010926F0088E0809374 +:10093000700060E875E280E090E040E020E008E0D0 +:1009400096DE1092420210923F01109240021092E5 +:100950004102CBDB10926D00109243027894A8956F +:1009600000DCC5DE90916D009923C9F38091AB0046 +:1009700084FFF5CF923021F482E690E068E003C076 +:100980008AE690E062E0E5DB80916D008150809323 +:100990006D00E5CF0F93FC01808180937100818110 +:1009A00080937200828180937300838180937400AE +:1009B000948190936E00858180936F0006810093EF +:1009C0007000833010F010926F00913011F410928B +:1009D0006E0060917100709172008091730090912F +:1009E000740040916F0020916E0041DE109242022F +:1009F00010923F01109240021092410281E00F914B +:100A00000895A1E21A2EAA1BBB1BFD010DC0AA1F4F +:100A1000BB1FEE1FFF1FA217B307E407F50720F067 +:100A2000A21BB30BE40BF50B661F771F881F991FE2 +:100A30001A9469F760957095809590959B01AC012B +:0A0A4000BD01CF010895F894FFCF27 +:0C0A4A005AFFA120000000000200030081 +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega88.hex b/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega88.hex new file mode 100755 index 0000000000000000000000000000000000000000..609eb233ce02eb6bc9851a82479235dbfaf01d26 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/mega48/default/cdcmega88.hex @@ -0,0 +1,170 @@ +:100000005FC0F4C178C077C076C075C074C073C0DB +:1000100072C071C070C06FC06EC06DC06CC06BC06C +:100020006AC069C068C067C066C065C064C063C09C +:1000300062C061C0040309042203770077007700DF +:100040002E00720065006300750072007300690085 +:100050006F006E002E006A00700010035500530000 +:1000600042002D0032003300320012011001020064 +:100070000008C016E1050001010200010902430069 +:10008000020100803209040000010202010005247F +:1000900000100104240202052406000105240103C6 +:1000A00001070583030800FF09040100020A00009C +:1000B0000007050102080000070581020800000092 +:1000C00011241FBECFEFD4E0DEBFCDBF11E0A0E012 +:1000D000B1E0EAE7FAE002C005900D92AC30B1075A +:1000E000D9F712E0ACE0B1E001C01D92A43EB10727 +:1000F000E1F709D4C0C484CFE9E6F0E080818260F2 +:100100008083E89A8BE48093210180934C018AE5F7 +:100110008093200180934B0108951F93CF93DF9329 +:10012000DC01162FEA01888184FF05C0898198E8E7 +:100130008927898302C08AE58883AE014E5F5F4FBD +:10014000212FFA018D91819321501216DCF3CA01FF +:10015000612F48D11C5F1883DF91CF911F910895C3 +:100160004BE451E0DADF089540E251E0D6DF089534 +:100170001F93CF93DF9360913101635067FDB3C04C +:1001800080912E01CCE0D0E0C81BD109CB5CDE4FC2 +:1001900080912D01803118F4CE0199D39EC08D320B +:1001A00009F08BC0683009F098C083EC809315018A +:1001B0008AE58093000110920C018881807621F0FD +:1001C000CE0145D3282F66C09A8110921E018981E5 +:1001D000882321F410921F0122E055C0853019F4C4 +:1001E000909332014FC08630B9F58B81813041F454 +:1001F0008AE690E09093300180932F0122E128C09D +:10020000823021F4CE010ED3282F22C08330F9F49E +:100210008A81882341F484E390E0909330018093B5 +:100220002F0124E015C0813041F488E390E09093E1 +:10023000300180932F0122E20BC0823041F48AE525 +:1002400090E09093300180932F0120E101C020E0E5 +:1002500080E480930C011EC0883021F421E084E307 +:1002600091E013C0893019F4909334010BC08A30A7 +:1002700011F421E008C08B3029F48BE48093210134 +:1002800080934C0120E08EE191E0909330018093C7 +:100290002F0109C02F3F39F4888187FD2E8180E826 +:1002A00080930C0106C08F81882319F48E818217F8 +:1002B00008F0822F8093010110C080910C0187FF0C +:1002C0000CC0CE017FD38F3F21F48EE180930001DB +:1002D00004C0882311F01092010180913101181699 +:1002E00014F4109231018091000184FF58C0809174 +:1002F00001018F3F09F453C0182F893008F018E02E +:10030000811B809301018091150198E889278093D2 +:100310001501112391F180910C0187FF08C086E13E +:1003200091E0612FBCD2182F893098F526C020911A +:100330002F013091300186FF0DC0A6E1B1E080E0D1 +:1003400090E0F901E80FF91FE491ED930196181779 +:10035000C1F708C0912FD901E6E1F1E08D918193B9 +:100360009150E1F71150812F90E01F5F0196820FAD +:10037000931F9093300180932F0186E191E0612FCC +:1003800031D0612F6C5F6C3041F08FEF80930101B1 +:1003900004C08FEF809301016EE16093000194E14E +:1003A00089B18C7031F49150D9F7109232011092CA +:1003B0002C01DF91CF911F910895A82FB92F80E0D4 +:1003C00090E041E050EA609530E009C02D9182272D +:1003D0009795879510F084279527305EC8F36F5F57 +:1003E000A8F30895EADF8D939D930895CF93CFB737 +:1003F000CF93C3954B9BE9F74B9B09C04B9B07C021 +:100400004B9B05C04B9B03C04B9B01C0A6C0DF9319 +:10041000C0912E01DD27CB5CDE4F4B9B02C0DF91EC +:10042000EBCF2F930F931F9309B12FEF03FB20F90D +:100430004F933F9319B14FEF012703FB21F93BE0A5 +:1004400031C04E7F012F19B1216028C0102F4D7F80 +:100450002260000009B129C04B7F2460012F0000F9 +:1004600019B12BC019B1477F28602AC04F7E09B14E +:1004700020612CC04F7D19B120622FC04F7B09B184 +:10048000206432C0422709B149934FEF0000102782 +:1004900013FB20F919B11C70C9F1297F91F20127D2 +:1004A00003FB21F909B1237F89F2315058F110275C +:1004B00013FB22F919B1277E79F2012703FB23F9F7 +:1004C0002F7C81F209B1102713FB24F92F7971F2E7 +:1004D00000C019B1012703FB25F92F7359F200C0A1 +:1004E00009B1102713FB26F9223040F200C019B1E0 +:1004F000012703FB27F9243028F64F77206819B12C +:100500000000F9CF11E01CBB00271CC03B50319507 +:10051000C31BD04011E01CBB0881033C11F10B341C +:1005200001F120912C011981110F1213EDCF4A8195 +:10053000441F093659F10D3211F0013E29F74F7071 +:1005400009F0042F009333013F914F911F910F91B8 +:100550002F91DF91CCB3C0FD4CCFCF91CFBFCF91C6 +:10056000189520913301222379F310913101112341 +:10057000C1F53430C2F13093310120932D01109137 +:100580002E013BE0311B30932E012DC00091310133 +:1005900001303CF50AE54F7049F43091000134FD1B +:1005A00024C000930001C5E1D1E023C0433049F0ED +:1005B0003091200134FD19C000932001C1E2D1E047 +:1005C00018C030914B0134FD10C000934B01CCE4B6 +:1005D000D1E00FC02795A8F45150A9F4220F0000D4 +:1005E000F9CF4AE503C042ED01C0432FC4E1D0E09A +:1005F00032E01AB11C605B9A1AB90BB120E41CE01E +:100600005F93012756E00BB9279520F4515021F450 +:10061000220FF9CF012756E000003B5A0BB9D0F268 +:10062000279528F4515029F4220F0000F9CF012713 +:1006300056E027950BB920F4515021F4220FF9CF41 +:10064000012756E0299133230BB921F6037F10913E +:100650003201110FC651D0400BB911F010932C018B +:1006600011E01CBB08601AB1137F402F437F5F91DC +:1006700000C000C00BB91AB94BB966CFBF92CF9278 +:10068000DF92EF92FF920F931F936B017C01B42EC8 +:10069000122F9695879577956795605A7C41894E7C +:1006A0009F4FA7019601C5D1215030404040504096 +:1006B0008091C00082608093C0001092C10081E0F0 +:1006C000B81611F440E303C04B2D4295407F802FB4 +:1006D00090E00597880F991F1695110F110F110FB4 +:1006E000182B412B4093C2002093C4003093C500C7 +:1006F00088E18093C10087B98FEF88B91F910F916E +:10070000FF90EF90DF90CF90BF9008950F931F93CD +:100710003091E1029091E20210C0E92FF0E0E05246 +:10072000FE4F80818093C6009F5F8091310187FFDB +:1007300007C0293028F010923101292F231B01C056 +:100740002F5F8091C00085FF0BC0391739F43093BB +:10075000E2029091E002E091DF0117C03599DDCF10 +:100760009093E202F6CF391761F08091C00020919A +:10077000C6008C7171F4F0E0E95AFE4F2083E32F3C +:1007800004C0E093DF0144980AC0EF5F3E2F3F773B +:10079000E1508091C00087FDE6CFE093DF018091BA +:1007A000200184FF3CC06091DF01691721F4809132 +:1007B000E3028823A1F1162F191B1F77193008F0C7 +:1007C00018E0012F090F07FF10C00F77A7E5B1E070 +:1007D000202F30E02A0F3B1F05C0FD01E058FF4FDE +:1007E0008D918083A217B307C1F7892F90E0895AB2 +:1007F0009E4F612FB9DC0093E002112361F0449A0F +:10080000183049F490E08091DF01801391E081E09D +:100810009827892F02C080E090E08093E3021F9127 +:100820000F910895FC018381813049F48AE690E0BC +:100830009093300180932F0180916A0008958CE796 +:1008400090E09093300180932F0183E40895FC01A0 +:100850002081822F8076803201F59181892F80520C +:10086000823010F48FEF0895923281F488B1928132 +:100870009170990F990F990F877F982B98B9809154 +:100880000D01882319F482E080930D0127FD05C036 +:1008900081E08093E30280E0089580E00895FC0108 +:1008A00080911101808380911201818380911301D5 +:1008B000828380911401838380910E0184838091CF +:1008C0000F01858380911001868387E00895DC0104 +:1008D0009091E2020CC02E2F2F5F291739F0F0E023 +:1008E000E052FE4F8D9180832093E1026150E091B0 +:1008F000E102662381F791509E1B993018F48FEF27 +:100900008093310108950F932EE088E190E00FB6B7 +:10091000F894A895809360000FBE2093600083EF49 +:100920008BB98CE08AB9A89584EC99E02CE231E08F +:10093000F9013197F1F70197D9F71AB880E895E2F4 +:10094000A0E0B0E08093110190931201A0931301F5 +:10095000B093140110920E0110920F0188E0809361 +:10096000100160E875E280E090E040E020E008E0FF +:1009700085DE1092E2021092DF011092E0021092E6 +:10098000E102BADB10920D011092E3027894A8956F +:10099000EFDBBCDE90910D019923C9F380914B01EF +:1009A00084FFF5CF923021F482E091E068E003C04B +:1009B0008AE091E062E0D4DB80910D018150809368 +:1009C0000D01E5CF0F93FC0180818093110181819E +:1009D000809312018281809313018381809314019B +:1009E000948190930E01858180930F01068100937D +:1009F0001001833010F010920F01913011F4109219 +:100A00000E0160911101709112018091130190917A +:100A1000140140910F0120910E0130DE1092E2028C +:100A20001092DF011092E0021092E10281E00F913A +:100A30000895A1E21A2EAA1BBB1BFD010DC0AA1F1F +:100A4000BB1FEE1FFF1FA217B307E407F50720F037 +:100A5000A21BB30BE40BF50B661F771F881F991FB2 +:100A60001A9469F760957095809590959B01AC01FB +:0A0A7000BD01CF010895F894FFCFF7 +:0C0A7A005AFFA120000000000200030051 +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/mega48/main.c b/FabFTDI Attiny441/Programing/CDC/mega48/main.c new file mode 100755 index 0000000000000000000000000000000000000000..a13b6429d7a0e71b2b5a5b8a0b1d3407d477807a --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/mega48/main.c @@ -0,0 +1,325 @@ + +/* Name: main.c + * Project: AVR USB driver for CDC interface on Low-Speed USB + * Author: Osamu Tamura + * Creation Date: 2006-05-12 + * Tabsize: 4 + * Copyright: (c) 2006 by Recursion Co., Ltd. + * License: Proprietary, free under certain conditions. See Documentation. + * + * 2006-07-08 removed zero-sized receive block + * 2006-07-08 adapted to higher baud rate by T.Kitazawa + * + */ + +#include +#include +#include +#include +#include +#include + +#include "oddebug.h" +#include "usbdrv.h" +#include "uart.h" + + +enum { + SEND_ENCAPSULATED_COMMAND = 0, + GET_ENCAPSULATED_RESPONSE, + SET_COMM_FEATURE, + GET_COMM_FEATURE, + CLEAR_COMM_FEATURE, + SET_LINE_CODING = 0x20, + GET_LINE_CODING, + SET_CONTROL_LINE_STATE, + SEND_BREAK +}; + + +static PROGMEM char configDescrCDC[] = { /* USB configuration descriptor */ + 9, /* sizeof(usbDescrConfig): length of descriptor in bytes */ + USBDESCR_CONFIG, /* descriptor type */ + 67, + 0, /* total length of data returned (including inlined descriptors) */ + 2, /* number of interfaces in this configuration */ + 1, /* index of this configuration */ + 0, /* configuration name string index */ +#if USB_CFG_IS_SELF_POWERED + (1 << 7) | USBATTR_SELFPOWER, /* attributes */ +#else + (1 << 7), /* attributes */ +#endif + USB_CFG_MAX_BUS_POWER/2, /* max USB current in 2mA units */ + + /* interface descriptor follows inline: */ + 9, /* sizeof(usbDescrInterface): length of descriptor in bytes */ + USBDESCR_INTERFACE, /* descriptor type */ + 0, /* index of this interface */ + 0, /* alternate setting for this interface */ + USB_CFG_HAVE_INTRIN_ENDPOINT, /* endpoints excl 0: number of endpoint descriptors to follow */ + USB_CFG_INTERFACE_CLASS, + USB_CFG_INTERFACE_SUBCLASS, + USB_CFG_INTERFACE_PROTOCOL, + 0, /* string index for interface */ + + /* CDC Class-Specific descriptor */ + 5, /* sizeof(usbDescrCDC_HeaderFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 0, /* header functional descriptor */ + 0x10, 0x01, + + 4, /* sizeof(usbDescrCDC_AcmFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 2, /* abstract control management functional descriptor */ + 0x02, /* SET_LINE_CODING, GET_LINE_CODING, SET_CONTROL_LINE_STATE */ + + 5, /* sizeof(usbDescrCDC_UnionFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 6, /* union functional descriptor */ + 0, /* CDC_COMM_INTF_ID */ + 1, /* CDC_DATA_INTF_ID */ + + 5, /* sizeof(usbDescrCDC_CallMgtFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 1, /* call management functional descriptor */ + 3, /* allow management on data interface, handles call management by itself */ + 1, /* CDC_DATA_INTF_ID */ + + /* Endpoint Descriptor */ + 7, /* sizeof(usbDescrEndpoint) */ + USBDESCR_ENDPOINT, /* descriptor type = endpoint */ + 0x80|USB_CFG_EP3_NUMBER, /* IN endpoint number */ + 0x03, /* attrib: Interrupt endpoint */ + 8, 0, /* maximum packet size */ + USB_CFG_INTR_POLL_INTERVAL, /* in ms */ + + /* Interface Descriptor */ + 9, /* sizeof(usbDescrInterface): length of descriptor in bytes */ + USBDESCR_INTERFACE, /* descriptor type */ + 1, /* index of this interface */ + 0, /* alternate setting for this interface */ + 2, /* endpoints excl 0: number of endpoint descriptors to follow */ + 0x0A, /* Data Interface Class Codes */ + 0, + 0, /* Data Interface Class Protocol Codes */ + 0, /* string index for interface */ + + /* Endpoint Descriptor */ + 7, /* sizeof(usbDescrEndpoint) */ + USBDESCR_ENDPOINT, /* descriptor type = endpoint */ + 0x01, /* OUT endpoint number 1 */ + 0x02, /* attrib: Bulk endpoint */ + 8, 0, /* maximum packet size */ + 0, /* in ms */ + + /* Endpoint Descriptor */ + 7, /* sizeof(usbDescrEndpoint) */ + USBDESCR_ENDPOINT, /* descriptor type = endpoint */ + 0x81, /* IN endpoint number 1 */ + 0x02, /* attrib: Bulk endpoint */ + 8, 0, /* maximum packet size */ + 0, /* in ms */ +}; + + +uchar usbFunctionDescriptor(usbRequest_t *rq) +{ + + if(rq->wValue.bytes[1] == USBDESCR_DEVICE){ + usbMsgPtr = (uchar *)usbDescriptorDevice; + return usbDescriptorDevice[0]; + }else{ /* must be config descriptor */ + usbMsgPtr = (uchar *)configDescrCDC; + return sizeof(configDescrCDC); + } +} + + +uchar sendEmptyFrame; +static uchar intr3Status; /* used to control interrupt endpoint transmissions */ + +static uchar stopbit, parity, databit; +static usbDWord_t baud; + +static void resetUart(void) +{ + + uartInit(baud.dword, parity, stopbit, databit); + irptr = 0; + iwptr = 0; + urptr = 0; + uwptr = 0; +} + +/* ------------------------------------------------------------------------- */ +/* ----------------------------- USB interface ----------------------------- */ +/* ------------------------------------------------------------------------- */ + +uchar usbFunctionSetup(uchar data[8]) +{ +usbRequest_t *rq = (void *)data; + + if((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS){ /* class request type */ + + if( rq->bRequest==GET_LINE_CODING || rq->bRequest==SET_LINE_CODING ){ + return 0xff; + /* GET_LINE_CODING -> usbFunctionRead() */ + /* SET_LINE_CODING -> usbFunctionWrite() */ + } + if(rq->bRequest == SET_CONTROL_LINE_STATE){ + UART_CTRL_PORT = (UART_CTRL_PORT&~(1<wValue.word&1)<bmRequestType & USBRQ_DIR_MASK) == USBRQ_DIR_HOST_TO_DEVICE) + sendEmptyFrame = 1; +#endif + } + + return 0; +} + + +/*---------------------------------------------------------------------------*/ +/* usbFunctionRead */ +/*---------------------------------------------------------------------------*/ + +uchar usbFunctionRead( uchar *data, uchar len ) +{ + + data[0] = baud.bytes[0]; + data[1] = baud.bytes[1]; + data[2] = baud.bytes[2]; + data[3] = baud.bytes[3]; + data[4] = stopbit; + data[5] = parity; + data[6] = databit; + + return 7; +} + + +/*---------------------------------------------------------------------------*/ +/* usbFunctionWrite */ +/*---------------------------------------------------------------------------*/ + +uchar usbFunctionWrite( uchar *data, uchar len ) +{ + + /* SET_LINE_CODING */ + baud.bytes[0] = data[0]; + baud.bytes[1] = data[1]; + baud.bytes[2] = data[2]; + baud.bytes[3] = data[3]; + + stopbit = data[4]; + parity = data[5]; + databit = data[6]; + + if( parity>2 ) + parity = 0; + if( stopbit==1 ) + stopbit = 0; + + resetUart(); + + return 1; +} + + +void usbFunctionWriteOut( uchar *data, uchar len ) +{ + + /* usb -> rs232c: transmit char */ + for( ; len; len-- ) { + uchar uwnxt; + + uwnxt = (uwptr+1) & TX_MASK; + if( uwnxt!=irptr ) { + tx_buf[uwptr] = *data++; + uwptr = uwnxt; + } + } + + /* postpone receiving next data */ + if( uartTxBytesFree()<=HW_CDC_BULK_OUT_SIZE ) + usbDisableAllRequests(); +} + + +static void hardwareInit(void) +{ + + /* activate pull-ups except on USB lines */ + USB_CFG_IOPORT = (uchar)~((1< USB reset) */ +#ifdef USB_CFG_PULLUP_IOPORT /* use usbDeviceConnect()/usbDeviceDisconnect() if available */ + USBDDR = 0; /* we do RESET by deactivating pullup */ + usbDeviceDisconnect(); +#else + USBDDR = (1< +#include +#include /* needed by usbdrv.h */ +#include "oddebug.h" +#include "usbdrv.h" +#include "uart.h" + +extern uchar sendEmptyFrame; + +/* UART buffer */ +uchar urptr, uwptr, irptr, iwptr; +uchar rx_buf[RX_SIZE+HW_CDC_BULK_IN_SIZE], tx_buf[TX_SIZE]; + + +void uartInit(ulong baudrate, uchar parity, uchar stopbits, uchar databits) +{ +usbDWord_t br; + + br.dword = ((F_CPU>>3)+(baudrate>>1)) / baudrate - 1; + UCSR0A |= (1<>1)< RS-232C */ + while( (UCSR0A&(1<HW_CDC_BULK_OUT_SIZE ) { + usbEnableAllRequests(); + } + } + + /* device <= RS-232C */ + while( UCSR0A&(1<HW_CDC_BULK_IN_SIZE) + bytesRead = HW_CDC_BULK_IN_SIZE; + next = urptr + bytesRead; + if( next>=RX_SIZE ) { + next &= RX_MASK; + for( i=0; io- PB0, PC1 -|>o- PB1) + to connect to RS-232C line directly. ( <= 2400 bps ) + (atmega48/88 only) +*/ +ISR( PCINT1_vect, ISR_NAKED ) +{ + asm volatile( + "out %0, r16" "\n\t" + "in r16, __SREG__" "\n\t" + "out %1, r16" "\n\t" + + "in r16, %2" "\n\t" + "com r16" "\n\t" + "out %3, r16" "\n\t" + + "in r16, %1" "\n\t" + "out __SREG__, r16" "\n\t" + "in r16, %0" "\n\t" + : + : "I" (_SFR_IO_ADDR(GPIOR0)), + "I" (_SFR_IO_ADDR(GPIOR1)), + "I" (_SFR_IO_ADDR(PINC)), + "I" (_SFR_IO_ADDR(PORTB)) + ); + + reti(); +} +#endif diff --git a/FabFTDI Attiny441/Programing/CDC/mega48/uart.h b/FabFTDI Attiny441/Programing/CDC/mega48/uart.h new file mode 100755 index 0000000000000000000000000000000000000000..d404653e15dd4dcb5ce2d9d1e14dd9cdf8393ed2 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/mega48/uart.h @@ -0,0 +1,145 @@ + +/* Name: uart.h + * Project: AVR USB driver for CDC interface on Low-Speed USB + * Author: Osamu Tamura + * Creation Date: 2006-06-18 + * Tabsize: 4 + * Copyright: (c) 2006 by Recursion Co., Ltd. + * License: Proprietary, free under certain conditions. See Documentation. + */ + +#ifndef __uart_h_included__ +#define __uart_h_included__ + +#include /* for TXEN or TXEN0 resp., if available */ + +#ifndef uchar +#define uchar unsigned char +#endif + +#ifndef ulong +#define ulong unsigned long +#endif + +#define HW_CDC_BULK_OUT_SIZE 8 +#define HW_CDC_BULK_IN_SIZE 8 + + +#if !(defined TXEN || defined TXEN0) +# error "MCU has no UART" +#endif + +#ifndef UART_DEFAULT_BPS +#define UART_DEFAULT_BPS 9600 +#endif +/* + The baud rate will be automatically configured after opening device anyway. +*/ + +/* These are the USART port and TXD, RXD bit numbers. +*/ +/* ATmega8/48/88/168 */ +#define UART_CFG_PORTNAME D +#define UART_CFG_RXD 0 +#define UART_CFG_TXD 1 + +#define UART_CTRL_PORTNAME C +#define UART_CTRL_DTR 3 +#define UART_CTRL_RTS 4 +#define UART_CTRL_CTS 5 + +#define RX_SIZE 128 /* UART receive buffer size (must be 2^n, 16-128) */ +#define TX_SIZE 256 /* UART transmit buffer size (must be 2^n, 16-256) */ +#define RX_MASK (RX_SIZE-1) +#define TX_MASK (TX_SIZE-1) + + +#ifndef URSEL +#define URSEL_MASK 0 +//#define UART_INVERT +/* enables software-inverter (PC0 -|>o- PB0, PC1 -|>o- PB1) */ +/* to connect to RS-232C line directly. ( <= 2400 bps ) */ +#else +#define URSEL_MASK (1 << URSEL) +#ifdef UART_INVERT +#error "ATmega8 doesn't support UART_INVERT" +#undef UART_INVERT +#endif +#endif + +/* ------------------------------------------------------------------------- */ +/* ------------------------ General Purpose Macros ------------------------- */ +/* ------------------------------------------------------------------------- */ +#define OD_CONCAT(a, b) a ## b +#define UART_OUTPORT(name) OD_CONCAT(PORT, name) +#define UART_INPORT(name) OD_CONCAT(PIN, name) +#define UART_DDRPORT(name) OD_CONCAT(DDR, name) + +#define UART_CFG_PORT UART_OUTPORT(UART_CFG_PORTNAME) +#define UART_PIN UART_INPORT(UART_CFG_PORTNAME) +#define UART_DDR UART_DDRPORT(UART_CFG_PORTNAME) + +#define UART_CTRL_PORT UART_OUTPORT(UART_CTRL_PORTNAME) +#define UART_CTRL_PIN UART_INPORT(UART_CTRL_PORTNAME) +#define UART_CTRL_DDR UART_DDRPORT(UART_CTRL_PORTNAME) + +#ifndef __ASSEMBLER__ + +/* allow ATmega8 compatibility */ +#ifdef URSEL +#define UBRR0H UBRRH +#define UBRR0L UBRRL +#define UCSR0A UCSRA +#define UCSR0B UCSRB +#define UCSR0C UCSRC +#define UDR0 UDR + +/* UCSR0A */ +#define RXC0 RXC +#define UDRE0 UDRE +#define FE0 FE +#define DOR0 DOR +#define UPE0 PE +#define U2X0 U2X + +/* UCSR0B */ +#define RXCIE0 RXCIE +#define UDRIE0 UDRIE +#define RXEN0 RXEN +#define TXEN0 TXEN + +/* UCSR0C */ +#define UPM00 UPM0 +#define USBS0 USBS +#define UPBS0 UPBS +#define UCSZ00 UCSZ0 +#endif + +/* ------------------------------------------------------------------------- */ +/* ---------------------- Type Definition --------------------------------- */ +/* ------------------------------------------------------------------------- */ +typedef union usbDWord { + ulong dword; + uchar bytes[4]; +} usbDWord_t; + + +extern uchar urptr, uwptr, irptr, iwptr; +extern uchar rx_buf[], tx_buf[]; + +extern void uartInit(ulong baudrate, uchar parity, uchar stopbits, uchar databits); +extern void uartPoll(void); + + +/* The following function returns the amount of bytes available in the TX + * buffer before we have an overflow. + */ +static inline uchar uartTxBytesFree(void) +{ + return (irptr - uwptr - 1) & TX_MASK; +} + + +#endif /* #ifndef __ASSEMBLER__ */ +#endif /* __uart_h_included__ */ + diff --git a/FabFTDI Attiny441/Programing/CDC/mega48/usbconfig.h b/FabFTDI Attiny441/Programing/CDC/mega48/usbconfig.h new file mode 100755 index 0000000000000000000000000000000000000000..b6a4b21e0e5d66b850dddedf8599420038251379 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/mega48/usbconfig.h @@ -0,0 +1,420 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). ++ To create your own usbconfig.h file, copy this file to your project's ++ firmware source directory) and rename it to "usbconfig.h". ++ Then edit it accordingly. +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +/* #define USB_CFG_IOPORTNAME D */ +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +/* #define USB_CFG_DMINUS_BIT 4 */ +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +/* #define USB_CFG_DPLUS_BIT 2 */ +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#if defined (__AVR_ATtiny44__) || defined (__AVR_ATtiny84__) +#define USB_CFG_IOPORTNAME B +#define USB_CFG_DMINUS_BIT 1 +#define USB_CFG_DPLUS_BIT 2 + +#elif defined (__AVR_ATtiny45__) || defined (__AVR_ATtiny85__) +#define USB_CFG_IOPORTNAME B +#define USB_CFG_DMINUS_BIT 3 +#define USB_CFG_DPLUS_BIT 4 + +#elif defined (__AVR_ATtiny461__) || defined (__AVR_ATtiny861__) +#define USB_CFG_IOPORTNAME B +#define USB_CFG_DMINUS_BIT 5 +#define USB_CFG_DPLUS_BIT 6 +#else +/* ATtiny2313, ATmega8/48/88/168 */ +#define USB_CFG_IOPORTNAME D +#define USB_CFG_DMINUS_BIT 3 +#define USB_CFG_DPLUS_BIT 2 +#endif + +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#if USB_CFG_CLOCK_KHZ==18000 +#define USB_CFG_CHECK_CRC 1 +#else +#define USB_CFG_CHECK_CRC 0 +#endif + +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 255 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 100 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 1 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 1 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 1 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 0 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#if USB_CFG_CLOCK_KHZ==16500 || USB_CFG_CLOCK_KHZ==12800 +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 1 +#include "osccal.h" +#else +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +#endif +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID 0xc0, 0x16 /* = 0x16c0 = 5824 = voti.nl */ +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID 0xe1, 0x05 /* = 0x05e1 = 1505 */ +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x01 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'w', 'w', '.', 'r', 'e', 'c', 'u', 'r', 's', 'i', 'o', 'n', '.', 'j', 'p' +#define USB_CFG_VENDOR_NAME_LEN 16 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'U', 'S', 'B', '-', '2', '3', '2' +#define USB_CFG_DEVICE_NAME_LEN 7 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 2 /* set to 0 if deferred to interface */ +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 2 /* CDC class */ +#define USB_CFG_INTERFACE_SUBCLASS 2 /* Abstract (Modem) */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* AT-Commands */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +/* #define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 42 */ +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* ATmega***p/pa needs SIG_ definitions */ +#ifndef SIG_INTERRUPT0 +#define SIG_INTERRUPT0 _VECTOR(1) +#endif + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +#if defined (__AVR_ATtiny45__) || defined (__AVR_ATtiny85__) +#define USB_INTR_CFG PCMSK +#define USB_INTR_CFG_SET (1< + + + + + + <xsl:value-of select="ConversionLog/@BrandName"/> + + + + + +
+ +
+ +
+ project(s) chosen for conversion. +
+
+ project(s) successfully converted. +
+ project(s) converted with errors. +
+
+ +
+ + + +
+ +
+ + + | + +
+ + link_ + + + toggleVisibility(''); + + Show Logs + + +
+ + + + + + + + + +
+ + + +
+
+
+
+ +
+ + + + + | + + +
+ + link_ + + + toggleVisibility(''); + + Show Logs + + +
+ + + + + + + + + + + + + +
+ + + +
+
+
+
+
diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/ConversionLog-10-03-2017 15-31-06.xml b/FabFTDI Attiny441/Programing/CDC/tiny2313/ConversionLog-10-03-2017 15-31-06.xml new file mode 100755 index 0000000000000000000000000000000000000000..2c8d5af93d5cfadd4ab84a352a7d42f6ca7f99c5 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/ConversionLog-10-03-2017 15-31-06.xml @@ -0,0 +1,328 @@ + + + + + + Info + 10/3/2017 3:30:50 PM + Source Project Path: C:\cygwin64\home\Prashant Patil\cbagitlab\FabFTDI\FabFTDI Attiny441\Programing\CDC\tiny2313\cdc2313.aps + + + + + Info + 10/3/2017 3:30:50 PM + Studio5 Project Path: C:\cygwin64\home\Prashant Patil\cbagitlab\FabFTDI\FabFTDI Attiny441\Programing\CDC\tiny2313\cdc2313.avrgccproj + + + + + Info + 10/3/2017 3:30:50 PM + Studio5 Solution Path: C:\cygwin64\home\Prashant Patil\cbagitlab\FabFTDI\FabFTDI Attiny441\Programing\CDC\tiny2313\cdc2313.atsln + + + + + Info + 10/3/2017 3:30:50 PM + Started : Processing General settings from source project + + + + + Info + 10/3/2017 3:31:03 PM + Completed : Processing General settings from source project + + + + + Info + 10/3/2017 3:31:03 PM + Started : Processing Project files information from source project + + + + + Info + 10/3/2017 3:31:03 PM + Completed : Processing Project files information from source project + + + + + Info + 10/3/2017 3:31:03 PM + Started : Processing Build Dependency settings from the source project + + + + + Warning + 10/3/2017 3:31:03 PM + Skipped reading Build Dependency settings from source project. It is either invalid or not provided. + + + + + Info + 10/3/2017 3:31:03 PM + Completed : Processing Build Dependency settings from the source project + + + + + Info + 10/3/2017 3:31:03 PM + Started : Processing ProjectLevel Toolchain settings from source project + + + + + Info + 10/3/2017 3:31:03 PM + Completed : Processing ProjectLevel Toolchain settings from source project + + + + + Info + 10/3/2017 3:31:03 PM + Started : Processing Toolchain settings from source project [Configuration default] + + + + + Info + 10/3/2017 3:31:03 PM + Completed : Processing Toolchain settings from source project [Configuration default] + + + + + Info + 10/3/2017 3:31:03 PM + Started : Processing external makefile settings [Configuration default] + + + + + Info + 10/3/2017 3:31:03 PM + Completed : Processing external makefile settings [Configuration default] + + + + + Info + 10/3/2017 3:31:03 PM + Started : Processing File level Toolchain settings from Source Project [Configuration default] + + + + + Info + 10/3/2017 3:31:03 PM + Completed : Processing File level Toolchain settings from Source Project [Configuration default] + + + + + Info + 10/3/2017 3:31:03 PM + Started : Processing Pre/Post Build event settings from source project [Configuration default] + + + + + Warning + 10/3/2017 3:31:03 PM + Skipped reading Pre/Post build event settings from source project. It is either invalid or not provided. + + + + + Info + 10/3/2017 3:31:03 PM + Completed : Processing Pre/Post Build event settings from source project [Configuration default] + + + + + Info + 10/3/2017 3:31:03 PM + Started : Create Atmel Studio 7.0 Project + + + + + Info + 10/3/2017 3:31:03 PM + Completed : Create Atmel Studio 7.0 Project + + + + + Info + 10/3/2017 3:31:03 PM + Started : Updating Atmel Studio 7.0 GeneralSettings + + + + + Info + 10/3/2017 3:31:03 PM + Completed : Updating Atmel Studio 7.0 GeneralSettings + + + + + Info + 10/3/2017 3:31:03 PM + Started : Updating Atmel Studio 7.0 FileInformation + + + + + Info + 10/3/2017 3:31:03 PM + Completed : Updating Atmel Studio 7.0 FileInformation + + + + + Info + 10/3/2017 3:31:03 PM + Started : Copying Files + + + + + Info + 10/3/2017 3:31:03 PM + Completed : Copying Files + + + + + Info + 10/3/2017 3:31:03 PM + Started : Saving Atmel Studio 7.0 Solution + + + + + Info + 10/3/2017 3:31:04 PM + Completed : Saving Atmel Studio 7.0 Solution + + + + + Info + 10/3/2017 3:31:04 PM + Started : Updating Configurations In Atmel Studio 7.0 Project + + + + + Info + 10/3/2017 3:31:05 PM + Completed : Updating Configurations In Atmel Studio 7.0 Project + + + + + Info + 10/3/2017 3:31:05 PM + Started : Updating Build Dependencies in Atmel Studio 7.0 Solution for the project + + + + + Info + 10/3/2017 3:31:05 PM + Completed : Updating Build Dependencies in Atmel Studio 7.0 Solution for the project + + + + + Info + 10/3/2017 3:31:05 PM + Started : Updating ProjectLevelToolchainSettings In Atmel Studio 7.0 Project + + + + + Info + 10/3/2017 3:31:05 PM + Completed : Updating ProjectLevelToolchainSettings In Atmel Studio 7.0 Project + + + + + Info + 10/3/2017 3:31:05 PM + Started : Updating ToolChainSettings In Atmel Studio 7.0 Project [Configuration default] + + + + + Info + 10/3/2017 3:31:05 PM + Completed : Updating ToolChainSettings In Atmel Studio 7.0 Project [Configuration default] + + + + + Info + 10/3/2017 3:31:05 PM + Started : Updating FileLevelSettings In Atmel Studio 7.0 Project [Configuration default] + + + + + Info + 10/3/2017 3:31:05 PM + Completed : Updating FileLevelSettings In Atmel Studio 7.0 Project [Configuration default] + + + + + Info + 10/3/2017 3:31:05 PM + Started : Updating ExternalMakeFileSettings In Atmel Studio 7.0 Project [Configuration default] + + + + + Info + 10/3/2017 3:31:05 PM + Completed : Updating ExternalMakeFileSettings In Atmel Studio 7.0 Project [Configuration default] + + + + + Info + 10/3/2017 3:31:05 PM + Started : Updating BuildEvents In Atmel Studio 7.0 Project [Configuration default] + + + + + Info + 10/3/2017 3:31:05 PM + Completed : Updating BuildEvents In Atmel Studio 7.0 Project [Configuration default] + + + + + Success + 10/3/2017 3:31:05 PM + Atmel Studio 7.0 Project Created Successfully + + + + + \ No newline at end of file diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/cdc2313.aps b/FabFTDI Attiny441/Programing/CDC/tiny2313/cdc2313.aps new file mode 100755 index 0000000000000000000000000000000000000000..bf9999ff3685f5ccc3fae346a70b4c4072bb762a --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/cdc2313.aps @@ -0,0 +1 @@ +cdc231303-Oct-2007 13:40:2224-Jun-2011 15:12:22241003-Oct-2007 13:40:2244, 13, 0, 557AVR GCCdefault\cdc2313.elfC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\tiny2313\AVR SimulatorAT90S2313falseR00R01R02R03R04R05R06R07R08R09R10R11R12R13R14R15R16R17R18R19R20R21R22R23R24R25R26R27R28R29R30R31Auto000main.c..\usbdrv\usbdrv.c..\usbdrv\usbdrvasm.S..\usbdrv\oddebug.cusbconfig.h..\usbdrv\usbportability.h..\usbdrv\oddebug.h..\usbdrv\usbdrv.hdefault\cdc2313.lssdefault\MakefiledefaultYESdefault\Makefileat90s2313110cdc2313.elfdefault\0.\..\usbdrv\-Wall -gdwarf-2 -std=gnu99 -DBPS=9600 -DF_CPU=12000000UL -Os -fsigned-chardefault1C:\Program Files\WinAVR\bin\avr-gcc.exeC:\Program Files\WinAVR\utils\bin\make.exeC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\tiny2313\usbconfig.hC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\tiny2313\..\usbdrv\usbportability.hC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\tiny2313\..\usbdrv\oddebug.hC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\tiny2313\..\usbdrv\usbdrv.hC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\tiny2313\main.cC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\tiny2313\..\usbdrv\usbdrv.cC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\tiny2313\..\usbdrv\usbdrvasm.SC:\Project\Recursion\AVR-CDC\cdc232.2011-03-11\tiny2313\..\usbdrv\oddebug.c diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/cdc2313.atsln b/FabFTDI Attiny441/Programing/CDC/tiny2313/cdc2313.atsln new file mode 100755 index 0000000000000000000000000000000000000000..932f5b23407a12316deb8142a0f6b4df6f822a2c --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/cdc2313.atsln @@ -0,0 +1,19 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Atmel Studio Solution File, Format Version 11.00 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "cdc2313", "cdc2313.cproj", "{48519EAB-C382-44F6-BEF7-DAB99EABB56F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + default|AVR = default|AVR + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {48519EAB-C382-44F6-BEF7-DAB99EABB56F}.default|AVR.ActiveCfg = default|AVR + {48519EAB-C382-44F6-BEF7-DAB99EABB56F}.default|AVR.Build.0 = default|AVR + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/cdc2313.aws b/FabFTDI Attiny441/Programing/CDC/tiny2313/cdc2313.aws new file mode 100755 index 0000000000000000000000000000000000000000..14b41f1b46efc8bc38c9760cb99050da26171ef5 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/cdc2313.aws @@ -0,0 +1 @@ + diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/cdc2313.componentinfo.xml b/FabFTDI Attiny441/Programing/CDC/tiny2313/cdc2313.componentinfo.xml new file mode 100755 index 0000000000000000000000000000000000000000..b1b6de0b733a0bd35b41aa0243f5b1afe951fa1a --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/cdc2313.componentinfo.xml @@ -0,0 +1,86 @@ + + + + + + + Device + Startup + + + Atmel + 1.2.0 + C:/Program Files (x86)\Atmel\Studio\7.0\Packs + + + + + C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.2.118\include + + include + C + + + include + + + + + C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.2.118\include\avr\iotn441.h + + header + C + CGxI4xurPcTPSEi/qpDIRw== + + include/avr/iotn441.h + + + + + C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.2.118\templates\main.c + template + source + C Exe + GD1k8YYhulqRs6FD1B2Hog== + + templates/main.c + Main file (.c) + + + + C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.2.118\templates\main.cpp + template + source + C Exe + YXFphlh0CtZJU+ebktABgQ== + + templates/main.cpp + Main file (.cpp) + + + + C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.2.118\gcc\dev\attiny441 + + libraryPrefix + GCC + + + gcc/dev/attiny441 + + + + + ATtiny_DFP + C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.2.118/Atmel.ATtiny_DFP.pdsc + 1.2.118 + true + ATtiny441 + + + + Resolved + Fixed + true + + + \ No newline at end of file diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/cdc2313.cproj b/FabFTDI Attiny441/Programing/CDC/tiny2313/cdc2313.cproj new file mode 100755 index 0000000000000000000000000000000000000000..3a3da3dc50a3d29fef7e2f54c7e5326182b2c86b --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/cdc2313.cproj @@ -0,0 +1,125 @@ + + + + 2.0 + 7.0 + com.Atmel.AVRGCC8.C + 48519eab-c382-44f6-bef7-dab99eabb56f + cdc2313 + ATtiny441 + none + Importer + Executable + C + cdc2313 + .elf + $(MSBuildProjectDirectory)\$(Configuration) + WinAVR + + true + false + true + true + 0x20000000 + + true + exception_table + 2 + 0 + + + + + + + + + + + + + + + bin\default\ + + + -mmcu=attiny441 -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.2.118\gcc\dev\attiny441" + True + True + True + True + False + + + BPS=9600 + F_CPU=12000000UL + + + + + ..\. + ..\..\usbdrv + %24(PackRepoDir)\atmel\ATtiny_DFP\1.2.118\include + + + Optimize for size (-Os) + true + -gdwarf-2 -std=gnu99 -fsigned-char + -Wall -gdwarf-2 -std=gnu99 -DBPS=9600 -DF_CPU=12000000UL -Os -fsigned-char + + + ..\. + ..\..\usbdrv + %24(PackRepoDir)\atmel\ATtiny_DFP\1.2.118\include + + + + + True + $(MSBuildProjectDirectory)\default + default\Makefile + all + clean + + + + + compile + + + compile + usbportability.h + + + compile + oddebug.h + + + compile + usbdrv.h + + + compile + + + + + compile + usbdrv.c + + + + + compile + usbdrvasm.S + + + + + compile + oddebug.c + + + + + \ No newline at end of file diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/Makefile b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/Makefile new file mode 100755 index 0000000000000000000000000000000000000000..183d18ec78a6349fd9c9d8ebf98a98a0ec6e7481 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/Makefile @@ -0,0 +1,104 @@ +############################################################################### +# Makefile for the project cdc2313 +############################################################################### + +## General Flags +PROJECT = cdc2313 + + +MCU = attiny441 +#MCU = attiny2313 +#MCU = at90s2313 + +#CLK = 12000000UL +CLK = 16500000UL +#CLK = 20000000UL + +TARGET = cdc2313.elf +CC = avr-gcc + +## Options common to compile, link and assembly rules +COMMON = -mmcu=$(MCU) + +## Enables DTR, RTS and CTS signals. +ifneq ($(CLK),12000000UL) +COMMON += -DUSE_UART_CTRL +endif + +## Compile options common for all C compilation units. +CFLAGS = $(COMMON) +CFLAGS += -Wall -gdwarf-2 -std=gnu99 -DF_CPU=$(CLK) -Os -fsigned-char +CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d + +## Assembly specific flags +ASMFLAGS = $(COMMON) +ASMFLAGS += $(CFLAGS) +ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 + +## Linker flags +LDFLAGS = $(COMMON) +LDFLAGS += + + +## Intel Hex file production flags +HEX_FLASH_FLAGS = -R .eeprom -R .fuse -R .lock -R .signature + +HEX_EEPROM_FLAGS = -j .eeprom +HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load" +HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings + + +## Include Directories +#INCLUDES = -I".." -I"../../usbdrv" +INCLUDES = -I".." -I"../../usbdrv" -I"../../libs-device" + +## Objects that must be built in order to link +OBJECTS = main.o usbdrv.o usbdrvasm.o oddebug.o osccal.o + +## Objects explicitly added by the user +LINKONLYOBJECTS = + +## Build +all: $(TARGET) cdc2313.hex cdc2313.eep cdc2313.lss size + +## Compile +usbdrvasm.o: ../../usbdrv/usbdrvasm.S + $(CC) $(INCLUDES) $(ASMFLAGS) -c $< + +main.o: ../main.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +usbdrv.o: ../../usbdrv/usbdrv.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +oddebug.o: ../../usbdrv/oddebug.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +osccal.o: ../../libs-device/osccal.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +##Link +$(TARGET): $(OBJECTS) + $(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET) + +%.hex: $(TARGET) + avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@ + +%.eep: $(TARGET) + -avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ || exit 0 + +%.lss: $(TARGET) + avr-objdump -h -S $< > $@ + +size: ${TARGET} + @echo + @avr-size -C --mcu=${MCU} ${TARGET} + +## Clean target +.PHONY: clean +clean: + -rm -rf $(OBJECTS) cdc2313.elf dep/* cdc2313.hex cdc2313.eep cdc2313.lss + +## Other dependencies +-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*) + diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313-16.hex b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313-16.hex new file mode 100755 index 0000000000000000000000000000000000000000..42e776f9d51c8f6c34a6def65ea62794093817b6 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313-16.hex @@ -0,0 +1,130 @@ +:1000000058C0C8C26FC06EC06DC06CC06BC06AC043 +:1000100069C068C067C066C065C064C063C062C0B4 +:1000200061C060C05FC00902430002010080320964 +:100030000400000102020100052400100104240252 +:1000400002052406000105240103010705830308B6 +:1000500000FF09040100020A000000070501020870 +:100060000000070581020800000403090422037749 +:1000700000770077002E0072006500630075007243 +:1000800000730069006F006E002E006A007000109F +:10009000035500530042002D00320033003200129D +:1000A00001100102000008C016E105000101020074 +:1000B000010011241FBECFEDCDBF10E0A0E6B0E0DF +:1000C000E6EFF7E002C005900D92A236B107D9F72E +:1000D00010E0A2E6B0E001C01D92A83CB107E1F734 +:1000E00047D087C38DCFFC018381813049F48FE9EC +:1000F00090E09093A1008093A00080919F000895CC +:1001000086E290E09093A1008093A00083E408959C +:10011000FC01808180768032A1F49181892F805208 +:10012000823010F48FEF0895923259F498B382819F +:1001300081708295880F807E9F7D892B88BB80E0AF +:10014000089580E00895DC0190916B0009C0E92FCB +:10015000F0E0EB58FF4F8D9180839F5F9F7061505F +:100160006623A9F790936B008FEF8093A200089508 +:1001700083EF82BB8CE081BB2FE003C0A895019781 +:10018000E9F7215019F080E090E0F9CF11BA8FEF34 +:1001900088BB87B3806687BB80D07894A895B9D098 +:1001A0005D9B12C090916C0080916B00891761F08B +:1001B000B79B0AC0E92FF0E0EB58FF4F80818CB964 +:1001C0009F5F9F7090936C008091A20087FF0DC08D +:1001D00080916B0090E020916C00821B91098F70E0 +:1001E0009070089714F41092A2005F9B11C0909138 +:1001F0006A00983068F48CB1E92FF0E0E359FF4FC2 +:100200008083892F8F5F80936A00883009F4C698B5 +:100210008091910084FFC2CF60916A00662329F427 +:1002200080916200882309F4B9CF8DE690E06DD00B +:1002300080916A0088708093620010926A00C69A6A +:10024000ADCFFC018081918120E003C088559240B0 +:100250002F5F0097D9F780E09DE003C096958795C2 +:1002600026952130D9F7019789B992B982E08BB9E7 +:1002700088E18AB9A3E6B0E087E001900D92815051 +:10028000E1F781E00895DC01E3E6F0E087E001902A +:100290000D928150E1F787E0089585B7826085BFB0 +:1002A0008BB780648BBF8BE4809392008093BD00FA +:1002B0008AE5809391008093BC0008951F93CF93AB +:1002C000DF93DC01162FEA01888184FF05C0898154 +:1002D00098E88927898302C08AE58883AE014E5F4A +:1002E0005F4F212FFA018D91819321501216DCF37B +:1002F000CA01612F4BD11C5F1883DF91CF911F91F1 +:1003000008954CEB50E0DADF089541E950E0D6DF84 +:1003100008951F93CF93DF936091A200635067FD10 +:10032000B6C080919F00CCE0D0E0C81BD109CA556F +:10033000DF4F80919E00803118F4CE0104DFA1C010 +:100340008D3209F08EC0683009F09BC083EC809339 +:1003500086008AE58093600010928500888180760F +:1003600021F0CE01D5DE282F69C09A8110928F002E +:100370008981882331F4109290008FE890E022E088 +:1003800058C0853019F49093A30050C08630B9F559 +:100390008B81813041F48FE990E09093A1008093AC +:1003A000A00022E128C0823021F4CE019CDE282F5B +:1003B00022C08330F9F48A81882341F489E690E0F1 +:1003C0009093A1008093A00024E015C0813041F4F7 +:1003D0008DE690E09093A1008093A00022E20BC0F4 +:1003E000823041F48FE890E09093A1008093A000C8 +:1003F00020E101C020E080E4809385001FC08830A8 +:1004000019F485EA90E009C0893019F49093A500A9 +:100410000DC08A3021F48FE890E021E00AC08B30D3 +:1004200029F48BE4809392008093BD008FE890E0E4 +:1004300020E09093A1008093A00009C02F3F39F4E1 +:10044000888187FD2E8180E88093850006C08F819A +:10045000882319F48E81821708F0822F809361001F +:1004600010C08091850087FF0CC0CE01EADE8F3F6F +:1004700021F48EE18093600004C0882311F0109273 +:1004800061008091A200181614F41092A2008091CD +:10049000600084FF58C0809161008F3F09F453C011 +:1004A000182F893008F018E0811B8093610080913B +:1004B000860098E8892780938600112391F1809126 +:1004C000850087FF08C087E890E0612FDCDE182FE9 +:1004D000893098F526C02091A0003091A10086FFB8 +:1004E0000DC0A7E8B0E080E090E0F901E80FF91F47 +:1004F000E491ED9301961817C1F708C0D901912F27 +:10050000E7E8F0E08D9181939150E1F71150812F50 +:1005100090E01F5F0196820F931F9093A10080933C +:10052000A00087E890E0612F31D0612F6C5F6C30C4 +:1005300041F08FEF8093610004C08FEF80936100E2 +:100540006EE16093600094E180B38C7031F491505F +:10055000D9F71092A30010929D00DF91CF911F91C7 +:100560000895A82FB92F80E090E041E050EA60950F +:1005700030E009C02D9182279795879510F0842748 +:100580009527305EC8F36F5FA8F30895EADF8D9377 +:100590009D930895CF93CFB7CF93DF93C395839B5C +:1005A000E9F7839B0BC0839B09C0839B07C0839B98 +:1005B00005C0839B03C0839B01C08EC06F93C09115 +:1005C0009F00DD27CA55DF4F2F9365E5839B03C04E +:1005D0002F916F91E6CF0F931F934F9320E040E14F +:1005E0005F9300B30C7003FB27F93F9350E03BE0AF +:1005F00039C01C7040642F77012F5F5F1EC04068B8 +:1006000010B31C702F7752501FC0406400B32F7777 +:100610000C70D1F15F5F00C023C0406210B32F7730 +:100620001C7091F15F5F00C025C00C701027515005 +:1006300012F45D5F0000115027952C3F10B3C8F6EF +:100640001C700127015027952C3FC8F6422749937B +:1006500000B30C7010274F73115027952C3FA8F64C +:100660004695469510B31C7079F0012701502795E7 +:100670002C3F98F66B5A60F3315000B3B0F600C0CF +:1006800010E41ABF00271CC03B503195C31BD0405B +:1006900010E41ABF0881033C21F10B3411F12091C1 +:1006A0009D001981110F1213EDCF4A81441F0936A5 +:1006B00069F10D3211F0013E29F74F7009F0042F56 +:1006C0000093A4003F915F914F911F910F912F9143 +:1006D0006F91CAB7C6FD62CFDF91CF91CFBFCF91E7 +:1006E00018952091A400222369F31091A2001123F0 +:1006F000E9F53430EAF13093A20020939E00109186 +:100700009F003BE0311B30939F0032C00091A2005C +:10071000013064F50AE54F7049F43091600034FD12 +:1007200028C000936000C6E8D0E027C0433049F0FD +:100730003091910034FD1DC000939100C2E9D0E0DA +:100740001CC03091BC0034FD14C00093BC00CDEB44 +:10075000D0E013C0052710E000C0000002BB1AC0A3 +:10076000052710E0221F1DC010E021C04AE502C08D +:1007700032ED432FC4E1D0E032E011B31C60939A14 +:1007800002B311BB5CE020E865E320FF052702BB54 +:10079000279517951C3FF0F66695B8F7B1F720FF3F +:1007A000052702BB279517951C3FD0F6279517956F +:1007B00017FF052700001C3F02BBB0F629913A95B0 +:1007C00019F7037F1091A300110FC651D04002BB4F +:1007D00011F010939D0010E41ABF086011B3137F4D +:1007E000402F437F54E05A95F1F702BB11BB42BB47 +:0607F00069CFF894FFCF71 +:0207F6005AFFA8 +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313-20.hex b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313-20.hex new file mode 100755 index 0000000000000000000000000000000000000000..2043aae2daa69dbe86f1f827dc3d3f87ad3f66bf --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313-20.hex @@ -0,0 +1,129 @@ +:1000000058C0C8C26FC06EC06DC06CC06BC06AC043 +:1000100069C068C067C066C065C064C063C062C0B4 +:1000200061C060C05FC00902430002010080320964 +:100030000400000102020100052400100104240252 +:1000400002052406000105240103010705830308B6 +:1000500000FF09040100020A000000070501020870 +:100060000000070581020800000403090422037749 +:1000700000770077002E0072006500630075007243 +:1000800000730069006F006E002E006A007000109F +:10009000035500530042002D00320033003200129D +:1000A00001100102000008C016E105000101020074 +:1000B000010011241FBECFEDCDBF10E0A0E6B0E0DF +:1000C000E4EEF7E002C005900D92A236B107D9F731 +:1000D00010E0A2E6B0E001C01D92A83CB107E1F734 +:1000E00047D07EC38DCFFC018381813049F48FE9F5 +:1000F00090E09093A1008093A00080919F000895CC +:1001000086E290E09093A1008093A00083E408959C +:10011000FC01808180768032A1F49181892F805208 +:10012000823010F48FEF0895923259F498B382819F +:1001300081708295880F807E9F7D892B88BB80E0AF +:10014000089580E00895DC0190916B0009C0E92FCB +:10015000F0E0EB58FF4F8D9180839F5F9F7061505F +:100160006623A9F790936B008FEF8093A200089508 +:1001700083EF82BB8CE081BB2FE003C0A895019781 +:10018000E9F7215019F080E090E0F9CF11BA8FEF34 +:1001900088BB87B3806687BB80D07894A895B9D098 +:1001A0005D9B12C090916C0080916B00891761F08B +:1001B000B79B0AC0E92FF0E0EB58FF4F80818CB964 +:1001C0009F5F9F7090936C008091A20087FF0DC08D +:1001D00080916B0090E020916C00821B91098F70E0 +:1001E0009070089714F41092A2005F9B11C0909138 +:1001F0006A00983068F48CB1E92FF0E0E359FF4FC2 +:100200008083892F8F5F80936A00883009F4C698B5 +:100210008091910084FFC2CF60916A00662329F427 +:1002200080916200882309F4B9CF8DE690E06DD00B +:1002300080916A0088708093620010926A00C69A6A +:10024000ADCFFC018081918120E003C088559240B0 +:100250002F5F0097D9F780E490E103C096958795CA +:1002600026952130D9F7019789B992B982E08BB9E7 +:1002700088E18AB9A3E6B0E087E001900D92815051 +:10028000E1F781E00895DC01E3E6F0E087E001902A +:100290000D928150E1F787E0089585B7826085BFB0 +:1002A0008BB780648BBF8BE4809392008093BD00FA +:1002B0008AE5809391008093BC0008951F93CF93AB +:1002C000DF93DC01162FEA01888184FF05C0898154 +:1002D00098E88927898302C08AE58883AE014E5F4A +:1002E0005F4F212FFA018D91819321501216DCF37B +:1002F000CA01612F4BD11C5F1883DF91CF911F91F1 +:1003000008954CEB50E0DADF089541E950E0D6DF84 +:1003100008951F93CF93DF936091A200635067FD10 +:10032000B6C080919F00CCE0D0E0C81BD109CA556F +:10033000DF4F80919E00803118F4CE0104DFA1C010 +:100340008D3209F08EC0683009F09BC083EC809339 +:1003500086008AE58093600010928500888180760F +:1003600021F0CE01D5DE282F69C09A8110928F002E +:100370008981882331F4109290008FE890E022E088 +:1003800058C0853019F49093A30050C08630B9F559 +:100390008B81813041F48FE990E09093A1008093AC +:1003A000A00022E128C0823021F4CE019CDE282F5B +:1003B00022C08330F9F48A81882341F489E690E0F1 +:1003C0009093A1008093A00024E015C0813041F4F7 +:1003D0008DE690E09093A1008093A00022E20BC0F4 +:1003E000823041F48FE890E09093A1008093A000C8 +:1003F00020E101C020E080E4809385001FC08830A8 +:1004000019F485EA90E009C0893019F49093A500A9 +:100410000DC08A3021F48FE890E021E00AC08B30D3 +:1004200029F48BE4809392008093BD008FE890E0E4 +:1004300020E09093A1008093A00009C02F3F39F4E1 +:10044000888187FD2E8180E88093850006C08F819A +:10045000882319F48E81821708F0822F809361001F +:1004600010C08091850087FF0CC0CE01EADE8F3F6F +:1004700021F48EE18093600004C0882311F0109273 +:1004800061008091A200181614F41092A2008091CD +:10049000600084FF58C0809161008F3F09F453C011 +:1004A000182F893008F018E0811B8093610080913B +:1004B000860098E8892780938600112391F1809126 +:1004C000850087FF08C087E890E0612FDCDE182FE9 +:1004D000893098F526C02091A0003091A10086FFB8 +:1004E0000DC0A7E8B0E080E090E0F901E80FF91F47 +:1004F000E491ED9301961817C1F708C0D901912F27 +:10050000E7E8F0E08D9181939150E1F71150812F50 +:1005100090E01F5F0196820F931F9093A10080933C +:10052000A00087E890E0612F31D0612F6C5F6C30C4 +:1005300041F08FEF8093610004C08FEF80936100E2 +:100540006EE16093600094E180B38C7031F491505F +:10055000D9F71092A30010929D00DF91CF911F91C7 +:100560000895A82FB92F80E090E041E050EA60950F +:1005700030E009C02D9182279795879510F0842748 +:100580009527305EC8F36F5FA8F30895EADF8D9377 +:100590009D930895CF93CFB7CF93DF93C395839B5C +:1005A000E9F7839B11C0839B0FC0839B0DC0839B86 +:1005B0000BC0839B09C0839B07C0839B05C0839BA3 +:1005C00003C0839B01C086C06F93C0919F00DD274D +:1005D000CA55DF4F2F9320E400C065E0839B03C022 +:1005E0002F916F91DECF0F931F934F9345E55F934C +:1005F00055E53F933BE014E000B30C702EC06A95C4 +:10060000C9F03150D8F100B30C7001130BC008943D +:100610002795299320E4555500F46A9569F701E080 +:1006200060B30BC0102F66E02695299320E4555542 +:1006300018F3E2CF0FEF60B30000162F455500F01E +:10064000404066E01C700030E2F221F0000000B390 +:100650000C7003C000B30C70A9F0011309C008941A +:10066000279568F200C06A95A9F700E060B3E5CF6E +:10067000102F66E0269528F20000ECCF10E41ABF98 +:1006800000271CC03B503195C31BD04010E41ABF5B +:100690000881033C21F10B3411F120919D00198157 +:1006A000110F1213EDCF4A81441F093669F10D3243 +:1006B00011F0013E29F74F7009F0042F0093A400B8 +:1006C0003F915F914F911F910F912F916F91CAB7F9 +:1006D000C6FD64CFDF91CF91CFBFCF911895209108 +:1006E000A400222369F31091A2001123D9F534301C +:1006F000DAF13093A20020939E0010919F003BE01E +:10070000311B30939F0030C00091A200013054F59E +:100710000AE54F7049F43091600034FD26C0009323 +:100720006000C6E8D0E025C0433049F03091910028 +:1007300034FD1BC000939100C2E9D0E01AC0309193 +:10074000BC0034FD12C00093BC00CDEBD0E011C062 +:10075000052710E000C002BB19C0052710E0221FCA +:1007600000C01DC04AE502C032ED432FC4E1D0E015 +:1007700032E011B31C60939A02B311BB5CE020E835 +:1007800069E420FF052702BB2795179500C00000EC +:100790001C3FF0F66695A8F7A1F720FF052702BBDE +:1007A0002795179500001C3FC0F629913A9541F70F +:1007B000037F1091A300110F02BBC651D04011F06E +:1007C00010939D0010E41ABF086011B3137F402FEF +:1007D000437F55E05A95F1F702BB11BB42BB70CF86 +:0407E000F894FFCFBB +:0207E4005AFFBA +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313.eep b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313.eep new file mode 100755 index 0000000000000000000000000000000000000000..1996e8fde5d7311bbef07a199045173b4bebb079 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313.eep @@ -0,0 +1 @@ +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313.elf b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313.elf new file mode 100755 index 0000000000000000000000000000000000000000..3e66ff4eb6b6fe90d8bf7fa0c3269e5af1e0522b Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313.elf differ diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313.hex b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313.hex new file mode 100755 index 0000000000000000000000000000000000000000..64815e9f187813625af91d6523e2fb8a9217bca1 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313.hex @@ -0,0 +1,164 @@ +:1000000063C08CC27CC07BC07AC079C078C077C026 +:1000100076C075C074C073C072C071C070C06FC04C +:100020006EC06DC06CC06BC06AC069C068C067C07C +:1000300066C065C064C063C062C061C0090243009D +:1000400002010080320904000001020201000524BF +:100050000010010424020205240600010524010306 +:1000600001070583030800FF09040100020A0000DC +:1000700000070501020800000705810208000012C0 +:1000800001100102000008C016E105000101020094 +:100090000110035500530042002D0032003300329E +:1000A0000022037700770077002E0072006500635E +:1000B0000075007200730069006F006E002E006A08 +:1000C000007000040309040011241FBECFEFD1E02B +:1000D000DEBFCDBF11E0A0E0B1E0E2E1FAE002C096 +:1000E00005900D92A230B107D9F721E0A2E0B1E06E +:1000F00001C01D92A936B207E1F702D488C480CFAF +:10010000FC018381813049F48FE790E090934201B4 +:100110008093410180917F0008958CE390E090935B +:1001200042018093410183E40895FC01808180763F +:10013000803279F4818190EE980F923040F08232D3 +:1001400041F4828180FDC59A80FFC59802C08FEF7F +:10015000089580E00895DC0197E0EDE1F1E0019081 +:100160000D929A95E1F787E00895FC012081318195 +:1001700090E02115310521F0285532409F5FF9CFDD +:1001800020E43DE0913021F0369527959695FACF01 +:1001900021503109209381003093820082E08093C6 +:1001A000860088E18093850097E0ADE1B1E00190A1 +:1001B0000D929A95E1F781E0089520911B01662345 +:1001C00061F0FC013191CF01E22FF0E0EE5FFE4FD4 +:1001D00030832F5F2F706150F2CF20931B018FEF80 +:1001E0008093430108951F93CF93DF93162FEA0165 +:1001F000288124FF05C0398128E82327298302C0EC +:100200002AE52883212FFC01CE010296DC013191E1 +:100210003D9321501216DCF3612F69D11C5F1883C6 +:10022000DF91CF911F91089542E351E0DCCF4DE57E +:1002300051E0D9CFCF93DF9360914301635067FDC5 +:10024000B3C080914001CCE0D0E0C81BD109C95BAC +:10025000DE4F80913F01803118F4CE01AEDF9EC0A9 +:100260008D3209F08CC0683009F098C083EC80931F +:1002700027018AE58093010110922601888180760A +:1002800019F0CE0152DF68C09A8110923001898145 +:10029000811106C01092310120E331E082E057C0A5 +:1002A000853019F4909344014FC08630A9F58B81B5 +:1002B000813041F48FE790E09093420180934101B7 +:1002C00082E126C0823019F4CE011ADF21C08330CA +:1002D000F1F4911108C083EC90E090934201809377 +:1002E000410184E015C0913041F481EA90E090939F +:1002F00042018093410182E20BC0923041F481E9D6 +:1003000090E0909342018093410180E101C080E040 +:1003100090E49093260120C0883079F0893019F458 +:100320009093460111C08A3059F08B3069F48BE408 +:100330008093330180935E0107C026E431E002C060 +:1003400020E331E081E003C020E331E080E030933E +:1003500042012093410109C08F3F39F4988197FDF4 +:100360008E8190E89093260107C09F81911104C06F +:100370009E81981708F4892F809300010FC0809107 +:10038000260187FF0BC0CE01F0DE8F3F21F48EE106 +:100390008093010103C081111092000180914301FB +:1003A000181614F4109243018091010184FF55C086 +:1003B000809100018F3F09F450C0C82F893008F0A8 +:1003C000C8E08C1B809300019091270188E8892761 +:1003D00080932701CC2309F459C02091260127FFDF +:1003E00008C06C2F88E291E0B6DEC82F893078F51E +:1003F00023C0809141019091420126FF0AC0A8E2EA +:10040000B1E0FC012C2F34913D9331962150D9F766 +:1004100008C0DC01E8E2F1E02C2F3D91319321503E +:10042000E1F72FEF2C0F30E02F5F3F4F820F931F2C +:1004300090934201809341016C2F88E291E057D064 +:10044000CC5FCC3041F08FEF8093000104C08FEF80 +:1004500080930001CEE1C093010184E196B39670D0 +:1004600031F48150D9F71092440110923E01C1E05D +:100470008111C0E090912501C91771F0882319F00E +:10048000F894C3D17894C093250106C060E088E257 +:1004900091E02DD0C4E0D7CFDF91CF91089585B7FB +:1004A000826085BF8BB780648BBFA2E3B1E08BE431 +:1004B00011968C931197EDE5F1E081838AE58C9399 +:1004C00080830895A82FB92F80E090E041E050EAA2 +:1004D000609530E009C02D9182279795879510F09F +:1004E00084279527305EC8F36F5FA8F30895EADF8D +:1004F0008D939D930895A6E088279927AA9569F082 +:100500000197E1F3B299FCCFB29BFECF81E099272E +:10051000A6B3019611F0A670D9F70895CF93CFB77F +:10052000CF93C395B29BE9F7B29B0BC0B29B09C0B6 +:10053000B29B07C0B29B05C0B29B03C0B29B01C077 +:10054000D8C00F92DF93C0914001DD27C95BDE4F19 +:10055000012EB29B03C0DF910F90E6CF2F930F9334 +:100560001F934F932FEF4F6F06B302FB20F95F935A +:100570003F9350E03BE065C016B30126502952FD81 +:10058000C89556B3012702FB25F92F7306B3B1F0C6 +:100590005027102712FB26F906B22230F0F000C0D7 +:1005A00016B3012702FB27F90126502906B2243091 +:1005B000E8F54F77206816B30000F6CF50274F7D3F +:1005C000206206B2102F000000C006B3002650299A +:1005D000102712FB26F906B2E2CF4F7B06B3206448 +:1005E00000C0DACF01265029167006B269F14E7F9D +:1005F0002160012F16B328C0002650294D7F06B276 +:100600002260102F29C0012650294B7F06B224609A +:10061000012F2DC016B301265029477F2860000006 +:1006200006B22EC04F7E06B3206130C0422706B30B +:10063000499300265029102706B24FEF12FB20F9EC +:10064000297F16B379F2167059F10126502906B2A6 +:10065000012702FB21F9237F06B371F200265029FE +:100660003150D0F006B2102712FB22F9277E16B3C4 +:1006700051F201265029012702FB06B223F92F7CF3 +:1006800049F2000006B3102712FB24F90026502976 +:1006900006B22F7939F270CF10E41ABF00271CC0C0 +:1006A0003B503195C31BD04010E41ABF0881033C76 +:1006B00021F10B3411F120913E011981110F121318 +:1006C000EDCF4A81441F093669F10D3211F0013E28 +:1006D00029F74F7009F0042F009345013F915F9176 +:1006E0004F911F910F912F91DF910F90CAB7C6FDC7 +:1006F00018CFCF91CFBFCF911895209145012223DC +:1007000069F3109143011123D1F53430D2F13093C4 +:10071000430120933F01109140013BE0311B309396 +:1007200040012FC00091430101304CF50AE54F70A4 +:1007300049F43091010134FD25C000930101C7E265 +:10074000D1E024C0433049F03091320134FD1AC069 +:1007500000933201C3E3D1E019C030915D0134FD53 +:1007600011C000935D01CEE5D1E010C0052710E077 +:1007700000C021C0052710E0C89508BB14C03AE5A9 +:1007800001C032ED032EC0E0D0E032E017B31660B6 +:10079000C29A08B317BB56E020E84FEF20FF0527A9 +:1007A00008BB279517951C3F28F700004552B0F766 +:1007B00020FF0527279508BB17951C3FB8F6299100 +:1007C0003A9561F7097F10914401110F08BBC2509F +:1007D000D04011F010933E0110E41ABF046017B32B +:1007E000197F402F497F54E05A95F1F708BB17BB9A +:1007F00048BB74CF80E090E0F4D08F3F19F4809133 +:1008000074008C5F809374000895CF92DF92EF9212 +:10081000FF920F931F93CF93DF93C09074006BDE12 +:10082000845399407C0197FF03C0F194E194F1084F +:1008300088E9809374005FDE8433994014F4C0E843 +:1008400001C0C0E007E010E0D0E4DD2EDC0ED09265 +:10085000740051DE843329E092070CF4CD2DD69537 +:100860000150110991F78453994097FF03C0919566 +:10087000819591098C01E816F9061CF4C092740068 +:1008800036C08EEF8C0F80937400EC2EF12C82E03A +:10089000E80EF11C8091740090E0E816F906A4F0CF +:1008A0002ADE8453994097FF03C091958195910961 +:1008B000801791071CF4C09174008C018091740022 +:1008C0008F5F80937400E6CFC093740080E090E067 +:1008D00088D0C81761F06C2F80E090E0DF91CF9155 +:1008E0001F910F91FF90EF90DF90CF9082C0DF912A +:1008F000CF911F910F91FF90EF90DF90CF900895CF +:1009000089EF88BB86E087BB2FE0215031F080E083 +:1009100090E00197D1F3A895FCCF17BA8FEF88BB71 +:1009200087B3806687BBBBDD7894A89583DC809114 +:10093000860085FF17C0E0911A0180911B018E1778 +:1009400089F0B79B0FC081E08E0F80931A01F0E011 +:10095000EE5FFE4F80818093800080911A018F703E +:1009600080931A018091430187FF0DC080911B0184 +:1009700090E020911A01821B91098F7099270897A6 +:1009800014F4109243018091860087FF11C0E0911A +:100990001C01E83068F481E08E0F80931C01909177 +:1009A0008000F0E0EE5EFE4F9083883009F4C69838 +:1009B0008091320184FFB9CF60911C01611105C0A3 +:1009C00080912401882309F4B0CF82E191E02CDCEE +:1009D00080911C0188708093240110921C01C69A9A +:1009E000A4CFE199FECF1FBA8EBBE09A99278DB3B1 +:1009F0000895262FE199FECF1CBA1FBA8EBB2DBBDE +:100A00000FB6F894E29AE19A0FBE01960895F89411 +:020A1000FFCF16 +:020A1200FF5A89 +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313.lss b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313.lss new file mode 100755 index 0000000000000000000000000000000000000000..e97f1a851a7931fbdbccb398b54091671921b075 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/cdc2313.lss @@ -0,0 +1,2622 @@ + +cdc2313.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .data 00000002 00800100 00000a12 00000aa6 2**0 + CONTENTS, ALLOC, LOAD, DATA + 1 .text 00000a12 00000000 00000000 00000094 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 2 .bss 00000067 00800102 00800102 00000aa8 2**0 + ALLOC + 3 .comment 00000030 00000000 00000000 00000aa8 2**0 + CONTENTS, READONLY + 4 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 00000ad8 2**2 + CONTENTS, READONLY + 5 .debug_aranges 000000a0 00000000 00000000 00000b18 2**3 + CONTENTS, READONLY, DEBUGGING + 6 .debug_info 0000196a 00000000 00000000 00000bb8 2**0 + CONTENTS, READONLY, DEBUGGING + 7 .debug_abbrev 00000d64 00000000 00000000 00002522 2**0 + CONTENTS, READONLY, DEBUGGING + 8 .debug_line 000011f5 00000000 00000000 00003286 2**0 + CONTENTS, READONLY, DEBUGGING + 9 .debug_frame 00000150 00000000 00000000 0000447c 2**2 + CONTENTS, READONLY, DEBUGGING + 10 .debug_str 00000954 00000000 00000000 000045cc 2**0 + CONTENTS, READONLY, DEBUGGING + 11 .debug_loc 00000c3d 00000000 00000000 00004f20 2**0 + CONTENTS, READONLY, DEBUGGING + 12 .debug_ranges 00000080 00000000 00000000 00005b5d 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00000000 <__vectors>: + 0: 63 c0 rjmp .+198 ; 0xc8 <__ctors_end> + 2: 8c c2 rjmp .+1304 ; 0x51c <__vector_1> + 4: 7c c0 rjmp .+248 ; 0xfe <__bad_interrupt> + 6: 7b c0 rjmp .+246 ; 0xfe <__bad_interrupt> + 8: 7a c0 rjmp .+244 ; 0xfe <__bad_interrupt> + a: 79 c0 rjmp .+242 ; 0xfe <__bad_interrupt> + c: 78 c0 rjmp .+240 ; 0xfe <__bad_interrupt> + e: 77 c0 rjmp .+238 ; 0xfe <__bad_interrupt> + 10: 76 c0 rjmp .+236 ; 0xfe <__bad_interrupt> + 12: 75 c0 rjmp .+234 ; 0xfe <__bad_interrupt> + 14: 74 c0 rjmp .+232 ; 0xfe <__bad_interrupt> + 16: 73 c0 rjmp .+230 ; 0xfe <__bad_interrupt> + 18: 72 c0 rjmp .+228 ; 0xfe <__bad_interrupt> + 1a: 71 c0 rjmp .+226 ; 0xfe <__bad_interrupt> + 1c: 70 c0 rjmp .+224 ; 0xfe <__bad_interrupt> + 1e: 6f c0 rjmp .+222 ; 0xfe <__bad_interrupt> + 20: 6e c0 rjmp .+220 ; 0xfe <__bad_interrupt> + 22: 6d c0 rjmp .+218 ; 0xfe <__bad_interrupt> + 24: 6c c0 rjmp .+216 ; 0xfe <__bad_interrupt> + 26: 6b c0 rjmp .+214 ; 0xfe <__bad_interrupt> + 28: 6a c0 rjmp .+212 ; 0xfe <__bad_interrupt> + 2a: 69 c0 rjmp .+210 ; 0xfe <__bad_interrupt> + 2c: 68 c0 rjmp .+208 ; 0xfe <__bad_interrupt> + 2e: 67 c0 rjmp .+206 ; 0xfe <__bad_interrupt> + 30: 66 c0 rjmp .+204 ; 0xfe <__bad_interrupt> + 32: 65 c0 rjmp .+202 ; 0xfe <__bad_interrupt> + 34: 64 c0 rjmp .+200 ; 0xfe <__bad_interrupt> + 36: 63 c0 rjmp .+198 ; 0xfe <__bad_interrupt> + 38: 62 c0 rjmp .+196 ; 0xfe <__bad_interrupt> + 3a: 61 c0 rjmp .+194 ; 0xfe <__bad_interrupt> + +0000003c <__trampolines_end>: + 3c: 09 02 muls r16, r25 + 3e: 43 00 .word 0x0043 ; ???? + 40: 02 01 movw r0, r4 + 42: 00 80 ld r0, Z + 44: 32 09 sbc r19, r2 + 46: 04 00 .word 0x0004 ; ???? + 48: 00 01 movw r0, r0 + 4a: 02 02 muls r16, r18 + 4c: 01 00 .word 0x0001 ; ???? + 4e: 05 24 eor r0, r5 + 50: 00 10 cpse r0, r0 + 52: 01 04 cpc r0, r1 + 54: 24 02 muls r18, r20 + 56: 02 05 cpc r16, r2 + 58: 24 06 cpc r2, r20 + 5a: 00 01 movw r0, r0 + 5c: 05 24 eor r0, r5 + 5e: 01 03 mulsu r16, r17 + 60: 01 07 cpc r16, r17 + 62: 05 83 std Z+5, r16 ; 0x05 + 64: 03 08 sbc r0, r3 + 66: 00 ff sbrs r16, 0 + 68: 09 04 cpc r0, r9 + 6a: 01 00 .word 0x0001 ; ???? + 6c: 02 0a sbc r0, r18 + 6e: 00 00 nop + 70: 00 07 cpc r16, r16 + 72: 05 01 movw r0, r10 + 74: 02 08 sbc r0, r2 + 76: 00 00 nop + 78: 07 05 cpc r16, r7 + 7a: 81 02 muls r24, r17 + 7c: 08 00 .word 0x0008 ; ???? + ... + +0000007f : + 7f: 12 01 10 01 02 00 00 08 c0 16 e1 05 00 01 01 02 ................ + 8f: 00 01 .. + +00000091 : + 91: 10 03 55 00 53 00 42 00 2d 00 32 00 33 00 32 00 ..U.S.B.-.2.3.2. + +000000a1 : + a1: 22 03 77 00 77 00 77 00 2e 00 72 00 65 00 63 00 ".w.w.w...r.e.c. + b1: 75 00 72 00 73 00 69 00 6f 00 6e 00 2e 00 6a 00 u.r.s.i.o.n...j. + c1: 70 00 p. + +000000c3 : + c3: 04 03 09 04 00 ..... + +000000c8 <__ctors_end>: + c8: 11 24 eor r1, r1 + ca: 1f be out 0x3f, r1 ; 63 + cc: cf ef ldi r28, 0xFF ; 255 + ce: d1 e0 ldi r29, 0x01 ; 1 + d0: de bf out 0x3e, r29 ; 62 + d2: cd bf out 0x3d, r28 ; 61 + +000000d4 <__do_copy_data>: + d4: 11 e0 ldi r17, 0x01 ; 1 + d6: a0 e0 ldi r26, 0x00 ; 0 + d8: b1 e0 ldi r27, 0x01 ; 1 + da: e2 e1 ldi r30, 0x12 ; 18 + dc: fa e0 ldi r31, 0x0A ; 10 + de: 02 c0 rjmp .+4 ; 0xe4 <__do_copy_data+0x10> + e0: 05 90 lpm r0, Z+ + e2: 0d 92 st X+, r0 + e4: a2 30 cpi r26, 0x02 ; 2 + e6: b1 07 cpc r27, r17 + e8: d9 f7 brne .-10 ; 0xe0 <__do_copy_data+0xc> + +000000ea <__do_clear_bss>: + ea: 21 e0 ldi r18, 0x01 ; 1 + ec: a2 e0 ldi r26, 0x02 ; 2 + ee: b1 e0 ldi r27, 0x01 ; 1 + f0: 01 c0 rjmp .+2 ; 0xf4 <.do_clear_bss_start> + +000000f2 <.do_clear_bss_loop>: + f2: 1d 92 st X+, r1 + +000000f4 <.do_clear_bss_start>: + f4: a9 36 cpi r26, 0x69 ; 105 + f6: b2 07 cpc r27, r18 + f8: e1 f7 brne .-8 ; 0xf2 <.do_clear_bss_loop> + fa: 02 d4 rcall .+2052 ; 0x900
+ fc: 88 c4 rjmp .+2320 ; 0xa0e <_exit> + +000000fe <__bad_interrupt>: + fe: 80 cf rjmp .-256 ; 0x0 <__vectors> + +00000100 : + + +uchar usbFunctionDescriptor(usbRequest_t *rq) +{ + + if(rq->wValue.bytes[1] == USBDESCR_DEVICE){ + 100: fc 01 movw r30, r24 + 102: 83 81 ldd r24, Z+3 ; 0x03 + 104: 81 30 cpi r24, 0x01 ; 1 + 106: 49 f4 brne .+18 ; 0x11a + usbMsgPtr = (uchar *)usbDescriptorDevice; + 108: 8f e7 ldi r24, 0x7F ; 127 + 10a: 90 e0 ldi r25, 0x00 ; 0 + 10c: 90 93 42 01 sts 0x0142, r25 ; 0x800142 + 110: 80 93 41 01 sts 0x0141, r24 ; 0x800141 + return usbDescriptorDevice[0]; + 114: 80 91 7f 00 lds r24, 0x007F ; 0x80007f <__EEPROM_REGION_LENGTH__+0x7f007f> + 118: 08 95 ret + }else{ /* must be config descriptor */ + usbMsgPtr = (uchar *)configDescrCDC; + 11a: 8c e3 ldi r24, 0x3C ; 60 + 11c: 90 e0 ldi r25, 0x00 ; 0 + 11e: 90 93 42 01 sts 0x0142, r25 ; 0x800142 + 122: 80 93 41 01 sts 0x0141, r24 ; 0x800141 + return sizeof(configDescrCDC); + 126: 83 e4 ldi r24, 0x43 ; 67 + } +} + 128: 08 95 ret + +0000012a : + +static uchar sendEmptyFrame; +static uchar modeBuffer[7]; + +uchar usbFunctionSetup(uchar data[8]) +{ + 12a: fc 01 movw r30, r24 +usbRequest_t *rq = (void *)data; + + if((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS){ /* class request type */ + 12c: 80 81 ld r24, Z + 12e: 80 76 andi r24, 0x60 ; 96 + 130: 80 32 cpi r24, 0x20 ; 32 + 132: 79 f4 brne .+30 ; 0x152 + + if( rq->bRequest==GET_LINE_CODING || rq->bRequest==SET_LINE_CODING ){ + 134: 81 81 ldd r24, Z+1 ; 0x01 + 136: 90 ee ldi r25, 0xE0 ; 224 + 138: 98 0f add r25, r24 + 13a: 92 30 cpi r25, 0x02 ; 2 + 13c: 40 f0 brcs .+16 ; 0x14e + return 0xff; + /* GET_LINE_CODING -> usbFunctionRead() */ + /* SET_LINE_CODING -> usbFunctionWrite() */ + } +#ifdef USE_UART_CTRL + if(rq->bRequest==SET_CONTROL_LINE_STATE){ + 13e: 82 32 cpi r24, 0x22 ; 34 + 140: 41 f4 brne .+16 ; 0x152 + UART_CTRL_PORT = (UART_CTRL_PORT&~(1<wValue.word&1)< +usbRequest_t *rq = (void *)data; + + if((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS){ /* class request type */ + + if( rq->bRequest==GET_LINE_CODING || rq->bRequest==SET_LINE_CODING ){ + return 0xff; + 14e: 8f ef ldi r24, 0xFF ; 255 + 150: 08 95 ret + if(rq->bRequest==SET_CONTROL_LINE_STATE){ + UART_CTRL_PORT = (UART_CTRL_PORT&~(1<wValue.word&1)<: +/*---------------------------------------------------------------------------*/ +/* usbFunctionRead - GET_LINE_CODING */ +/*---------------------------------------------------------------------------*/ + +uchar usbFunctionRead( uchar *data, uchar len ) +{ + 156: dc 01 movw r26, r24 + memcpy( data, modeBuffer, 7 ); + 158: 97 e0 ldi r25, 0x07 ; 7 + 15a: ed e1 ldi r30, 0x1D ; 29 + 15c: f1 e0 ldi r31, 0x01 ; 1 + 15e: 01 90 ld r0, Z+ + 160: 0d 92 st X+, r0 + 162: 9a 95 dec r25 + 164: e1 f7 brne .-8 ; 0x15e + return 7; +} + 166: 87 e0 ldi r24, 0x07 ; 7 + 168: 08 95 ret + +0000016a : +#define BRMAX 38400 +#define BSTEP ((F_CPU>>3)/BRMAX) +#define BRVAL ((unsigned)BSTEP*BRMAX/BRMIN) + +uchar usbFunctionWrite( uchar *data, uchar len ) +{ + 16a: fc 01 movw r30, r24 + usbWord_t br; + unsigned baudrate; + uchar i; + + // set baudrate generator + baudrate = *(unsigned *)data; + 16c: 20 81 ld r18, Z + 16e: 31 81 ldd r19, Z+1 ; 0x01 + for( i=0; baudrate; i++ ) + 170: 90 e0 ldi r25, 0x00 ; 0 + 172: 21 15 cp r18, r1 + 174: 31 05 cpc r19, r1 + 176: 21 f0 breq .+8 ; 0x180 + baudrate -= BRMIN; + 178: 28 55 subi r18, 0x58 ; 88 + 17a: 32 40 sbci r19, 0x02 ; 2 + unsigned baudrate; + uchar i; + + // set baudrate generator + baudrate = *(unsigned *)data; + for( i=0; baudrate; i++ ) + 17c: 9f 5f subi r25, 0xFF ; 255 + 17e: f9 cf rjmp .-14 ; 0x172 + 180: 20 e4 ldi r18, 0x40 ; 64 + 182: 3d e0 ldi r19, 0x0D ; 13 + baudrate -= BRMIN; + for( br.word=BRVAL; i!=1; i>>=1 ) + 184: 91 30 cpi r25, 0x01 ; 1 + 186: 21 f0 breq .+8 ; 0x190 + br.word >>= 1; + 188: 36 95 lsr r19 + 18a: 27 95 ror r18 + + // set baudrate generator + baudrate = *(unsigned *)data; + for( i=0; baudrate; i++ ) + baudrate -= BRMIN; + for( br.word=BRVAL; i!=1; i>>=1 ) + 18c: 96 95 lsr r25 + 18e: fa cf rjmp .-12 ; 0x184 + br.word >>= 1; + br.word--; + 190: 21 50 subi r18, 0x01 ; 1 + 192: 31 09 sbc r19, r1 + +#ifdef _AVR_IO441_H_ + UBRR0L = br.bytes[0] << 1; +#else + UBRR0L = br.bytes[0]; + 194: 20 93 81 00 sts 0x0081, r18 ; 0x800081 <__EEPROM_REGION_LENGTH__+0x7f0081> + UBRR0H = br.bytes[1]; + 198: 30 93 82 00 sts 0x0082, r19 ; 0x800082 <__EEPROM_REGION_LENGTH__+0x7f0082> + UCSR0A = (1< +#endif + UCSR0B = (1< + + memcpy( modeBuffer, data, 7 ); + 1a8: 97 e0 ldi r25, 0x07 ; 7 + 1aa: ad e1 ldi r26, 0x1D ; 29 + 1ac: b1 e0 ldi r27, 0x01 ; 1 + 1ae: 01 90 ld r0, Z+ + 1b0: 0d 92 st X+, r0 + 1b2: 9a 95 dec r25 + 1b4: e1 f7 brne .-8 ; 0x1ae + return 1; +} + 1b6: 81 e0 ldi r24, 0x01 ; 1 + 1b8: 08 95 ret + +000001ba : + +static uchar iwptr, uwptr, irptr; +static uchar rx_buf[RX_SIZE], tx_buf[TX_SIZE]; + +void usbFunctionWriteOut( uchar *data, uchar len ) +{ + 1ba: 20 91 1b 01 lds r18, 0x011B ; 0x80011b + + /* usb -> rs232c: transmit char */ + for( ; len; len-- ) { + 1be: 66 23 and r22, r22 + 1c0: 61 f0 breq .+24 ; 0x1da + tx_buf[uwptr++] = *data++; + 1c2: fc 01 movw r30, r24 + 1c4: 31 91 ld r19, Z+ + 1c6: cf 01 movw r24, r30 + 1c8: e2 2f mov r30, r18 + 1ca: f0 e0 ldi r31, 0x00 ; 0 + 1cc: ee 5f subi r30, 0xFE ; 254 + 1ce: fe 4f sbci r31, 0xFE ; 254 + 1d0: 30 83 st Z, r19 + uwptr &= TX_MASK; + 1d2: 2f 5f subi r18, 0xFF ; 255 + 1d4: 2f 70 andi r18, 0x0F ; 15 + +void usbFunctionWriteOut( uchar *data, uchar len ) +{ + + /* usb -> rs232c: transmit char */ + for( ; len; len-- ) { + 1d6: 61 50 subi r22, 0x01 ; 1 + 1d8: f2 cf rjmp .-28 ; 0x1be + 1da: 20 93 1b 01 sts 0x011B, r18 ; 0x80011b + tx_buf[uwptr++] = *data++; + uwptr &= TX_MASK; + } + + /* postpone receiving next data */ + usbDisableAllRequests(); + 1de: 8f ef ldi r24, 0xFF ; 255 + 1e0: 80 93 43 01 sts 0x0143, r24 ; 0x800143 + 1e4: 08 95 ret + +000001e6 : +/* ------------------------------------------------------------------------- */ + +#if !USB_CFG_SUPPRESS_INTR_CODE +#if USB_CFG_HAVE_INTRIN_ENDPOINT +static void usbGenericSetInterrupt(uchar *data, uchar len, usbTxStatus_t *txStatus) +{ + 1e6: 1f 93 push r17 + 1e8: cf 93 push r28 + 1ea: df 93 push r29 + 1ec: 16 2f mov r17, r22 + 1ee: ea 01 movw r28, r20 + +#if USB_CFG_IMPLEMENT_HALT + if(usbTxLen1 == USBPID_STALL) + return; +#endif + if(txStatus->len & 0x10){ /* packet buffer was empty */ + 1f0: 28 81 ld r18, Y + 1f2: 24 ff sbrs r18, 4 + 1f4: 05 c0 rjmp .+10 ; 0x200 <__stack+0x1> + txStatus->buffer[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* toggle token */ + 1f6: 39 81 ldd r19, Y+1 ; 0x01 + 1f8: 28 e8 ldi r18, 0x88 ; 136 + 1fa: 23 27 eor r18, r19 + 1fc: 29 83 std Y+1, r18 ; 0x01 + 1fe: 02 c0 rjmp .+4 ; 0x204 <__stack+0x5> + }else{ + txStatus->len = USBPID_NAK; /* avoid sending outdated (overwritten) interrupt data */ + 200: 2a e5 ldi r18, 0x5A ; 90 + 202: 28 83 st Y, r18 + } + p = txStatus->buffer + 1; + i = len; + 204: 21 2f mov r18, r17 + 206: fc 01 movw r30, r24 + if(txStatus->len & 0x10){ /* packet buffer was empty */ + txStatus->buffer[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* toggle token */ + }else{ + txStatus->len = USBPID_NAK; /* avoid sending outdated (overwritten) interrupt data */ + } + p = txStatus->buffer + 1; + 208: ce 01 movw r24, r28 + 20a: 02 96 adiw r24, 0x02 ; 2 + i = len; + 20c: dc 01 movw r26, r24 + do{ /* if len == 0, we still copy 1 byte, but that's no problem */ + *p++ = *data++; + 20e: 31 91 ld r19, Z+ + 210: 3d 93 st X+, r19 + 212: 21 50 subi r18, 0x01 ; 1 + }while(--i > 0); /* loop control at the end is 2 bytes shorter than at beginning */ + 214: 12 16 cp r1, r18 + 216: dc f3 brlt .-10 ; 0x20e <__stack+0xf> + usbCrc16Append(&txStatus->buffer[1], len); + 218: 61 2f mov r22, r17 + 21a: 69 d1 rcall .+722 ; 0x4ee + txStatus->len = len + 4; /* len must be given including sync byte */ + 21c: 1c 5f subi r17, 0xFC ; 252 + 21e: 18 83 st Y, r17 + DBG2(0x21 + (((int)txStatus >> 3) & 3), txStatus->buffer, len + 3); +} + 220: df 91 pop r29 + 222: cf 91 pop r28 + 224: 1f 91 pop r17 + 226: 08 95 ret + +00000228 : + +USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len) +{ + usbGenericSetInterrupt(data, len, &usbTxStatus1); + 228: 42 e3 ldi r20, 0x32 ; 50 + 22a: 51 e0 ldi r21, 0x01 ; 1 + 22c: dc cf rjmp .-72 ; 0x1e6 + +0000022e : +#endif + +#if USB_CFG_HAVE_INTRIN_ENDPOINT3 +USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len) +{ + usbGenericSetInterrupt(data, len, &usbTxStatus3); + 22e: 4d e5 ldi r20, 0x5D ; 93 + 230: 51 e0 ldi r21, 0x01 ; 1 + 232: d9 cf rjmp .-78 ; 0x1e6 + +00000234 : +} + +/* ------------------------------------------------------------------------- */ + +USB_PUBLIC void usbPoll(void) +{ + 234: cf 93 push r28 + 236: df 93 push r29 +schar len; +uchar i; + + len = usbRxLen - 3; + 238: 60 91 43 01 lds r22, 0x0143 ; 0x800143 + 23c: 63 50 subi r22, 0x03 ; 3 + if(len >= 0){ + 23e: 67 fd sbrc r22, 7 + 240: b3 c0 rjmp .+358 ; 0x3a8 + * need data integrity checks with this driver, check the CRC in your app + * code and report errors back to the host. Since the ACK was already sent, + * retries must be handled on application level. + * unsigned crc = usbCrc16(buffer + 1, usbRxLen - 3); + */ + usbProcessRx(usbRxBuf + USB_BUFSIZE + 1 - usbInputBufOffset, len); + 242: 80 91 40 01 lds r24, 0x0140 ; 0x800140 + 246: cc e0 ldi r28, 0x0C ; 12 + 248: d0 e0 ldi r29, 0x00 ; 0 + 24a: c8 1b sub r28, r24 + 24c: d1 09 sbc r29, r1 + 24e: c9 5b subi r28, 0xB9 ; 185 + 250: de 4f sbci r29, 0xFE ; 254 + * 0...0x0f for OUT on endpoint X + */ + DBG2(0x10 + (usbRxToken & 0xf), data, len + 2); /* SETUP=1d, SETUP-DATA=11, OUTx=1x */ + USB_RX_USER_HOOK(data, len) +#if USB_CFG_IMPLEMENT_FN_WRITEOUT + if(usbRxToken < 0x10){ /* OUT to endpoint != 0: endpoint number in usbRxToken */ + 252: 80 91 3f 01 lds r24, 0x013F ; 0x80013f + 256: 80 31 cpi r24, 0x10 ; 16 + 258: 18 f4 brcc .+6 ; 0x260 + usbFunctionWriteOut(data, len); + 25a: ce 01 movw r24, r28 + 25c: ae df rcall .-164 ; 0x1ba + 25e: 9e c0 rjmp .+316 ; 0x39c + return; + } +#endif + if(usbRxToken == (uchar)USBPID_SETUP){ + 260: 8d 32 cpi r24, 0x2D ; 45 + 262: 09 f0 breq .+2 ; 0x266 + 264: 8c c0 rjmp .+280 ; 0x37e + if(len != 8) /* Setup size must be always 8 bytes. Ignore otherwise. */ + 266: 68 30 cpi r22, 0x08 ; 8 + 268: 09 f0 breq .+2 ; 0x26c + 26a: 98 c0 rjmp .+304 ; 0x39c + return; + usbMsgLen_t replyLen; + usbTxBuf[0] = USBPID_DATA0; /* initialize data toggling */ + 26c: 83 ec ldi r24, 0xC3 ; 195 + 26e: 80 93 27 01 sts 0x0127, r24 ; 0x800127 + usbTxLen = USBPID_NAK; /* abort pending transmit */ + 272: 8a e5 ldi r24, 0x5A ; 90 + 274: 80 93 01 01 sts 0x0101, r24 ; 0x800101 + usbMsgFlags = 0; + 278: 10 92 26 01 sts 0x0126, r1 ; 0x800126 + uchar type = rq->bmRequestType & USBRQ_TYPE_MASK; + if(type != USBRQ_TYPE_STANDARD){ /* standard requests are handled by driver */ + 27c: 88 81 ld r24, Y + 27e: 80 76 andi r24, 0x60 ; 96 + 280: 19 f0 breq .+6 ; 0x288 + replyLen = usbFunctionSetup(data); + 282: ce 01 movw r24, r28 + 284: 52 df rcall .-348 ; 0x12a + 286: 68 c0 rjmp .+208 ; 0x358 + * standard requests instead of class and custom requests. + */ +static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq) +{ +uchar len = 0, *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */ +uchar value = rq->wValue.bytes[0]; + 288: 9a 81 ldd r25, Y+2 ; 0x02 +#if USB_CFG_IMPLEMENT_HALT +uchar index = rq->wIndex.bytes[0]; +#endif + + dataPtr[0] = 0; /* default reply common to USBRQ_GET_STATUS and USBRQ_GET_INTERFACE */ + 28a: 10 92 30 01 sts 0x0130, r1 ; 0x800130 + SWITCH_START(rq->bRequest) + 28e: 89 81 ldd r24, Y+1 ; 0x01 + SWITCH_CASE(USBRQ_GET_STATUS) /* 0 */ + 290: 81 11 cpse r24, r1 + 292: 06 c0 rjmp .+12 ; 0x2a0 + dataPtr[0] = USB_CFG_IS_SELF_POWERED; +#if USB_CFG_IMPLEMENT_HALT + if(recipient == USBRQ_RCPT_ENDPOINT && index == 0x81) /* request status for endpoint 1 */ + dataPtr[0] = usbTxLen1 == USBPID_STALL; +#endif + dataPtr[1] = 0; + 294: 10 92 31 01 sts 0x0131, r1 ; 0x800131 +/* usbDriverSetup() is similar to usbFunctionSetup(), but it's used for + * standard requests instead of class and custom requests. + */ +static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq) +{ +uchar len = 0, *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */ + 298: 20 e3 ldi r18, 0x30 ; 48 + 29a: 31 e0 ldi r19, 0x01 ; 1 +#if USB_CFG_IMPLEMENT_HALT + if(recipient == USBRQ_RCPT_ENDPOINT && index == 0x81) /* request status for endpoint 1 */ + dataPtr[0] = usbTxLen1 == USBPID_STALL; +#endif + dataPtr[1] = 0; + len = 2; + 29c: 82 e0 ldi r24, 0x02 ; 2 + 29e: 57 c0 rjmp .+174 ; 0x34e + if(value == 0 && index == 0x81){ /* feature 0 == HALT for endpoint == 1 */ + usbTxLen1 = rq->bRequest == USBRQ_CLEAR_FEATURE ? USBPID_NAK : USBPID_STALL; + usbResetDataToggling(); + } +#endif + SWITCH_CASE(USBRQ_SET_ADDRESS) /* 5 */ + 2a0: 85 30 cpi r24, 0x05 ; 5 + 2a2: 19 f4 brne .+6 ; 0x2aa + usbNewDeviceAddr = value; + 2a4: 90 93 44 01 sts 0x0144, r25 ; 0x800144 + 2a8: 4f c0 rjmp .+158 ; 0x348 + USB_SET_ADDRESS_HOOK(); + SWITCH_CASE(USBRQ_GET_DESCRIPTOR) /* 6 */ + 2aa: 86 30 cpi r24, 0x06 ; 6 + 2ac: a9 f5 brne .+106 ; 0x318 +static inline usbMsgLen_t usbDriverDescriptor(usbRequest_t *rq) +{ +usbMsgLen_t len = 0; +uchar flags = USB_FLG_MSGPTR_IS_ROM; + + SWITCH_START(rq->wValue.bytes[1]) + 2ae: 8b 81 ldd r24, Y+3 ; 0x03 + SWITCH_CASE(USBDESCR_DEVICE) /* 1 */ + 2b0: 81 30 cpi r24, 0x01 ; 1 + 2b2: 41 f4 brne .+16 ; 0x2c4 + GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_DEVICE, usbDescriptorDevice) + 2b4: 8f e7 ldi r24, 0x7F ; 127 + 2b6: 90 e0 ldi r25, 0x00 ; 0 + 2b8: 90 93 42 01 sts 0x0142, r25 ; 0x800142 + 2bc: 80 93 41 01 sts 0x0141, r24 ; 0x800141 + 2c0: 82 e1 ldi r24, 0x12 ; 18 + 2c2: 26 c0 rjmp .+76 ; 0x310 + SWITCH_CASE(USBDESCR_CONFIG) /* 2 */ + 2c4: 82 30 cpi r24, 0x02 ; 2 + 2c6: 19 f4 brne .+6 ; 0x2ce + GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_CONFIGURATION, usbDescriptorConfiguration) + 2c8: ce 01 movw r24, r28 + 2ca: 1a df rcall .-460 ; 0x100 + 2cc: 21 c0 rjmp .+66 ; 0x310 + SWITCH_CASE(USBDESCR_STRING) /* 3 */ + 2ce: 83 30 cpi r24, 0x03 ; 3 + 2d0: f1 f4 brne .+60 ; 0x30e + if(USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_RAM) + flags = 0; + len = usbFunctionDescriptor(rq); +#else /* USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_DYNAMIC */ + SWITCH_START(rq->wValue.bytes[0]) + SWITCH_CASE(0) + 2d2: 91 11 cpse r25, r1 + 2d4: 08 c0 rjmp .+16 ; 0x2e6 + GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_0, usbDescriptorString0) + 2d6: 83 ec ldi r24, 0xC3 ; 195 + 2d8: 90 e0 ldi r25, 0x00 ; 0 + 2da: 90 93 42 01 sts 0x0142, r25 ; 0x800142 + 2de: 80 93 41 01 sts 0x0141, r24 ; 0x800141 + 2e2: 84 e0 ldi r24, 0x04 ; 4 + 2e4: 15 c0 rjmp .+42 ; 0x310 + SWITCH_CASE(1) + 2e6: 91 30 cpi r25, 0x01 ; 1 + 2e8: 41 f4 brne .+16 ; 0x2fa + GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_VENDOR, usbDescriptorStringVendor) + 2ea: 81 ea ldi r24, 0xA1 ; 161 + 2ec: 90 e0 ldi r25, 0x00 ; 0 + 2ee: 90 93 42 01 sts 0x0142, r25 ; 0x800142 + 2f2: 80 93 41 01 sts 0x0141, r24 ; 0x800141 + 2f6: 82 e2 ldi r24, 0x22 ; 34 + 2f8: 0b c0 rjmp .+22 ; 0x310 + SWITCH_CASE(2) + 2fa: 92 30 cpi r25, 0x02 ; 2 + 2fc: 41 f4 brne .+16 ; 0x30e + GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_PRODUCT, usbDescriptorStringDevice) + 2fe: 81 e9 ldi r24, 0x91 ; 145 + 300: 90 e0 ldi r25, 0x00 ; 0 + 302: 90 93 42 01 sts 0x0142, r25 ; 0x800142 + 306: 80 93 41 01 sts 0x0141, r24 ; 0x800141 + 30a: 80 e1 ldi r24, 0x10 ; 16 + 30c: 01 c0 rjmp .+2 ; 0x310 +/* usbDriverDescriptor() is similar to usbFunctionDescriptor(), but used + * internally for all types of descriptors. + */ +static inline usbMsgLen_t usbDriverDescriptor(usbRequest_t *rq) +{ +usbMsgLen_t len = 0; + 30e: 80 e0 ldi r24, 0x00 ; 0 + SWITCH_DEFAULT + if(USB_CFG_DESCR_PROPS_UNKNOWN & USB_PROP_IS_DYNAMIC){ + len = usbFunctionDescriptor(rq); + } + SWITCH_END + usbMsgFlags = flags; + 310: 90 e4 ldi r25, 0x40 ; 64 + 312: 90 93 26 01 sts 0x0126, r25 ; 0x800126 + 316: 20 c0 rjmp .+64 ; 0x358 + usbNewDeviceAddr = value; + USB_SET_ADDRESS_HOOK(); + SWITCH_CASE(USBRQ_GET_DESCRIPTOR) /* 6 */ + len = usbDriverDescriptor(rq); + goto skipMsgPtrAssignment; + SWITCH_CASE(USBRQ_GET_CONFIGURATION) /* 8 */ + 318: 88 30 cpi r24, 0x08 ; 8 + 31a: 79 f0 breq .+30 ; 0x33a + dataPtr = &usbConfiguration; /* send current configuration value */ + len = 1; + SWITCH_CASE(USBRQ_SET_CONFIGURATION) /* 9 */ + 31c: 89 30 cpi r24, 0x09 ; 9 + 31e: 19 f4 brne .+6 ; 0x326 + usbConfiguration = value; + 320: 90 93 46 01 sts 0x0146, r25 ; 0x800146 + 324: 11 c0 rjmp .+34 ; 0x348 + usbResetStall(); + SWITCH_CASE(USBRQ_GET_INTERFACE) /* 10 */ + 326: 8a 30 cpi r24, 0x0A ; 10 + 328: 59 f0 breq .+22 ; 0x340 + len = 1; +#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE + SWITCH_CASE(USBRQ_SET_INTERFACE) /* 11 */ + 32a: 8b 30 cpi r24, 0x0B ; 11 + 32c: 69 f4 brne .+26 ; 0x348 +/* ------------------------------------------------------------------------- */ + +static inline void usbResetDataToggling(void) +{ +#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE + USB_SET_DATATOKEN1(USB_INITIAL_DATATOKEN); /* reset data toggling for interrupt endpoint */ + 32e: 8b e4 ldi r24, 0x4B ; 75 + 330: 80 93 33 01 sts 0x0133, r24 ; 0x800133 +# if USB_CFG_HAVE_INTRIN_ENDPOINT3 + USB_SET_DATATOKEN3(USB_INITIAL_DATATOKEN); /* reset data toggling for interrupt endpoint */ + 334: 80 93 5e 01 sts 0x015E, r24 ; 0x80015e + 338: 07 c0 rjmp .+14 ; 0x348 + USB_SET_ADDRESS_HOOK(); + SWITCH_CASE(USBRQ_GET_DESCRIPTOR) /* 6 */ + len = usbDriverDescriptor(rq); + goto skipMsgPtrAssignment; + SWITCH_CASE(USBRQ_GET_CONFIGURATION) /* 8 */ + dataPtr = &usbConfiguration; /* send current configuration value */ + 33a: 26 e4 ldi r18, 0x46 ; 70 + 33c: 31 e0 ldi r19, 0x01 ; 1 + 33e: 02 c0 rjmp .+4 ; 0x344 +/* usbDriverSetup() is similar to usbFunctionSetup(), but it's used for + * standard requests instead of class and custom requests. + */ +static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq) +{ +uchar len = 0, *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */ + 340: 20 e3 ldi r18, 0x30 ; 48 + 342: 31 e0 ldi r19, 0x01 ; 1 + len = 1; + SWITCH_CASE(USBRQ_SET_CONFIGURATION) /* 9 */ + usbConfiguration = value; + usbResetStall(); + SWITCH_CASE(USBRQ_GET_INTERFACE) /* 10 */ + len = 1; + 344: 81 e0 ldi r24, 0x01 ; 1 + 346: 03 c0 rjmp .+6 ; 0x34e +/* usbDriverSetup() is similar to usbFunctionSetup(), but it's used for + * standard requests instead of class and custom requests. + */ +static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq) +{ +uchar len = 0, *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */ + 348: 20 e3 ldi r18, 0x30 ; 48 + 34a: 31 e0 ldi r19, 0x01 ; 1 + 34c: 80 e0 ldi r24, 0x00 ; 0 + usbResetStall(); +#endif + SWITCH_DEFAULT /* 7=SET_DESCRIPTOR, 12=SYNC_FRAME */ + /* Should we add an optional hook here? */ + SWITCH_END + usbMsgPtr = dataPtr; + 34e: 30 93 42 01 sts 0x0142, r19 ; 0x800142 + 352: 20 93 41 01 sts 0x0141, r18 ; 0x800141 + 356: 09 c0 rjmp .+18 ; 0x36a + replyLen = usbFunctionSetup(data); + }else{ + replyLen = usbDriverSetup(rq); + } +#if USB_CFG_IMPLEMENT_FN_READ || USB_CFG_IMPLEMENT_FN_WRITE + if(replyLen == USB_NO_MSG){ /* use user-supplied read/write function */ + 358: 8f 3f cpi r24, 0xFF ; 255 + 35a: 39 f4 brne .+14 ; 0x36a + /* do some conditioning on replyLen, but on IN transfers only */ + if((rq->bmRequestType & USBRQ_DIR_MASK) != USBRQ_DIR_HOST_TO_DEVICE){ + 35c: 98 81 ld r25, Y + 35e: 97 fd sbrc r25, 7 + if(sizeof(replyLen) < sizeof(rq->wLength.word)){ /* help compiler with optimizing */ + replyLen = rq->wLength.bytes[0]; + 360: 8e 81 ldd r24, Y+6 ; 0x06 + }else{ + replyLen = rq->wLength.word; + } + } + usbMsgFlags = USB_FLG_USE_USER_RW; + 362: 90 e8 ldi r25, 0x80 ; 128 + 364: 90 93 26 01 sts 0x0126, r25 ; 0x800126 + 368: 07 c0 rjmp .+14 ; 0x378 + }else /* The 'else' prevents that we limit a replyLen of USB_NO_MSG to the maximum transfer len. */ +#endif + if(sizeof(replyLen) < sizeof(rq->wLength.word)){ /* help compiler with optimizing */ + if(!rq->wLength.bytes[1] && replyLen > rq->wLength.bytes[0]) /* limit length to max */ + 36a: 9f 81 ldd r25, Y+7 ; 0x07 + 36c: 91 11 cpse r25, r1 + 36e: 04 c0 rjmp .+8 ; 0x378 + 370: 9e 81 ldd r25, Y+6 ; 0x06 + 372: 98 17 cp r25, r24 + 374: 08 f4 brcc .+2 ; 0x378 + 376: 89 2f mov r24, r25 + replyLen = rq->wLength.bytes[0]; + }else{ + if(replyLen > rq->wLength.word) /* limit length to max */ + replyLen = rq->wLength.word; + } + usbMsgLen = replyLen; + 378: 80 93 00 01 sts 0x0100, r24 ; 0x800100 <__data_start> + 37c: 0f c0 rjmp .+30 ; 0x39c + }else{ /* usbRxToken must be USBPID_OUT, which means data phase of setup (control-out) */ +#if USB_CFG_IMPLEMENT_FN_WRITE + if(usbMsgFlags & USB_FLG_USE_USER_RW){ + 37e: 80 91 26 01 lds r24, 0x0126 ; 0x800126 + 382: 87 ff sbrs r24, 7 + 384: 0b c0 rjmp .+22 ; 0x39c + uchar rval = usbFunctionWrite(data, len); + 386: ce 01 movw r24, r28 + 388: f0 de rcall .-544 ; 0x16a + if(rval == 0xff){ /* an error occurred */ + 38a: 8f 3f cpi r24, 0xFF ; 255 + 38c: 21 f4 brne .+8 ; 0x396 + usbTxLen = USBPID_STALL; + 38e: 8e e1 ldi r24, 0x1E ; 30 + 390: 80 93 01 01 sts 0x0101, r24 ; 0x800101 + 394: 03 c0 rjmp .+6 ; 0x39c + }else if(rval != 0){ /* This was the final package */ + 396: 81 11 cpse r24, r1 + usbMsgLen = 0; /* answer with a zero-sized data packet */ + 398: 10 92 00 01 sts 0x0100, r1 ; 0x800100 <__data_start> + * retries must be handled on application level. + * unsigned crc = usbCrc16(buffer + 1, usbRxLen - 3); + */ + usbProcessRx(usbRxBuf + USB_BUFSIZE + 1 - usbInputBufOffset, len); +#if USB_CFG_HAVE_FLOWCONTROL + if(usbRxLen > 0) /* only mark as available if not inactivated */ + 39c: 80 91 43 01 lds r24, 0x0143 ; 0x800143 + 3a0: 18 16 cp r1, r24 + 3a2: 14 f4 brge .+4 ; 0x3a8 + usbRxLen = 0; + 3a4: 10 92 43 01 sts 0x0143, r1 ; 0x800143 +#else + usbRxLen = 0; /* mark rx buffer as available */ +#endif + } + if(usbTxLen & 0x10){ /* transmit system idle */ + 3a8: 80 91 01 01 lds r24, 0x0101 ; 0x800101 + 3ac: 84 ff sbrs r24, 4 + 3ae: 55 c0 rjmp .+170 ; 0x45a <__LOCK_REGION_LENGTH__+0x5a> + if(usbMsgLen != USB_NO_MSG){ /* transmit data pending? */ + 3b0: 80 91 00 01 lds r24, 0x0100 ; 0x800100 <__data_start> + 3b4: 8f 3f cpi r24, 0xFF ; 255 + 3b6: 09 f4 brne .+2 ; 0x3ba + 3b8: 50 c0 rjmp .+160 ; 0x45a <__LOCK_REGION_LENGTH__+0x5a> + 3ba: c8 2f mov r28, r24 + 3bc: 89 30 cpi r24, 0x09 ; 9 + 3be: 08 f0 brcs .+2 ; 0x3c2 + 3c0: c8 e0 ldi r28, 0x08 ; 8 +uchar len; + + wantLen = usbMsgLen; + if(wantLen > 8) + wantLen = 8; + usbMsgLen -= wantLen; + 3c2: 8c 1b sub r24, r28 + 3c4: 80 93 00 01 sts 0x0100, r24 ; 0x800100 <__data_start> + usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */ + 3c8: 90 91 27 01 lds r25, 0x0127 ; 0x800127 + 3cc: 88 e8 ldi r24, 0x88 ; 136 + 3ce: 89 27 eor r24, r25 + 3d0: 80 93 27 01 sts 0x0127, r24 ; 0x800127 +/* This function is similar to usbFunctionRead(), but it's also called for + * data handled automatically by the driver (e.g. descriptor reads). + */ +static uchar usbDeviceRead(uchar *data, uchar len) +{ + if(len > 0){ /* don't bother app with 0 sized reads */ + 3d4: cc 23 and r28, r28 + 3d6: 09 f4 brne .+2 ; 0x3da + 3d8: 59 c0 rjmp .+178 ; 0x48c <__LOCK_REGION_LENGTH__+0x8c> +#if USB_CFG_IMPLEMENT_FN_READ + if(usbMsgFlags & USB_FLG_USE_USER_RW){ + 3da: 20 91 26 01 lds r18, 0x0126 ; 0x800126 + 3de: 27 ff sbrs r18, 7 + 3e0: 08 c0 rjmp .+16 ; 0x3f2 + len = usbFunctionRead(data, len); + 3e2: 6c 2f mov r22, r28 + 3e4: 88 e2 ldi r24, 0x28 ; 40 + 3e6: 91 e0 ldi r25, 0x01 ; 1 + 3e8: b6 de rcall .-660 ; 0x156 + 3ea: c8 2f mov r28, r24 + if(wantLen > 8) + wantLen = 8; + usbMsgLen -= wantLen; + usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */ + len = usbDeviceRead(usbTxBuf + 1, wantLen); + if(len <= 8){ /* valid data packet */ + 3ec: 89 30 cpi r24, 0x09 ; 9 + 3ee: 78 f5 brcc .+94 ; 0x44e <__LOCK_REGION_LENGTH__+0x4e> + 3f0: 23 c0 rjmp .+70 ; 0x438 <__LOCK_REGION_LENGTH__+0x38> + if(usbMsgFlags & USB_FLG_USE_USER_RW){ + len = usbFunctionRead(data, len); + }else +#endif + { + uchar i = len, *r = usbMsgPtr; + 3f2: 80 91 41 01 lds r24, 0x0141 ; 0x800141 + 3f6: 90 91 42 01 lds r25, 0x0142 ; 0x800142 + if(usbMsgFlags & USB_FLG_MSGPTR_IS_ROM){ /* ROM data */ + 3fa: 26 ff sbrs r18, 6 + 3fc: 0a c0 rjmp .+20 ; 0x412 <__LOCK_REGION_LENGTH__+0x12> + 3fe: a8 e2 ldi r26, 0x28 ; 40 + 400: b1 e0 ldi r27, 0x01 ; 1 + 402: fc 01 movw r30, r24 + 404: 2c 2f mov r18, r28 + do{ + uchar c = USB_READ_FLASH(r); /* assign to char size variable to enforce byte ops */ + 406: 34 91 lpm r19, Z + *data++ = c; + 408: 3d 93 st X+, r19 + r++; + 40a: 31 96 adiw r30, 0x01 ; 1 + }while(--i); + 40c: 21 50 subi r18, 0x01 ; 1 + 40e: d9 f7 brne .-10 ; 0x406 <__LOCK_REGION_LENGTH__+0x6> + 410: 08 c0 rjmp .+16 ; 0x422 <__LOCK_REGION_LENGTH__+0x22> + 412: dc 01 movw r26, r24 + 414: e8 e2 ldi r30, 0x28 ; 40 + 416: f1 e0 ldi r31, 0x01 ; 1 + len = usbFunctionRead(data, len); + }else +#endif + { + uchar i = len, *r = usbMsgPtr; + if(usbMsgFlags & USB_FLG_MSGPTR_IS_ROM){ /* ROM data */ + 418: 2c 2f mov r18, r28 + *data++ = c; + r++; + }while(--i); + }else{ /* RAM data */ + do{ + *data++ = *r++; + 41a: 3d 91 ld r19, X+ + 41c: 31 93 st Z+, r19 + }while(--i); + 41e: 21 50 subi r18, 0x01 ; 1 + 420: e1 f7 brne .-8 ; 0x41a <__LOCK_REGION_LENGTH__+0x1a> + 422: 2f ef ldi r18, 0xFF ; 255 + 424: 2c 0f add r18, r28 + 426: 30 e0 ldi r19, 0x00 ; 0 + 428: 2f 5f subi r18, 0xFF ; 255 + 42a: 3f 4f sbci r19, 0xFF ; 255 + 42c: 82 0f add r24, r18 + 42e: 93 1f adc r25, r19 + } + usbMsgPtr = r; + 430: 90 93 42 01 sts 0x0142, r25 ; 0x800142 + 434: 80 93 41 01 sts 0x0141, r24 ; 0x800141 + wantLen = 8; + usbMsgLen -= wantLen; + usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */ + len = usbDeviceRead(usbTxBuf + 1, wantLen); + if(len <= 8){ /* valid data packet */ + usbCrc16Append(&usbTxBuf[1], len); + 438: 6c 2f mov r22, r28 + 43a: 88 e2 ldi r24, 0x28 ; 40 + 43c: 91 e0 ldi r25, 0x01 ; 1 + 43e: 57 d0 rcall .+174 ; 0x4ee + len += 4; /* length including sync byte */ + 440: cc 5f subi r28, 0xFC ; 252 + if(len < 12) /* a partial package identifies end of message */ + 442: cc 30 cpi r28, 0x0C ; 12 + 444: 41 f0 breq .+16 ; 0x456 <__LOCK_REGION_LENGTH__+0x56> + usbMsgLen = USB_NO_MSG; + 446: 8f ef ldi r24, 0xFF ; 255 + 448: 80 93 00 01 sts 0x0100, r24 ; 0x800100 <__data_start> + 44c: 04 c0 rjmp .+8 ; 0x456 <__LOCK_REGION_LENGTH__+0x56> + }else{ + len = USBPID_STALL; /* stall the endpoint */ + usbMsgLen = USB_NO_MSG; + 44e: 8f ef ldi r24, 0xFF ; 255 + 450: 80 93 00 01 sts 0x0100, r24 ; 0x800100 <__data_start> + usbCrc16Append(&usbTxBuf[1], len); + len += 4; /* length including sync byte */ + if(len < 12) /* a partial package identifies end of message */ + usbMsgLen = USB_NO_MSG; + }else{ + len = USBPID_STALL; /* stall the endpoint */ + 454: ce e1 ldi r28, 0x1E ; 30 + usbMsgLen = USB_NO_MSG; + } + usbTxLen = len; + 456: c0 93 01 01 sts 0x0101, r28 ; 0x800101 + if(usbTxLen & 0x10){ /* transmit system idle */ + if(usbMsgLen != USB_NO_MSG){ /* transmit data pending? */ + usbBuildTxBlock(); + } + } + for(i = 20; i > 0; i--){ + 45a: 84 e1 ldi r24, 0x14 ; 20 + uchar usbLineStatus = USBIN & USBMASK; + 45c: 96 b3 in r25, 0x16 ; 22 + if(usbLineStatus != 0) /* SE0 has ended */ + 45e: 96 70 andi r25, 0x06 ; 6 + 460: 31 f4 brne .+12 ; 0x46e <__LOCK_REGION_LENGTH__+0x6e> + if(usbTxLen & 0x10){ /* transmit system idle */ + if(usbMsgLen != USB_NO_MSG){ /* transmit data pending? */ + usbBuildTxBlock(); + } + } + for(i = 20; i > 0; i--){ + 462: 81 50 subi r24, 0x01 ; 1 + 464: d9 f7 brne .-10 ; 0x45c <__LOCK_REGION_LENGTH__+0x5c> + uchar usbLineStatus = USBIN & USBMASK; + if(usbLineStatus != 0) /* SE0 has ended */ + goto isNotReset; + } + /* RESET condition, called multiple times during reset */ + usbNewDeviceAddr = 0; + 466: 10 92 44 01 sts 0x0144, r1 ; 0x800144 + usbDeviceAddr = 0; + 46a: 10 92 3e 01 sts 0x013E, r1 ; 0x80013e + +static inline void usbHandleResetHook(uchar notResetState) +{ +#ifdef USB_RESET_HOOK +static uchar wasReset; +uchar isReset = !notResetState; + 46e: c1 e0 ldi r28, 0x01 ; 1 + 470: 81 11 cpse r24, r1 + 472: c0 e0 ldi r28, 0x00 ; 0 + + if(wasReset != isReset){ + 474: 90 91 25 01 lds r25, 0x0125 ; 0x800125 + 478: c9 17 cp r28, r25 + 47a: 71 f0 breq .+28 ; 0x498 <__LOCK_REGION_LENGTH__+0x98> + USB_RESET_HOOK(isReset); + 47c: 88 23 and r24, r24 + 47e: 19 f0 breq .+6 ; 0x486 <__LOCK_REGION_LENGTH__+0x86> + 480: f8 94 cli + 482: c3 d1 rcall .+902 ; 0x80a + 484: 78 94 sei + wasReset = isReset; + 486: c0 93 25 01 sts 0x0125, r28 ; 0x800125 + usbDeviceAddr = 0; + usbResetStall(); + DBG1(0xff, 0, 0); +isNotReset: + usbHandleResetHook(i); +} + 48a: 06 c0 rjmp .+12 ; 0x498 <__LOCK_REGION_LENGTH__+0x98> + wantLen = 8; + usbMsgLen -= wantLen; + usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */ + len = usbDeviceRead(usbTxBuf + 1, wantLen); + if(len <= 8){ /* valid data packet */ + usbCrc16Append(&usbTxBuf[1], len); + 48c: 60 e0 ldi r22, 0x00 ; 0 + 48e: 88 e2 ldi r24, 0x28 ; 40 + 490: 91 e0 ldi r25, 0x01 ; 1 + 492: 2d d0 rcall .+90 ; 0x4ee + len += 4; /* length including sync byte */ + 494: c4 e0 ldi r28, 0x04 ; 4 + 496: d7 cf rjmp .-82 ; 0x446 <__LOCK_REGION_LENGTH__+0x46> + usbDeviceAddr = 0; + usbResetStall(); + DBG1(0xff, 0, 0); +isNotReset: + usbHandleResetHook(i); +} + 498: df 91 pop r29 + 49a: cf 91 pop r28 + 49c: 08 95 ret + +0000049e : +/* ------------------------------------------------------------------------- */ + +USB_PUBLIC void usbInit(void) +{ +#if USB_INTR_CFG_SET != 0 + USB_INTR_CFG |= USB_INTR_CFG_SET; + 49e: 85 b7 in r24, 0x35 ; 53 + 4a0: 82 60 ori r24, 0x02 ; 2 + 4a2: 85 bf out 0x35, r24 ; 53 +#endif +#if USB_INTR_CFG_CLR != 0 + USB_INTR_CFG &= ~(USB_INTR_CFG_CLR); +#endif + USB_INTR_ENABLE |= (1 << USB_INTR_ENABLE_BIT); + 4a4: 8b b7 in r24, 0x3b ; 59 + 4a6: 80 64 ori r24, 0x40 ; 64 + 4a8: 8b bf out 0x3b, r24 ; 59 +/* ------------------------------------------------------------------------- */ + +static inline void usbResetDataToggling(void) +{ +#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE + USB_SET_DATATOKEN1(USB_INITIAL_DATATOKEN); /* reset data toggling for interrupt endpoint */ + 4aa: a2 e3 ldi r26, 0x32 ; 50 + 4ac: b1 e0 ldi r27, 0x01 ; 1 + 4ae: 8b e4 ldi r24, 0x4B ; 75 + 4b0: 11 96 adiw r26, 0x01 ; 1 + 4b2: 8c 93 st X, r24 + 4b4: 11 97 sbiw r26, 0x01 ; 1 +# if USB_CFG_HAVE_INTRIN_ENDPOINT3 + USB_SET_DATATOKEN3(USB_INITIAL_DATATOKEN); /* reset data toggling for interrupt endpoint */ + 4b6: ed e5 ldi r30, 0x5D ; 93 + 4b8: f1 e0 ldi r31, 0x01 ; 1 + 4ba: 81 83 std Z+1, r24 ; 0x01 + USB_INTR_CFG &= ~(USB_INTR_CFG_CLR); +#endif + USB_INTR_ENABLE |= (1 << USB_INTR_ENABLE_BIT); + usbResetDataToggling(); +#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE + usbTxLen1 = USBPID_NAK; + 4bc: 8a e5 ldi r24, 0x5A ; 90 + 4be: 8c 93 st X, r24 +#if USB_CFG_HAVE_INTRIN_ENDPOINT3 + usbTxLen3 = USBPID_NAK; + 4c0: 80 83 st Z, r24 + 4c2: 08 95 ret + +000004c4 : +; poly r20+r21 +; scratch r23 +; resCrc r24+r25 / r16+r17 +; ptr X / Z +usbCrc16: + mov ptrL, argPtrL + 4c4: a8 2f mov r26, r24 + mov ptrH, argPtrH + 4c6: b9 2f mov r27, r25 + ldi resCrcL, 0 + 4c8: 80 e0 ldi r24, 0x00 ; 0 + ldi resCrcH, 0 + 4ca: 90 e0 ldi r25, 0x00 ; 0 + ldi polyL, lo8(0xa001) + 4cc: 41 e0 ldi r20, 0x01 ; 1 + ldi polyH, hi8(0xa001) + 4ce: 50 ea ldi r21, 0xA0 ; 160 + com argLen ; argLen = -argLen - 1: modified loop to ensure that carry is set + 4d0: 60 95 com r22 + ldi bitCnt, 0 ; loop counter with starnd condition = end condition + 4d2: 30 e0 ldi r19, 0x00 ; 0 + rjmp usbCrcLoopEntry + 4d4: 09 c0 rjmp .+18 ; 0x4e8 + +000004d6 : +usbCrcByteLoop: + ld byte, ptr+ + 4d6: 2d 91 ld r18, X+ + eor resCrcL, byte + 4d8: 82 27 eor r24, r18 + +000004da : +usbCrcBitLoop: + ror resCrcH ; carry is always set here (see brcs jumps to here) + 4da: 97 95 ror r25 + ror resCrcL + 4dc: 87 95 ror r24 + brcs usbCrcNoXor + 4de: 10 f0 brcs .+4 ; 0x4e4 + eor resCrcL, polyL + 4e0: 84 27 eor r24, r20 + eor resCrcH, polyH + 4e2: 95 27 eor r25, r21 + +000004e4 : +usbCrcNoXor: + subi bitCnt, 224 ; (8 * 224) % 256 = 0; this loop iterates 8 times + 4e4: 30 5e subi r19, 0xE0 ; 224 + brcs usbCrcBitLoop + 4e6: c8 f3 brcs .-14 ; 0x4da + +000004e8 : +usbCrcLoopEntry: + subi argLen, -1 + 4e8: 6f 5f subi r22, 0xFF ; 255 + brcs usbCrcByteLoop + 4ea: a8 f3 brcs .-22 ; 0x4d6 + +000004ec : +usbCrcReady: + ret + 4ec: 08 95 ret + +000004ee : + +#endif /* USB_USE_FAST_CRC */ + +; extern unsigned usbCrc16Append(unsigned char *data, unsigned char len); +usbCrc16Append: + rcall usbCrc16 + 4ee: ea df rcall .-44 ; 0x4c4 + st ptr+, resCrcL + 4f0: 8d 93 st X+, r24 + st ptr+, resCrcH + 4f2: 9d 93 st X+, r25 + ret + 4f4: 08 95 ret + +000004f6 : + +; extern unsigned usbMeasurePacketLength(void); +; returns time between two idle strobes in multiples of 7 CPU clocks +.global usbMeasureFrameLength +usbMeasureFrameLength: + ldi cntH, 6 ; wait ~ 10 ms for D- == 0 + 4f6: a6 e0 ldi r26, 0x06 ; 6 + clr cnt16L + 4f8: 88 27 eor r24, r24 + clr cnt16H + 4fa: 99 27 eor r25, r25 + +000004fc : +usbMFTime16: + dec cntH + 4fc: aa 95 dec r26 + breq usbMFTimeout + 4fe: 69 f0 breq .+26 ; 0x51a + +00000500 : +usbMFWaitStrobe: ; first wait for D- == 0 (idle strobe) + sbiw cnt16, 1 ;[0] [6] + 500: 01 97 sbiw r24, 0x01 ; 1 + breq usbMFTime16 ;[2] + 502: e1 f3 breq .-8 ; 0x4fc + sbic USBIN, USBMINUS ;[3] + 504: b2 99 sbic 0x16, 2 ; 22 + rjmp usbMFWaitStrobe ;[4] + 506: fc cf rjmp .-8 ; 0x500 + +00000508 : +usbMFWaitIdle: ; then wait until idle again + sbis USBIN, USBMINUS ;1 wait for D- == 1 + 508: b2 9b sbis 0x16, 2 ; 22 + rjmp usbMFWaitIdle ;2 + 50a: fe cf rjmp .-4 ; 0x508 + ldi cnt16L, 1 ;1 represents cycles so far + 50c: 81 e0 ldi r24, 0x01 ; 1 + clr cnt16H ;1 + 50e: 99 27 eor r25, r25 + +00000510 : +usbMFWaitLoop: + in cntH, USBIN ;[0] [7] + 510: a6 b3 in r26, 0x16 ; 22 + adiw cnt16, 1 ;[1] + 512: 01 96 adiw r24, 0x01 ; 1 + breq usbMFTimeout ;[3] + 514: 11 f0 breq .+4 ; 0x51a + andi cntH, USBMASK ;[4] + 516: a6 70 andi r26, 0x06 ; 6 + brne usbMFWaitLoop ;[5] + 518: d9 f7 brne .-10 ; 0x510 + +0000051a : +usbMFTimeout: +#if resL != cnt16L + mov resL, cnt16L + mov resH, cnt16H +#endif + ret + 51a: 08 95 ret + +0000051c <__vector_1>: +; when instruction starts + + +USB_INTR_VECTOR: +;order of registers pushed: YL, SREG [sofError], r0, YH, shift, x1, x2, x3, x4, cnt + push YL ;[-23] push only what is necessary to sync with edge ASAP + 51c: cf 93 push r28 + in YL, SREG ;[-21] + 51e: cf b7 in r28, 0x3f ; 63 + push YL ;[-20] + 520: cf 93 push r28 + +00000522 : +;sync up with J to K edge during sync pattern -- use fastest possible loops +;The first part waits at most 1 bit long since we must be in sync pattern. +;YL is guarenteed to be < 0x80 because I flag is clear. When we jump to +;waitForJ, ensure that this prerequisite is met. +waitForJ: + inc YL + 522: c3 95 inc r28 + sbis USBIN, USBMINUS + 524: b2 9b sbis 0x16, 2 ; 22 + brne waitForJ ; just make sure we have ANY timeout + 526: e9 f7 brne .-6 ; 0x522 + +00000528 : +waitForK: +;The following code results in a sampling window of < 1/4 bit which meets the spec. + sbis USBIN, USBMINUS ;[-15] + 528: b2 9b sbis 0x16, 2 ; 22 + rjmp foundK ;[-14] + 52a: 0b c0 rjmp .+22 ; 0x542 + sbis USBIN, USBMINUS + 52c: b2 9b sbis 0x16, 2 ; 22 + rjmp foundK + 52e: 09 c0 rjmp .+18 ; 0x542 + sbis USBIN, USBMINUS + 530: b2 9b sbis 0x16, 2 ; 22 + rjmp foundK + 532: 07 c0 rjmp .+14 ; 0x542 + sbis USBIN, USBMINUS + 534: b2 9b sbis 0x16, 2 ; 22 + rjmp foundK + 536: 05 c0 rjmp .+10 ; 0x542 + sbis USBIN, USBMINUS + 538: b2 9b sbis 0x16, 2 ; 22 + rjmp foundK + 53a: 03 c0 rjmp .+6 ; 0x542 + sbis USBIN, USBMINUS + 53c: b2 9b sbis 0x16, 2 ; 22 + rjmp foundK + 53e: 01 c0 rjmp .+2 ; 0x542 + sts usbSofCount, YL +#endif /* USB_COUNT_SOF */ +#ifdef USB_SOF_HOOK + USB_SOF_HOOK +#endif + rjmp sofError + 540: d8 c0 rjmp .+432 ; 0x6f2 + +00000542 : +foundK: ;[-12] +;{3, 5} after falling D- edge, average delay: 4 cycles [we want 5 for center sampling] +;we have 1 bit time for setup purposes, then sample again. Numbers in brackets +;are cycles from center of first sync (double K) bit after the instruction + push r0 ;[-12] + 542: 0f 92 push r0 +; [---] ;[-11] + push YH ;[-10] + 544: df 93 push r29 +; [---] ;[-9] + lds YL, usbInputBufOffset;[-8] + 546: c0 91 40 01 lds r28, 0x0140 ; 0x800140 +; [---] ;[-7] + clr YH ;[-6] + 54a: dd 27 eor r29, r29 + subi YL, lo8(-(usbRxBuf));[-5] [rx loop init] + 54c: c9 5b subi r28, 0xB9 ; 185 + sbci YH, hi8(-(usbRxBuf));[-4] [rx loop init] + 54e: de 4f sbci r29, 0xFE ; 254 + mov r0, x2 ;[-3] [rx loop init] + 550: 01 2e mov r0, r17 + sbis USBIN, USBMINUS ;[-2] we want two bits K (sample 2 cycles too early) + 552: b2 9b sbis 0x16, 2 ; 22 + rjmp haveTwoBitsK ;[-1] + 554: 03 c0 rjmp .+6 ; 0x55c + pop YH ;[0] undo the pushes from before + 556: df 91 pop r29 + pop r0 ;[2] + 558: 0f 90 pop r0 + rjmp waitForK ;[4] this was not the end of sync, retry + 55a: e6 cf rjmp .-52 ; 0x528 + +0000055c : + +;---------------------------------------------------------------------------- +; push more registers and initialize values while we sample the first bits: +;---------------------------------------------------------------------------- +haveTwoBitsK: ;[1] + push shift ;[1] + 55c: 2f 93 push r18 + push x1 ;[3] + 55e: 0f 93 push r16 + push x2 ;[5] + 560: 1f 93 push r17 + push x3 ;[7] + 562: 4f 93 push r20 + ldi shift, 0xff ;[9] [rx loop init] + 564: 2f ef ldi r18, 0xFF ; 255 + ori x3, 0xff ;[10] [rx loop init] == ser x3, clear zero flag + 566: 4f 6f ori r20, 0xFF ; 255 + + in x1, USBIN ;[11] <-- sample bit 0 + 568: 06 b3 in r16, 0x16 ; 22 + bst x1, USBMINUS ;[12] + 56a: 02 fb bst r16, 2 + bld shift, 0 ;[13] + 56c: 20 f9 bld r18, 0 + push x4 ;[14] == phase + 56e: 5f 93 push r21 +; [---] ;[15] + push cnt ;[16] + 570: 3f 93 push r19 +; [---] ;[17] + ldi phase, 0 ;[18] [rx loop init] + 572: 50 e0 ldi r21, 0x00 ; 0 + ldi cnt, USB_BUFSIZE;[19] [rx loop init] + 574: 3b e0 ldi r19, 0x0B ; 11 + rjmp rxbit1 ;[20] + 576: 65 c0 rjmp .+202 ; 0x642 + +00000578 : +bit 7: jump, fixup bitstuff +; 87 [+ 2] cycles +------------------------------------------------------------------ +*/ +continueWithBit5: + in x2, USBIN ;[055] <-- bit 5 + 578: 16 b3 in r17, 0x16 ; 22 + eor r0, x2 ;[056] + 57a: 01 26 eor r0, r17 + or phase, r0 ;[057] + 57c: 50 29 or r21, r0 + sbrc phase, USBMINUS ;[058] + 57e: 52 fd sbrc r21, 2 + lpm ;[059] optional nop3; modifies r0 + 580: c8 95 lpm + in phase, USBIN ;[060] <-- phase + 582: 56 b3 in r21, 0x16 ; 22 + eor x1, x2 ;[061] + 584: 01 27 eor r16, r17 + bst x1, USBMINUS ;[062] + 586: 02 fb bst r16, 2 + bld shift, 5 ;[063] + 588: 25 f9 bld r18, 5 + andi shift, 0x3f ;[064] + 58a: 2f 73 andi r18, 0x3F ; 63 + in x1, USBIN ;[065] <-- bit 6 + 58c: 06 b3 in r16, 0x16 ; 22 + breq unstuff5 ;[066] *** unstuff escape + 58e: b1 f0 breq .+44 ; 0x5bc + eor phase, x1 ;[067] + 590: 50 27 eor r21, r16 + eor x2, x1 ;[068] + 592: 10 27 eor r17, r16 + bst x2, USBMINUS ;[069] + 594: 12 fb bst r17, 2 + bld shift, 6 ;[070] + 596: 26 f9 bld r18, 6 + +00000598 : +didUnstuff6: ;[ ] + in r0, USBIN ;[071] <-- phase + 598: 06 b2 in r0, 0x16 ; 22 + cpi shift, 0x02 ;[072] + 59a: 22 30 cpi r18, 0x02 ; 2 + brlo unstuff6 ;[073] *** unstuff escape + 59c: f0 f0 brcs .+60 ; 0x5da + +0000059e : +didUnstuff5: ;[ ] + nop2 ;[074] + 59e: 00 c0 rjmp .+0 ; 0x5a0 +; [---] ;[075] + in x2, USBIN ;[076] <-- bit 7 + 5a0: 16 b3 in r17, 0x16 ; 22 + eor x1, x2 ;[077] + 5a2: 01 27 eor r16, r17 + bst x1, USBMINUS ;[078] + 5a4: 02 fb bst r16, 2 + bld shift, 7 ;[079] + 5a6: 27 f9 bld r18, 7 + +000005a8 : +didUnstuff7: ;[ ] + eor r0, x2 ;[080] + 5a8: 01 26 eor r0, r17 + or phase, r0 ;[081] + 5aa: 50 29 or r21, r0 + in r0, USBIN ;[082] <-- phase + 5ac: 06 b2 in r0, 0x16 ; 22 + cpi shift, 0x04 ;[083] + 5ae: 24 30 cpi r18, 0x04 ; 4 + brsh rxLoop ;[084] + 5b0: e8 f5 brcc .+122 ; 0x62c + +000005b2 : +; [---] ;[085] +unstuff7: ;[ ] + andi x3, ~0x80 ;[085] + 5b2: 4f 77 andi r20, 0x7F ; 127 + ori shift, 0x80 ;[086] + 5b4: 20 68 ori r18, 0x80 ; 128 + in x2, USBIN ;[087] <-- sample stuffed bit 7 + 5b6: 16 b3 in r17, 0x16 ; 22 + nop ;[088] + 5b8: 00 00 nop + rjmp didUnstuff7 ;[089] + 5ba: f6 cf rjmp .-20 ; 0x5a8 + +000005bc : +; [---] ;[090] + ;[080] + +unstuff5: ;[067] + eor phase, x1 ;[068] + 5bc: 50 27 eor r21, r16 + andi x3, ~0x20 ;[069] + 5be: 4f 7d andi r20, 0xDF ; 223 + ori shift, 0x20 ;[070] + 5c0: 20 62 ori r18, 0x20 ; 32 + in r0, USBIN ;[071] <-- phase + 5c2: 06 b2 in r0, 0x16 ; 22 + mov x2, x1 ;[072] + 5c4: 10 2f mov r17, r16 + nop ;[073] + 5c6: 00 00 nop + nop2 ;[074] + 5c8: 00 c0 rjmp .+0 ; 0x5ca +; [---] ;[075] + in x1, USBIN ;[076] <-- bit 6 + 5ca: 06 b3 in r16, 0x16 ; 22 + eor r0, x1 ;[077] + 5cc: 00 26 eor r0, r16 + or phase, r0 ;[078] + 5ce: 50 29 or r21, r0 + eor x2, x1 ;[079] + 5d0: 10 27 eor r17, r16 + bst x2, USBMINUS ;[080] + 5d2: 12 fb bst r17, 2 + bld shift, 6 ;[081] no need to check bitstuffing, we just had one + 5d4: 26 f9 bld r18, 6 + in r0, USBIN ;[082] <-- phase + 5d6: 06 b2 in r0, 0x16 ; 22 + rjmp didUnstuff5 ;[083] + 5d8: e2 cf rjmp .-60 ; 0x59e + +000005da : +; [---] ;[084] + ;[074] + +unstuff6: ;[074] + andi x3, ~0x40 ;[075] + 5da: 4f 7b andi r20, 0xBF ; 191 + in x1, USBIN ;[076] <-- bit 6 again + 5dc: 06 b3 in r16, 0x16 ; 22 + ori shift, 0x40 ;[077] + 5de: 20 64 ori r18, 0x40 ; 64 + nop2 ;[078] + 5e0: 00 c0 rjmp .+0 ; 0x5e2 +; [---] ;[079] + rjmp didUnstuff6 ;[080] + 5e2: da cf rjmp .-76 ; 0x598 + +000005e4 : +; [---] ;[081] + ;[071] + +unstuff0: ;[013] + eor r0, x2 ;[014] + 5e4: 01 26 eor r0, r17 + or phase, r0 ;[015] + 5e6: 50 29 or r21, r0 + andi x2, USBMASK ;[016] check for SE0 + 5e8: 16 70 andi r17, 0x06 ; 6 + in r0, USBIN ;[017] <-- phase + 5ea: 06 b2 in r0, 0x16 ; 22 + breq didUnstuff0 ;[018] direct jump to se0 would be too long + 5ec: 69 f1 breq .+90 ; 0x648 + andi x3, ~0x01 ;[019] + 5ee: 4e 7f andi r20, 0xFE ; 254 + ori shift, 0x01 ;[020] + 5f0: 21 60 ori r18, 0x01 ; 1 + mov x1, x2 ;[021] mov existing sample + 5f2: 01 2f mov r16, r17 + in x2, USBIN ;[022] <-- bit 1 again + 5f4: 16 b3 in r17, 0x16 ; 22 + rjmp didUnstuff0 ;[023] + 5f6: 28 c0 rjmp .+80 ; 0x648 + +000005f8 : +; [---] ;[024] + ;[014] + +unstuff1: ;[024] + eor r0, x1 ;[025] + 5f8: 00 26 eor r0, r16 + or phase, r0 ;[026] + 5fa: 50 29 or r21, r0 + andi x3, ~0x02 ;[027] + 5fc: 4d 7f andi r20, 0xFD ; 253 + in r0, USBIN ;[028] <-- phase + 5fe: 06 b2 in r0, 0x16 ; 22 + ori shift, 0x02 ;[029] + 600: 22 60 ori r18, 0x02 ; 2 + mov x2, x1 ;[030] + 602: 10 2f mov r17, r16 + rjmp didUnstuff1 ;[031] + 604: 29 c0 rjmp .+82 ; 0x658 + +00000606 : +; [---] ;[032] + ;[022] + +unstuff2: ;[035] + eor r0, x2 ;[036] + 606: 01 26 eor r0, r17 + or phase, r0 ;[037] + 608: 50 29 or r21, r0 + andi x3, ~0x04 ;[038] + 60a: 4b 7f andi r20, 0xFB ; 251 + in r0, USBIN ;[039] <-- phase + 60c: 06 b2 in r0, 0x16 ; 22 + ori shift, 0x04 ;[040] + 60e: 24 60 ori r18, 0x04 ; 4 + mov x1, x2 ;[041] + 610: 01 2f mov r16, r17 + rjmp didUnstuff2 ;[042] + 612: 2d c0 rjmp .+90 ; 0x66e + +00000614 : +; [---] ;[043] + ;[033] + +unstuff3: ;[043] + in x2, USBIN ;[044] <-- bit 3 again + 614: 16 b3 in r17, 0x16 ; 22 + eor r0, x2 ;[045] + 616: 01 26 eor r0, r17 + or phase, r0 ;[046] + 618: 50 29 or r21, r0 + andi x3, ~0x08 ;[047] + 61a: 47 7f andi r20, 0xF7 ; 247 + ori shift, 0x08 ;[048] + 61c: 28 60 ori r18, 0x08 ; 8 + nop ;[049] + 61e: 00 00 nop + in r0, USBIN ;[050] <-- phase + 620: 06 b2 in r0, 0x16 ; 22 + rjmp didUnstuff3 ;[051] + 622: 2e c0 rjmp .+92 ; 0x680 + +00000624 : +; [---] ;[052] + ;[042] + +unstuff4: ;[053] + andi x3, ~0x10 ;[054] + 624: 4f 7e andi r20, 0xEF ; 239 + in x1, USBIN ;[055] <-- bit 4 again + 626: 06 b3 in r16, 0x16 ; 22 + ori shift, 0x10 ;[056] + 628: 20 61 ori r18, 0x10 ; 16 + rjmp didUnstuff4 ;[057] + 62a: 30 c0 rjmp .+96 ; 0x68c + +0000062c : +; [---] ;[058] + ;[048] + +rxLoop: ;[085] + eor x3, shift ;[086] reconstruct: x3 is 0 at bit locations we changed, 1 at others + 62c: 42 27 eor r20, r18 + in x1, USBIN ;[000] <-- bit 0 + 62e: 06 b3 in r16, 0x16 ; 22 + st y+, x3 ;[001] + 630: 49 93 st Y+, r20 +; [---] ;[002] + eor r0, x1 ;[003] + 632: 00 26 eor r0, r16 + or phase, r0 ;[004] + 634: 50 29 or r21, r0 + eor x2, x1 ;[005] + 636: 10 27 eor r17, r16 + in r0, USBIN ;[006] <-- phase + 638: 06 b2 in r0, 0x16 ; 22 + ser x3 ;[007] + 63a: 4f ef ldi r20, 0xFF ; 255 + bst x2, USBMINUS ;[008] + 63c: 12 fb bst r17, 2 + bld shift, 0 ;[009] + 63e: 20 f9 bld r18, 0 + andi shift, 0xf9 ;[010] + 640: 29 7f andi r18, 0xF9 ; 249 + +00000642 : +rxbit1: ;[ ] + in x2, USBIN ;[011] <-- bit 1 + 642: 16 b3 in r17, 0x16 ; 22 + breq unstuff0 ;[012] *** unstuff escape + 644: 79 f2 breq .-98 ; 0x5e4 + andi x2, USBMASK ;[013] SE0 check for bit 1 + 646: 16 70 andi r17, 0x06 ; 6 + +00000648 : +didUnstuff0: ;[ ] Z only set if we detected SE0 in bitstuff + breq se0 ;[014] + 648: 59 f1 breq .+86 ; 0x6a0 + eor r0, x2 ;[015] + 64a: 01 26 eor r0, r17 + or phase, r0 ;[016] + 64c: 50 29 or r21, r0 + in r0, USBIN ;[017] <-- phase + 64e: 06 b2 in r0, 0x16 ; 22 + eor x1, x2 ;[018] + 650: 01 27 eor r16, r17 + bst x1, USBMINUS ;[019] + 652: 02 fb bst r16, 2 + bld shift, 1 ;[020] + 654: 21 f9 bld r18, 1 + andi shift, 0xf3 ;[021] + 656: 23 7f andi r18, 0xF3 ; 243 + +00000658 : +didUnstuff1: ;[ ] + in x1, USBIN ;[022] <-- bit 2 + 658: 06 b3 in r16, 0x16 ; 22 + breq unstuff1 ;[023] *** unstuff escape + 65a: 71 f2 breq .-100 ; 0x5f8 + eor r0, x1 ;[024] + 65c: 00 26 eor r0, r16 + or phase, r0 ;[025] + 65e: 50 29 or r21, r0 + subi cnt, 1 ;[026] overflow check + 660: 31 50 subi r19, 0x01 ; 1 + brcs overflow ;[027] + 662: d0 f0 brcs .+52 ; 0x698 + in r0, USBIN ;[028] <-- phase + 664: 06 b2 in r0, 0x16 ; 22 + eor x2, x1 ;[029] + 666: 10 27 eor r17, r16 + bst x2, USBMINUS ;[030] + 668: 12 fb bst r17, 2 + bld shift, 2 ;[031] + 66a: 22 f9 bld r18, 2 + andi shift, 0xe7 ;[032] + 66c: 27 7e andi r18, 0xE7 ; 231 + +0000066e : +didUnstuff2: ;[ ] + in x2, USBIN ;[033] <-- bit 3 + 66e: 16 b3 in r17, 0x16 ; 22 + breq unstuff2 ;[034] *** unstuff escape + 670: 51 f2 breq .-108 ; 0x606 + eor r0, x2 ;[035] + 672: 01 26 eor r0, r17 + or phase, r0 ;[036] + 674: 50 29 or r21, r0 + eor x1, x2 ;[037] + 676: 01 27 eor r16, r17 + bst x1, USBMINUS ;[038] + 678: 02 fb bst r16, 2 + in r0, USBIN ;[039] <-- phase + 67a: 06 b2 in r0, 0x16 ; 22 + bld shift, 3 ;[040] + 67c: 23 f9 bld r18, 3 + andi shift, 0xcf ;[041] + 67e: 2f 7c andi r18, 0xCF ; 207 + +00000680 : +didUnstuff3: ;[ ] + breq unstuff3 ;[042] *** unstuff escape + 680: 49 f2 breq .-110 ; 0x614 + nop ;[043] + 682: 00 00 nop + in x1, USBIN ;[044] <-- bit 4 + 684: 06 b3 in r16, 0x16 ; 22 + eor x2, x1 ;[045] + 686: 10 27 eor r17, r16 + bst x2, USBMINUS ;[046] + 688: 12 fb bst r17, 2 + bld shift, 4 ;[047] + 68a: 24 f9 bld r18, 4 + +0000068c : +didUnstuff4: ;[ ] + eor r0, x1 ;[048] + 68c: 00 26 eor r0, r16 + or phase, r0 ;[049] + 68e: 50 29 or r21, r0 + in r0, USBIN ;[050] <-- phase + 690: 06 b2 in r0, 0x16 ; 22 + andi shift, 0x9f ;[051] + 692: 2f 79 andi r18, 0x9F ; 159 + breq unstuff4 ;[052] *** unstuff escape + 694: 39 f2 breq .-114 ; 0x624 + rjmp continueWithBit5;[053] + 696: 70 cf rjmp .-288 ; 0x578 + +00000698 : +*/ + +#define token x1 + +overflow: + ldi x2, 1<: +ignorePacket: + clr token + 69c: 00 27 eor r16, r16 + rjmp storeTokenAndReturn + 69e: 1c c0 rjmp .+56 ; 0x6d8 + +000006a0 : +; Processing of received packet (numbers in brackets are cycles after center of SE0) +;---------------------------------------------------------------------------- +;This is the only non-error exit point for the software receiver loop +;we don't check any CRCs here because there is no time left. +se0: + subi cnt, USB_BUFSIZE ;[5] + 6a0: 3b 50 subi r19, 0x0B ; 11 + neg cnt ;[6] + 6a2: 31 95 neg r19 + sub YL, cnt ;[7] + 6a4: c3 1b sub r28, r19 + sbci YH, 0 ;[8] + 6a6: d0 40 sbci r29, 0x00 ; 0 + ldi x2, 1< + cpi token, USBPID_DATA1 ;[15] + 6b2: 0b 34 cpi r16, 0x4B ; 75 + breq handleData ;[16] + 6b4: 11 f1 breq .+68 ; 0x6fa + lds shift, usbDeviceAddr;[17] + 6b6: 20 91 3e 01 lds r18, 0x013E ; 0x80013e + ldd x2, y+1 ;[19] ADDR and 1 bit endpoint number + 6ba: 19 81 ldd r17, Y+1 ; 0x01 + lsl x2 ;[21] shift out 1 bit endpoint number + 6bc: 11 0f add r17, r17 + cpse x2, shift ;[22] + 6be: 12 13 cpse r17, r18 + rjmp ignorePacket ;[23] + 6c0: ed cf rjmp .-38 ; 0x69c +/* only compute endpoint number in x3 if required later */ +#if USB_CFG_HAVE_INTRIN_ENDPOINT || USB_CFG_IMPLEMENT_FN_WRITEOUT + ldd x3, y+2 ;[24] endpoint number + crc + 6c2: 4a 81 ldd r20, Y+2 ; 0x02 + rol x3 ;[26] shift in LSB of endpoint + 6c4: 44 1f adc r20, r20 +#endif + cpi token, USBPID_IN ;[27] + 6c6: 09 36 cpi r16, 0x69 ; 105 + breq handleIn ;[28] + 6c8: 69 f1 breq .+90 ; 0x724 + cpi token, USBPID_SETUP ;[29] + 6ca: 0d 32 cpi r16, 0x2D ; 45 + breq handleSetupOrOut ;[30] + 6cc: 11 f0 breq .+4 ; 0x6d2 + cpi token, USBPID_OUT ;[31] + 6ce: 01 3e cpi r16, 0xE1 ; 225 + brne ignorePacket ;[32] must be ack, nak or whatever + 6d0: 29 f7 brne .-54 ; 0x69c + +000006d2 : +;Setup and Out are followed by a data packet two bit times (16 cycles) after +;the end of SE0. The sync code allows up to 40 cycles delay from the start of +;the sync pattern until the first bit is sampled. That's a total of 56 cycles. +handleSetupOrOut: ;[32] +#if USB_CFG_IMPLEMENT_FN_WRITEOUT /* if we have data for endpoint != 0, set usbCurrentTok to address */ + andi x3, 0xf ;[32] + 6d2: 4f 70 andi r20, 0x0F ; 15 + breq storeTokenAndReturn ;[33] + 6d4: 09 f0 breq .+2 ; 0x6d8 + mov token, x3 ;[34] indicate that this is endpoint x OUT + 6d6: 04 2f mov r16, r20 + +000006d8 : +#endif +storeTokenAndReturn: + sts usbCurrentTok, token;[35] + 6d8: 00 93 45 01 sts 0x0145, r16 ; 0x800145 + +000006dc : +doReturn: + POP_STANDARD ;[37] 12...16 cycles + 6dc: 3f 91 pop r19 + 6de: 5f 91 pop r21 + 6e0: 4f 91 pop r20 + 6e2: 1f 91 pop r17 + 6e4: 0f 91 pop r16 + 6e6: 2f 91 pop r18 + 6e8: df 91 pop r29 + 6ea: 0f 90 pop r0 + USB_LOAD_PENDING(YL) ;[49] + 6ec: ca b7 in r28, 0x3a ; 58 + sbrc YL, USB_INTR_PENDING_BIT;[50] check whether data is already arriving + 6ee: c6 fd sbrc r28, 6 + rjmp waitForJ ;[51] save the pops and pushes -- a new interrupt is already pending + 6f0: 18 cf rjmp .-464 ; 0x522 + +000006f2 : +sofError: + POP_RETI ;macro call + 6f2: cf 91 pop r28 + 6f4: cf bf out 0x3f, r28 ; 63 + 6f6: cf 91 pop r28 + reti + 6f8: 18 95 reti + +000006fa : + +handleData: +#if USB_CFG_CHECK_CRC + CRC_CLEANUP_AND_CHECK ; jumps to ignorePacket if CRC error +#endif + lds shift, usbCurrentTok;[18] + 6fa: 20 91 45 01 lds r18, 0x0145 ; 0x800145 + tst shift ;[20] + 6fe: 22 23 and r18, r18 + breq doReturn ;[21] + 700: 69 f3 breq .-38 ; 0x6dc + lds x2, usbRxLen ;[22] + 702: 10 91 43 01 lds r17, 0x0143 ; 0x800143 + tst x2 ;[24] + 706: 11 23 and r17, r17 + brne sendNakAndReti ;[25] + 708: d1 f5 brne .+116 ; 0x77e +; 2006-03-11: The following two lines fix a problem where the device was not +; recognized if usbPoll() was called less frequently than once every 4 ms. + cpi cnt, 4 ;[26] zero sized data packets are status phase only -- ignore and ack + 70a: 34 30 cpi r19, 0x04 ; 4 + brmi sendAckAndReti ;[27] keep rx buffer clean -- we must not NAK next SETUP + 70c: d2 f1 brmi .+116 ; 0x782 +#if USB_CFG_CHECK_DATA_TOGGLING + sts usbCurrentDataToken, token ; store for checking by C code +#endif + sts usbRxLen, cnt ;[28] store received data, swap buffers + 70e: 30 93 43 01 sts 0x0143, r19 ; 0x800143 + sts usbRxToken, shift ;[30] + 712: 20 93 3f 01 sts 0x013F, r18 ; 0x80013f + lds x2, usbInputBufOffset;[32] swap buffers + 716: 10 91 40 01 lds r17, 0x0140 ; 0x800140 + ldi cnt, USB_BUFSIZE ;[34] + 71a: 3b e0 ldi r19, 0x0B ; 11 + sub cnt, x2 ;[35] + 71c: 31 1b sub r19, r17 + sts usbInputBufOffset, cnt;[36] buffers now swapped + 71e: 30 93 40 01 sts 0x0140, r19 ; 0x800140 + rjmp sendAckAndReti ;[38] 40 + 17 = 57 until SOP + 722: 2f c0 rjmp .+94 ; 0x782 + +00000724 : + +handleIn: +;We don't send any data as long as the C code has not processed the current +;input data and potentially updated the output data. That's more efficient +;in terms of code size than clearing the tx buffers when a packet is received. + lds x1, usbRxLen ;[30] + 724: 00 91 43 01 lds r16, 0x0143 ; 0x800143 + cpi x1, 1 ;[32] negative values are flow control, 0 means "buffer free" + 728: 01 30 cpi r16, 0x01 ; 1 + brge sendNakAndReti ;[33] unprocessed input packet? + 72a: 4c f5 brge .+82 ; 0x77e + ldi x1, USBPID_NAK ;[34] prepare value for usbTxLen + 72c: 0a e5 ldi r16, 0x5A ; 90 +#if USB_CFG_HAVE_INTRIN_ENDPOINT + andi x3, 0xf ;[35] x3 contains endpoint + 72e: 4f 70 andi r20, 0x0F ; 15 +#if USB_CFG_SUPPRESS_INTR_CODE + brne sendNakAndReti ;[36] +#else + brne handleIn1 ;[36] + 730: 49 f4 brne .+18 ; 0x744 +#endif +#endif + lds cnt, usbTxLen ;[37] + 732: 30 91 01 01 lds r19, 0x0101 ; 0x800101 + sbrc cnt, 4 ;[39] all handshake tokens have bit 4 set + 736: 34 fd sbrc r19, 4 + rjmp sendCntAndReti ;[40] 42 + 16 = 58 until SOP + 738: 25 c0 rjmp .+74 ; 0x784 + sts usbTxLen, x1 ;[41] x1 == USBPID_NAK from above + 73a: 00 93 01 01 sts 0x0101, r16 ; 0x800101 + ldi YL, lo8(usbTxBuf) ;[43] + 73e: c7 e2 ldi r28, 0x27 ; 39 + ldi YH, hi8(usbTxBuf) ;[44] + 740: d1 e0 ldi r29, 0x01 ; 1 + rjmp usbSendAndReti ;[45] 57 + 12 = 59 until SOP + 742: 24 c0 rjmp .+72 ; 0x78c + +00000744 : + +#if !USB_CFG_SUPPRESS_INTR_CODE && USB_CFG_HAVE_INTRIN_ENDPOINT /* placed here due to relative jump range */ +handleIn1: ;[38] +#if USB_CFG_HAVE_INTRIN_ENDPOINT3 +; 2006-06-10 as suggested by O.Tamura: support second INTR IN / BULK IN endpoint + cpi x3, USB_CFG_EP3_NUMBER;[38] + 744: 43 30 cpi r20, 0x03 ; 3 + breq handleIn3 ;[39] + 746: 49 f0 breq .+18 ; 0x75a +#endif + lds cnt, usbTxLen1 ;[40] + 748: 30 91 32 01 lds r19, 0x0132 ; 0x800132 + sbrc cnt, 4 ;[42] all handshake tokens have bit 4 set + 74c: 34 fd sbrc r19, 4 + rjmp sendCntAndReti ;[43] 47 + 16 = 63 until SOP + 74e: 1a c0 rjmp .+52 ; 0x784 + sts usbTxLen1, x1 ;[44] x1 == USBPID_NAK from above + 750: 00 93 32 01 sts 0x0132, r16 ; 0x800132 + ldi YL, lo8(usbTxBuf1) ;[46] + 754: c3 e3 ldi r28, 0x33 ; 51 + ldi YH, hi8(usbTxBuf1) ;[47] + 756: d1 e0 ldi r29, 0x01 ; 1 + rjmp usbSendAndReti ;[48] 50 + 12 = 62 until SOP + 758: 19 c0 rjmp .+50 ; 0x78c + +0000075a : + +#if USB_CFG_HAVE_INTRIN_ENDPOINT3 +handleIn3: + lds cnt, usbTxLen3 ;[41] + 75a: 30 91 5d 01 lds r19, 0x015D ; 0x80015d + sbrc cnt, 4 ;[43] + 75e: 34 fd sbrc r19, 4 + rjmp sendCntAndReti ;[44] 49 + 16 = 65 until SOP + 760: 11 c0 rjmp .+34 ; 0x784 + sts usbTxLen3, x1 ;[45] x1 == USBPID_NAK from above + 762: 00 93 5d 01 sts 0x015D, r16 ; 0x80015d + ldi YL, lo8(usbTxBuf3) ;[47] + 766: ce e5 ldi r28, 0x5E ; 94 + ldi YH, hi8(usbTxBuf3) ;[48] + 768: d1 e0 ldi r29, 0x01 ; 1 + rjmp usbSendAndReti ;[49] 51 + 12 = 63 until SOP + 76a: 10 c0 rjmp .+32 ; 0x78c + +0000076c : +; J = (D+ = 0), (D- = 1) +; K = (D+ = 1), (D- = 0) +; Spec allows 7.5 bit times from EOP to SOP for replies + +bitstuff7: + eor x1, x4 ;[4] + 76c: 05 27 eor r16, r21 + ldi x2, 0 ;[5] + 76e: 10 e0 ldi r17, 0x00 ; 0 + nop2 ;[6] C is zero (brcc) + 770: 00 c0 rjmp .+0 ; 0x772 + rjmp didStuff7 ;[8] + 772: 21 c0 rjmp .+66 ; 0x7b6 + +00000774 : + +bitstuffN: + eor x1, x4 ;[5] + 774: 05 27 eor r16, r21 + ldi x2, 0 ;[6] + 776: 10 e0 ldi r17, 0x00 ; 0 + lpm ;[7] 3 cycle NOP, modifies r0 + 778: c8 95 lpm + out USBOUT, x1 ;[10] <-- out + 77a: 08 bb out 0x18, r16 ; 24 + rjmp didStuffN ;[0] + 77c: 14 c0 rjmp .+40 ; 0x7a6 + +0000077e : + +#define bitStatus x3 + +sendNakAndReti: + ldi cnt, USBPID_NAK ;[-19] + 77e: 3a e5 ldi r19, 0x5A ; 90 + rjmp sendCntAndReti ;[-18] + 780: 01 c0 rjmp .+2 ; 0x784 + +00000782 : +sendAckAndReti: + ldi cnt, USBPID_ACK ;[-17] + 782: 32 ed ldi r19, 0xD2 ; 210 + +00000784 : +sendCntAndReti: + mov r0, cnt ;[-16] + 784: 03 2e mov r0, r19 + ldi YL, 0 ;[-15] R0 address is 0 + 786: c0 e0 ldi r28, 0x00 ; 0 + ldi YH, 0 ;[-14] + 788: d0 e0 ldi r29, 0x00 ; 0 + ldi cnt, 2 ;[-13] + 78a: 32 e0 ldi r19, 0x02 ; 2 + +0000078c : +;pointer to data in 'Y' +;number of bytes in 'cnt' -- including sync byte [range 2 ... 12] +;uses: x1...x4, shift, cnt, Y +;Numbers in brackets are time since first bit of sync pattern is sent +usbSendAndReti: ; 12 cycles until SOP + in x2, USBDDR ;[-12] + 78c: 17 b3 in r17, 0x17 ; 23 + ori x2, USBMASK ;[-11] + 78e: 16 60 ori r17, 0x06 ; 6 + sbi USBOUT, USBMINUS;[-10] prepare idle state; D+ and D- must have been 0 (no pullups) + 790: c2 9a sbi 0x18, 2 ; 24 + in x1, USBOUT ;[-8] port mirror for tx loop + 792: 08 b3 in r16, 0x18 ; 24 + out USBDDR, x2 ;[-7] <- acquire bus + 794: 17 bb out 0x17, r17 ; 23 +; need not init x2 (bitstuff history) because sync starts with 0 + ldi x4, USBMASK ;[-6] exor mask + 796: 56 e0 ldi r21, 0x06 ; 6 + ldi shift, 0x80 ;[-5] sync byte is first byte sent + 798: 20 e8 ldi r18, 0x80 ; 128 + ldi bitStatus, 0xff ;[-4] init bit loop counter, works for up to 12 bytes + 79a: 4f ef ldi r20, 0xFF ; 255 + +0000079c : +byteloop: +bitloop: + sbrs shift, 0 ;[8] [-3] + 79c: 20 ff sbrs r18, 0 + eor x1, x4 ;[9] [-2] + 79e: 05 27 eor r16, r21 + out USBOUT, x1 ;[10] [-1] <-- out + 7a0: 08 bb out 0x18, r16 ; 24 + ror shift ;[0] + 7a2: 27 95 ror r18 + ror x2 ;[1] + 7a4: 17 95 ror r17 + +000007a6 : +didStuffN: + cpi x2, 0xfc ;[2] + 7a6: 1c 3f cpi r17, 0xFC ; 252 + brcc bitstuffN ;[3] + 7a8: 28 f7 brcc .-54 ; 0x774 + nop ;[4] + 7aa: 00 00 nop + subi bitStatus, 37 ;[5] 256 / 7 ~=~ 37 + 7ac: 45 52 subi r20, 0x25 ; 37 + brcc bitloop ;[6] when we leave the loop, bitStatus has almost the initial value + 7ae: b0 f7 brcc .-20 ; 0x79c + sbrs shift, 0 ;[7] + 7b0: 20 ff sbrs r18, 0 + eor x1, x4 ;[8] + 7b2: 05 27 eor r16, r21 + ror shift ;[9] + 7b4: 27 95 ror r18 + +000007b6 : +didStuff7: + out USBOUT, x1 ;[10] <-- out + 7b6: 08 bb out 0x18, r16 ; 24 + ror x2 ;[0] + 7b8: 17 95 ror r17 + cpi x2, 0xfc ;[1] + 7ba: 1c 3f cpi r17, 0xFC ; 252 + brcc bitstuff7 ;[2] + 7bc: b8 f6 brcc .-82 ; 0x76c + ld shift, y+ ;[3] + 7be: 29 91 ld r18, Y+ + dec cnt ;[5] + 7c0: 3a 95 dec r19 + brne byteloop ;[6] + 7c2: 61 f7 brne .-40 ; 0x79c +;make SE0: + cbr x1, USBMASK ;[7] prepare SE0 [spec says EOP may be 21 to 25 cycles] + 7c4: 09 7f andi r16, 0xF9 ; 249 + lds x2, usbNewDeviceAddr;[8] + 7c6: 10 91 44 01 lds r17, 0x0144 ; 0x800144 + lsl x2 ;[10] we compare with left shifted address + 7ca: 11 0f add r17, r17 + out USBOUT, x1 ;[11] <-- out SE0 -- from now 2 bits = 22 cycles until bus idle + 7cc: 08 bb out 0x18, r16 ; 24 +;2006-03-06: moved transfer of new address to usbDeviceAddr from C-Code to asm: +;set address only after data packet was sent, not after handshake + subi YL, 2 ;[0] Only assign address on data packets, not ACK/NAK in r0 + 7ce: c2 50 subi r28, 0x02 ; 2 + sbci YH, 0 ;[1] + 7d0: d0 40 sbci r29, 0x00 ; 0 + breq skipAddrAssign ;[2] + 7d2: 11 f0 breq .+4 ; 0x7d8 + sts usbDeviceAddr, x2; if not skipped: SE0 is one cycle longer + 7d4: 10 93 3e 01 sts 0x013E, r17 ; 0x80013e + +000007d8 : +skipAddrAssign: +;end of usbDeviceAddress transfer + ldi x2, 1<: +se0Delay: + dec x4 ;[12] [15] [18] [21] + 7e8: 5a 95 dec r21 + brne se0Delay ;[13] [16] [19] [22] + 7ea: f1 f7 brne .-4 ; 0x7e8 + out USBOUT, x1 ;[23] <-- out J (idle) -- end of SE0 (EOP signal) + 7ec: 08 bb out 0x18, r16 ; 24 + out USBDDR, x2 ;[24] <-- release bus now + 7ee: 17 bb out 0x17, r17 ; 23 + out USBOUT, x3 ;[25] <-- ensure no pull-up resistors are active + 7f0: 48 bb out 0x18, r20 ; 24 + rjmp doReturn + 7f2: 74 cf rjmp .-280 ; 0x6dc + +000007f4 : + +void oscInit(void) +{ +uchar calibrationValue; + + calibrationValue = eeprom_read_byte(0); + 7f4: 80 e0 ldi r24, 0x00 ; 0 + 7f6: 90 e0 ldi r25, 0x00 ; 0 + 7f8: f4 d0 rcall .+488 ; 0x9e2 + if(calibrationValue != 0xff) + 7fa: 8f 3f cpi r24, 0xFF ; 255 + 7fc: 19 f4 brne .+6 ; 0x804 + OSCCAL0 = calibrationValue; + else { +#if USB_CFG_CLOCK_KHZ==12800 + OSCCAL0 = 232; +#else + OSCCAL0 += 4; /* 8.00 -> 8.25MHz */ + 7fe: 80 91 74 00 lds r24, 0x0074 ; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074> + 802: 8c 5f subi r24, 0xFC ; 252 + 804: 80 93 74 00 sts 0x0074, r24 ; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074> + 808: 08 95 ret + +0000080a : + * signal (a single SE0 bit) repeating every millisecond immediately after + * a USB RESET. We first do a binary search for the OSCCAL value and then + * optimize this value with a neighboorhod search. + */ +void calibrateOscillator(void) +{ + 80a: cf 92 push r12 + 80c: df 92 push r13 + 80e: ef 92 push r14 + 810: ff 92 push r15 + 812: 0f 93 push r16 + 814: 1f 93 push r17 + 816: cf 93 push r28 + 818: df 93 push r29 +uchar trialValue = 0; +#endif +uchar org; +int err; + + org = OSCCAL0; /* keep the original value */ + 81a: c0 90 74 00 lds r12, 0x0074 ; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074> + /* keep the current error ... */ + err = usbMeasureFrameLength() - targetValue; + 81e: 6b de rcall .-810 ; 0x4f6 + 820: 84 53 subi r24, 0x34 ; 52 + 822: 99 40 sbci r25, 0x09 ; 9 + 824: 7c 01 movw r14, r24 + 826: 97 ff sbrs r25, 7 + 828: 03 c0 rjmp .+6 ; 0x830 + 82a: f1 94 neg r15 + 82c: e1 94 neg r14 + 82e: f1 08 sbc r15, r1 + if(err < 0) + err = -err; + +#if USB_CFG_CLOCK_KHZ==16500 + OSCCAL0 = 0x98; /* select a split range - O.Tamura */ + 830: 88 e9 ldi r24, 0x98 ; 152 + 832: 80 93 74 00 sts 0x0074, r24 ; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074> + x = usbMeasureFrameLength(); + 836: 5f de rcall .-834 ; 0x4f6 + if(x < targetValue) + 838: 84 33 cpi r24, 0x34 ; 52 + 83a: 99 40 sbci r25, 0x09 ; 9 + 83c: 14 f4 brge .+4 ; 0x842 + trialValue = 128; + 83e: c0 e8 ldi r28, 0x80 ; 128 + 840: 01 c0 rjmp .+2 ; 0x844 +#if USB_CFG_CLOCK_KHZ==12800 +uchar step = 32; +uchar trialValue = 192; +#else +uchar step = 64; +uchar trialValue = 0; + 842: c0 e0 ldi r28, 0x00 ; 0 + 844: 07 e0 ldi r16, 0x07 ; 7 + 846: 10 e0 ldi r17, 0x00 ; 0 + 848: d0 e4 ldi r29, 0x40 ; 64 + trialValue = 128; +#endif + + /* do a binary search: */ + do{ + OSCCAL0 = trialValue + step; + 84a: dd 2e mov r13, r29 + 84c: dc 0e add r13, r28 + 84e: d0 92 74 00 sts 0x0074, r13 ; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074> + x = usbMeasureFrameLength(); /* proportional to current real frequency */ + 852: 51 de rcall .-862 ; 0x4f6 + if(x < targetValue) /* frequency still too low */ + 854: 84 33 cpi r24, 0x34 ; 52 + 856: 29 e0 ldi r18, 0x09 ; 9 + 858: 92 07 cpc r25, r18 + 85a: 0c f4 brge .+2 ; 0x85e + trialValue += step; + 85c: cd 2d mov r28, r13 + step >>= 1; + 85e: d6 95 lsr r29 + 860: 01 50 subi r16, 0x01 ; 1 + 862: 11 09 sbc r17, r1 + }while(step > 0); + 864: 91 f7 brne .-28 ; 0x84a + 866: 84 53 subi r24, 0x34 ; 52 + 868: 99 40 sbci r25, 0x09 ; 9 + 86a: 97 ff sbrs r25, 7 + 86c: 03 c0 rjmp .+6 ; 0x874 + 86e: 91 95 neg r25 + 870: 81 95 neg r24 + 872: 91 09 sbc r25, r1 + 874: 8c 01 movw r16, r24 + to the same host controller (by downstream broadcast packet). - O.Tamura + */ + x -= targetValue; + if(x < 0) + x = -x; + if( x>err ) { + 876: e8 16 cp r14, r24 + 878: f9 06 cpc r15, r25 + 87a: 1c f4 brge .+6 ; 0x882 + OSCCAL0 = org; + 87c: c0 92 74 00 sts 0x0074, r12 ; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074> + return; + 880: 36 c0 rjmp .+108 ; 0x8ee + + /* We have a precision of +/- 2 for optimum OSCCAL here */ + /* now do a neighborhood search for optimum value */ + optimumValue = trialValue; + optimumDev = x; /* this is certainly far away from optimum */ + for(OSCCAL0 = trialValue - 2; OSCCAL0 <= trialValue + 2; OSCCAL0++){ + 882: 8e ef ldi r24, 0xFE ; 254 + 884: 8c 0f add r24, r28 + 886: 80 93 74 00 sts 0x0074, r24 ; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074> + 88a: ec 2e mov r14, r28 + 88c: f1 2c mov r15, r1 + 88e: 82 e0 ldi r24, 0x02 ; 2 + 890: e8 0e add r14, r24 + 892: f1 1c adc r15, r1 + 894: 80 91 74 00 lds r24, 0x0074 ; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074> + 898: 90 e0 ldi r25, 0x00 ; 0 + 89a: e8 16 cp r14, r24 + 89c: f9 06 cpc r15, r25 + 89e: a4 f0 brlt .+40 ; 0x8c8 + x = usbMeasureFrameLength() - targetValue; + 8a0: 2a de rcall .-940 ; 0x4f6 + 8a2: 84 53 subi r24, 0x34 ; 52 + 8a4: 99 40 sbci r25, 0x09 ; 9 + 8a6: 97 ff sbrs r25, 7 + 8a8: 03 c0 rjmp .+6 ; 0x8b0 + 8aa: 91 95 neg r25 + 8ac: 81 95 neg r24 + 8ae: 91 09 sbc r25, r1 + if(x < 0) + x = -x; + if(x < optimumDev){ + 8b0: 80 17 cp r24, r16 + 8b2: 91 07 cpc r25, r17 + 8b4: 1c f4 brge .+6 ; 0x8bc + optimumDev = x; + optimumValue = OSCCAL0; + 8b6: c0 91 74 00 lds r28, 0x0074 ; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074> + 8ba: 8c 01 movw r16, r24 + + /* We have a precision of +/- 2 for optimum OSCCAL here */ + /* now do a neighborhood search for optimum value */ + optimumValue = trialValue; + optimumDev = x; /* this is certainly far away from optimum */ + for(OSCCAL0 = trialValue - 2; OSCCAL0 <= trialValue + 2; OSCCAL0++){ + 8bc: 80 91 74 00 lds r24, 0x0074 ; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074> + 8c0: 8f 5f subi r24, 0xFF ; 255 + 8c2: 80 93 74 00 sts 0x0074, r24 ; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074> + 8c6: e6 cf rjmp .-52 ; 0x894 + if(x < optimumDev){ + optimumDev = x; + optimumValue = OSCCAL0; + } + } + OSCCAL0 = optimumValue; + 8c8: c0 93 74 00 sts 0x0074, r28 ; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074> + + if( eeprom_read_byte(0)!=optimumValue ) + 8cc: 80 e0 ldi r24, 0x00 ; 0 + 8ce: 90 e0 ldi r25, 0x00 ; 0 + 8d0: 88 d0 rcall .+272 ; 0x9e2 + 8d2: c8 17 cp r28, r24 + 8d4: 61 f0 breq .+24 ; 0x8ee + eeprom_write_byte(0, optimumValue); + 8d6: 6c 2f mov r22, r28 + 8d8: 80 e0 ldi r24, 0x00 ; 0 + 8da: 90 e0 ldi r25, 0x00 ; 0 +} + 8dc: df 91 pop r29 + 8de: cf 91 pop r28 + 8e0: 1f 91 pop r17 + 8e2: 0f 91 pop r16 + 8e4: ff 90 pop r15 + 8e6: ef 90 pop r14 + 8e8: df 90 pop r13 + 8ea: cf 90 pop r12 + } + } + OSCCAL0 = optimumValue; + + if( eeprom_read_byte(0)!=optimumValue ) + eeprom_write_byte(0, optimumValue); + 8ec: 82 c0 rjmp .+260 ; 0x9f2 +} + 8ee: df 91 pop r29 + 8f0: cf 91 pop r28 + 8f2: 1f 91 pop r17 + 8f4: 0f 91 pop r16 + 8f6: ff 90 pop r15 + 8f8: ef 90 pop r14 + 8fa: df 90 pop r13 + 8fc: cf 90 pop r12 + 8fe: 08 95 ret + +00000900
: +{ +unsigned i; +uchar j; + + /* activate pull-ups except on USB lines */ + USB_CFG_IOPORT = (uchar)~((1< USB reset) */ +#ifdef USB_CFG_PULLUP_IOPORT /* use usbDeviceConnect()/usbDeviceDisconnect() if available */ + USBDDR = 0; /* we do RESET by deactivating pullup */ + usbDeviceDisconnect(); +#else + USBDDR = (1< + 90e: 80 e0 ldi r24, 0x00 ; 0 + 910: 90 e0 ldi r25, 0x00 ; 0 + i = 0; + while(--i) + 912: 01 97 sbiw r24, 0x01 ; 1 + 914: d1 f3 breq .-12 ; 0x90a + wdt_reset(); + 916: a8 95 wdr + 918: fc cf rjmp .-8 ; 0x912 + } + +#ifdef USB_CFG_PULLUP_IOPORT + usbDeviceConnect(); +#else + USBDDR = 0; /* remove USB reset condition */ + 91a: 17 ba out 0x17, r1 ; 23 +#endif + + PORTB = 0xff; + 91c: 8f ef ldi r24, 0xFF ; 255 + 91e: 88 bb out 0x18, r24 ; 24 + +#ifdef USE_UART_CTRL + UART_CTRL_DDR |= (1< + + sei(); + 928: 78 94 sei + for(;;){ /* main event loop */ + wdt_reset(); + 92a: a8 95 wdr + usbPoll(); + 92c: 83 dc rcall .-1786 ; 0x234 + + /* host => device */ + if( (UCSR0A&(1< + 932: 85 ff sbrs r24, 5 + 934: 17 c0 rjmp .+46 ; 0x964 + 936: e0 91 1a 01 lds r30, 0x011A ; 0x80011a + 93a: 80 91 1b 01 lds r24, 0x011B ; 0x80011b + 93e: 8e 17 cp r24, r30 + 940: 89 f0 breq .+34 ; 0x964 +#ifdef USE_UART_CTRL + && (UART_CTRL_PIN&(1< +#endif + ) { + UDR0 = tx_buf[irptr++]; + 946: 81 e0 ldi r24, 0x01 ; 1 + 948: 8e 0f add r24, r30 + 94a: 80 93 1a 01 sts 0x011A, r24 ; 0x80011a + 94e: f0 e0 ldi r31, 0x00 ; 0 + 950: ee 5f subi r30, 0xFE ; 254 + 952: fe 4f sbci r31, 0xFE ; 254 + 954: 80 81 ld r24, Z + 956: 80 93 80 00 sts 0x0080, r24 ; 0x800080 <__EEPROM_REGION_LENGTH__+0x7f0080> + irptr &= TX_MASK; + 95a: 80 91 1a 01 lds r24, 0x011A ; 0x80011a + 95e: 8f 70 andi r24, 0x0F ; 15 + 960: 80 93 1a 01 sts 0x011A, r24 ; 0x80011a + } + if( usbAllRequestsAreDisabled() && + 964: 80 91 43 01 lds r24, 0x0143 ; 0x800143 + 968: 87 ff sbrs r24, 7 + 96a: 0d c0 rjmp .+26 ; 0x986 + 96c: 80 91 1b 01 lds r24, 0x011B ; 0x80011b + 970: 90 e0 ldi r25, 0x00 ; 0 + 972: 20 91 1a 01 lds r18, 0x011A ; 0x80011a + 976: 82 1b sub r24, r18 + 978: 91 09 sbc r25, r1 + 97a: 8f 70 andi r24, 0x0F ; 15 + 97c: 99 27 eor r25, r25 + 97e: 08 97 sbiw r24, 0x08 ; 8 + 980: 14 f4 brge .+4 ; 0x986 + ((uwptr-irptr)&TX_MASK)<(TX_SIZE-HW_CDC_BULK_OUT_SIZE) ) { + usbEnableAllRequests(); + 982: 10 92 43 01 sts 0x0143, r1 ; 0x800143 + } + + /* host <= device */ + if( UCSR0A&(1< + 98a: 87 ff sbrs r24, 7 + 98c: 11 c0 rjmp .+34 ; 0x9b0 + 98e: e0 91 1c 01 lds r30, 0x011C ; 0x80011c + 992: e8 30 cpi r30, 0x08 ; 8 + 994: 68 f4 brcc .+26 ; 0x9b0 + rx_buf[iwptr++] = UDR0; + 996: 81 e0 ldi r24, 0x01 ; 1 + 998: 8e 0f add r24, r30 + 99a: 80 93 1c 01 sts 0x011C, r24 ; 0x80011c + 99e: 90 91 80 00 lds r25, 0x0080 ; 0x800080 <__EEPROM_REGION_LENGTH__+0x7f0080> + 9a2: f0 e0 ldi r31, 0x00 ; 0 + 9a4: ee 5e subi r30, 0xEE ; 238 + 9a6: fe 4f sbci r31, 0xFE ; 254 + 9a8: 90 83 st Z, r25 +#ifdef USE_UART_CTRL + if( iwptr==HW_CDC_BULK_IN_SIZE ) + 9aa: 88 30 cpi r24, 0x08 ; 8 + 9ac: 09 f4 brne .+2 ; 0x9b0 + UART_CTRL_PORT &= ~(1< + 9b4: 84 ff sbrs r24, 4 + 9b6: b9 cf rjmp .-142 ; 0x92a + 9b8: 60 91 1c 01 lds r22, 0x011C ; 0x80011c + 9bc: 61 11 cpse r22, r1 + 9be: 05 c0 rjmp .+10 ; 0x9ca + 9c0: 80 91 24 01 lds r24, 0x0124 ; 0x800124 + 9c4: 88 23 and r24, r24 + 9c6: 09 f4 brne .+2 ; 0x9ca + 9c8: b0 cf rjmp .-160 ; 0x92a + usbSetInterrupt(rx_buf, iwptr); + 9ca: 82 e1 ldi r24, 0x12 ; 18 + 9cc: 91 e0 ldi r25, 0x01 ; 1 + 9ce: 2c dc rcall .-1960 ; 0x228 + sendEmptyFrame = iwptr & HW_CDC_BULK_IN_SIZE; + 9d0: 80 91 1c 01 lds r24, 0x011C ; 0x80011c + 9d4: 88 70 andi r24, 0x08 ; 8 + 9d6: 80 93 24 01 sts 0x0124, r24 ; 0x800124 + iwptr = 0; + 9da: 10 92 1c 01 sts 0x011C, r1 ; 0x80011c +#ifdef USE_UART_CTRL + UART_CTRL_PORT |= (1< + +000009e2 : + 9e2: e1 99 sbic 0x1c, 1 ; 28 + 9e4: fe cf rjmp .-4 ; 0x9e2 + 9e6: 1f ba out 0x1f, r1 ; 31 + 9e8: 8e bb out 0x1e, r24 ; 30 + 9ea: e0 9a sbi 0x1c, 0 ; 28 + 9ec: 99 27 eor r25, r25 + 9ee: 8d b3 in r24, 0x1d ; 29 + 9f0: 08 95 ret + +000009f2 : + 9f2: 26 2f mov r18, r22 + +000009f4 : + 9f4: e1 99 sbic 0x1c, 1 ; 28 + 9f6: fe cf rjmp .-4 ; 0x9f4 + 9f8: 1c ba out 0x1c, r1 ; 28 + 9fa: 1f ba out 0x1f, r1 ; 31 + 9fc: 8e bb out 0x1e, r24 ; 30 + 9fe: 2d bb out 0x1d, r18 ; 29 + a00: 0f b6 in r0, 0x3f ; 63 + a02: f8 94 cli + a04: e2 9a sbi 0x1c, 2 ; 28 + a06: e1 9a sbi 0x1c, 1 ; 28 + a08: 0f be out 0x3f, r0 ; 63 + a0a: 01 96 adiw r24, 0x01 ; 1 + a0c: 08 95 ret + +00000a0e <_exit>: + a0e: f8 94 cli + +00000a10 <__stop_program>: + a10: ff cf rjmp .-2 ; 0xa10 <__stop_program> diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/dep/main.o.d b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/dep/main.o.d new file mode 100755 index 0000000000000000000000000000000000000000..669590f8cc81e3635e39f591470d467bfc3eaf3a --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/dep/main.o.d @@ -0,0 +1,61 @@ +main.o: ../main.c \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\string.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn441.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\wdt.h \ + ../../usbdrv/usbdrv.h ../usbconfig.h ../../usbdrv/osccal.h \ + ../../usbdrv/usbportability.h ../../usbdrv/oddebug.h + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\string.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn441.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\wdt.h: + +../../usbdrv/usbdrv.h: + +../usbconfig.h: + +../../usbdrv/osccal.h: + +../../usbdrv/usbportability.h: + +../../usbdrv/oddebug.h: diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/dep/oddebug.o.d b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/dep/oddebug.o.d new file mode 100755 index 0000000000000000000000000000000000000000..738cbec37d6dbfa5b1e996158c8c00710489fcd2 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/dep/oddebug.o.d @@ -0,0 +1,45 @@ +oddebug.o: ../../usbdrv/oddebug.c ../../usbdrv/oddebug.h \ + ../../usbdrv/usbportability.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn441.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h + +../../usbdrv/oddebug.h: + +../../usbdrv/usbportability.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn441.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h: diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/dep/osccal.o.d b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/dep/osccal.o.d new file mode 100755 index 0000000000000000000000000000000000000000..7110f3d5fcef9cadf0c46dd77f8507ba21907b4a --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/dep/osccal.o.d @@ -0,0 +1,56 @@ +osccal.o: ../../libs-device/osccal.c \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn441.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\eeprom.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h \ + ../../usbdrv/usbdrv.h ../usbconfig.h ../../usbdrv/osccal.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h \ + ../../usbdrv/usbportability.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn441.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\eeprom.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h: + +../../usbdrv/usbdrv.h: + +../usbconfig.h: + +../../usbdrv/osccal.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h: + +../../usbdrv/usbportability.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h: diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/dep/usbdrv.o.d b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/dep/usbdrv.o.d new file mode 100755 index 0000000000000000000000000000000000000000..d79d9a27d94a06265c5e9bccec0db80d98990539 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/dep/usbdrv.o.d @@ -0,0 +1,55 @@ +usbdrv.o: ../../usbdrv/usbdrv.c ../../usbdrv/usbportability.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn441.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h \ + ../../usbdrv/usbdrv.h ../usbconfig.h ../../usbdrv/osccal.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h \ + ../../usbdrv/oddebug.h + +../../usbdrv/usbportability.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn441.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h: + +../../usbdrv/usbdrv.h: + +../usbconfig.h: + +../../usbdrv/osccal.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h: + +../../usbdrv/oddebug.h: diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/dep/usbdrvasm.o.d b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/dep/usbdrvasm.o.d new file mode 100755 index 0000000000000000000000000000000000000000..ea4a795e5feaa20810eb384f18e43df09dc175f2 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/dep/usbdrvasm.o.d @@ -0,0 +1,39 @@ +usbdrvasm.o: ../../usbdrv/usbdrvasm.S ../../usbdrv/usbportability.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn441.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \ + ../../usbdrv/usbdrv.h ../usbconfig.h ../../usbdrv/osccal.h \ + ../../usbdrv/usbdrvasm165.inc ../../usbdrv/asmcommon.inc + +../../usbdrv/usbportability.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn441.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h: + +../../usbdrv/usbdrv.h: + +../usbconfig.h: + +../../usbdrv/osccal.h: + +../../usbdrv/usbdrvasm165.inc: + +../../usbdrv/asmcommon.inc: diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/main.o b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/main.o new file mode 100755 index 0000000000000000000000000000000000000000..45ffad1c40dab88173b23476d0bf8d44a04715ac Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/main.o differ diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/oddebug.o b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/oddebug.o new file mode 100755 index 0000000000000000000000000000000000000000..f81174dab4f286452a4f3f136d3767b480e52c52 Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/oddebug.o differ diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/osccal.o b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/osccal.o new file mode 100755 index 0000000000000000000000000000000000000000..44e2a8d2576ce11ee2af6d5e8ddc830340d8ee6d Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/osccal.o differ diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/usbdrv.o b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/usbdrv.o new file mode 100755 index 0000000000000000000000000000000000000000..276ae482ab4b5d85ebfd90f8aacbbe10bde0a064 Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/usbdrv.o differ diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/default/usbdrvasm.o b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/usbdrvasm.o new file mode 100755 index 0000000000000000000000000000000000000000..0d4d0674d428de0d34cbedb8c928db89ad2423db Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/tiny2313/default/usbdrvasm.o differ diff --git a/FabFTDI Attiny441/Programing/CDC/tiny2313/main.c b/FabFTDI Attiny441/Programing/CDC/tiny2313/main.c new file mode 100755 index 0000000000000000000000000000000000000000..f20036dc870db8040e2312611ce0ff6240e44357 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny2313/main.c @@ -0,0 +1,330 @@ + +/* Name: main.c + * Project: AVR USB driver for CDC interface on Low-Speed USB + * for ATtiny2313 + * Author: Osamu Tamura + * Creation Date: 2007-10-03 + * Tabsize: 4 + * Copyright: (c) 2007-2009 by Recursion Co., Ltd. + * License: Proprietary, free under certain conditions. See Documentation. + * + */ + +#include +#include +#include +#include +#include + +#include "usbdrv.h" +#include "oddebug.h" + +#ifdef _AVR_IO441_H_ +#define UCSRA USR +#define UCSRB UCR +#define UBRRL UBRR +#endif + +#define HW_CDC_BULK_OUT_SIZE 8 +#define HW_CDC_BULK_IN_SIZE 8 + +/* Control signals works at 16/20MHz clocks. */ +#ifdef USE_UART_CTRL +#define UART_CTRL_PIN PINB +#define UART_CTRL_DDR DDRB +#define UART_CTRL_PORT PORTB +#define UART_CTRL_DTR 5 +#define UART_CTRL_RTS 6 +#define UART_CTRL_CTS 7 +#endif + +enum { + SEND_ENCAPSULATED_COMMAND = 0, + GET_ENCAPSULATED_RESPONSE, + SET_COMM_FEATURE, + GET_COMM_FEATURE, + CLEAR_COMM_FEATURE, + SET_LINE_CODING = 0x20, + GET_LINE_CODING, + SET_CONTROL_LINE_STATE, + SEND_BREAK +}; + + +const PROGMEM char configDescrCDC[] = { /* USB configuration descriptor */ + 9, /* sizeof(usbDescrConfig): length of descriptor in bytes */ + USBDESCR_CONFIG, /* descriptor type */ + 67, + 0, /* total length of data returned (including inlined descriptors) */ + 2, /* number of interfaces in this configuration */ + 1, /* index of this configuration */ + 0, /* configuration name string index */ +#if USB_CFG_IS_SELF_POWERED + (1 << 7) | USBATTR_SELFPOWER, /* attributes */ +#else + (1 << 7), /* attributes */ +#endif + USB_CFG_MAX_BUS_POWER/2, /* max USB current in 2mA units */ + + /* interface descriptor follows inline: */ + 9, /* sizeof(usbDescrInterface): length of descriptor in bytes */ + USBDESCR_INTERFACE, /* descriptor type */ + 0, /* index of this interface */ + 0, /* alternate setting for this interface */ + USB_CFG_HAVE_INTRIN_ENDPOINT, /* endpoints excl 0: number of endpoint descriptors to follow */ + USB_CFG_INTERFACE_CLASS, + USB_CFG_INTERFACE_SUBCLASS, + USB_CFG_INTERFACE_PROTOCOL, + 0, /* string index for interface */ + + /* CDC Class-Specific descriptor */ + 5, /* sizeof(usbDescrCDC_HeaderFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 0, /* header functional descriptor */ + 0x10, 0x01, + + 4, /* sizeof(usbDescrCDC_AcmFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 2, /* abstract control management functional descriptor */ + 0x02, /* SET_LINE_CODING, GET_LINE_CODING, SET_CONTROL_LINE_STATE */ + + 5, /* sizeof(usbDescrCDC_UnionFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 6, /* union functional descriptor */ + 0, /* CDC_COMM_INTF_ID */ + 1, /* CDC_DATA_INTF_ID */ + + 5, /* sizeof(usbDescrCDC_CallMgtFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 1, /* call management functional descriptor */ + 3, /* allow management on data interface, handles call management by itself */ + 1, /* CDC_DATA_INTF_ID */ + + /* Endpoint Descriptor */ + 7, /* sizeof(usbDescrEndpoint) */ + USBDESCR_ENDPOINT, /* descriptor type = endpoint */ + 0x83, /* IN endpoint number 3 */ + 0x03, /* attrib: Interrupt endpoint */ + 8, 0, /* maximum packet size */ + USB_CFG_INTR_POLL_INTERVAL, /* in ms */ + + /* Interface Descriptor */ + 9, /* sizeof(usbDescrInterface): length of descriptor in bytes */ + USBDESCR_INTERFACE, /* descriptor type */ + 1, /* index of this interface */ + 0, /* alternate setting for this interface */ + 2, /* endpoints excl 0: number of endpoint descriptors to follow */ + 0x0A, /* Data Interface Class Codes */ + 0, + 0, /* Data Interface Class Protocol Codes */ + 0, /* string index for interface */ + + /* Endpoint Descriptor */ + 7, /* sizeof(usbDescrEndpoint) */ + USBDESCR_ENDPOINT, /* descriptor type = endpoint */ + 0x01, /* OUT endpoint number 1 */ + 0x02, /* attrib: Bulk endpoint */ + HW_CDC_BULK_OUT_SIZE, 0, /* maximum packet size */ + 0, /* in ms */ + + /* Endpoint Descriptor */ + 7, /* sizeof(usbDescrEndpoint) */ + USBDESCR_ENDPOINT, /* descriptor type = endpoint */ + 0x81, /* IN endpoint number 1 */ + 0x02, /* attrib: Bulk endpoint */ + HW_CDC_BULK_IN_SIZE, 0, /* maximum packet size */ + 0, /* in ms */ +}; + + +uchar usbFunctionDescriptor(usbRequest_t *rq) +{ + + if(rq->wValue.bytes[1] == USBDESCR_DEVICE){ + usbMsgPtr = (uchar *)usbDescriptorDevice; + return usbDescriptorDevice[0]; + }else{ /* must be config descriptor */ + usbMsgPtr = (uchar *)configDescrCDC; + return sizeof(configDescrCDC); + } +} + +/* ------------------------------------------------------------------------- */ +/* ----------------------------- USB interface ----------------------------- */ +/* ------------------------------------------------------------------------- */ + +static uchar sendEmptyFrame; +static uchar modeBuffer[7]; + +uchar usbFunctionSetup(uchar data[8]) +{ +usbRequest_t *rq = (void *)data; + + if((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS){ /* class request type */ + + if( rq->bRequest==GET_LINE_CODING || rq->bRequest==SET_LINE_CODING ){ + return 0xff; + /* GET_LINE_CODING -> usbFunctionRead() */ + /* SET_LINE_CODING -> usbFunctionWrite() */ + } +#ifdef USE_UART_CTRL + if(rq->bRequest==SET_CONTROL_LINE_STATE){ + UART_CTRL_PORT = (UART_CTRL_PORT&~(1<wValue.word&1)<>3)/BRMAX) +#define BRVAL ((unsigned)BSTEP*BRMAX/BRMIN) + +uchar usbFunctionWrite( uchar *data, uchar len ) +{ + usbWord_t br; + unsigned baudrate; + uchar i; + + // set baudrate generator + baudrate = *(unsigned *)data; + for( i=0; baudrate; i++ ) + baudrate -= BRMIN; + for( br.word=BRVAL; i!=1; i>>=1 ) + br.word >>= 1; + br.word--; + +#ifdef _AVR_IO441_H_ + UBRR0L = br.bytes[0] << 1; +#else + UBRR0L = br.bytes[0]; + UBRR0H = br.bytes[1]; + UCSR0A = (1< rs232c: transmit char */ + for( ; len; len-- ) { + tx_buf[uwptr++] = *data++; + uwptr &= TX_MASK; + } + + /* postpone receiving next data */ + usbDisableAllRequests(); +} + + +static void hardwareInit(void) +{ +unsigned i; +uchar j; + + /* activate pull-ups except on USB lines */ + USB_CFG_IOPORT = (uchar)~((1< USB reset) */ +#ifdef USB_CFG_PULLUP_IOPORT /* use usbDeviceConnect()/usbDeviceDisconnect() if available */ + USBDDR = 0; /* we do RESET by deactivating pullup */ + usbDeviceDisconnect(); +#else + USBDDR = (1< device */ + if( (UCSR0A&(1< + + + + + + <xsl:value-of select="ConversionLog/@BrandName"/> + + + + + +
+ +
+ +
+ project(s) chosen for conversion. +
+
+ project(s) successfully converted. +
+ project(s) converted with errors. +
+
+ +
+ + + +
+ +
+ + + | + +
+ + link_ + + + toggleVisibility(''); + + Show Logs + + +
+ + + + + + + + + +
+ + + +
+
+
+
+ +
+ + + + + | + + +
+ + link_ + + + toggleVisibility(''); + + Show Logs + + +
+ + + + + + + + + + + + + +
+ + + +
+
+
+
+
diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/ConversionLog-10-03-2017 16-31-58.xml b/FabFTDI Attiny441/Programing/CDC/tiny45/ConversionLog-10-03-2017 16-31-58.xml new file mode 100755 index 0000000000000000000000000000000000000000..1409db597721ec965d4f89e7d07afbeffcf02bc1 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/ConversionLog-10-03-2017 16-31-58.xml @@ -0,0 +1,328 @@ + + + + + + Info + 10/3/2017 4:31:56 PM + Source Project Path: C:\cygwin64\home\Prashant Patil\cbagitlab\FabFTDI\FabFTDI Attiny441\Programing\CDC\tiny45\cdctiny.aps + + + + + Info + 10/3/2017 4:31:56 PM + Studio5 Project Path: C:\cygwin64\home\Prashant Patil\cbagitlab\FabFTDI\FabFTDI Attiny441\Programing\CDC\tiny45\cdctiny.avrgccproj + + + + + Info + 10/3/2017 4:31:56 PM + Studio5 Solution Path: C:\cygwin64\home\Prashant Patil\cbagitlab\FabFTDI\FabFTDI Attiny441\Programing\CDC\tiny45\cdctiny.atsln + + + + + Info + 10/3/2017 4:31:56 PM + Started : Processing General settings from source project + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Processing General settings from source project + + + + + Info + 10/3/2017 4:31:56 PM + Started : Processing Project files information from source project + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Processing Project files information from source project + + + + + Info + 10/3/2017 4:31:56 PM + Started : Processing Build Dependency settings from the source project + + + + + Warning + 10/3/2017 4:31:56 PM + Skipped reading Build Dependency settings from source project. It is either invalid or not provided. + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Processing Build Dependency settings from the source project + + + + + Info + 10/3/2017 4:31:56 PM + Started : Processing ProjectLevel Toolchain settings from source project + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Processing ProjectLevel Toolchain settings from source project + + + + + Info + 10/3/2017 4:31:56 PM + Started : Processing Toolchain settings from source project [Configuration default] + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Processing Toolchain settings from source project [Configuration default] + + + + + Info + 10/3/2017 4:31:56 PM + Started : Processing external makefile settings [Configuration default] + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Processing external makefile settings [Configuration default] + + + + + Info + 10/3/2017 4:31:56 PM + Started : Processing File level Toolchain settings from Source Project [Configuration default] + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Processing File level Toolchain settings from Source Project [Configuration default] + + + + + Info + 10/3/2017 4:31:56 PM + Started : Processing Pre/Post Build event settings from source project [Configuration default] + + + + + Warning + 10/3/2017 4:31:56 PM + Skipped reading Pre/Post build event settings from source project. It is either invalid or not provided. + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Processing Pre/Post Build event settings from source project [Configuration default] + + + + + Info + 10/3/2017 4:31:56 PM + Started : Create Atmel Studio 7.0 Project + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Create Atmel Studio 7.0 Project + + + + + Info + 10/3/2017 4:31:56 PM + Started : Updating Atmel Studio 7.0 GeneralSettings + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Updating Atmel Studio 7.0 GeneralSettings + + + + + Info + 10/3/2017 4:31:56 PM + Started : Updating Atmel Studio 7.0 FileInformation + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Updating Atmel Studio 7.0 FileInformation + + + + + Info + 10/3/2017 4:31:56 PM + Started : Copying Files + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Copying Files + + + + + Info + 10/3/2017 4:31:56 PM + Started : Saving Atmel Studio 7.0 Solution + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Saving Atmel Studio 7.0 Solution + + + + + Info + 10/3/2017 4:31:56 PM + Started : Updating Configurations In Atmel Studio 7.0 Project + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Updating Configurations In Atmel Studio 7.0 Project + + + + + Info + 10/3/2017 4:31:56 PM + Started : Updating Build Dependencies in Atmel Studio 7.0 Solution for the project + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Updating Build Dependencies in Atmel Studio 7.0 Solution for the project + + + + + Info + 10/3/2017 4:31:56 PM + Started : Updating ProjectLevelToolchainSettings In Atmel Studio 7.0 Project + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Updating ProjectLevelToolchainSettings In Atmel Studio 7.0 Project + + + + + Info + 10/3/2017 4:31:56 PM + Started : Updating ToolChainSettings In Atmel Studio 7.0 Project [Configuration default] + + + + + Info + 10/3/2017 4:31:56 PM + Completed : Updating ToolChainSettings In Atmel Studio 7.0 Project [Configuration default] + + + + + Info + 10/3/2017 4:31:56 PM + Started : Updating FileLevelSettings In Atmel Studio 7.0 Project [Configuration default] + + + + + Info + 10/3/2017 4:31:57 PM + Completed : Updating FileLevelSettings In Atmel Studio 7.0 Project [Configuration default] + + + + + Info + 10/3/2017 4:31:57 PM + Started : Updating ExternalMakeFileSettings In Atmel Studio 7.0 Project [Configuration default] + + + + + Info + 10/3/2017 4:31:57 PM + Completed : Updating ExternalMakeFileSettings In Atmel Studio 7.0 Project [Configuration default] + + + + + Info + 10/3/2017 4:31:57 PM + Started : Updating BuildEvents In Atmel Studio 7.0 Project [Configuration default] + + + + + Info + 10/3/2017 4:31:57 PM + Completed : Updating BuildEvents In Atmel Studio 7.0 Project [Configuration default] + + + + + Success + 10/3/2017 4:31:58 PM + Atmel Studio 7.0 Project Created Successfully + + + + + \ No newline at end of file diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/cdctiny.aps b/FabFTDI Attiny441/Programing/CDC/tiny45/cdctiny.aps new file mode 100755 index 0000000000000000000000000000000000000000..f199e57b34ea3e67b46390dd2e5416b432ac78e1 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/cdctiny.aps @@ -0,0 +1 @@ +cdctiny20-Mar-2007 23:41:3124-Jun-2011 15:34:35241020-Mar-2007 23:41:3144, 13, 0, 528AVR GCCdefault\cdctiny.elfC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45\AVR SimulatorATtiny45.xmlfalseR00R01R02R03R04R05R06R07R08R09R10R11R12R13R14R15R16R17R18R19R20R21R22R23R24R25R26R27R28R29R30R31Auto000sw-uart-asm.Smain.csw-uart.c..\usbdrv\usbdrv.c..\usbdrv\usbdrvasm.S..\usbdrv\oddebug.c..\libs-device\osccal.cusbconfig.huart.h..\usbdrv\usbportability.h..\usbdrv\oddebug.h..\usbdrv\usbdrv.h..\libs-device\osccal.hdefault\cdctiny45.lssdefault\MakefiledefaultYESdefault\Makefileattiny45110cdctiny.elfdefault\0.\..\usbdrv\..\libs-device\-Wall -gdwarf-2 -DF_CPU=16500000UL -Os -fsigned-chardefault1C:\Program Files\WinAVR\bin\avr-gcc.exeC:\Program Files\WinAVR\utils\bin\make.exeC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45\usbconfig.hC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45\uart.hC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45\..\usbdrv\usbportability.hC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45\..\usbdrv\oddebug.hC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45\..\usbdrv\usbdrv.hC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45\..\libs-device\osccal.hC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45\sw-uart-asm.SC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45\main.cC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45\sw-uart.cC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45\..\usbdrv\usbdrv.cC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45\..\usbdrv\usbdrvasm.SC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45\..\usbdrv\oddebug.cC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45\..\libs-device\osccal.c diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/cdctiny.atsln b/FabFTDI Attiny441/Programing/CDC/tiny45/cdctiny.atsln new file mode 100755 index 0000000000000000000000000000000000000000..0251320349aa5a982acde7eb0b8d1fca466cedc7 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/cdctiny.atsln @@ -0,0 +1,19 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Atmel Studio Solution File, Format Version 11.00 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "cdctiny", "cdctiny.cproj", "{9EEAA216-F708-4F5D-AABB-8EE3AE2D5880}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + default|AVR = default|AVR + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9EEAA216-F708-4F5D-AABB-8EE3AE2D5880}.default|AVR.ActiveCfg = default|AVR + {9EEAA216-F708-4F5D-AABB-8EE3AE2D5880}.default|AVR.Build.0 = default|AVR + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/cdctiny.aws b/FabFTDI Attiny441/Programing/CDC/tiny45/cdctiny.aws new file mode 100755 index 0000000000000000000000000000000000000000..59b6690ceae3e30c1d9f74b819715c4f8dece982 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/cdctiny.aws @@ -0,0 +1 @@ + diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/cdctiny.componentinfo.xml b/FabFTDI Attiny441/Programing/CDC/tiny45/cdctiny.componentinfo.xml new file mode 100755 index 0000000000000000000000000000000000000000..e8887b3db92019037581a31ef5fcdf486b66d70a --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/cdctiny.componentinfo.xml @@ -0,0 +1,86 @@ + + + + + + + Device + Startup + + + Atmel + 1.2.0 + C:/Program Files (x86)\Atmel\Studio\7.0\Packs + + + + + C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.2.118\include + + include + C + + + include + + + + + C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.2.118\include\avr\iotn45.h + + header + C + D6lrhGymODXhdBjVTkc4pA== + + include/avr/iotn45.h + + + + + C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.2.118\templates\main.c + template + source + C Exe + GD1k8YYhulqRs6FD1B2Hog== + + templates/main.c + Main file (.c) + + + + C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.2.118\templates\main.cpp + template + source + C Exe + YXFphlh0CtZJU+ebktABgQ== + + templates/main.cpp + Main file (.cpp) + + + + C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATtiny_DFP\1.2.118\gcc\dev\attiny45 + + libraryPrefix + GCC + + + gcc/dev/attiny45 + + + + + ATtiny_DFP + C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATtiny_DFP/1.2.118/Atmel.ATtiny_DFP.pdsc + 1.2.118 + true + ATtiny45 + + + + Resolved + Fixed + true + + + \ No newline at end of file diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/cdctiny.cproj b/FabFTDI Attiny441/Programing/CDC/tiny45/cdctiny.cproj new file mode 100755 index 0000000000000000000000000000000000000000..e16a9728dcffabf0d332f06269c0542afdaf2d7c --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/cdctiny.cproj @@ -0,0 +1,147 @@ + + + + 2.0 + 7.0 + com.Atmel.AVRGCC8.C + 9eeaa216-f708-4f5d-aabb-8ee3ae2d5880 + cdctiny + attiny45 + none + Importer + Executable + C + cdctiny + .elf + $(MSBuildProjectDirectory)\$(Configuration) + WinAVR + + true + false + true + true + + + true + + 2 + 0 + + + + + + + + + + + + + + + bin\default\ + + + -mmcu=attiny45 -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.2.118\gcc\dev\attiny45" + True + True + True + True + False + + + F_CPU=16500000UL + + + + + ..\. + ..\..\usbdrv + ..\..\libs-device + %24(PackRepoDir)\atmel\ATtiny_DFP\1.2.118\include + + + Optimize for size (-Os) + true + -gdwarf-2 -fsigned-char + -Wall -gdwarf-2 -DF_CPU=16500000UL -Os -fsigned-char + + + ..\. + ..\..\usbdrv + ..\..\libs-device + %24(PackRepoDir)\atmel\ATtiny_DFP\1.2.118\include + + + + + True + $(MSBuildProjectDirectory)\default + default\Makefile + all + clean + + + + + compile + + + compile + + + compile + usbportability.h + + + compile + oddebug.h + + + compile + usbdrv.h + + + compile + osccal.h + + + compile + + + + + compile + + + + + compile + + + + + compile + usbdrv.c + + + + + compile + usbdrvasm.S + + + + + compile + oddebug.c + + + + + compile + osccal.c + + + \ No newline at end of file diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/Makefile b/FabFTDI Attiny441/Programing/CDC/tiny45/default/Makefile new file mode 100755 index 0000000000000000000000000000000000000000..fe5877589c23cc930b709d60993cae8a54636e7a --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/default/Makefile @@ -0,0 +1,105 @@ +############################################################################### +# Makefile for the project cdctiny +############################################################################### + +## General Flags +PROJECT = cdctiny + +MCU = attiny45 +#MCU = attiny85 + +CLK = 16500000UL + +TARGET = cdctiny.elf +CC = avr-gcc + +## Options common to compile, link and assembly rules +COMMON = -mmcu=$(MCU) -DF_CPU=$(CLK) + +## UART_INVERT reverses the polarity of TXD and RXD to +## connect to RS-232C directly. +#COMMON += -DUART_INVERT + +## Compile options common for all C compilation units. +CFLAGS = $(COMMON) +CFLAGS += -Wall -gdwarf-2 -Os -fsigned-char +CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d + +## Assembly specific flags +ASMFLAGS = $(COMMON) +ASMFLAGS += $(CFLAGS) +ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 + +## Linker flags +LDFLAGS = $(COMMON) +LDFLAGS += + + +## Intel Hex file production flags +HEX_FLASH_FLAGS = -R .eeprom -R .fuse -R .lock -R .signature + +HEX_EEPROM_FLAGS = -j .eeprom +HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load" +HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings + + +## Include Directories +INCLUDES = +INCLUDES = -I".." -I"../../usbdrv" -I"../../libs-device" + +## Objects that must be built in order to link +OBJECTS = usbdrv.o usbdrvasm.o oddebug.o osccal.o sw-uart-asm.o sw-uart.o main.o + +## Objects explicitly added by the user +LINKONLYOBJECTS = + +## Build +all: $(TARGET) cdctiny45.hex cdctiny45.eep cdctiny45.lss size + +## Compile +usbdrv.o: ../../usbdrv/usbdrv.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +usbdrvasm.o: ../../usbdrv/usbdrvasm.S + $(CC) $(INCLUDES) $(ASMFLAGS) -c $< + +oddebug.o: ../../usbdrv/oddebug.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +osccal.o: ../../libs-device/osccal.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +sw-uart-asm.o: ../sw-uart-asm.S + $(CC) $(INCLUDES) $(ASMFLAGS) -c $< + +sw-uart.o: ../sw-uart.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +main.o: ../main.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +##Link +$(TARGET): $(OBJECTS) + $(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET) + +%.hex: $(TARGET) + avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@ + +%.eep: $(TARGET) + -avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ || exit 0 + +%.lss: $(TARGET) + avr-objdump -h -S $< > $@ + +size: ${TARGET} + @echo + @avr-size -C --mcu=${MCU} ${TARGET} + +## Clean target +.PHONY: clean +clean: + -rm -rf $(OBJECTS) cdctiny45.elf dep/* cdctiny45.hex cdctiny45.eep cdctiny45.lss + +## Other dependencies +-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*) + diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny.elf b/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny.elf new file mode 100755 index 0000000000000000000000000000000000000000..24400bbcef62ded5d042172883ca9f299a49ec85 Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny.elf differ diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny45.eep b/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny45.eep new file mode 100755 index 0000000000000000000000000000000000000000..1996e8fde5d7311bbef07a199045173b4bebb079 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny45.eep @@ -0,0 +1 @@ +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny45.hex b/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny45.hex new file mode 100755 index 0000000000000000000000000000000000000000..4632644b473b332df33b5b1932c16bd6663e6c2d --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny45.hex @@ -0,0 +1,189 @@ +:1000000054C0EEC307C2F9C36BC06AC069C068C000 +:1000100067C066C065C064C063C062C010C412011E +:10002000100102000008C016E105000101020001F4 +:1000300010035500530042002D00320033003200FF +:1000400022037700770077002E00720065006300BE +:1000500075007200730069006F006E002E006A0068 +:100060007000040309040902430002010080320900 +:100070000400000102020100052400100104240212 +:100080000205240600010524010301070583030876 +:1000900000FF09040100020A000000070501020236 +:1000A0000000070581020800000011241FBECFE5F3 +:1000B000D1E0DEBFCDBF10E0A0E6B0E0E2EAFBE0B9 +:1000C00002C005900D92AC36B107D9F721E0ACE63D +:1000D000B0E001C01D92A034B207E1F7E9D45FC5DA +:1000E0008FCF1F93CF93DF93162FEA01288124FF30 +:1000F00005C0398128E82327298302C02AE52883FF +:10010000212FFC01CE010296DC0131913D9321505B +:100110001216DCF3612F67D11C5F1883DF91CF913A +:100120001F9108954CE750E0DCCF47EA50E0D9CF6B +:10013000CF93DF9360918D00635067FDB3C08091D2 +:100140008A00CCE0D0E0C81BD109CF56DF4F8091A8 +:100150008900803118F4CE018DD49EC08D3209F013 +:100160008CC0683009F098C083EC809371008AE5F8 +:100170008093610010926D008881807619F0CE0125 +:100180003DD468C09A8110927A008981811106C09D +:1001900010927B002AE730E082E057C0853019F4E6 +:1001A00090938E004FC08630A9F58B81813041F449 +:1001B0008EE190E090938C0080938B0082E126C0CA +:1001C000823019F4CE0105D421C08330F1F49111AD +:1001D00008C082E690E090938C0080938B0084E0CE +:1001E00015C0913041F480E490E090938C008093AE +:1001F0008B0082E20BC0923041F480E390E0909358 +:100200008C0080938B0080E101C080E090E49093AB +:100210006D0020C0883079F0893019F490939000F7 +:1002200011C08A3059F08B3069F48BE480937D00E3 +:100230008093A80007C020E930E002C02AE730E040 +:1002400081E003C02AE730E080E030938C00209307 +:100250008B0009C08F3F39F4988197FD8E8190E81B +:1002600090936D0007C09F81911104C09E819817E3 +:1002700008F4892F809360000FC080916D0087FF84 +:100280000BC0CE01E8D38F3F21F48EE18093610053 +:1002900003C081111092600080918D00181614F433 +:1002A00010928D008091610084FF55C080916000A4 +:1002B0008F3F09F450C0C82F893008F0C8E08C1B6C +:1002C000809360009091710088E889278093710085 +:1002D000CC2309F459C020916D0027FF08C06C2F72 +:1002E00082E790E0A8D3C82F893078F523C08091A9 +:1002F0008B0090918C0026FF0AC0A2E7B0E0FC01C1 +:100300002C2F34913D9331962150D9F708C0DC0150 +:10031000E2E7F0E02C2F3D9131932150E1F72FEFF0 +:100320002C0F30E02F5F3F4F820F931F90938C0074 +:1003300080938B006C2F82E790E055D0CC5FCC305F +:1003400041F08FEF8093600004C08FEF80936000D6 +:10035000CEE1C093610084E196B3987131F481508D +:10036000D9F710928E0010928800C1E08111C0E090 +:1003700090916C00C91771F0882319F0F894BFD1DF +:100380007894C0936C0006C060E082E790E02BD0C8 +:10039000C4E0D7CFDF91CF910895AC9A8BB780623C +:1003A0008BBFACE7B0E08BE411968C931197E7EA32 +:1003B000F0E081838AE58C9380830895A82FB92F7C +:1003C00080E090E041E050EA609530E009C02D9176 +:1003D00082279795879510F084279527305EC8F37C +:1003E0006F5FA8F30895EADF8D939D930895A6E0CB +:1003F00088279927AA9569F00197E1F3B399FCCF73 +:10040000B39BFECF81E09927A6B3019611F0A871A6 +:10041000D9F70895CF93CFB7CF93C395B39BE9F79F +:10042000B39B0BC0B39B09C0B39B07C0B39B05C074 +:10043000B39B03C0B39B01C0D8C00F92DF93C091A0 +:100440008A00DD27CF56DF4F012EB39B03C0DF911B +:100450000F90E6CF2F930F931F934F932FEF4F6F74 +:1004600006B303FB20F95F933F9350E03BE065C088 +:1004700016B30126502953FDC89556B3012703FB37 +:1004800025F92F7306B3B1F05027102713FB26F977 +:1004900006B22230F0F000C016B3012703FB27F9A3 +:1004A0000126502906B22430E8F54F77206816B3AC +:1004B0000000F6CF50274F7D206206B2102F0000BB +:1004C00000C006B300265029102713FB26F906B2F8 +:1004D000E2CF4F7B06B3206400C0DACF012650295B +:1004E000187106B269F14E7F2160012F16B328C042 +:1004F000002650294D7F06B22260102F29C0012608 +:1005000050294B7F06B22460012F2DC016B301265F +:100510005029477F2860000006B22EC04F7E06B3E8 +:10052000206130C0422706B3499300265029102786 +:1005300006B24FEF13FB20F9297F16B379F2187139 +:1005400059F10126502906B2012703FB21F9237F27 +:1005500006B371F2002650293150D0F006B21027B0 +:1005600013FB22F9277E16B351F2012650290127E9 +:1005700003FB06B223F92F7C49F2000006B31027D3 +:1005800013FB24F90026502906B22F7939F270CFD7 +:1005900010E21ABF00271CC03B503195C31BD0404E +:1005A00010E21ABF0881033C21F10B3411F12091B4 +:1005B00088001981110F1213EDCF4A81441F0936AB +:1005C00069F10D3211F0013E29F74F7009F0042F47 +:1005D00000938F003F915F914F911F910F912F9149 +:1005E000DF910F90CAB7C5FD18CFCF91CFBFCF9184 +:1005F000189520918F00222369F310918D0011230B +:10060000D1F53430D2F130938D00209389001091D0 +:100610008A003BE0311B30938A002FC000918D008F +:1006200001304CF50AE54F7049F43091610034FD1A +:1006300025C000936100C1E7D0E024C0433049F0F9 +:1006400030917C0034FD1AC000937C00CDE7D0E0EF +:1006500019C03091A70034FD11C00093A700C8EA6B +:10066000D0E010C0052710E000C021C0052710E031 +:10067000C89508BB14C03AE501C032ED032EC0E0B6 +:10068000D0E032E017B31861C39A08B317BB58E142 +:1006900020E84FEF20FF052708BB279517951C3F43 +:1006A00028F700004552B0F720FF0527279508BB23 +:1006B00017951C3FB8F629913A9561F7077E10917E +:1006C0008E00110F08BBC250D04011F0109388006B +:1006D00010E21ABF086017B3177E402F477E54E020 +:1006E0005A95F1F708BB17BB48BB74CF80E090E088 +:1006F00040D28F3F11F481B78C5F81BF0895CF92B4 +:10070000DF92EF92FF920F931F93CF93DF93C1B6C7 +:100710006EDE845399407C0197FF03C0F194E1940D +:10072000F10888E981BF63DE8433994014F4C0E89E +:1007300001C0C0E007E010E0D0E4DD2EDC0ED1BE49 +:1007400056DE843329E092070CF4CD2DD695015066 +:10075000110999F78453994097FF03C091958195AA +:1007600091098C01E816F90614F4C1BE30C08EEF71 +:100770008C0F81BFEC2EF12C82E0E80EF11C81B7CA +:1007800090E0E816F9068CF032DE8453994097FF2A +:1007900003C09195819591098017910714F4C1B711 +:1007A0008C0181B78F5F81BFEACFC1BF80E090E04D +:1007B000E0D1C81761F06C2F80E090E0DF91CF911D +:1007C0001F910F91FF90EF90DF90CF90DAC1DF91F2 +:1007D000CF911F910F91FF90EF90DF90CF900895F0 +:1007E000B299189501BB05B50FBD09E00DBD07E035 +:1007F00000BF00E20BBF01B3189501BB0FB702BBEE +:100800000DB50A950DBD79F00BB50695B299006846 +:100810000BBD13BB0FB51EB5011B0FBD13B302B348 +:100820000FBF01B3189500BF04BD0BB50DBB00E4AD +:100830000ABF00E60BBF02B30FBF01B3189501BB9F +:10084000F09907C00BE40EB90EBB08B50FB901B3A0 +:10085000189500E40EB900E003BF01B31895881F96 +:100860009795881F9795881F9795881F9795881F3C +:100870009795881F9795881F9795881F9795892F1B +:1008800008959C0181E080BD80E888B9B99ABA9842 +:100890008BB78F7B8BBF1ABC13BE10BE80EE8EB998 +:1008A00084E58DB98FEF8FB9B90176956795CB0146 +:1008B000A0E0B0E0BC01CD016C5E70418C4F9F4F59 +:1008C00040E050E034D121502EBD29BD1DBC8EB575 +:1008D00090E001969595879595958795819585BD2D +:1008E00095B58EB5891718F08EB58F5F85BD82E0FE +:1008F0008ABD81E084BD90E499BF85B78C7F82601A +:1009000085BF9ABF8BB780648BBF10923E01109257 +:10091000BB0010923C0110923D01089584B58111F5 +:100920000FC0E091BB00E83058F481E08E0F809357 +:10093000BB008DB3F0E0ED54FF4F808381E084BDB8 +:1009400080917C0084FF12C06091BB00611104C0E3 +:1009500080913F01882351F083EB90E0E3DB8091AD +:10096000BB00887080933F011092BB0083B7811158 +:100970002FC0E0913E0180913D018E1749F1F0E0DA +:10098000E454FF4F80816BDF90913E019F5F9F7722 +:1009900090933E0112BE9BE49EB91EBA982F929589 +:1009A000907F9F6098BD8695F8948FB983E083BF50 +:1009B000789480918D0087FF0BC080913E0181501B +:1009C00090913D01891B8F77823010F010928D003D +:1009D0000895FC018381813049F48EE190E0909389 +:1009E0008C0080938B0080911E00089586E690E035 +:1009F00090938C0080938B0083E40895FC01908198 +:100A0000892F8076803299F4818120EE280F223060 +:100A100080F0823239F480917000811103C082E04D +:100A20008093700097FD03C081E080933F0180E0D8 +:100A300008958FEF0895FC01AEE6B0E08C918083BD +:100A400011968C918183128213821482158288E020 +:100A5000868387E00895EEE6F0E0DC012C912083A8 +:100A600011968C91818380916E0090916F0009DFC7 +:100A700081E00895DC01E0913D01662371F091E091 +:100A80009E0F90933D018D91F0E0E454FF4F8083E1 +:100A90009F7790933D016150EECF80913E01815050 +:100AA0008E1B8F77823018F48FEF80938D0008951E +:100AB000C8E18EE00FB6F894A895C1BD0FBE81BD08 +:100AC00015DE87EE88BBC7BBA89527EA86E99CE0C0 +:100AD000215080409040E1F700C0000017BA80EC40 +:100AE00092E190936F0080936E00CBDE56DC109203 +:100AF000700010923F017894A8951ADB0FDF809167 +:100B000070008823C9F39091A70094FFF5CF82303D +:100B100021F468E082E690E003C062E08AE690E0BB +:100B200004DB80917000815080937000E5CFA1E2DA +:100B30001A2EAA1BBB1BFD010DC0AA1FBB1FEE1F57 +:100B4000FF1FA217B307E407F50720F0A21BB30BA2 +:100B5000E40BF50B661F771F881F991F1A9469F71E +:100B600060957095809590959B01AC01BD01CF017A +:100B70000895E199FECF1FBA8EBBE09A99278DB3F5 +:100B80000895262FE199FECF1CBA1FBA8EBB2DBB4C +:100B90000FB6F894E29AE19A0FBE01960895F89480 +:020BA000FFCF85 +:0C0BA200FF5AA120000000000200030028 +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny45.lss b/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny45.lss new file mode 100755 index 0000000000000000000000000000000000000000..0d9a5ea00580a87baa4f3c7edc5eda14561b30a2 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny45.lss @@ -0,0 +1,3041 @@ + +cdctiny.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 00000ba2 00000000 00000000 00000094 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .data 0000000c 00800060 00000ba2 00000c36 2**0 + CONTENTS, ALLOC, LOAD, DATA + 2 .bss 000000d4 0080006c 0080006c 00000c42 2**0 + ALLOC + 3 .comment 00000030 00000000 00000000 00000c42 2**0 + CONTENTS, READONLY + 4 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 00000c74 2**2 + CONTENTS, READONLY + 5 .debug_aranges 000000e0 00000000 00000000 00000cb0 2**3 + CONTENTS, READONLY, DEBUGGING + 6 .debug_info 000019b4 00000000 00000000 00000d90 2**0 + CONTENTS, READONLY, DEBUGGING + 7 .debug_abbrev 00000c30 00000000 00000000 00002744 2**0 + CONTENTS, READONLY, DEBUGGING + 8 .debug_line 000016a4 00000000 00000000 00003374 2**0 + CONTENTS, READONLY, DEBUGGING + 9 .debug_frame 00000184 00000000 00000000 00004a18 2**2 + CONTENTS, READONLY, DEBUGGING + 10 .debug_str 000008c5 00000000 00000000 00004b9c 2**0 + CONTENTS, READONLY, DEBUGGING + 11 .debug_loc 00000c96 00000000 00000000 00005461 2**0 + CONTENTS, READONLY, DEBUGGING + 12 .debug_ranges 00000080 00000000 00000000 000060f7 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00000000 <__vectors>: + 0: 54 c0 rjmp .+168 ; 0xaa <__ctors_end> + 2: ee c3 rjmp .+2012 ; 0x7e0 <__vector_1> + 4: 07 c2 rjmp .+1038 ; 0x414 <__vector_2> + 6: f9 c3 rjmp .+2034 ; 0x7fa <__vector_3> + 8: 6b c0 rjmp .+214 ; 0xe0 <__bad_interrupt> + a: 6a c0 rjmp .+212 ; 0xe0 <__bad_interrupt> + c: 69 c0 rjmp .+210 ; 0xe0 <__bad_interrupt> + e: 68 c0 rjmp .+208 ; 0xe0 <__bad_interrupt> + 10: 67 c0 rjmp .+206 ; 0xe0 <__bad_interrupt> + 12: 66 c0 rjmp .+204 ; 0xe0 <__bad_interrupt> + 14: 65 c0 rjmp .+202 ; 0xe0 <__bad_interrupt> + 16: 64 c0 rjmp .+200 ; 0xe0 <__bad_interrupt> + 18: 63 c0 rjmp .+198 ; 0xe0 <__bad_interrupt> + 1a: 62 c0 rjmp .+196 ; 0xe0 <__bad_interrupt> + 1c: 10 c4 rjmp .+2080 ; 0x83e <__vector_14> + +0000001e <__trampolines_end>: + 1e: 12 01 movw r2, r4 + 20: 10 01 movw r2, r0 + 22: 02 00 .word 0x0002 ; ???? + 24: 00 08 sbc r0, r0 + 26: c0 16 cp r12, r16 + 28: e1 05 cpc r30, r1 + 2a: 00 01 movw r0, r0 + 2c: 01 02 muls r16, r17 + 2e: 00 01 movw r0, r0 + +00000030 : + 30: 10 03 55 00 53 00 42 00 2d 00 32 00 33 00 32 00 ..U.S.B.-.2.3.2. + +00000040 : + 40: 22 03 77 00 77 00 77 00 2e 00 72 00 65 00 63 00 ".w.w.w...r.e.c. + 50: 75 00 72 00 73 00 69 00 6f 00 6e 00 2e 00 6a 00 u.r.s.i.o.n...j. + 60: 70 00 p. + +00000062 : + 62: 04 03 09 04 .... + +00000066 : + 66: 09 02 43 00 02 01 00 80 32 09 04 00 00 01 02 02 ..C.....2....... + 76: 01 00 05 24 00 10 01 04 24 02 02 05 24 06 00 01 ...$....$...$... + 86: 05 24 01 03 01 07 05 83 03 08 00 ff 09 04 01 00 .$.............. + 96: 02 0a 00 00 00 07 05 01 02 02 00 00 07 05 81 02 ................ + a6: 08 00 00 00 .... + +000000aa <__ctors_end>: + aa: 11 24 eor r1, r1 + ac: 1f be out 0x3f, r1 ; 63 + ae: cf e5 ldi r28, 0x5F ; 95 + b0: d1 e0 ldi r29, 0x01 ; 1 + b2: de bf out 0x3e, r29 ; 62 + b4: cd bf out 0x3d, r28 ; 61 + +000000b6 <__do_copy_data>: + b6: 10 e0 ldi r17, 0x00 ; 0 + b8: a0 e6 ldi r26, 0x60 ; 96 + ba: b0 e0 ldi r27, 0x00 ; 0 + bc: e2 ea ldi r30, 0xA2 ; 162 + be: fb e0 ldi r31, 0x0B ; 11 + c0: 02 c0 rjmp .+4 ; 0xc6 <__do_copy_data+0x10> + c2: 05 90 lpm r0, Z+ + c4: 0d 92 st X+, r0 + c6: ac 36 cpi r26, 0x6C ; 108 + c8: b1 07 cpc r27, r17 + ca: d9 f7 brne .-10 ; 0xc2 <__do_copy_data+0xc> + +000000cc <__do_clear_bss>: + cc: 21 e0 ldi r18, 0x01 ; 1 + ce: ac e6 ldi r26, 0x6C ; 108 + d0: b0 e0 ldi r27, 0x00 ; 0 + d2: 01 c0 rjmp .+2 ; 0xd6 <.do_clear_bss_start> + +000000d4 <.do_clear_bss_loop>: + d4: 1d 92 st X+, r1 + +000000d6 <.do_clear_bss_start>: + d6: a0 34 cpi r26, 0x40 ; 64 + d8: b2 07 cpc r27, r18 + da: e1 f7 brne .-8 ; 0xd4 <.do_clear_bss_loop> + dc: e9 d4 rcall .+2514 ; 0xab0
+ de: 5f c5 rjmp .+2750 ; 0xb9e <_exit> + +000000e0 <__bad_interrupt>: + e0: 8f cf rjmp .-226 ; 0x0 <__vectors> + +000000e2 : +/* ------------------------------------------------------------------------- */ + +#if !USB_CFG_SUPPRESS_INTR_CODE +#if USB_CFG_HAVE_INTRIN_ENDPOINT +static void usbGenericSetInterrupt(uchar *data, uchar len, usbTxStatus_t *txStatus) +{ + e2: 1f 93 push r17 + e4: cf 93 push r28 + e6: df 93 push r29 + e8: 16 2f mov r17, r22 + ea: ea 01 movw r28, r20 + +#if USB_CFG_IMPLEMENT_HALT + if(usbTxLen1 == USBPID_STALL) + return; +#endif + if(txStatus->len & 0x10){ /* packet buffer was empty */ + ec: 28 81 ld r18, Y + ee: 24 ff sbrs r18, 4 + f0: 05 c0 rjmp .+10 ; 0xfc + txStatus->buffer[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* toggle token */ + f2: 39 81 ldd r19, Y+1 ; 0x01 + f4: 28 e8 ldi r18, 0x88 ; 136 + f6: 23 27 eor r18, r19 + f8: 29 83 std Y+1, r18 ; 0x01 + fa: 02 c0 rjmp .+4 ; 0x100 + }else{ + txStatus->len = USBPID_NAK; /* avoid sending outdated (overwritten) interrupt data */ + fc: 2a e5 ldi r18, 0x5A ; 90 + fe: 28 83 st Y, r18 + } + p = txStatus->buffer + 1; + i = len; + 100: 21 2f mov r18, r17 + 102: fc 01 movw r30, r24 + if(txStatus->len & 0x10){ /* packet buffer was empty */ + txStatus->buffer[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* toggle token */ + }else{ + txStatus->len = USBPID_NAK; /* avoid sending outdated (overwritten) interrupt data */ + } + p = txStatus->buffer + 1; + 104: ce 01 movw r24, r28 + 106: 02 96 adiw r24, 0x02 ; 2 + i = len; + 108: dc 01 movw r26, r24 + do{ /* if len == 0, we still copy 1 byte, but that's no problem */ + *p++ = *data++; + 10a: 31 91 ld r19, Z+ + 10c: 3d 93 st X+, r19 + 10e: 21 50 subi r18, 0x01 ; 1 + }while(--i > 0); /* loop control at the end is 2 bytes shorter than at beginning */ + 110: 12 16 cp r1, r18 + 112: dc f3 brlt .-10 ; 0x10a + usbCrc16Append(&txStatus->buffer[1], len); + 114: 61 2f mov r22, r17 + 116: 67 d1 rcall .+718 ; 0x3e6 + txStatus->len = len + 4; /* len must be given including sync byte */ + 118: 1c 5f subi r17, 0xFC ; 252 + 11a: 18 83 st Y, r17 + DBG2(0x21 + (((int)txStatus >> 3) & 3), txStatus->buffer, len + 3); +} + 11c: df 91 pop r29 + 11e: cf 91 pop r28 + 120: 1f 91 pop r17 + 122: 08 95 ret + +00000124 : + +USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len) +{ + usbGenericSetInterrupt(data, len, &usbTxStatus1); + 124: 4c e7 ldi r20, 0x7C ; 124 + 126: 50 e0 ldi r21, 0x00 ; 0 + 128: dc cf rjmp .-72 ; 0xe2 + +0000012a : +#endif + +#if USB_CFG_HAVE_INTRIN_ENDPOINT3 +USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len) +{ + usbGenericSetInterrupt(data, len, &usbTxStatus3); + 12a: 47 ea ldi r20, 0xA7 ; 167 + 12c: 50 e0 ldi r21, 0x00 ; 0 + 12e: d9 cf rjmp .-78 ; 0xe2 + +00000130 : +} + +/* ------------------------------------------------------------------------- */ + +USB_PUBLIC void usbPoll(void) +{ + 130: cf 93 push r28 + 132: df 93 push r29 +schar len; +uchar i; + + len = usbRxLen - 3; + 134: 60 91 8d 00 lds r22, 0x008D ; 0x80008d + 138: 63 50 subi r22, 0x03 ; 3 + if(len >= 0){ + 13a: 67 fd sbrc r22, 7 + 13c: b3 c0 rjmp .+358 ; 0x2a4 <__stack+0x145> + * need data integrity checks with this driver, check the CRC in your app + * code and report errors back to the host. Since the ACK was already sent, + * retries must be handled on application level. + * unsigned crc = usbCrc16(buffer + 1, usbRxLen - 3); + */ + usbProcessRx(usbRxBuf + USB_BUFSIZE + 1 - usbInputBufOffset, len); + 13e: 80 91 8a 00 lds r24, 0x008A ; 0x80008a + 142: cc e0 ldi r28, 0x0C ; 12 + 144: d0 e0 ldi r29, 0x00 ; 0 + 146: c8 1b sub r28, r24 + 148: d1 09 sbc r29, r1 + 14a: cf 56 subi r28, 0x6F ; 111 + 14c: df 4f sbci r29, 0xFF ; 255 + * 0...0x0f for OUT on endpoint X + */ + DBG2(0x10 + (usbRxToken & 0xf), data, len + 2); /* SETUP=1d, SETUP-DATA=11, OUTx=1x */ + USB_RX_USER_HOOK(data, len) +#if USB_CFG_IMPLEMENT_FN_WRITEOUT + if(usbRxToken < 0x10){ /* OUT to endpoint != 0: endpoint number in usbRxToken */ + 14e: 80 91 89 00 lds r24, 0x0089 ; 0x800089 + 152: 80 31 cpi r24, 0x10 ; 16 + 154: 18 f4 brcc .+6 ; 0x15c + usbFunctionWriteOut(data, len); + 156: ce 01 movw r24, r28 + 158: 8d d4 rcall .+2330 ; 0xa74 + 15a: 9e c0 rjmp .+316 ; 0x298 <__stack+0x139> + return; + } +#endif + if(usbRxToken == (uchar)USBPID_SETUP){ + 15c: 8d 32 cpi r24, 0x2D ; 45 + 15e: 09 f0 breq .+2 ; 0x162 <__stack+0x3> + 160: 8c c0 rjmp .+280 ; 0x27a <__stack+0x11b> + if(len != 8) /* Setup size must be always 8 bytes. Ignore otherwise. */ + 162: 68 30 cpi r22, 0x08 ; 8 + 164: 09 f0 breq .+2 ; 0x168 <__stack+0x9> + 166: 98 c0 rjmp .+304 ; 0x298 <__stack+0x139> + return; + usbMsgLen_t replyLen; + usbTxBuf[0] = USBPID_DATA0; /* initialize data toggling */ + 168: 83 ec ldi r24, 0xC3 ; 195 + 16a: 80 93 71 00 sts 0x0071, r24 ; 0x800071 + usbTxLen = USBPID_NAK; /* abort pending transmit */ + 16e: 8a e5 ldi r24, 0x5A ; 90 + 170: 80 93 61 00 sts 0x0061, r24 ; 0x800061 + usbMsgFlags = 0; + 174: 10 92 6d 00 sts 0x006D, r1 ; 0x80006d + uchar type = rq->bmRequestType & USBRQ_TYPE_MASK; + if(type != USBRQ_TYPE_STANDARD){ /* standard requests are handled by driver */ + 178: 88 81 ld r24, Y + 17a: 80 76 andi r24, 0x60 ; 96 + 17c: 19 f0 breq .+6 ; 0x184 <__stack+0x25> + replyLen = usbFunctionSetup(data); + 17e: ce 01 movw r24, r28 + 180: 3d d4 rcall .+2170 ; 0x9fc + 182: 68 c0 rjmp .+208 ; 0x254 <__stack+0xf5> + * standard requests instead of class and custom requests. + */ +static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq) +{ +uchar len = 0, *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */ +uchar value = rq->wValue.bytes[0]; + 184: 9a 81 ldd r25, Y+2 ; 0x02 +#if USB_CFG_IMPLEMENT_HALT +uchar index = rq->wIndex.bytes[0]; +#endif + + dataPtr[0] = 0; /* default reply common to USBRQ_GET_STATUS and USBRQ_GET_INTERFACE */ + 186: 10 92 7a 00 sts 0x007A, r1 ; 0x80007a + SWITCH_START(rq->bRequest) + 18a: 89 81 ldd r24, Y+1 ; 0x01 + SWITCH_CASE(USBRQ_GET_STATUS) /* 0 */ + 18c: 81 11 cpse r24, r1 + 18e: 06 c0 rjmp .+12 ; 0x19c <__stack+0x3d> + dataPtr[0] = USB_CFG_IS_SELF_POWERED; +#if USB_CFG_IMPLEMENT_HALT + if(recipient == USBRQ_RCPT_ENDPOINT && index == 0x81) /* request status for endpoint 1 */ + dataPtr[0] = usbTxLen1 == USBPID_STALL; +#endif + dataPtr[1] = 0; + 190: 10 92 7b 00 sts 0x007B, r1 ; 0x80007b +/* usbDriverSetup() is similar to usbFunctionSetup(), but it's used for + * standard requests instead of class and custom requests. + */ +static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq) +{ +uchar len = 0, *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */ + 194: 2a e7 ldi r18, 0x7A ; 122 + 196: 30 e0 ldi r19, 0x00 ; 0 +#if USB_CFG_IMPLEMENT_HALT + if(recipient == USBRQ_RCPT_ENDPOINT && index == 0x81) /* request status for endpoint 1 */ + dataPtr[0] = usbTxLen1 == USBPID_STALL; +#endif + dataPtr[1] = 0; + len = 2; + 198: 82 e0 ldi r24, 0x02 ; 2 + 19a: 57 c0 rjmp .+174 ; 0x24a <__stack+0xeb> + if(value == 0 && index == 0x81){ /* feature 0 == HALT for endpoint == 1 */ + usbTxLen1 = rq->bRequest == USBRQ_CLEAR_FEATURE ? USBPID_NAK : USBPID_STALL; + usbResetDataToggling(); + } +#endif + SWITCH_CASE(USBRQ_SET_ADDRESS) /* 5 */ + 19c: 85 30 cpi r24, 0x05 ; 5 + 19e: 19 f4 brne .+6 ; 0x1a6 <__stack+0x47> + usbNewDeviceAddr = value; + 1a0: 90 93 8e 00 sts 0x008E, r25 ; 0x80008e + 1a4: 4f c0 rjmp .+158 ; 0x244 <__stack+0xe5> + USB_SET_ADDRESS_HOOK(); + SWITCH_CASE(USBRQ_GET_DESCRIPTOR) /* 6 */ + 1a6: 86 30 cpi r24, 0x06 ; 6 + 1a8: a9 f5 brne .+106 ; 0x214 <__stack+0xb5> +static inline usbMsgLen_t usbDriverDescriptor(usbRequest_t *rq) +{ +usbMsgLen_t len = 0; +uchar flags = USB_FLG_MSGPTR_IS_ROM; + + SWITCH_START(rq->wValue.bytes[1]) + 1aa: 8b 81 ldd r24, Y+3 ; 0x03 + SWITCH_CASE(USBDESCR_DEVICE) /* 1 */ + 1ac: 81 30 cpi r24, 0x01 ; 1 + 1ae: 41 f4 brne .+16 ; 0x1c0 <__stack+0x61> + GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_DEVICE, usbDescriptorDevice) + 1b0: 8e e1 ldi r24, 0x1E ; 30 + 1b2: 90 e0 ldi r25, 0x00 ; 0 + 1b4: 90 93 8c 00 sts 0x008C, r25 ; 0x80008c + 1b8: 80 93 8b 00 sts 0x008B, r24 ; 0x80008b + 1bc: 82 e1 ldi r24, 0x12 ; 18 + 1be: 26 c0 rjmp .+76 ; 0x20c <__stack+0xad> + SWITCH_CASE(USBDESCR_CONFIG) /* 2 */ + 1c0: 82 30 cpi r24, 0x02 ; 2 + 1c2: 19 f4 brne .+6 ; 0x1ca <__stack+0x6b> + GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_CONFIGURATION, usbDescriptorConfiguration) + 1c4: ce 01 movw r24, r28 + 1c6: 05 d4 rcall .+2058 ; 0x9d2 + 1c8: 21 c0 rjmp .+66 ; 0x20c <__stack+0xad> + SWITCH_CASE(USBDESCR_STRING) /* 3 */ + 1ca: 83 30 cpi r24, 0x03 ; 3 + 1cc: f1 f4 brne .+60 ; 0x20a <__stack+0xab> + if(USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_RAM) + flags = 0; + len = usbFunctionDescriptor(rq); +#else /* USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_DYNAMIC */ + SWITCH_START(rq->wValue.bytes[0]) + SWITCH_CASE(0) + 1ce: 91 11 cpse r25, r1 + 1d0: 08 c0 rjmp .+16 ; 0x1e2 <__stack+0x83> + GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_0, usbDescriptorString0) + 1d2: 82 e6 ldi r24, 0x62 ; 98 + 1d4: 90 e0 ldi r25, 0x00 ; 0 + 1d6: 90 93 8c 00 sts 0x008C, r25 ; 0x80008c + 1da: 80 93 8b 00 sts 0x008B, r24 ; 0x80008b + 1de: 84 e0 ldi r24, 0x04 ; 4 + 1e0: 15 c0 rjmp .+42 ; 0x20c <__stack+0xad> + SWITCH_CASE(1) + 1e2: 91 30 cpi r25, 0x01 ; 1 + 1e4: 41 f4 brne .+16 ; 0x1f6 <__stack+0x97> + GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_VENDOR, usbDescriptorStringVendor) + 1e6: 80 e4 ldi r24, 0x40 ; 64 + 1e8: 90 e0 ldi r25, 0x00 ; 0 + 1ea: 90 93 8c 00 sts 0x008C, r25 ; 0x80008c + 1ee: 80 93 8b 00 sts 0x008B, r24 ; 0x80008b + 1f2: 82 e2 ldi r24, 0x22 ; 34 + 1f4: 0b c0 rjmp .+22 ; 0x20c <__stack+0xad> + SWITCH_CASE(2) + 1f6: 92 30 cpi r25, 0x02 ; 2 + 1f8: 41 f4 brne .+16 ; 0x20a <__stack+0xab> + GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_PRODUCT, usbDescriptorStringDevice) + 1fa: 80 e3 ldi r24, 0x30 ; 48 + 1fc: 90 e0 ldi r25, 0x00 ; 0 + 1fe: 90 93 8c 00 sts 0x008C, r25 ; 0x80008c + 202: 80 93 8b 00 sts 0x008B, r24 ; 0x80008b + 206: 80 e1 ldi r24, 0x10 ; 16 + 208: 01 c0 rjmp .+2 ; 0x20c <__stack+0xad> +/* usbDriverDescriptor() is similar to usbFunctionDescriptor(), but used + * internally for all types of descriptors. + */ +static inline usbMsgLen_t usbDriverDescriptor(usbRequest_t *rq) +{ +usbMsgLen_t len = 0; + 20a: 80 e0 ldi r24, 0x00 ; 0 + SWITCH_DEFAULT + if(USB_CFG_DESCR_PROPS_UNKNOWN & USB_PROP_IS_DYNAMIC){ + len = usbFunctionDescriptor(rq); + } + SWITCH_END + usbMsgFlags = flags; + 20c: 90 e4 ldi r25, 0x40 ; 64 + 20e: 90 93 6d 00 sts 0x006D, r25 ; 0x80006d + 212: 20 c0 rjmp .+64 ; 0x254 <__stack+0xf5> + usbNewDeviceAddr = value; + USB_SET_ADDRESS_HOOK(); + SWITCH_CASE(USBRQ_GET_DESCRIPTOR) /* 6 */ + len = usbDriverDescriptor(rq); + goto skipMsgPtrAssignment; + SWITCH_CASE(USBRQ_GET_CONFIGURATION) /* 8 */ + 214: 88 30 cpi r24, 0x08 ; 8 + 216: 79 f0 breq .+30 ; 0x236 <__stack+0xd7> + dataPtr = &usbConfiguration; /* send current configuration value */ + len = 1; + SWITCH_CASE(USBRQ_SET_CONFIGURATION) /* 9 */ + 218: 89 30 cpi r24, 0x09 ; 9 + 21a: 19 f4 brne .+6 ; 0x222 <__stack+0xc3> + usbConfiguration = value; + 21c: 90 93 90 00 sts 0x0090, r25 ; 0x800090 + 220: 11 c0 rjmp .+34 ; 0x244 <__stack+0xe5> + usbResetStall(); + SWITCH_CASE(USBRQ_GET_INTERFACE) /* 10 */ + 222: 8a 30 cpi r24, 0x0A ; 10 + 224: 59 f0 breq .+22 ; 0x23c <__stack+0xdd> + len = 1; +#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE + SWITCH_CASE(USBRQ_SET_INTERFACE) /* 11 */ + 226: 8b 30 cpi r24, 0x0B ; 11 + 228: 69 f4 brne .+26 ; 0x244 <__stack+0xe5> +/* ------------------------------------------------------------------------- */ + +static inline void usbResetDataToggling(void) +{ +#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE + USB_SET_DATATOKEN1(USB_INITIAL_DATATOKEN); /* reset data toggling for interrupt endpoint */ + 22a: 8b e4 ldi r24, 0x4B ; 75 + 22c: 80 93 7d 00 sts 0x007D, r24 ; 0x80007d +# if USB_CFG_HAVE_INTRIN_ENDPOINT3 + USB_SET_DATATOKEN3(USB_INITIAL_DATATOKEN); /* reset data toggling for interrupt endpoint */ + 230: 80 93 a8 00 sts 0x00A8, r24 ; 0x8000a8 + 234: 07 c0 rjmp .+14 ; 0x244 <__stack+0xe5> + USB_SET_ADDRESS_HOOK(); + SWITCH_CASE(USBRQ_GET_DESCRIPTOR) /* 6 */ + len = usbDriverDescriptor(rq); + goto skipMsgPtrAssignment; + SWITCH_CASE(USBRQ_GET_CONFIGURATION) /* 8 */ + dataPtr = &usbConfiguration; /* send current configuration value */ + 236: 20 e9 ldi r18, 0x90 ; 144 + 238: 30 e0 ldi r19, 0x00 ; 0 + 23a: 02 c0 rjmp .+4 ; 0x240 <__stack+0xe1> +/* usbDriverSetup() is similar to usbFunctionSetup(), but it's used for + * standard requests instead of class and custom requests. + */ +static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq) +{ +uchar len = 0, *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */ + 23c: 2a e7 ldi r18, 0x7A ; 122 + 23e: 30 e0 ldi r19, 0x00 ; 0 + len = 1; + SWITCH_CASE(USBRQ_SET_CONFIGURATION) /* 9 */ + usbConfiguration = value; + usbResetStall(); + SWITCH_CASE(USBRQ_GET_INTERFACE) /* 10 */ + len = 1; + 240: 81 e0 ldi r24, 0x01 ; 1 + 242: 03 c0 rjmp .+6 ; 0x24a <__stack+0xeb> +/* usbDriverSetup() is similar to usbFunctionSetup(), but it's used for + * standard requests instead of class and custom requests. + */ +static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq) +{ +uchar len = 0, *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */ + 244: 2a e7 ldi r18, 0x7A ; 122 + 246: 30 e0 ldi r19, 0x00 ; 0 + 248: 80 e0 ldi r24, 0x00 ; 0 + usbResetStall(); +#endif + SWITCH_DEFAULT /* 7=SET_DESCRIPTOR, 12=SYNC_FRAME */ + /* Should we add an optional hook here? */ + SWITCH_END + usbMsgPtr = dataPtr; + 24a: 30 93 8c 00 sts 0x008C, r19 ; 0x80008c + 24e: 20 93 8b 00 sts 0x008B, r18 ; 0x80008b + 252: 09 c0 rjmp .+18 ; 0x266 <__stack+0x107> + replyLen = usbFunctionSetup(data); + }else{ + replyLen = usbDriverSetup(rq); + } +#if USB_CFG_IMPLEMENT_FN_READ || USB_CFG_IMPLEMENT_FN_WRITE + if(replyLen == USB_NO_MSG){ /* use user-supplied read/write function */ + 254: 8f 3f cpi r24, 0xFF ; 255 + 256: 39 f4 brne .+14 ; 0x266 <__stack+0x107> + /* do some conditioning on replyLen, but on IN transfers only */ + if((rq->bmRequestType & USBRQ_DIR_MASK) != USBRQ_DIR_HOST_TO_DEVICE){ + 258: 98 81 ld r25, Y + 25a: 97 fd sbrc r25, 7 + if(sizeof(replyLen) < sizeof(rq->wLength.word)){ /* help compiler with optimizing */ + replyLen = rq->wLength.bytes[0]; + 25c: 8e 81 ldd r24, Y+6 ; 0x06 + }else{ + replyLen = rq->wLength.word; + } + } + usbMsgFlags = USB_FLG_USE_USER_RW; + 25e: 90 e8 ldi r25, 0x80 ; 128 + 260: 90 93 6d 00 sts 0x006D, r25 ; 0x80006d + 264: 07 c0 rjmp .+14 ; 0x274 <__stack+0x115> + }else /* The 'else' prevents that we limit a replyLen of USB_NO_MSG to the maximum transfer len. */ +#endif + if(sizeof(replyLen) < sizeof(rq->wLength.word)){ /* help compiler with optimizing */ + if(!rq->wLength.bytes[1] && replyLen > rq->wLength.bytes[0]) /* limit length to max */ + 266: 9f 81 ldd r25, Y+7 ; 0x07 + 268: 91 11 cpse r25, r1 + 26a: 04 c0 rjmp .+8 ; 0x274 <__stack+0x115> + 26c: 9e 81 ldd r25, Y+6 ; 0x06 + 26e: 98 17 cp r25, r24 + 270: 08 f4 brcc .+2 ; 0x274 <__stack+0x115> + 272: 89 2f mov r24, r25 + replyLen = rq->wLength.bytes[0]; + }else{ + if(replyLen > rq->wLength.word) /* limit length to max */ + replyLen = rq->wLength.word; + } + usbMsgLen = replyLen; + 274: 80 93 60 00 sts 0x0060, r24 ; 0x800060 <__data_start> + 278: 0f c0 rjmp .+30 ; 0x298 <__stack+0x139> + }else{ /* usbRxToken must be USBPID_OUT, which means data phase of setup (control-out) */ +#if USB_CFG_IMPLEMENT_FN_WRITE + if(usbMsgFlags & USB_FLG_USE_USER_RW){ + 27a: 80 91 6d 00 lds r24, 0x006D ; 0x80006d + 27e: 87 ff sbrs r24, 7 + 280: 0b c0 rjmp .+22 ; 0x298 <__stack+0x139> + uchar rval = usbFunctionWrite(data, len); + 282: ce 01 movw r24, r28 + 284: e8 d3 rcall .+2000 ; 0xa56 + if(rval == 0xff){ /* an error occurred */ + 286: 8f 3f cpi r24, 0xFF ; 255 + 288: 21 f4 brne .+8 ; 0x292 <__stack+0x133> + usbTxLen = USBPID_STALL; + 28a: 8e e1 ldi r24, 0x1E ; 30 + 28c: 80 93 61 00 sts 0x0061, r24 ; 0x800061 + 290: 03 c0 rjmp .+6 ; 0x298 <__stack+0x139> + }else if(rval != 0){ /* This was the final package */ + 292: 81 11 cpse r24, r1 + usbMsgLen = 0; /* answer with a zero-sized data packet */ + 294: 10 92 60 00 sts 0x0060, r1 ; 0x800060 <__data_start> + * retries must be handled on application level. + * unsigned crc = usbCrc16(buffer + 1, usbRxLen - 3); + */ + usbProcessRx(usbRxBuf + USB_BUFSIZE + 1 - usbInputBufOffset, len); +#if USB_CFG_HAVE_FLOWCONTROL + if(usbRxLen > 0) /* only mark as available if not inactivated */ + 298: 80 91 8d 00 lds r24, 0x008D ; 0x80008d + 29c: 18 16 cp r1, r24 + 29e: 14 f4 brge .+4 ; 0x2a4 <__stack+0x145> + usbRxLen = 0; + 2a0: 10 92 8d 00 sts 0x008D, r1 ; 0x80008d +#else + usbRxLen = 0; /* mark rx buffer as available */ +#endif + } + if(usbTxLen & 0x10){ /* transmit system idle */ + 2a4: 80 91 61 00 lds r24, 0x0061 ; 0x800061 + 2a8: 84 ff sbrs r24, 4 + 2aa: 55 c0 rjmp .+170 ; 0x356 <__stack+0x1f7> + if(usbMsgLen != USB_NO_MSG){ /* transmit data pending? */ + 2ac: 80 91 60 00 lds r24, 0x0060 ; 0x800060 <__data_start> + 2b0: 8f 3f cpi r24, 0xFF ; 255 + 2b2: 09 f4 brne .+2 ; 0x2b6 <__stack+0x157> + 2b4: 50 c0 rjmp .+160 ; 0x356 <__stack+0x1f7> + 2b6: c8 2f mov r28, r24 + 2b8: 89 30 cpi r24, 0x09 ; 9 + 2ba: 08 f0 brcs .+2 ; 0x2be <__stack+0x15f> + 2bc: c8 e0 ldi r28, 0x08 ; 8 +uchar len; + + wantLen = usbMsgLen; + if(wantLen > 8) + wantLen = 8; + usbMsgLen -= wantLen; + 2be: 8c 1b sub r24, r28 + 2c0: 80 93 60 00 sts 0x0060, r24 ; 0x800060 <__data_start> + usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */ + 2c4: 90 91 71 00 lds r25, 0x0071 ; 0x800071 + 2c8: 88 e8 ldi r24, 0x88 ; 136 + 2ca: 89 27 eor r24, r25 + 2cc: 80 93 71 00 sts 0x0071, r24 ; 0x800071 +/* This function is similar to usbFunctionRead(), but it's also called for + * data handled automatically by the driver (e.g. descriptor reads). + */ +static uchar usbDeviceRead(uchar *data, uchar len) +{ + if(len > 0){ /* don't bother app with 0 sized reads */ + 2d0: cc 23 and r28, r28 + 2d2: 09 f4 brne .+2 ; 0x2d6 <__stack+0x177> + 2d4: 59 c0 rjmp .+178 ; 0x388 <__stack+0x229> +#if USB_CFG_IMPLEMENT_FN_READ + if(usbMsgFlags & USB_FLG_USE_USER_RW){ + 2d6: 20 91 6d 00 lds r18, 0x006D ; 0x80006d + 2da: 27 ff sbrs r18, 7 + 2dc: 08 c0 rjmp .+16 ; 0x2ee <__stack+0x18f> + len = usbFunctionRead(data, len); + 2de: 6c 2f mov r22, r28 + 2e0: 82 e7 ldi r24, 0x72 ; 114 + 2e2: 90 e0 ldi r25, 0x00 ; 0 + 2e4: a8 d3 rcall .+1872 ; 0xa36 + 2e6: c8 2f mov r28, r24 + if(wantLen > 8) + wantLen = 8; + usbMsgLen -= wantLen; + usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */ + len = usbDeviceRead(usbTxBuf + 1, wantLen); + if(len <= 8){ /* valid data packet */ + 2e8: 89 30 cpi r24, 0x09 ; 9 + 2ea: 78 f5 brcc .+94 ; 0x34a <__stack+0x1eb> + 2ec: 23 c0 rjmp .+70 ; 0x334 <__stack+0x1d5> + if(usbMsgFlags & USB_FLG_USE_USER_RW){ + len = usbFunctionRead(data, len); + }else +#endif + { + uchar i = len, *r = usbMsgPtr; + 2ee: 80 91 8b 00 lds r24, 0x008B ; 0x80008b + 2f2: 90 91 8c 00 lds r25, 0x008C ; 0x80008c + if(usbMsgFlags & USB_FLG_MSGPTR_IS_ROM){ /* ROM data */ + 2f6: 26 ff sbrs r18, 6 + 2f8: 0a c0 rjmp .+20 ; 0x30e <__stack+0x1af> + 2fa: a2 e7 ldi r26, 0x72 ; 114 + 2fc: b0 e0 ldi r27, 0x00 ; 0 + 2fe: fc 01 movw r30, r24 + 300: 2c 2f mov r18, r28 + do{ + uchar c = USB_READ_FLASH(r); /* assign to char size variable to enforce byte ops */ + 302: 34 91 lpm r19, Z + *data++ = c; + 304: 3d 93 st X+, r19 + r++; + 306: 31 96 adiw r30, 0x01 ; 1 + }while(--i); + 308: 21 50 subi r18, 0x01 ; 1 + 30a: d9 f7 brne .-10 ; 0x302 <__stack+0x1a3> + 30c: 08 c0 rjmp .+16 ; 0x31e <__stack+0x1bf> + 30e: dc 01 movw r26, r24 + 310: e2 e7 ldi r30, 0x72 ; 114 + 312: f0 e0 ldi r31, 0x00 ; 0 + len = usbFunctionRead(data, len); + }else +#endif + { + uchar i = len, *r = usbMsgPtr; + if(usbMsgFlags & USB_FLG_MSGPTR_IS_ROM){ /* ROM data */ + 314: 2c 2f mov r18, r28 + *data++ = c; + r++; + }while(--i); + }else{ /* RAM data */ + do{ + *data++ = *r++; + 316: 3d 91 ld r19, X+ + 318: 31 93 st Z+, r19 + }while(--i); + 31a: 21 50 subi r18, 0x01 ; 1 + 31c: e1 f7 brne .-8 ; 0x316 <__stack+0x1b7> + 31e: 2f ef ldi r18, 0xFF ; 255 + 320: 2c 0f add r18, r28 + 322: 30 e0 ldi r19, 0x00 ; 0 + 324: 2f 5f subi r18, 0xFF ; 255 + 326: 3f 4f sbci r19, 0xFF ; 255 + 328: 82 0f add r24, r18 + 32a: 93 1f adc r25, r19 + } + usbMsgPtr = r; + 32c: 90 93 8c 00 sts 0x008C, r25 ; 0x80008c + 330: 80 93 8b 00 sts 0x008B, r24 ; 0x80008b + wantLen = 8; + usbMsgLen -= wantLen; + usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */ + len = usbDeviceRead(usbTxBuf + 1, wantLen); + if(len <= 8){ /* valid data packet */ + usbCrc16Append(&usbTxBuf[1], len); + 334: 6c 2f mov r22, r28 + 336: 82 e7 ldi r24, 0x72 ; 114 + 338: 90 e0 ldi r25, 0x00 ; 0 + 33a: 55 d0 rcall .+170 ; 0x3e6 + len += 4; /* length including sync byte */ + 33c: cc 5f subi r28, 0xFC ; 252 + if(len < 12) /* a partial package identifies end of message */ + 33e: cc 30 cpi r28, 0x0C ; 12 + 340: 41 f0 breq .+16 ; 0x352 <__stack+0x1f3> + usbMsgLen = USB_NO_MSG; + 342: 8f ef ldi r24, 0xFF ; 255 + 344: 80 93 60 00 sts 0x0060, r24 ; 0x800060 <__data_start> + 348: 04 c0 rjmp .+8 ; 0x352 <__stack+0x1f3> + }else{ + len = USBPID_STALL; /* stall the endpoint */ + usbMsgLen = USB_NO_MSG; + 34a: 8f ef ldi r24, 0xFF ; 255 + 34c: 80 93 60 00 sts 0x0060, r24 ; 0x800060 <__data_start> + usbCrc16Append(&usbTxBuf[1], len); + len += 4; /* length including sync byte */ + if(len < 12) /* a partial package identifies end of message */ + usbMsgLen = USB_NO_MSG; + }else{ + len = USBPID_STALL; /* stall the endpoint */ + 350: ce e1 ldi r28, 0x1E ; 30 + usbMsgLen = USB_NO_MSG; + } + usbTxLen = len; + 352: c0 93 61 00 sts 0x0061, r28 ; 0x800061 + if(usbTxLen & 0x10){ /* transmit system idle */ + if(usbMsgLen != USB_NO_MSG){ /* transmit data pending? */ + usbBuildTxBlock(); + } + } + for(i = 20; i > 0; i--){ + 356: 84 e1 ldi r24, 0x14 ; 20 + uchar usbLineStatus = USBIN & USBMASK; + 358: 96 b3 in r25, 0x16 ; 22 + if(usbLineStatus != 0) /* SE0 has ended */ + 35a: 98 71 andi r25, 0x18 ; 24 + 35c: 31 f4 brne .+12 ; 0x36a <__stack+0x20b> + if(usbTxLen & 0x10){ /* transmit system idle */ + if(usbMsgLen != USB_NO_MSG){ /* transmit data pending? */ + usbBuildTxBlock(); + } + } + for(i = 20; i > 0; i--){ + 35e: 81 50 subi r24, 0x01 ; 1 + 360: d9 f7 brne .-10 ; 0x358 <__stack+0x1f9> + uchar usbLineStatus = USBIN & USBMASK; + if(usbLineStatus != 0) /* SE0 has ended */ + goto isNotReset; + } + /* RESET condition, called multiple times during reset */ + usbNewDeviceAddr = 0; + 362: 10 92 8e 00 sts 0x008E, r1 ; 0x80008e + usbDeviceAddr = 0; + 366: 10 92 88 00 sts 0x0088, r1 ; 0x800088 + +static inline void usbHandleResetHook(uchar notResetState) +{ +#ifdef USB_RESET_HOOK +static uchar wasReset; +uchar isReset = !notResetState; + 36a: c1 e0 ldi r28, 0x01 ; 1 + 36c: 81 11 cpse r24, r1 + 36e: c0 e0 ldi r28, 0x00 ; 0 + + if(wasReset != isReset){ + 370: 90 91 6c 00 lds r25, 0x006C ; 0x80006c <__data_end> + 374: c9 17 cp r28, r25 + 376: 71 f0 breq .+28 ; 0x394 <__stack+0x235> + USB_RESET_HOOK(isReset); + 378: 88 23 and r24, r24 + 37a: 19 f0 breq .+6 ; 0x382 <__stack+0x223> + 37c: f8 94 cli + 37e: bf d1 rcall .+894 ; 0x6fe + 380: 78 94 sei + wasReset = isReset; + 382: c0 93 6c 00 sts 0x006C, r28 ; 0x80006c <__data_end> + usbDeviceAddr = 0; + usbResetStall(); + DBG1(0xff, 0, 0); +isNotReset: + usbHandleResetHook(i); +} + 386: 06 c0 rjmp .+12 ; 0x394 <__stack+0x235> + wantLen = 8; + usbMsgLen -= wantLen; + usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */ + len = usbDeviceRead(usbTxBuf + 1, wantLen); + if(len <= 8){ /* valid data packet */ + usbCrc16Append(&usbTxBuf[1], len); + 388: 60 e0 ldi r22, 0x00 ; 0 + 38a: 82 e7 ldi r24, 0x72 ; 114 + 38c: 90 e0 ldi r25, 0x00 ; 0 + 38e: 2b d0 rcall .+86 ; 0x3e6 + len += 4; /* length including sync byte */ + 390: c4 e0 ldi r28, 0x04 ; 4 + 392: d7 cf rjmp .-82 ; 0x342 <__stack+0x1e3> + usbDeviceAddr = 0; + usbResetStall(); + DBG1(0xff, 0, 0); +isNotReset: + usbHandleResetHook(i); +} + 394: df 91 pop r29 + 396: cf 91 pop r28 + 398: 08 95 ret + +0000039a : +/* ------------------------------------------------------------------------- */ + +USB_PUBLIC void usbInit(void) +{ +#if USB_INTR_CFG_SET != 0 + USB_INTR_CFG |= USB_INTR_CFG_SET; + 39a: ac 9a sbi 0x15, 4 ; 21 +#endif +#if USB_INTR_CFG_CLR != 0 + USB_INTR_CFG &= ~(USB_INTR_CFG_CLR); +#endif + USB_INTR_ENABLE |= (1 << USB_INTR_ENABLE_BIT); + 39c: 8b b7 in r24, 0x3b ; 59 + 39e: 80 62 ori r24, 0x20 ; 32 + 3a0: 8b bf out 0x3b, r24 ; 59 +/* ------------------------------------------------------------------------- */ + +static inline void usbResetDataToggling(void) +{ +#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE + USB_SET_DATATOKEN1(USB_INITIAL_DATATOKEN); /* reset data toggling for interrupt endpoint */ + 3a2: ac e7 ldi r26, 0x7C ; 124 + 3a4: b0 e0 ldi r27, 0x00 ; 0 + 3a6: 8b e4 ldi r24, 0x4B ; 75 + 3a8: 11 96 adiw r26, 0x01 ; 1 + 3aa: 8c 93 st X, r24 + 3ac: 11 97 sbiw r26, 0x01 ; 1 +# if USB_CFG_HAVE_INTRIN_ENDPOINT3 + USB_SET_DATATOKEN3(USB_INITIAL_DATATOKEN); /* reset data toggling for interrupt endpoint */ + 3ae: e7 ea ldi r30, 0xA7 ; 167 + 3b0: f0 e0 ldi r31, 0x00 ; 0 + 3b2: 81 83 std Z+1, r24 ; 0x01 + USB_INTR_CFG &= ~(USB_INTR_CFG_CLR); +#endif + USB_INTR_ENABLE |= (1 << USB_INTR_ENABLE_BIT); + usbResetDataToggling(); +#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE + usbTxLen1 = USBPID_NAK; + 3b4: 8a e5 ldi r24, 0x5A ; 90 + 3b6: 8c 93 st X, r24 +#if USB_CFG_HAVE_INTRIN_ENDPOINT3 + usbTxLen3 = USBPID_NAK; + 3b8: 80 83 st Z, r24 + 3ba: 08 95 ret + +000003bc : +; poly r20+r21 +; scratch r23 +; resCrc r24+r25 / r16+r17 +; ptr X / Z +usbCrc16: + mov ptrL, argPtrL + 3bc: a8 2f mov r26, r24 + mov ptrH, argPtrH + 3be: b9 2f mov r27, r25 + ldi resCrcL, 0 + 3c0: 80 e0 ldi r24, 0x00 ; 0 + ldi resCrcH, 0 + 3c2: 90 e0 ldi r25, 0x00 ; 0 + ldi polyL, lo8(0xa001) + 3c4: 41 e0 ldi r20, 0x01 ; 1 + ldi polyH, hi8(0xa001) + 3c6: 50 ea ldi r21, 0xA0 ; 160 + com argLen ; argLen = -argLen - 1: modified loop to ensure that carry is set + 3c8: 60 95 com r22 + ldi bitCnt, 0 ; loop counter with starnd condition = end condition + 3ca: 30 e0 ldi r19, 0x00 ; 0 + rjmp usbCrcLoopEntry + 3cc: 09 c0 rjmp .+18 ; 0x3e0 + +000003ce : +usbCrcByteLoop: + ld byte, ptr+ + 3ce: 2d 91 ld r18, X+ + eor resCrcL, byte + 3d0: 82 27 eor r24, r18 + +000003d2 : +usbCrcBitLoop: + ror resCrcH ; carry is always set here (see brcs jumps to here) + 3d2: 97 95 ror r25 + ror resCrcL + 3d4: 87 95 ror r24 + brcs usbCrcNoXor + 3d6: 10 f0 brcs .+4 ; 0x3dc + eor resCrcL, polyL + 3d8: 84 27 eor r24, r20 + eor resCrcH, polyH + 3da: 95 27 eor r25, r21 + +000003dc : +usbCrcNoXor: + subi bitCnt, 224 ; (8 * 224) % 256 = 0; this loop iterates 8 times + 3dc: 30 5e subi r19, 0xE0 ; 224 + brcs usbCrcBitLoop + 3de: c8 f3 brcs .-14 ; 0x3d2 + +000003e0 : +usbCrcLoopEntry: + subi argLen, -1 + 3e0: 6f 5f subi r22, 0xFF ; 255 + brcs usbCrcByteLoop + 3e2: a8 f3 brcs .-22 ; 0x3ce + +000003e4 : +usbCrcReady: + ret + 3e4: 08 95 ret + +000003e6 : + +#endif /* USB_USE_FAST_CRC */ + +; extern unsigned usbCrc16Append(unsigned char *data, unsigned char len); +usbCrc16Append: + rcall usbCrc16 + 3e6: ea df rcall .-44 ; 0x3bc + st ptr+, resCrcL + 3e8: 8d 93 st X+, r24 + st ptr+, resCrcH + 3ea: 9d 93 st X+, r25 + ret + 3ec: 08 95 ret + +000003ee : + +; extern unsigned usbMeasurePacketLength(void); +; returns time between two idle strobes in multiples of 7 CPU clocks +.global usbMeasureFrameLength +usbMeasureFrameLength: + ldi cntH, 6 ; wait ~ 10 ms for D- == 0 + 3ee: a6 e0 ldi r26, 0x06 ; 6 + clr cnt16L + 3f0: 88 27 eor r24, r24 + clr cnt16H + 3f2: 99 27 eor r25, r25 + +000003f4 : +usbMFTime16: + dec cntH + 3f4: aa 95 dec r26 + breq usbMFTimeout + 3f6: 69 f0 breq .+26 ; 0x412 + +000003f8 : +usbMFWaitStrobe: ; first wait for D- == 0 (idle strobe) + sbiw cnt16, 1 ;[0] [6] + 3f8: 01 97 sbiw r24, 0x01 ; 1 + breq usbMFTime16 ;[2] + 3fa: e1 f3 breq .-8 ; 0x3f4 + sbic USBIN, USBMINUS ;[3] + 3fc: b3 99 sbic 0x16, 3 ; 22 + rjmp usbMFWaitStrobe ;[4] + 3fe: fc cf rjmp .-8 ; 0x3f8 + +00000400 : +usbMFWaitIdle: ; then wait until idle again + sbis USBIN, USBMINUS ;1 wait for D- == 1 + 400: b3 9b sbis 0x16, 3 ; 22 + rjmp usbMFWaitIdle ;2 + 402: fe cf rjmp .-4 ; 0x400 + ldi cnt16L, 1 ;1 represents cycles so far + 404: 81 e0 ldi r24, 0x01 ; 1 + clr cnt16H ;1 + 406: 99 27 eor r25, r25 + +00000408 : +usbMFWaitLoop: + in cntH, USBIN ;[0] [7] + 408: a6 b3 in r26, 0x16 ; 22 + adiw cnt16, 1 ;[1] + 40a: 01 96 adiw r24, 0x01 ; 1 + breq usbMFTimeout ;[3] + 40c: 11 f0 breq .+4 ; 0x412 + andi cntH, USBMASK ;[4] + 40e: a8 71 andi r26, 0x18 ; 24 + brne usbMFWaitLoop ;[5] + 410: d9 f7 brne .-10 ; 0x408 + +00000412 : +usbMFTimeout: +#if resL != cnt16L + mov resL, cnt16L + mov resH, cnt16H +#endif + ret + 412: 08 95 ret + +00000414 <__vector_2>: +; when instruction starts + + +USB_INTR_VECTOR: +;order of registers pushed: YL, SREG [sofError], r0, YH, shift, x1, x2, x3, x4, cnt + push YL ;[-23] push only what is necessary to sync with edge ASAP + 414: cf 93 push r28 + in YL, SREG ;[-21] + 416: cf b7 in r28, 0x3f ; 63 + push YL ;[-20] + 418: cf 93 push r28 + +0000041a : +;sync up with J to K edge during sync pattern -- use fastest possible loops +;The first part waits at most 1 bit long since we must be in sync pattern. +;YL is guarenteed to be < 0x80 because I flag is clear. When we jump to +;waitForJ, ensure that this prerequisite is met. +waitForJ: + inc YL + 41a: c3 95 inc r28 + sbis USBIN, USBMINUS + 41c: b3 9b sbis 0x16, 3 ; 22 + brne waitForJ ; just make sure we have ANY timeout + 41e: e9 f7 brne .-6 ; 0x41a + +00000420 : +waitForK: +;The following code results in a sampling window of < 1/4 bit which meets the spec. + sbis USBIN, USBMINUS ;[-15] + 420: b3 9b sbis 0x16, 3 ; 22 + rjmp foundK ;[-14] + 422: 0b c0 rjmp .+22 ; 0x43a + sbis USBIN, USBMINUS + 424: b3 9b sbis 0x16, 3 ; 22 + rjmp foundK + 426: 09 c0 rjmp .+18 ; 0x43a + sbis USBIN, USBMINUS + 428: b3 9b sbis 0x16, 3 ; 22 + rjmp foundK + 42a: 07 c0 rjmp .+14 ; 0x43a + sbis USBIN, USBMINUS + 42c: b3 9b sbis 0x16, 3 ; 22 + rjmp foundK + 42e: 05 c0 rjmp .+10 ; 0x43a + sbis USBIN, USBMINUS + 430: b3 9b sbis 0x16, 3 ; 22 + rjmp foundK + 432: 03 c0 rjmp .+6 ; 0x43a + sbis USBIN, USBMINUS + 434: b3 9b sbis 0x16, 3 ; 22 + rjmp foundK + 436: 01 c0 rjmp .+2 ; 0x43a + sts usbSofCount, YL +#endif /* USB_COUNT_SOF */ +#ifdef USB_SOF_HOOK + USB_SOF_HOOK +#endif + rjmp sofError + 438: d8 c0 rjmp .+432 ; 0x5ea + +0000043a : +foundK: ;[-12] +;{3, 5} after falling D- edge, average delay: 4 cycles [we want 5 for center sampling] +;we have 1 bit time for setup purposes, then sample again. Numbers in brackets +;are cycles from center of first sync (double K) bit after the instruction + push r0 ;[-12] + 43a: 0f 92 push r0 +; [---] ;[-11] + push YH ;[-10] + 43c: df 93 push r29 +; [---] ;[-9] + lds YL, usbInputBufOffset;[-8] + 43e: c0 91 8a 00 lds r28, 0x008A ; 0x80008a +; [---] ;[-7] + clr YH ;[-6] + 442: dd 27 eor r29, r29 + subi YL, lo8(-(usbRxBuf));[-5] [rx loop init] + 444: cf 56 subi r28, 0x6F ; 111 + sbci YH, hi8(-(usbRxBuf));[-4] [rx loop init] + 446: df 4f sbci r29, 0xFF ; 255 + mov r0, x2 ;[-3] [rx loop init] + 448: 01 2e mov r0, r17 + sbis USBIN, USBMINUS ;[-2] we want two bits K (sample 2 cycles too early) + 44a: b3 9b sbis 0x16, 3 ; 22 + rjmp haveTwoBitsK ;[-1] + 44c: 03 c0 rjmp .+6 ; 0x454 + pop YH ;[0] undo the pushes from before + 44e: df 91 pop r29 + pop r0 ;[2] + 450: 0f 90 pop r0 + rjmp waitForK ;[4] this was not the end of sync, retry + 452: e6 cf rjmp .-52 ; 0x420 + +00000454 : + +;---------------------------------------------------------------------------- +; push more registers and initialize values while we sample the first bits: +;---------------------------------------------------------------------------- +haveTwoBitsK: ;[1] + push shift ;[1] + 454: 2f 93 push r18 + push x1 ;[3] + 456: 0f 93 push r16 + push x2 ;[5] + 458: 1f 93 push r17 + push x3 ;[7] + 45a: 4f 93 push r20 + ldi shift, 0xff ;[9] [rx loop init] + 45c: 2f ef ldi r18, 0xFF ; 255 + ori x3, 0xff ;[10] [rx loop init] == ser x3, clear zero flag + 45e: 4f 6f ori r20, 0xFF ; 255 + + in x1, USBIN ;[11] <-- sample bit 0 + 460: 06 b3 in r16, 0x16 ; 22 + bst x1, USBMINUS ;[12] + 462: 03 fb bst r16, 3 + bld shift, 0 ;[13] + 464: 20 f9 bld r18, 0 + push x4 ;[14] == phase + 466: 5f 93 push r21 +; [---] ;[15] + push cnt ;[16] + 468: 3f 93 push r19 +; [---] ;[17] + ldi phase, 0 ;[18] [rx loop init] + 46a: 50 e0 ldi r21, 0x00 ; 0 + ldi cnt, USB_BUFSIZE;[19] [rx loop init] + 46c: 3b e0 ldi r19, 0x0B ; 11 + rjmp rxbit1 ;[20] + 46e: 65 c0 rjmp .+202 ; 0x53a + +00000470 : +bit 7: jump, fixup bitstuff +; 87 [+ 2] cycles +------------------------------------------------------------------ +*/ +continueWithBit5: + in x2, USBIN ;[055] <-- bit 5 + 470: 16 b3 in r17, 0x16 ; 22 + eor r0, x2 ;[056] + 472: 01 26 eor r0, r17 + or phase, r0 ;[057] + 474: 50 29 or r21, r0 + sbrc phase, USBMINUS ;[058] + 476: 53 fd sbrc r21, 3 + lpm ;[059] optional nop3; modifies r0 + 478: c8 95 lpm + in phase, USBIN ;[060] <-- phase + 47a: 56 b3 in r21, 0x16 ; 22 + eor x1, x2 ;[061] + 47c: 01 27 eor r16, r17 + bst x1, USBMINUS ;[062] + 47e: 03 fb bst r16, 3 + bld shift, 5 ;[063] + 480: 25 f9 bld r18, 5 + andi shift, 0x3f ;[064] + 482: 2f 73 andi r18, 0x3F ; 63 + in x1, USBIN ;[065] <-- bit 6 + 484: 06 b3 in r16, 0x16 ; 22 + breq unstuff5 ;[066] *** unstuff escape + 486: b1 f0 breq .+44 ; 0x4b4 + eor phase, x1 ;[067] + 488: 50 27 eor r21, r16 + eor x2, x1 ;[068] + 48a: 10 27 eor r17, r16 + bst x2, USBMINUS ;[069] + 48c: 13 fb bst r17, 3 + bld shift, 6 ;[070] + 48e: 26 f9 bld r18, 6 + +00000490 : +didUnstuff6: ;[ ] + in r0, USBIN ;[071] <-- phase + 490: 06 b2 in r0, 0x16 ; 22 + cpi shift, 0x02 ;[072] + 492: 22 30 cpi r18, 0x02 ; 2 + brlo unstuff6 ;[073] *** unstuff escape + 494: f0 f0 brcs .+60 ; 0x4d2 + +00000496 : +didUnstuff5: ;[ ] + nop2 ;[074] + 496: 00 c0 rjmp .+0 ; 0x498 +; [---] ;[075] + in x2, USBIN ;[076] <-- bit 7 + 498: 16 b3 in r17, 0x16 ; 22 + eor x1, x2 ;[077] + 49a: 01 27 eor r16, r17 + bst x1, USBMINUS ;[078] + 49c: 03 fb bst r16, 3 + bld shift, 7 ;[079] + 49e: 27 f9 bld r18, 7 + +000004a0 : +didUnstuff7: ;[ ] + eor r0, x2 ;[080] + 4a0: 01 26 eor r0, r17 + or phase, r0 ;[081] + 4a2: 50 29 or r21, r0 + in r0, USBIN ;[082] <-- phase + 4a4: 06 b2 in r0, 0x16 ; 22 + cpi shift, 0x04 ;[083] + 4a6: 24 30 cpi r18, 0x04 ; 4 + brsh rxLoop ;[084] + 4a8: e8 f5 brcc .+122 ; 0x524 + +000004aa : +; [---] ;[085] +unstuff7: ;[ ] + andi x3, ~0x80 ;[085] + 4aa: 4f 77 andi r20, 0x7F ; 127 + ori shift, 0x80 ;[086] + 4ac: 20 68 ori r18, 0x80 ; 128 + in x2, USBIN ;[087] <-- sample stuffed bit 7 + 4ae: 16 b3 in r17, 0x16 ; 22 + nop ;[088] + 4b0: 00 00 nop + rjmp didUnstuff7 ;[089] + 4b2: f6 cf rjmp .-20 ; 0x4a0 + +000004b4 : +; [---] ;[090] + ;[080] + +unstuff5: ;[067] + eor phase, x1 ;[068] + 4b4: 50 27 eor r21, r16 + andi x3, ~0x20 ;[069] + 4b6: 4f 7d andi r20, 0xDF ; 223 + ori shift, 0x20 ;[070] + 4b8: 20 62 ori r18, 0x20 ; 32 + in r0, USBIN ;[071] <-- phase + 4ba: 06 b2 in r0, 0x16 ; 22 + mov x2, x1 ;[072] + 4bc: 10 2f mov r17, r16 + nop ;[073] + 4be: 00 00 nop + nop2 ;[074] + 4c0: 00 c0 rjmp .+0 ; 0x4c2 +; [---] ;[075] + in x1, USBIN ;[076] <-- bit 6 + 4c2: 06 b3 in r16, 0x16 ; 22 + eor r0, x1 ;[077] + 4c4: 00 26 eor r0, r16 + or phase, r0 ;[078] + 4c6: 50 29 or r21, r0 + eor x2, x1 ;[079] + 4c8: 10 27 eor r17, r16 + bst x2, USBMINUS ;[080] + 4ca: 13 fb bst r17, 3 + bld shift, 6 ;[081] no need to check bitstuffing, we just had one + 4cc: 26 f9 bld r18, 6 + in r0, USBIN ;[082] <-- phase + 4ce: 06 b2 in r0, 0x16 ; 22 + rjmp didUnstuff5 ;[083] + 4d0: e2 cf rjmp .-60 ; 0x496 + +000004d2 : +; [---] ;[084] + ;[074] + +unstuff6: ;[074] + andi x3, ~0x40 ;[075] + 4d2: 4f 7b andi r20, 0xBF ; 191 + in x1, USBIN ;[076] <-- bit 6 again + 4d4: 06 b3 in r16, 0x16 ; 22 + ori shift, 0x40 ;[077] + 4d6: 20 64 ori r18, 0x40 ; 64 + nop2 ;[078] + 4d8: 00 c0 rjmp .+0 ; 0x4da +; [---] ;[079] + rjmp didUnstuff6 ;[080] + 4da: da cf rjmp .-76 ; 0x490 + +000004dc : +; [---] ;[081] + ;[071] + +unstuff0: ;[013] + eor r0, x2 ;[014] + 4dc: 01 26 eor r0, r17 + or phase, r0 ;[015] + 4de: 50 29 or r21, r0 + andi x2, USBMASK ;[016] check for SE0 + 4e0: 18 71 andi r17, 0x18 ; 24 + in r0, USBIN ;[017] <-- phase + 4e2: 06 b2 in r0, 0x16 ; 22 + breq didUnstuff0 ;[018] direct jump to se0 would be too long + 4e4: 69 f1 breq .+90 ; 0x540 + andi x3, ~0x01 ;[019] + 4e6: 4e 7f andi r20, 0xFE ; 254 + ori shift, 0x01 ;[020] + 4e8: 21 60 ori r18, 0x01 ; 1 + mov x1, x2 ;[021] mov existing sample + 4ea: 01 2f mov r16, r17 + in x2, USBIN ;[022] <-- bit 1 again + 4ec: 16 b3 in r17, 0x16 ; 22 + rjmp didUnstuff0 ;[023] + 4ee: 28 c0 rjmp .+80 ; 0x540 + +000004f0 : +; [---] ;[024] + ;[014] + +unstuff1: ;[024] + eor r0, x1 ;[025] + 4f0: 00 26 eor r0, r16 + or phase, r0 ;[026] + 4f2: 50 29 or r21, r0 + andi x3, ~0x02 ;[027] + 4f4: 4d 7f andi r20, 0xFD ; 253 + in r0, USBIN ;[028] <-- phase + 4f6: 06 b2 in r0, 0x16 ; 22 + ori shift, 0x02 ;[029] + 4f8: 22 60 ori r18, 0x02 ; 2 + mov x2, x1 ;[030] + 4fa: 10 2f mov r17, r16 + rjmp didUnstuff1 ;[031] + 4fc: 29 c0 rjmp .+82 ; 0x550 + +000004fe : +; [---] ;[032] + ;[022] + +unstuff2: ;[035] + eor r0, x2 ;[036] + 4fe: 01 26 eor r0, r17 + or phase, r0 ;[037] + 500: 50 29 or r21, r0 + andi x3, ~0x04 ;[038] + 502: 4b 7f andi r20, 0xFB ; 251 + in r0, USBIN ;[039] <-- phase + 504: 06 b2 in r0, 0x16 ; 22 + ori shift, 0x04 ;[040] + 506: 24 60 ori r18, 0x04 ; 4 + mov x1, x2 ;[041] + 508: 01 2f mov r16, r17 + rjmp didUnstuff2 ;[042] + 50a: 2d c0 rjmp .+90 ; 0x566 + +0000050c : +; [---] ;[043] + ;[033] + +unstuff3: ;[043] + in x2, USBIN ;[044] <-- bit 3 again + 50c: 16 b3 in r17, 0x16 ; 22 + eor r0, x2 ;[045] + 50e: 01 26 eor r0, r17 + or phase, r0 ;[046] + 510: 50 29 or r21, r0 + andi x3, ~0x08 ;[047] + 512: 47 7f andi r20, 0xF7 ; 247 + ori shift, 0x08 ;[048] + 514: 28 60 ori r18, 0x08 ; 8 + nop ;[049] + 516: 00 00 nop + in r0, USBIN ;[050] <-- phase + 518: 06 b2 in r0, 0x16 ; 22 + rjmp didUnstuff3 ;[051] + 51a: 2e c0 rjmp .+92 ; 0x578 + +0000051c : +; [---] ;[052] + ;[042] + +unstuff4: ;[053] + andi x3, ~0x10 ;[054] + 51c: 4f 7e andi r20, 0xEF ; 239 + in x1, USBIN ;[055] <-- bit 4 again + 51e: 06 b3 in r16, 0x16 ; 22 + ori shift, 0x10 ;[056] + 520: 20 61 ori r18, 0x10 ; 16 + rjmp didUnstuff4 ;[057] + 522: 30 c0 rjmp .+96 ; 0x584 + +00000524 : +; [---] ;[058] + ;[048] + +rxLoop: ;[085] + eor x3, shift ;[086] reconstruct: x3 is 0 at bit locations we changed, 1 at others + 524: 42 27 eor r20, r18 + in x1, USBIN ;[000] <-- bit 0 + 526: 06 b3 in r16, 0x16 ; 22 + st y+, x3 ;[001] + 528: 49 93 st Y+, r20 +; [---] ;[002] + eor r0, x1 ;[003] + 52a: 00 26 eor r0, r16 + or phase, r0 ;[004] + 52c: 50 29 or r21, r0 + eor x2, x1 ;[005] + 52e: 10 27 eor r17, r16 + in r0, USBIN ;[006] <-- phase + 530: 06 b2 in r0, 0x16 ; 22 + ser x3 ;[007] + 532: 4f ef ldi r20, 0xFF ; 255 + bst x2, USBMINUS ;[008] + 534: 13 fb bst r17, 3 + bld shift, 0 ;[009] + 536: 20 f9 bld r18, 0 + andi shift, 0xf9 ;[010] + 538: 29 7f andi r18, 0xF9 ; 249 + +0000053a : +rxbit1: ;[ ] + in x2, USBIN ;[011] <-- bit 1 + 53a: 16 b3 in r17, 0x16 ; 22 + breq unstuff0 ;[012] *** unstuff escape + 53c: 79 f2 breq .-98 ; 0x4dc + andi x2, USBMASK ;[013] SE0 check for bit 1 + 53e: 18 71 andi r17, 0x18 ; 24 + +00000540 : +didUnstuff0: ;[ ] Z only set if we detected SE0 in bitstuff + breq se0 ;[014] + 540: 59 f1 breq .+86 ; 0x598 + eor r0, x2 ;[015] + 542: 01 26 eor r0, r17 + or phase, r0 ;[016] + 544: 50 29 or r21, r0 + in r0, USBIN ;[017] <-- phase + 546: 06 b2 in r0, 0x16 ; 22 + eor x1, x2 ;[018] + 548: 01 27 eor r16, r17 + bst x1, USBMINUS ;[019] + 54a: 03 fb bst r16, 3 + bld shift, 1 ;[020] + 54c: 21 f9 bld r18, 1 + andi shift, 0xf3 ;[021] + 54e: 23 7f andi r18, 0xF3 ; 243 + +00000550 : +didUnstuff1: ;[ ] + in x1, USBIN ;[022] <-- bit 2 + 550: 06 b3 in r16, 0x16 ; 22 + breq unstuff1 ;[023] *** unstuff escape + 552: 71 f2 breq .-100 ; 0x4f0 + eor r0, x1 ;[024] + 554: 00 26 eor r0, r16 + or phase, r0 ;[025] + 556: 50 29 or r21, r0 + subi cnt, 1 ;[026] overflow check + 558: 31 50 subi r19, 0x01 ; 1 + brcs overflow ;[027] + 55a: d0 f0 brcs .+52 ; 0x590 + in r0, USBIN ;[028] <-- phase + 55c: 06 b2 in r0, 0x16 ; 22 + eor x2, x1 ;[029] + 55e: 10 27 eor r17, r16 + bst x2, USBMINUS ;[030] + 560: 13 fb bst r17, 3 + bld shift, 2 ;[031] + 562: 22 f9 bld r18, 2 + andi shift, 0xe7 ;[032] + 564: 27 7e andi r18, 0xE7 ; 231 + +00000566 : +didUnstuff2: ;[ ] + in x2, USBIN ;[033] <-- bit 3 + 566: 16 b3 in r17, 0x16 ; 22 + breq unstuff2 ;[034] *** unstuff escape + 568: 51 f2 breq .-108 ; 0x4fe + eor r0, x2 ;[035] + 56a: 01 26 eor r0, r17 + or phase, r0 ;[036] + 56c: 50 29 or r21, r0 + eor x1, x2 ;[037] + 56e: 01 27 eor r16, r17 + bst x1, USBMINUS ;[038] + 570: 03 fb bst r16, 3 + in r0, USBIN ;[039] <-- phase + 572: 06 b2 in r0, 0x16 ; 22 + bld shift, 3 ;[040] + 574: 23 f9 bld r18, 3 + andi shift, 0xcf ;[041] + 576: 2f 7c andi r18, 0xCF ; 207 + +00000578 : +didUnstuff3: ;[ ] + breq unstuff3 ;[042] *** unstuff escape + 578: 49 f2 breq .-110 ; 0x50c + nop ;[043] + 57a: 00 00 nop + in x1, USBIN ;[044] <-- bit 4 + 57c: 06 b3 in r16, 0x16 ; 22 + eor x2, x1 ;[045] + 57e: 10 27 eor r17, r16 + bst x2, USBMINUS ;[046] + 580: 13 fb bst r17, 3 + bld shift, 4 ;[047] + 582: 24 f9 bld r18, 4 + +00000584 : +didUnstuff4: ;[ ] + eor r0, x1 ;[048] + 584: 00 26 eor r0, r16 + or phase, r0 ;[049] + 586: 50 29 or r21, r0 + in r0, USBIN ;[050] <-- phase + 588: 06 b2 in r0, 0x16 ; 22 + andi shift, 0x9f ;[051] + 58a: 2f 79 andi r18, 0x9F ; 159 + breq unstuff4 ;[052] *** unstuff escape + 58c: 39 f2 breq .-114 ; 0x51c + rjmp continueWithBit5;[053] + 58e: 70 cf rjmp .-288 ; 0x470 + +00000590 : +*/ + +#define token x1 + +overflow: + ldi x2, 1<: +ignorePacket: + clr token + 594: 00 27 eor r16, r16 + rjmp storeTokenAndReturn + 596: 1c c0 rjmp .+56 ; 0x5d0 + +00000598 : +; Processing of received packet (numbers in brackets are cycles after center of SE0) +;---------------------------------------------------------------------------- +;This is the only non-error exit point for the software receiver loop +;we don't check any CRCs here because there is no time left. +se0: + subi cnt, USB_BUFSIZE ;[5] + 598: 3b 50 subi r19, 0x0B ; 11 + neg cnt ;[6] + 59a: 31 95 neg r19 + sub YL, cnt ;[7] + 59c: c3 1b sub r28, r19 + sbci YH, 0 ;[8] + 59e: d0 40 sbci r29, 0x00 ; 0 + ldi x2, 1< + cpi token, USBPID_DATA1 ;[15] + 5aa: 0b 34 cpi r16, 0x4B ; 75 + breq handleData ;[16] + 5ac: 11 f1 breq .+68 ; 0x5f2 + lds shift, usbDeviceAddr;[17] + 5ae: 20 91 88 00 lds r18, 0x0088 ; 0x800088 + ldd x2, y+1 ;[19] ADDR and 1 bit endpoint number + 5b2: 19 81 ldd r17, Y+1 ; 0x01 + lsl x2 ;[21] shift out 1 bit endpoint number + 5b4: 11 0f add r17, r17 + cpse x2, shift ;[22] + 5b6: 12 13 cpse r17, r18 + rjmp ignorePacket ;[23] + 5b8: ed cf rjmp .-38 ; 0x594 +/* only compute endpoint number in x3 if required later */ +#if USB_CFG_HAVE_INTRIN_ENDPOINT || USB_CFG_IMPLEMENT_FN_WRITEOUT + ldd x3, y+2 ;[24] endpoint number + crc + 5ba: 4a 81 ldd r20, Y+2 ; 0x02 + rol x3 ;[26] shift in LSB of endpoint + 5bc: 44 1f adc r20, r20 +#endif + cpi token, USBPID_IN ;[27] + 5be: 09 36 cpi r16, 0x69 ; 105 + breq handleIn ;[28] + 5c0: 69 f1 breq .+90 ; 0x61c + cpi token, USBPID_SETUP ;[29] + 5c2: 0d 32 cpi r16, 0x2D ; 45 + breq handleSetupOrOut ;[30] + 5c4: 11 f0 breq .+4 ; 0x5ca + cpi token, USBPID_OUT ;[31] + 5c6: 01 3e cpi r16, 0xE1 ; 225 + brne ignorePacket ;[32] must be ack, nak or whatever + 5c8: 29 f7 brne .-54 ; 0x594 + +000005ca : +;Setup and Out are followed by a data packet two bit times (16 cycles) after +;the end of SE0. The sync code allows up to 40 cycles delay from the start of +;the sync pattern until the first bit is sampled. That's a total of 56 cycles. +handleSetupOrOut: ;[32] +#if USB_CFG_IMPLEMENT_FN_WRITEOUT /* if we have data for endpoint != 0, set usbCurrentTok to address */ + andi x3, 0xf ;[32] + 5ca: 4f 70 andi r20, 0x0F ; 15 + breq storeTokenAndReturn ;[33] + 5cc: 09 f0 breq .+2 ; 0x5d0 + mov token, x3 ;[34] indicate that this is endpoint x OUT + 5ce: 04 2f mov r16, r20 + +000005d0 : +#endif +storeTokenAndReturn: + sts usbCurrentTok, token;[35] + 5d0: 00 93 8f 00 sts 0x008F, r16 ; 0x80008f + +000005d4 : +doReturn: + POP_STANDARD ;[37] 12...16 cycles + 5d4: 3f 91 pop r19 + 5d6: 5f 91 pop r21 + 5d8: 4f 91 pop r20 + 5da: 1f 91 pop r17 + 5dc: 0f 91 pop r16 + 5de: 2f 91 pop r18 + 5e0: df 91 pop r29 + 5e2: 0f 90 pop r0 + USB_LOAD_PENDING(YL) ;[49] + 5e4: ca b7 in r28, 0x3a ; 58 + sbrc YL, USB_INTR_PENDING_BIT;[50] check whether data is already arriving + 5e6: c5 fd sbrc r28, 5 + rjmp waitForJ ;[51] save the pops and pushes -- a new interrupt is already pending + 5e8: 18 cf rjmp .-464 ; 0x41a + +000005ea : +sofError: + POP_RETI ;macro call + 5ea: cf 91 pop r28 + 5ec: cf bf out 0x3f, r28 ; 63 + 5ee: cf 91 pop r28 + reti + 5f0: 18 95 reti + +000005f2 : + +handleData: +#if USB_CFG_CHECK_CRC + CRC_CLEANUP_AND_CHECK ; jumps to ignorePacket if CRC error +#endif + lds shift, usbCurrentTok;[18] + 5f2: 20 91 8f 00 lds r18, 0x008F ; 0x80008f + tst shift ;[20] + 5f6: 22 23 and r18, r18 + breq doReturn ;[21] + 5f8: 69 f3 breq .-38 ; 0x5d4 + lds x2, usbRxLen ;[22] + 5fa: 10 91 8d 00 lds r17, 0x008D ; 0x80008d + tst x2 ;[24] + 5fe: 11 23 and r17, r17 + brne sendNakAndReti ;[25] + 600: d1 f5 brne .+116 ; 0x676 +; 2006-03-11: The following two lines fix a problem where the device was not +; recognized if usbPoll() was called less frequently than once every 4 ms. + cpi cnt, 4 ;[26] zero sized data packets are status phase only -- ignore and ack + 602: 34 30 cpi r19, 0x04 ; 4 + brmi sendAckAndReti ;[27] keep rx buffer clean -- we must not NAK next SETUP + 604: d2 f1 brmi .+116 ; 0x67a +#if USB_CFG_CHECK_DATA_TOGGLING + sts usbCurrentDataToken, token ; store for checking by C code +#endif + sts usbRxLen, cnt ;[28] store received data, swap buffers + 606: 30 93 8d 00 sts 0x008D, r19 ; 0x80008d + sts usbRxToken, shift ;[30] + 60a: 20 93 89 00 sts 0x0089, r18 ; 0x800089 + lds x2, usbInputBufOffset;[32] swap buffers + 60e: 10 91 8a 00 lds r17, 0x008A ; 0x80008a + ldi cnt, USB_BUFSIZE ;[34] + 612: 3b e0 ldi r19, 0x0B ; 11 + sub cnt, x2 ;[35] + 614: 31 1b sub r19, r17 + sts usbInputBufOffset, cnt;[36] buffers now swapped + 616: 30 93 8a 00 sts 0x008A, r19 ; 0x80008a + rjmp sendAckAndReti ;[38] 40 + 17 = 57 until SOP + 61a: 2f c0 rjmp .+94 ; 0x67a + +0000061c : + +handleIn: +;We don't send any data as long as the C code has not processed the current +;input data and potentially updated the output data. That's more efficient +;in terms of code size than clearing the tx buffers when a packet is received. + lds x1, usbRxLen ;[30] + 61c: 00 91 8d 00 lds r16, 0x008D ; 0x80008d + cpi x1, 1 ;[32] negative values are flow control, 0 means "buffer free" + 620: 01 30 cpi r16, 0x01 ; 1 + brge sendNakAndReti ;[33] unprocessed input packet? + 622: 4c f5 brge .+82 ; 0x676 + ldi x1, USBPID_NAK ;[34] prepare value for usbTxLen + 624: 0a e5 ldi r16, 0x5A ; 90 +#if USB_CFG_HAVE_INTRIN_ENDPOINT + andi x3, 0xf ;[35] x3 contains endpoint + 626: 4f 70 andi r20, 0x0F ; 15 +#if USB_CFG_SUPPRESS_INTR_CODE + brne sendNakAndReti ;[36] +#else + brne handleIn1 ;[36] + 628: 49 f4 brne .+18 ; 0x63c +#endif +#endif + lds cnt, usbTxLen ;[37] + 62a: 30 91 61 00 lds r19, 0x0061 ; 0x800061 + sbrc cnt, 4 ;[39] all handshake tokens have bit 4 set + 62e: 34 fd sbrc r19, 4 + rjmp sendCntAndReti ;[40] 42 + 16 = 58 until SOP + 630: 25 c0 rjmp .+74 ; 0x67c + sts usbTxLen, x1 ;[41] x1 == USBPID_NAK from above + 632: 00 93 61 00 sts 0x0061, r16 ; 0x800061 + ldi YL, lo8(usbTxBuf) ;[43] + 636: c1 e7 ldi r28, 0x71 ; 113 + ldi YH, hi8(usbTxBuf) ;[44] + 638: d0 e0 ldi r29, 0x00 ; 0 + rjmp usbSendAndReti ;[45] 57 + 12 = 59 until SOP + 63a: 24 c0 rjmp .+72 ; 0x684 + +0000063c : + +#if !USB_CFG_SUPPRESS_INTR_CODE && USB_CFG_HAVE_INTRIN_ENDPOINT /* placed here due to relative jump range */ +handleIn1: ;[38] +#if USB_CFG_HAVE_INTRIN_ENDPOINT3 +; 2006-06-10 as suggested by O.Tamura: support second INTR IN / BULK IN endpoint + cpi x3, USB_CFG_EP3_NUMBER;[38] + 63c: 43 30 cpi r20, 0x03 ; 3 + breq handleIn3 ;[39] + 63e: 49 f0 breq .+18 ; 0x652 +#endif + lds cnt, usbTxLen1 ;[40] + 640: 30 91 7c 00 lds r19, 0x007C ; 0x80007c + sbrc cnt, 4 ;[42] all handshake tokens have bit 4 set + 644: 34 fd sbrc r19, 4 + rjmp sendCntAndReti ;[43] 47 + 16 = 63 until SOP + 646: 1a c0 rjmp .+52 ; 0x67c + sts usbTxLen1, x1 ;[44] x1 == USBPID_NAK from above + 648: 00 93 7c 00 sts 0x007C, r16 ; 0x80007c + ldi YL, lo8(usbTxBuf1) ;[46] + 64c: cd e7 ldi r28, 0x7D ; 125 + ldi YH, hi8(usbTxBuf1) ;[47] + 64e: d0 e0 ldi r29, 0x00 ; 0 + rjmp usbSendAndReti ;[48] 50 + 12 = 62 until SOP + 650: 19 c0 rjmp .+50 ; 0x684 + +00000652 : + +#if USB_CFG_HAVE_INTRIN_ENDPOINT3 +handleIn3: + lds cnt, usbTxLen3 ;[41] + 652: 30 91 a7 00 lds r19, 0x00A7 ; 0x8000a7 + sbrc cnt, 4 ;[43] + 656: 34 fd sbrc r19, 4 + rjmp sendCntAndReti ;[44] 49 + 16 = 65 until SOP + 658: 11 c0 rjmp .+34 ; 0x67c + sts usbTxLen3, x1 ;[45] x1 == USBPID_NAK from above + 65a: 00 93 a7 00 sts 0x00A7, r16 ; 0x8000a7 + ldi YL, lo8(usbTxBuf3) ;[47] + 65e: c8 ea ldi r28, 0xA8 ; 168 + ldi YH, hi8(usbTxBuf3) ;[48] + 660: d0 e0 ldi r29, 0x00 ; 0 + rjmp usbSendAndReti ;[49] 51 + 12 = 63 until SOP + 662: 10 c0 rjmp .+32 ; 0x684 + +00000664 : +; J = (D+ = 0), (D- = 1) +; K = (D+ = 1), (D- = 0) +; Spec allows 7.5 bit times from EOP to SOP for replies + +bitstuff7: + eor x1, x4 ;[4] + 664: 05 27 eor r16, r21 + ldi x2, 0 ;[5] + 666: 10 e0 ldi r17, 0x00 ; 0 + nop2 ;[6] C is zero (brcc) + 668: 00 c0 rjmp .+0 ; 0x66a + rjmp didStuff7 ;[8] + 66a: 21 c0 rjmp .+66 ; 0x6ae + +0000066c : + +bitstuffN: + eor x1, x4 ;[5] + 66c: 05 27 eor r16, r21 + ldi x2, 0 ;[6] + 66e: 10 e0 ldi r17, 0x00 ; 0 + lpm ;[7] 3 cycle NOP, modifies r0 + 670: c8 95 lpm + out USBOUT, x1 ;[10] <-- out + 672: 08 bb out 0x18, r16 ; 24 + rjmp didStuffN ;[0] + 674: 14 c0 rjmp .+40 ; 0x69e + +00000676 : + +#define bitStatus x3 + +sendNakAndReti: + ldi cnt, USBPID_NAK ;[-19] + 676: 3a e5 ldi r19, 0x5A ; 90 + rjmp sendCntAndReti ;[-18] + 678: 01 c0 rjmp .+2 ; 0x67c + +0000067a : +sendAckAndReti: + ldi cnt, USBPID_ACK ;[-17] + 67a: 32 ed ldi r19, 0xD2 ; 210 + +0000067c : +sendCntAndReti: + mov r0, cnt ;[-16] + 67c: 03 2e mov r0, r19 + ldi YL, 0 ;[-15] R0 address is 0 + 67e: c0 e0 ldi r28, 0x00 ; 0 + ldi YH, 0 ;[-14] + 680: d0 e0 ldi r29, 0x00 ; 0 + ldi cnt, 2 ;[-13] + 682: 32 e0 ldi r19, 0x02 ; 2 + +00000684 : +;pointer to data in 'Y' +;number of bytes in 'cnt' -- including sync byte [range 2 ... 12] +;uses: x1...x4, shift, cnt, Y +;Numbers in brackets are time since first bit of sync pattern is sent +usbSendAndReti: ; 12 cycles until SOP + in x2, USBDDR ;[-12] + 684: 17 b3 in r17, 0x17 ; 23 + ori x2, USBMASK ;[-11] + 686: 18 61 ori r17, 0x18 ; 24 + sbi USBOUT, USBMINUS;[-10] prepare idle state; D+ and D- must have been 0 (no pullups) + 688: c3 9a sbi 0x18, 3 ; 24 + in x1, USBOUT ;[-8] port mirror for tx loop + 68a: 08 b3 in r16, 0x18 ; 24 + out USBDDR, x2 ;[-7] <- acquire bus + 68c: 17 bb out 0x17, r17 ; 23 +; need not init x2 (bitstuff history) because sync starts with 0 + ldi x4, USBMASK ;[-6] exor mask + 68e: 58 e1 ldi r21, 0x18 ; 24 + ldi shift, 0x80 ;[-5] sync byte is first byte sent + 690: 20 e8 ldi r18, 0x80 ; 128 + ldi bitStatus, 0xff ;[-4] init bit loop counter, works for up to 12 bytes + 692: 4f ef ldi r20, 0xFF ; 255 + +00000694 : +byteloop: +bitloop: + sbrs shift, 0 ;[8] [-3] + 694: 20 ff sbrs r18, 0 + eor x1, x4 ;[9] [-2] + 696: 05 27 eor r16, r21 + out USBOUT, x1 ;[10] [-1] <-- out + 698: 08 bb out 0x18, r16 ; 24 + ror shift ;[0] + 69a: 27 95 ror r18 + ror x2 ;[1] + 69c: 17 95 ror r17 + +0000069e : +didStuffN: + cpi x2, 0xfc ;[2] + 69e: 1c 3f cpi r17, 0xFC ; 252 + brcc bitstuffN ;[3] + 6a0: 28 f7 brcc .-54 ; 0x66c + nop ;[4] + 6a2: 00 00 nop + subi bitStatus, 37 ;[5] 256 / 7 ~=~ 37 + 6a4: 45 52 subi r20, 0x25 ; 37 + brcc bitloop ;[6] when we leave the loop, bitStatus has almost the initial value + 6a6: b0 f7 brcc .-20 ; 0x694 + sbrs shift, 0 ;[7] + 6a8: 20 ff sbrs r18, 0 + eor x1, x4 ;[8] + 6aa: 05 27 eor r16, r21 + ror shift ;[9] + 6ac: 27 95 ror r18 + +000006ae : +didStuff7: + out USBOUT, x1 ;[10] <-- out + 6ae: 08 bb out 0x18, r16 ; 24 + ror x2 ;[0] + 6b0: 17 95 ror r17 + cpi x2, 0xfc ;[1] + 6b2: 1c 3f cpi r17, 0xFC ; 252 + brcc bitstuff7 ;[2] + 6b4: b8 f6 brcc .-82 ; 0x664 + ld shift, y+ ;[3] + 6b6: 29 91 ld r18, Y+ + dec cnt ;[5] + 6b8: 3a 95 dec r19 + brne byteloop ;[6] + 6ba: 61 f7 brne .-40 ; 0x694 +;make SE0: + cbr x1, USBMASK ;[7] prepare SE0 [spec says EOP may be 21 to 25 cycles] + 6bc: 07 7e andi r16, 0xE7 ; 231 + lds x2, usbNewDeviceAddr;[8] + 6be: 10 91 8e 00 lds r17, 0x008E ; 0x80008e + lsl x2 ;[10] we compare with left shifted address + 6c2: 11 0f add r17, r17 + out USBOUT, x1 ;[11] <-- out SE0 -- from now 2 bits = 22 cycles until bus idle + 6c4: 08 bb out 0x18, r16 ; 24 +;2006-03-06: moved transfer of new address to usbDeviceAddr from C-Code to asm: +;set address only after data packet was sent, not after handshake + subi YL, 2 ;[0] Only assign address on data packets, not ACK/NAK in r0 + 6c6: c2 50 subi r28, 0x02 ; 2 + sbci YH, 0 ;[1] + 6c8: d0 40 sbci r29, 0x00 ; 0 + breq skipAddrAssign ;[2] + 6ca: 11 f0 breq .+4 ; 0x6d0 + sts usbDeviceAddr, x2; if not skipped: SE0 is one cycle longer + 6cc: 10 93 88 00 sts 0x0088, r17 ; 0x800088 + +000006d0 : +skipAddrAssign: +;end of usbDeviceAddress transfer + ldi x2, 1<: +se0Delay: + dec x4 ;[12] [15] [18] [21] + 6e0: 5a 95 dec r21 + brne se0Delay ;[13] [16] [19] [22] + 6e2: f1 f7 brne .-4 ; 0x6e0 + out USBOUT, x1 ;[23] <-- out J (idle) -- end of SE0 (EOP signal) + 6e4: 08 bb out 0x18, r16 ; 24 + out USBDDR, x2 ;[24] <-- release bus now + 6e6: 17 bb out 0x17, r17 ; 23 + out USBOUT, x3 ;[25] <-- ensure no pull-up resistors are active + 6e8: 48 bb out 0x18, r20 ; 24 + rjmp doReturn + 6ea: 74 cf rjmp .-280 ; 0x5d4 + +000006ec : + +void oscInit(void) +{ +uchar calibrationValue; + + calibrationValue = eeprom_read_byte(0); + 6ec: 80 e0 ldi r24, 0x00 ; 0 + 6ee: 90 e0 ldi r25, 0x00 ; 0 + 6f0: 40 d2 rcall .+1152 ; 0xb72 + if(calibrationValue != 0xff) + 6f2: 8f 3f cpi r24, 0xFF ; 255 + 6f4: 11 f4 brne .+4 ; 0x6fa + OSCCAL = calibrationValue; + else { +#if USB_CFG_CLOCK_KHZ==12800 + OSCCAL = 232; +#else + OSCCAL += 4; /* 8.00 -> 8.25MHz */ + 6f6: 81 b7 in r24, 0x31 ; 49 + 6f8: 8c 5f subi r24, 0xFC ; 252 + 6fa: 81 bf out 0x31, r24 ; 49 + 6fc: 08 95 ret + +000006fe : + * signal (a single SE0 bit) repeating every millisecond immediately after + * a USB RESET. We first do a binary search for the OSCCAL value and then + * optimize this value with a neighboorhod search. + */ +void calibrateOscillator(void) +{ + 6fe: cf 92 push r12 + 700: df 92 push r13 + 702: ef 92 push r14 + 704: ff 92 push r15 + 706: 0f 93 push r16 + 708: 1f 93 push r17 + 70a: cf 93 push r28 + 70c: df 93 push r29 +uchar trialValue = 0; +#endif +uchar org; +int err; + + org = OSCCAL; /* keep the original value */ + 70e: c1 b6 in r12, 0x31 ; 49 + /* keep the current error ... */ + err = usbMeasureFrameLength() - targetValue; + 710: 6e de rcall .-804 ; 0x3ee + 712: 84 53 subi r24, 0x34 ; 52 + 714: 99 40 sbci r25, 0x09 ; 9 + 716: 7c 01 movw r14, r24 + 718: 97 ff sbrs r25, 7 + 71a: 03 c0 rjmp .+6 ; 0x722 + 71c: f1 94 neg r15 + 71e: e1 94 neg r14 + 720: f1 08 sbc r15, r1 + if(err < 0) + err = -err; + +#if USB_CFG_CLOCK_KHZ==16500 + OSCCAL = 0x98; /* select a split range - O.Tamura */ + 722: 88 e9 ldi r24, 0x98 ; 152 + 724: 81 bf out 0x31, r24 ; 49 + x = usbMeasureFrameLength(); + 726: 63 de rcall .-826 ; 0x3ee + if(x < targetValue) + 728: 84 33 cpi r24, 0x34 ; 52 + 72a: 99 40 sbci r25, 0x09 ; 9 + 72c: 14 f4 brge .+4 ; 0x732 + trialValue = 128; + 72e: c0 e8 ldi r28, 0x80 ; 128 + 730: 01 c0 rjmp .+2 ; 0x734 +#if USB_CFG_CLOCK_KHZ==12800 +uchar step = 32; +uchar trialValue = 192; +#else +uchar step = 64; +uchar trialValue = 0; + 732: c0 e0 ldi r28, 0x00 ; 0 + 734: 07 e0 ldi r16, 0x07 ; 7 + 736: 10 e0 ldi r17, 0x00 ; 0 + 738: d0 e4 ldi r29, 0x40 ; 64 + trialValue = 128; +#endif + + /* do a binary search: */ + do{ + OSCCAL = trialValue + step; + 73a: dd 2e mov r13, r29 + 73c: dc 0e add r13, r28 + 73e: d1 be out 0x31, r13 ; 49 + x = usbMeasureFrameLength(); /* proportional to current real frequency */ + 740: 56 de rcall .-852 ; 0x3ee + if(x < targetValue) /* frequency still too low */ + 742: 84 33 cpi r24, 0x34 ; 52 + 744: 29 e0 ldi r18, 0x09 ; 9 + 746: 92 07 cpc r25, r18 + 748: 0c f4 brge .+2 ; 0x74c + trialValue += step; + 74a: cd 2d mov r28, r13 + step >>= 1; + 74c: d6 95 lsr r29 + 74e: 01 50 subi r16, 0x01 ; 1 + 750: 11 09 sbc r17, r1 + }while(step > 0); + 752: 99 f7 brne .-26 ; 0x73a + 754: 84 53 subi r24, 0x34 ; 52 + 756: 99 40 sbci r25, 0x09 ; 9 + 758: 97 ff sbrs r25, 7 + 75a: 03 c0 rjmp .+6 ; 0x762 + 75c: 91 95 neg r25 + 75e: 81 95 neg r24 + 760: 91 09 sbc r25, r1 + 762: 8c 01 movw r16, r24 + to the same host controller (by downstream broadcast packet). - O.Tamura + */ + x -= targetValue; + if(x < 0) + x = -x; + if( x>err ) { + 764: e8 16 cp r14, r24 + 766: f9 06 cpc r15, r25 + 768: 14 f4 brge .+4 ; 0x76e + OSCCAL = org; + 76a: c1 be out 0x31, r12 ; 49 + return; + 76c: 30 c0 rjmp .+96 ; 0x7ce + + /* We have a precision of +/- 2 for optimum OSCCAL here */ + /* now do a neighborhood search for optimum value */ + optimumValue = trialValue; + optimumDev = x; /* this is certainly far away from optimum */ + for(OSCCAL = trialValue - 2; OSCCAL <= trialValue + 2; OSCCAL++){ + 76e: 8e ef ldi r24, 0xFE ; 254 + 770: 8c 0f add r24, r28 + 772: 81 bf out 0x31, r24 ; 49 + 774: ec 2e mov r14, r28 + 776: f1 2c mov r15, r1 + 778: 82 e0 ldi r24, 0x02 ; 2 + 77a: e8 0e add r14, r24 + 77c: f1 1c adc r15, r1 + 77e: 81 b7 in r24, 0x31 ; 49 + 780: 90 e0 ldi r25, 0x00 ; 0 + 782: e8 16 cp r14, r24 + 784: f9 06 cpc r15, r25 + 786: 8c f0 brlt .+34 ; 0x7aa + x = usbMeasureFrameLength() - targetValue; + 788: 32 de rcall .-924 ; 0x3ee + 78a: 84 53 subi r24, 0x34 ; 52 + 78c: 99 40 sbci r25, 0x09 ; 9 + 78e: 97 ff sbrs r25, 7 + 790: 03 c0 rjmp .+6 ; 0x798 + 792: 91 95 neg r25 + 794: 81 95 neg r24 + 796: 91 09 sbc r25, r1 + if(x < 0) + x = -x; + if(x < optimumDev){ + 798: 80 17 cp r24, r16 + 79a: 91 07 cpc r25, r17 + 79c: 14 f4 brge .+4 ; 0x7a2 + optimumDev = x; + optimumValue = OSCCAL; + 79e: c1 b7 in r28, 0x31 ; 49 + 7a0: 8c 01 movw r16, r24 + + /* We have a precision of +/- 2 for optimum OSCCAL here */ + /* now do a neighborhood search for optimum value */ + optimumValue = trialValue; + optimumDev = x; /* this is certainly far away from optimum */ + for(OSCCAL = trialValue - 2; OSCCAL <= trialValue + 2; OSCCAL++){ + 7a2: 81 b7 in r24, 0x31 ; 49 + 7a4: 8f 5f subi r24, 0xFF ; 255 + 7a6: 81 bf out 0x31, r24 ; 49 + 7a8: ea cf rjmp .-44 ; 0x77e + if(x < optimumDev){ + optimumDev = x; + optimumValue = OSCCAL; + } + } + OSCCAL = optimumValue; + 7aa: c1 bf out 0x31, r28 ; 49 + + if( eeprom_read_byte(0)!=optimumValue ) + 7ac: 80 e0 ldi r24, 0x00 ; 0 + 7ae: 90 e0 ldi r25, 0x00 ; 0 + 7b0: e0 d1 rcall .+960 ; 0xb72 + 7b2: c8 17 cp r28, r24 + 7b4: 61 f0 breq .+24 ; 0x7ce + eeprom_write_byte(0, optimumValue); + 7b6: 6c 2f mov r22, r28 + 7b8: 80 e0 ldi r24, 0x00 ; 0 + 7ba: 90 e0 ldi r25, 0x00 ; 0 +} + 7bc: df 91 pop r29 + 7be: cf 91 pop r28 + 7c0: 1f 91 pop r17 + 7c2: 0f 91 pop r16 + 7c4: ff 90 pop r15 + 7c6: ef 90 pop r14 + 7c8: df 90 pop r13 + 7ca: cf 90 pop r12 + } + } + OSCCAL = optimumValue; + + if( eeprom_read_byte(0)!=optimumValue ) + eeprom_write_byte(0, optimumValue); + 7cc: da c1 rjmp .+948 ; 0xb82 +} + 7ce: df 91 pop r29 + 7d0: cf 91 pop r28 + 7d2: 1f 91 pop r17 + 7d4: 0f 91 pop r16 + 7d6: ff 90 pop r15 + 7d8: ef 90 pop r14 + 7da: df 90 pop r13 + 7dc: cf 90 pop r12 + 7de: 08 95 ret + +000007e0 <__vector_1>: + +UART_INTR_VECTOR: +#ifdef UART_INVERT + sbis UART_PIN, UART_CFG_RXD ;1/2 +#else + sbic UART_PIN, UART_CFG_RXD ;1/2 + 7e0: b2 99 sbic 0x16, 2 ; 22 +#endif + reti ;4 + 7e2: 18 95 reti + + out GPIOR0, x1 ;1 + 7e4: 01 bb out 0x11, r16 ; 17 + + in x1, RX_DELAY ;1 1st bit sampling delay + 7e6: 05 b5 in r16, 0x25 ; 37 + out TCNT1, x1 ;1 + 7e8: 0f bd out 0x2f, r16 ; 47 + ldi x1, 9 ;1 set rx_bitcounter = 9 + 7ea: 09 e0 ldi r16, 0x09 ; 9 + out OCR1C, x1 ;1 + 7ec: 0d bd out 0x2d, r16 ; 45 + ldi x1, 7 ;1 start timer + 7ee: 07 e0 ldi r16, 0x07 ; 7 + out TCCR1, x1 ;1 + 7f0: 00 bf out 0x30, r16 ; 48 + + ldi x1, (1<: + + +SIG_OUTPUT_COMPARE1A: + out GPIOR0, x1 ;1 + 7fa: 01 bb out 0x11, r16 ; 17 + in x1, SREG ;1 + 7fc: 0f b7 in r16, 0x3f ; 63 + out GPIOR1, x1 ;1 + 7fe: 02 bb out 0x12, r16 ; 18 + + in x1, OCR1C ;1 rx_bitcounter-- + 800: 0d b5 in r16, 0x2d ; 45 + dec x1 ;1 + 802: 0a 95 dec r16 + out OCR1C, x1 ;1 + 804: 0d bd out 0x2d, r16 ; 45 + breq tm1_stopbit ;1/2 + 806: 79 f0 breq .+30 ; 0x826 + + in x1, OCR1B ;1 + 808: 0b b5 in r16, 0x2b ; 43 + lsr x1 ;1 data shift + 80a: 06 95 lsr r16 +#ifdef UART_INVERT + sbis UART_PIN, UART_CFG_RXD ;1/2 +#else + sbic UART_PIN, UART_CFG_RXD ;1/2 + 80c: b2 99 sbic 0x16, 2 ; 22 +#endif + ori x1, 0x80 ;1 + 80e: 00 68 ori r16, 0x80 ; 128 + out OCR1B, x1 ;1 + 810: 0b bd out 0x2b, r16 ; 43 + + out GPIOR2, x2 ;1 + 812: 13 bb out 0x13, r17 ; 19 + in x1, TCNT1 ;1 + 814: 0f b5 in r16, 0x2f ; 47 + in x2, OCR1A ;1 + 816: 1e b5 in r17, 0x2e ; 46 + sub x1, x2 ;1 + 818: 01 1b sub r16, r17 + out TCNT1, x1 ;1 + 81a: 0f bd out 0x2f, r16 ; 47 + + in x2, GPIOR2 ;1 + 81c: 13 b3 in r17, 0x13 ; 19 + in x1, GPIOR1 ;1 + 81e: 02 b3 in r16, 0x12 ; 18 + out SREG, x1 ;1 + 820: 0f bf out 0x3f, r16 ; 63 + in x1, GPIOR0 ;1 + 822: 01 b3 in r16, 0x11 ; 17 + reti ;4 + 824: 18 95 reti + +00000826 : + +tm1_stopbit: + out TCCR1, x1 ;1 stop timer1 + 826: 00 bf out 0x30, r16 ; 48 + + out RX_READY, x1 ;1 rx_data ready flag + 828: 04 bd out 0x24, r16 ; 36 + in x1, OCR1B ;1 + 82a: 0b b5 in r16, 0x2b ; 43 + out EEDR, x1 ;1 rx_data + 82c: 0d bb out 0x1d, r16 ; 29 + + ldi x1, (1<: + + +SIG_USI_OVERFLOW: + out GPIOR0, x1 ;1 + 83e: 01 bb out 0x11, r16 ; 17 + + sbic EEARL, 0 ;1/2 + 840: f0 99 sbic 0x1e, 0 ; 30 + rjmp usi_stopbit ;2 + 842: 07 c0 rjmp .+14 ; 0x852 + + ldi x1, 0x4b ;1 + 844: 0b e4 ldi r16, 0x4B ; 75 + out USISR, x1 ;1 + 846: 0e b9 out 0x0e, r16 ; 14 + + out EEARL, x1 ;1 + 848: 0e bb out 0x1e, r16 ; 30 + + in x1, OCR0B ;1 + 84a: 08 b5 in r16, 0x28 ; 40 + out USIDR, x1 ;1 transfer upper 4 bits + 84c: 0f b9 out 0x0f, r16 ; 15 + + in x1, GPIOR0 ;1 + 84e: 01 b3 in r16, 0x11 ; 17 + reti ;4 + 850: 18 95 reti + +00000852 : + +usi_stopbit: + ldi x1, (1<: +#define inb r24 +#define outb r25 +#endif + +bit_reverse: + rol inb + 85e: 88 1f adc r24, r24 + ror outb + 860: 97 95 ror r25 + rol inb + 862: 88 1f adc r24, r24 + ror outb + 864: 97 95 ror r25 + rol inb + 866: 88 1f adc r24, r24 + ror outb + 868: 97 95 ror r25 + rol inb + 86a: 88 1f adc r24, r24 + ror outb + 86c: 97 95 ror r25 + rol inb + 86e: 88 1f adc r24, r24 + ror outb + 870: 97 95 ror r25 + rol inb + 872: 88 1f adc r24, r24 + ror outb + 874: 97 95 ror r25 + rol inb + 876: 88 1f adc r24, r24 + ror outb + 878: 97 95 ror r25 + rol inb + 87a: 88 1f adc r24, r24 + ror outb + 87c: 97 95 ror r25 + mov inb, outb + 87e: 89 2f mov r24, r25 + ret + 880: 08 95 ret + +00000882 : +uchar urptr, uwptr, irptr, iwptr; +uchar rx_buf[RX_SIZE], tx_buf[TX_SIZE]; + + +void uartInit(uint baudrate) +{ + 882: 9c 01 movw r18, r24 + + PRR = (1<>6)+(baudrate>>1)) / baudrate - 1; + 8a8: b9 01 movw r22, r18 + 8aa: 76 95 lsr r23 + 8ac: 67 95 ror r22 + 8ae: cb 01 movw r24, r22 + 8b0: a0 e0 ldi r26, 0x00 ; 0 + 8b2: b0 e0 ldi r27, 0x00 ; 0 + 8b4: bc 01 movw r22, r24 + 8b6: cd 01 movw r24, r26 + 8b8: 6c 5e subi r22, 0xEC ; 236 + 8ba: 70 41 sbci r23, 0x10 ; 16 + 8bc: 8c 4f sbci r24, 0xFC ; 252 + 8be: 9f 4f sbci r25, 0xFF ; 255 + 8c0: 40 e0 ldi r20, 0x00 ; 0 + 8c2: 50 e0 ldi r21, 0x00 ; 0 + 8c4: 34 d1 rcall .+616 ; 0xb2e <__udivmodsi4> + 8c6: 21 50 subi r18, 0x01 ; 1 + 8c8: 2e bd out 0x2e, r18 ; 46 + USIDR = 0; +#else + USIDR = 0xff; +#endif + + OCR0A = + 8ca: 29 bd out 0x29, r18 ; 41 + OCR1A = ((F_CPU>>6)+(baudrate>>1)) / baudrate - 1; + OCR1C = 0; + 8cc: 1d bc out 0x2d, r1 ; 45 + RX_DELAY = -((OCR1A+1)>>2); /* 1.25 sample bit */ + 8ce: 8e b5 in r24, 0x2e ; 46 + 8d0: 90 e0 ldi r25, 0x00 ; 0 + 8d2: 01 96 adiw r24, 0x01 ; 1 + 8d4: 95 95 asr r25 + 8d6: 87 95 ror r24 + 8d8: 95 95 asr r25 + 8da: 87 95 ror r24 + 8dc: 81 95 neg r24 + 8de: 85 bd out 0x25, r24 ; 37 + if( RX_DELAY<=OCR1A ) + 8e0: 95 b5 in r25, 0x25 ; 37 + 8e2: 8e b5 in r24, 0x2e ; 46 + 8e4: 89 17 cp r24, r25 + 8e6: 18 f0 brcs .+6 ; 0x8ee + RX_DELAY = OCR1A + 1; /* for 1200 bps */ + 8e8: 8e b5 in r24, 0x2e ; 46 + 8ea: 8f 5f subi r24, 0xFF ; 255 + 8ec: 85 bd out 0x25, r24 ; 37 + + + TCCR0A = 2; /* CTC */ + 8ee: 82 e0 ldi r24, 0x02 ; 2 + 8f0: 8a bd out 0x2a, r24 ; 42 + RX_READY = 1; + 8f2: 81 e0 ldi r24, 0x01 ; 1 + 8f4: 84 bd out 0x24, r24 ; 36 + TIMSK = (1< + iwptr = 0; + 90e: 10 92 bb 00 sts 0x00BB, r1 ; 0x8000bb + urptr = 0; + 912: 10 92 3c 01 sts 0x013C, r1 ; 0x80013c + uwptr = 0; + 916: 10 92 3d 01 sts 0x013D, r1 ; 0x80013d + 91a: 08 95 ret + +0000091c : + +void uartPoll(void) +{ + + /* device <= rs232c : receive */ + if( RX_READY==0 && iwptr + 922: e0 91 bb 00 lds r30, 0x00BB ; 0x8000bb + 926: e8 30 cpi r30, 0x08 ; 8 + 928: 58 f4 brcc .+22 ; 0x940 + rx_buf[iwptr++] = EEDR; + 92a: 81 e0 ldi r24, 0x01 ; 1 + 92c: 8e 0f add r24, r30 + 92e: 80 93 bb 00 sts 0x00BB, r24 ; 0x8000bb + 932: 8d b3 in r24, 0x1d ; 29 + 934: f0 e0 ldi r31, 0x00 ; 0 + 936: ed 54 subi r30, 0x4D ; 77 + 938: ff 4f sbci r31, 0xFF ; 255 + 93a: 80 83 st Z, r24 + RX_READY = 1; + 93c: 81 e0 ldi r24, 0x01 ; 1 + 93e: 84 bd out 0x24, r24 ; 36 + } + + /* host <= device : transmit */ + if( usbInterruptIsReady() && (iwptr||sendEmptyFrame) ) { + 940: 80 91 7c 00 lds r24, 0x007C ; 0x80007c + 944: 84 ff sbrs r24, 4 + 946: 12 c0 rjmp .+36 ; 0x96c + 948: 60 91 bb 00 lds r22, 0x00BB ; 0x8000bb + 94c: 61 11 cpse r22, r1 + 94e: 04 c0 rjmp .+8 ; 0x958 + 950: 80 91 3f 01 lds r24, 0x013F ; 0x80013f + 954: 88 23 and r24, r24 + 956: 51 f0 breq .+20 ; 0x96c + usbSetInterrupt(rx_buf, iwptr); + 958: 83 eb ldi r24, 0xB3 ; 179 + 95a: 90 e0 ldi r25, 0x00 ; 0 + 95c: e3 db rcall .-2106 ; 0x124 + sendEmptyFrame = iwptr & HW_CDC_BULK_IN_SIZE; + 95e: 80 91 bb 00 lds r24, 0x00BB ; 0x8000bb + 962: 88 70 andi r24, 0x08 ; 8 + 964: 80 93 3f 01 sts 0x013F, r24 ; 0x80013f + iwptr = 0; + 968: 10 92 bb 00 sts 0x00BB, r1 ; 0x8000bb + } + + /* device => rs232c : transmit */ + if( TCCR0B==0 && uwptr!=irptr ) { + 96c: 83 b7 in r24, 0x33 ; 51 + 96e: 81 11 cpse r24, r1 + 970: 2f c0 rjmp .+94 ; 0x9d0 + 972: e0 91 3e 01 lds r30, 0x013E ; 0x80013e + 976: 80 91 3d 01 lds r24, 0x013D ; 0x80013d + 97a: 8e 17 cp r24, r30 + 97c: 49 f1 breq .+82 ; 0x9d0 + uchar data; + + data = bit_reverse( tx_buf[irptr] ); + 97e: f0 e0 ldi r31, 0x00 ; 0 + 980: e4 54 subi r30, 0x44 ; 68 + 982: ff 4f sbci r31, 0xFF ; 255 + 984: 80 81 ld r24, Z + 986: 6b df rcall .-298 ; 0x85e + irptr = (irptr+1) & TX_MASK; + 988: 90 91 3e 01 lds r25, 0x013E ; 0x80013e + 98c: 9f 5f subi r25, 0xFF ; 255 + 98e: 9f 77 andi r25, 0x7F ; 127 + 990: 90 93 3e 01 sts 0x013E, r25 ; 0x80013e + + TCNT0 = 0; + 994: 12 be out 0x32, r1 ; 50 + USISR = 0x4b; /* interrupt at D4 */ + 996: 9b e4 ldi r25, 0x4B ; 75 + 998: 9e b9 out 0x0e, r25 ; 14 + EEARL = 0; /* usi_phase */ + 99a: 1e ba out 0x1e, r1 ; 30 + +#ifdef UART_INVERT + OCR0B = ~((data<<4) | 0x0f); +#else + OCR0B = ((data<<4) | 0x0f); /* D4-7, stop bit */ + 99c: 98 2f mov r25, r24 + 99e: 92 95 swap r25 + 9a0: 90 7f andi r25, 0xF0 ; 240 + 9a2: 9f 60 ori r25, 0x0F ; 15 + 9a4: 98 bd out 0x28, r25 ; 40 +#endif + + data >>= 1; + 9a6: 86 95 lsr r24 + cli(); + 9a8: f8 94 cli +#ifdef UART_INVERT + USIDR = ~data; +#else + USIDR = data; /* startbit, D0-3 */ + 9aa: 8f b9 out 0x0f, r24 ; 15 +#endif + TCCR0B = 3; /* start timer0: 1/64 clk */ + 9ac: 83 e0 ldi r24, 0x03 ; 3 + 9ae: 83 bf out 0x33, r24 ; 51 + sei(); + 9b0: 78 94 sei + + /* host => device : accept */ + if( usbAllRequestsAreDisabled() && uartTxBytesFree()>=HW_CDC_BULK_OUT_SIZE ) { + 9b2: 80 91 8d 00 lds r24, 0x008D ; 0x80008d + 9b6: 87 ff sbrs r24, 7 + 9b8: 0b c0 rjmp .+22 ; 0x9d0 + 9ba: 80 91 3e 01 lds r24, 0x013E ; 0x80013e + 9be: 81 50 subi r24, 0x01 ; 1 + 9c0: 90 91 3d 01 lds r25, 0x013D ; 0x80013d + 9c4: 89 1b sub r24, r25 + 9c6: 8f 77 andi r24, 0x7F ; 127 + 9c8: 82 30 cpi r24, 0x02 ; 2 + 9ca: 10 f0 brcs .+4 ; 0x9d0 + usbEnableAllRequests(); + 9cc: 10 92 8d 00 sts 0x008D, r1 ; 0x80008d + 9d0: 08 95 ret + +000009d2 : + + +uchar usbFunctionDescriptor(usbRequest_t *rq) +{ + + if(rq->wValue.bytes[1] == USBDESCR_DEVICE){ + 9d2: fc 01 movw r30, r24 + 9d4: 83 81 ldd r24, Z+3 ; 0x03 + 9d6: 81 30 cpi r24, 0x01 ; 1 + 9d8: 49 f4 brne .+18 ; 0x9ec + usbMsgPtr = (uchar *)usbDescriptorDevice; + 9da: 8e e1 ldi r24, 0x1E ; 30 + 9dc: 90 e0 ldi r25, 0x00 ; 0 + 9de: 90 93 8c 00 sts 0x008C, r25 ; 0x80008c + 9e2: 80 93 8b 00 sts 0x008B, r24 ; 0x80008b + return usbDescriptorDevice[0]; + 9e6: 80 91 1e 00 lds r24, 0x001E ; 0x80001e <__EEPROM_REGION_LENGTH__+0x7f001e> + 9ea: 08 95 ret + }else{ /* must be config descriptor */ + usbMsgPtr = (uchar *)configDescrCDC; + 9ec: 86 e6 ldi r24, 0x66 ; 102 + 9ee: 90 e0 ldi r25, 0x00 ; 0 + 9f0: 90 93 8c 00 sts 0x008C, r25 ; 0x80008c + 9f4: 80 93 8b 00 sts 0x008B, r24 ; 0x80008b + return sizeof(configDescrCDC); + 9f8: 83 e4 ldi r24, 0x43 ; 67 + } +} + 9fa: 08 95 ret + +000009fc : +/* ------------------------------------------------------------------------- */ +/* ----------------------------- USB interface ----------------------------- */ +/* ------------------------------------------------------------------------- */ + +uchar usbFunctionSetup(uchar data[8]) +{ + 9fc: fc 01 movw r30, r24 +usbRequest_t *rq = (void *)data; + + if((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS){ /* class request type */ + 9fe: 90 81 ld r25, Z + a00: 89 2f mov r24, r25 + a02: 80 76 andi r24, 0x60 ; 96 + a04: 80 32 cpi r24, 0x20 ; 32 + a06: 99 f4 brne .+38 ; 0xa2e + + if( rq->bRequest==GET_LINE_CODING || rq->bRequest==SET_LINE_CODING ){ + a08: 81 81 ldd r24, Z+1 ; 0x01 + a0a: 20 ee ldi r18, 0xE0 ; 224 + a0c: 28 0f add r18, r24 + a0e: 22 30 cpi r18, 0x02 ; 2 + a10: 80 f0 brcs .+32 ; 0xa32 + return 0xff; + /* GET_LINE_CODING -> usbFunctionRead() */ + /* SET_LINE_CODING -> usbFunctionWrite() */ + } + if(rq->bRequest == SET_CONTROL_LINE_STATE){ + a12: 82 32 cpi r24, 0x22 ; 34 + a14: 39 f4 brne .+14 ; 0xa24 + /* Report serial state (carrier detect). On several Unix platforms, + * tty devices can only be opened when carrier detect is set. + */ + if( intr3Status==0 ) + a16: 80 91 70 00 lds r24, 0x0070 ; 0x800070 + a1a: 81 11 cpse r24, r1 + a1c: 03 c0 rjmp .+6 ; 0xa24 + intr3Status = 2; + a1e: 82 e0 ldi r24, 0x02 ; 2 + a20: 80 93 70 00 sts 0x0070, r24 ; 0x800070 + } + + /* Prepare bulk-in endpoint to respond to early termination */ + if((rq->bmRequestType & USBRQ_DIR_MASK) == USBRQ_DIR_HOST_TO_DEVICE) + a24: 97 fd sbrc r25, 7 + a26: 03 c0 rjmp .+6 ; 0xa2e + sendEmptyFrame = 1; + a28: 81 e0 ldi r24, 0x01 ; 1 + a2a: 80 93 3f 01 sts 0x013F, r24 ; 0x80013f + } + + return 0; + a2e: 80 e0 ldi r24, 0x00 ; 0 + a30: 08 95 ret +usbRequest_t *rq = (void *)data; + + if((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS){ /* class request type */ + + if( rq->bRequest==GET_LINE_CODING || rq->bRequest==SET_LINE_CODING ){ + return 0xff; + a32: 8f ef ldi r24, 0xFF ; 255 + if((rq->bmRequestType & USBRQ_DIR_MASK) == USBRQ_DIR_HOST_TO_DEVICE) + sendEmptyFrame = 1; + } + + return 0; +} + a34: 08 95 ret + +00000a36 : +/*---------------------------------------------------------------------------*/ +/* usbFunctionRead */ +/*---------------------------------------------------------------------------*/ + +uchar usbFunctionRead( uchar *data, uchar len ) +{ + a36: fc 01 movw r30, r24 + + data[0] = baud.bytes[0]; + a38: ae e6 ldi r26, 0x6E ; 110 + a3a: b0 e0 ldi r27, 0x00 ; 0 + a3c: 8c 91 ld r24, X + a3e: 80 83 st Z, r24 + data[1] = baud.bytes[1]; + a40: 11 96 adiw r26, 0x01 ; 1 + a42: 8c 91 ld r24, X + a44: 81 83 std Z+1, r24 ; 0x01 + data[2] = 0; + a46: 12 82 std Z+2, r1 ; 0x02 + data[3] = 0; + a48: 13 82 std Z+3, r1 ; 0x03 + data[4] = 0; + a4a: 14 82 std Z+4, r1 ; 0x04 + data[5] = 0; + a4c: 15 82 std Z+5, r1 ; 0x05 + data[6] = 8; + a4e: 88 e0 ldi r24, 0x08 ; 8 + a50: 86 83 std Z+6, r24 ; 0x06 + + return 7; +} + a52: 87 e0 ldi r24, 0x07 ; 7 + a54: 08 95 ret + +00000a56 : + +uchar usbFunctionWrite( uchar *data, uchar len ) +{ + + /* SET_LINE_CODING */ + baud.bytes[0] = data[0]; + a56: ee e6 ldi r30, 0x6E ; 110 + a58: f0 e0 ldi r31, 0x00 ; 0 + a5a: dc 01 movw r26, r24 + a5c: 2c 91 ld r18, X + a5e: 20 83 st Z, r18 + baud.bytes[1] = data[1]; + a60: 11 96 adiw r26, 0x01 ; 1 + a62: 8c 91 ld r24, X + a64: 81 83 std Z+1, r24 ; 0x01 + + uartInit(baud.word); + a66: 80 91 6e 00 lds r24, 0x006E ; 0x80006e + a6a: 90 91 6f 00 lds r25, 0x006F ; 0x80006f + a6e: 09 df rcall .-494 ; 0x882 + + return 1; +} + a70: 81 e0 ldi r24, 0x01 ; 1 + a72: 08 95 ret + +00000a74 : + + +void usbFunctionWriteOut( uchar *data, uchar len ) +{ + a74: dc 01 movw r26, r24 + a76: e0 91 3d 01 lds r30, 0x013D ; 0x80013d + + /* usb -> rs232c: transmit char */ + for( ; len; len-- ) { + a7a: 66 23 and r22, r22 + a7c: 71 f0 breq .+28 ; 0xa9a + tx_buf[uwptr++] = *data++; + a7e: 91 e0 ldi r25, 0x01 ; 1 + a80: 9e 0f add r25, r30 + a82: 90 93 3d 01 sts 0x013D, r25 ; 0x80013d + a86: 8d 91 ld r24, X+ + a88: f0 e0 ldi r31, 0x00 ; 0 + a8a: e4 54 subi r30, 0x44 ; 68 + a8c: ff 4f sbci r31, 0xFF ; 255 + a8e: 80 83 st Z, r24 + uwptr &= TX_MASK; + a90: 9f 77 andi r25, 0x7F ; 127 + a92: 90 93 3d 01 sts 0x013D, r25 ; 0x80013d + +void usbFunctionWriteOut( uchar *data, uchar len ) +{ + + /* usb -> rs232c: transmit char */ + for( ; len; len-- ) { + a96: 61 50 subi r22, 0x01 ; 1 + a98: ee cf rjmp .-36 ; 0xa76 + tx_buf[uwptr++] = *data++; + uwptr &= TX_MASK; + } + + /* postpone receiving next data */ + if( uartTxBytesFree() + a9e: 81 50 subi r24, 0x01 ; 1 + aa0: 8e 1b sub r24, r30 + aa2: 8f 77 andi r24, 0x7F ; 127 + aa4: 82 30 cpi r24, 0x02 ; 2 + aa6: 18 f4 brcc .+6 ; 0xaae + usbDisableAllRequests(); + aa8: 8f ef ldi r24, 0xFF ; 255 + aaa: 80 93 8d 00 sts 0x008D, r24 ; 0x80008d + aae: 08 95 ret + +00000ab0
: +__attribute__ ((__always_inline__)) +void wdt_enable (const uint8_t value) +{ + if (_SFR_IO_REG_P (_WD_CONTROL_REG)) + { + __asm__ __volatile__ ( + ab0: c8 e1 ldi r28, 0x18 ; 24 + ab2: 8e e0 ldi r24, 0x0E ; 14 + ab4: 0f b6 in r0, 0x3f ; 63 + ab6: f8 94 cli + ab8: a8 95 wdr + aba: c1 bd out 0x21, r28 ; 33 + abc: 0f be out 0x3f, r0 ; 63 + abe: 81 bd out 0x21, r24 ; 33 + +int main(void) +{ + wdt_enable(WDTO_1S); +#if USB_CFG_HAVE_MEASURE_FRAME_LENGTH + oscInit(); + ac0: 15 de rcall .-982 ; 0x6ec + +static void hardwareInit(void) +{ + + /* activate pull-ups except on USB lines */ + USB_CFG_IOPORT = (uchar)~((1< USB reset) */ +#ifdef USB_CFG_PULLUP_IOPORT /* use usbDeviceConnect()/usbDeviceDisconnect() if available */ + USBDDR = 0; /* we do RESET by deactivating pullup */ + usbDeviceDisconnect(); +#else + USBDDR = (1< + ad8: 00 c0 rjmp .+0 ; 0xada + ada: 00 00 nop + _delay_ms(250); + +#ifdef USB_CFG_PULLUP_IOPORT + usbDeviceConnect(); +#else + USBDDR = 0; /* remove USB reset condition */ + adc: 17 ba out 0x17, r1 ; 23 +#endif + + /* USART configuration */ + baud.word = UART_DEFAULT_BPS; + ade: 80 ec ldi r24, 0xC0 ; 192 + ae0: 92 e1 ldi r25, 0x12 ; 18 + ae2: 90 93 6f 00 sts 0x006F, r25 ; 0x80006f + ae6: 80 93 6e 00 sts 0x006E, r24 ; 0x80006e + uartInit(baud.word); + aea: cb de rcall .-618 ; 0x882 +#if USB_CFG_HAVE_MEASURE_FRAME_LENGTH + oscInit(); +#endif + odDebugInit(); + hardwareInit(); + usbInit(); + aec: 56 dc rcall .-1876 ; 0x39a + + intr3Status = 0; + aee: 10 92 70 00 sts 0x0070, r1 ; 0x800070 + sendEmptyFrame = 0; + af2: 10 92 3f 01 sts 0x013F, r1 ; 0x80013f + + sei(); + af6: 78 94 sei + for(;;){ /* main event loop */ + wdt_reset(); + af8: a8 95 wdr + usbPoll(); + afa: 1a db rcall .-2508 ; 0x130 + uartPoll(); + afc: 0f df rcall .-482 ; 0x91c + + /* We need to report rx and tx carrier after open attempt */ + if(intr3Status != 0 && usbInterruptIsReady3()){ + afe: 80 91 70 00 lds r24, 0x0070 ; 0x800070 + b02: 88 23 and r24, r24 + b04: c9 f3 breq .-14 ; 0xaf8 + b06: 90 91 a7 00 lds r25, 0x00A7 ; 0x8000a7 + b0a: 94 ff sbrs r25, 4 + b0c: f5 cf rjmp .-22 ; 0xaf8 + static uchar serialStateNotification[10] = {0xa1, 0x20, 0, 0, 0, 0, 2, 0, 3, 0}; + + if(intr3Status == 2){ + b0e: 82 30 cpi r24, 0x02 ; 2 + b10: 21 f4 brne .+8 ; 0xb1a + usbSetInterrupt3(serialStateNotification, 8); + b12: 68 e0 ldi r22, 0x08 ; 8 + b14: 82 e6 ldi r24, 0x62 ; 98 + b16: 90 e0 ldi r25, 0x00 ; 0 + b18: 03 c0 rjmp .+6 ; 0xb20 + }else{ + usbSetInterrupt3(serialStateNotification+8, 2); + b1a: 62 e0 ldi r22, 0x02 ; 2 + b1c: 8a e6 ldi r24, 0x6A ; 106 + b1e: 90 e0 ldi r25, 0x00 ; 0 + b20: 04 db rcall .-2552 ; 0x12a + } + intr3Status--; + b22: 80 91 70 00 lds r24, 0x0070 ; 0x800070 + b26: 81 50 subi r24, 0x01 ; 1 + b28: 80 93 70 00 sts 0x0070, r24 ; 0x800070 + b2c: e5 cf rjmp .-54 ; 0xaf8 + +00000b2e <__udivmodsi4>: + b2e: a1 e2 ldi r26, 0x21 ; 33 + b30: 1a 2e mov r1, r26 + b32: aa 1b sub r26, r26 + b34: bb 1b sub r27, r27 + b36: fd 01 movw r30, r26 + b38: 0d c0 rjmp .+26 ; 0xb54 <__udivmodsi4_ep> + +00000b3a <__udivmodsi4_loop>: + b3a: aa 1f adc r26, r26 + b3c: bb 1f adc r27, r27 + b3e: ee 1f adc r30, r30 + b40: ff 1f adc r31, r31 + b42: a2 17 cp r26, r18 + b44: b3 07 cpc r27, r19 + b46: e4 07 cpc r30, r20 + b48: f5 07 cpc r31, r21 + b4a: 20 f0 brcs .+8 ; 0xb54 <__udivmodsi4_ep> + b4c: a2 1b sub r26, r18 + b4e: b3 0b sbc r27, r19 + b50: e4 0b sbc r30, r20 + b52: f5 0b sbc r31, r21 + +00000b54 <__udivmodsi4_ep>: + b54: 66 1f adc r22, r22 + b56: 77 1f adc r23, r23 + b58: 88 1f adc r24, r24 + b5a: 99 1f adc r25, r25 + b5c: 1a 94 dec r1 + b5e: 69 f7 brne .-38 ; 0xb3a <__udivmodsi4_loop> + b60: 60 95 com r22 + b62: 70 95 com r23 + b64: 80 95 com r24 + b66: 90 95 com r25 + b68: 9b 01 movw r18, r22 + b6a: ac 01 movw r20, r24 + b6c: bd 01 movw r22, r26 + b6e: cf 01 movw r24, r30 + b70: 08 95 ret + +00000b72 : + b72: e1 99 sbic 0x1c, 1 ; 28 + b74: fe cf rjmp .-4 ; 0xb72 + b76: 1f ba out 0x1f, r1 ; 31 + b78: 8e bb out 0x1e, r24 ; 30 + b7a: e0 9a sbi 0x1c, 0 ; 28 + b7c: 99 27 eor r25, r25 + b7e: 8d b3 in r24, 0x1d ; 29 + b80: 08 95 ret + +00000b82 : + b82: 26 2f mov r18, r22 + +00000b84 : + b84: e1 99 sbic 0x1c, 1 ; 28 + b86: fe cf rjmp .-4 ; 0xb84 + b88: 1c ba out 0x1c, r1 ; 28 + b8a: 1f ba out 0x1f, r1 ; 31 + b8c: 8e bb out 0x1e, r24 ; 30 + b8e: 2d bb out 0x1d, r18 ; 29 + b90: 0f b6 in r0, 0x3f ; 63 + b92: f8 94 cli + b94: e2 9a sbi 0x1c, 2 ; 28 + b96: e1 9a sbi 0x1c, 1 ; 28 + b98: 0f be out 0x3f, r0 ; 63 + b9a: 01 96 adiw r24, 0x01 ; 1 + b9c: 08 95 ret + +00000b9e <_exit>: + b9e: f8 94 cli + +00000ba0 <__stop_program>: + ba0: ff cf rjmp .-2 ; 0xba0 <__stop_program> diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny45inv.hex b/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny45inv.hex new file mode 100755 index 0000000000000000000000000000000000000000..0ff6021a7cc0d3f3205df346edda57be156b60a7 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny45inv.hex @@ -0,0 +1,188 @@ +:1000000054C0EBC308C2F6C36BC06AC069C068C005 +:1000100067C066C065C064C063C062C00DC404032D +:10002000090422037700770077002E007200650034 +:10003000630075007200730069006F006E002E008F +:100040006A00700010035500530042002D0032007A +:10005000330032001201100102000008C016E10551 +:10006000000101020001090243000201008032097F +:100070000400000102020100052400100104240212 +:100080000205240600010524010301070583030876 +:1000900000FF09040100020A000000070501020236 +:1000A0000000070581020800000011241FBECFE5F3 +:1000B000D1E0DEBFCDBF10E0A0E6B0E0E4E9FBE0B8 +:1000C00002C005900D92AC36B107D9F711E0ACE64D +:1000D000B0E001C01D92A034B107E1F7D2D458C5F9 +:1000E0008FCFAC9A8BB780628BBF8BE480937D00FF +:1000F0008093A8008AE580937C008093A7000895F0 +:100100001F93CF93DF93DC01162FEA01888184FFD0 +:1001100005C0898198E88927898302C08AE5888398 +:10012000AE014E5F5F4F212FFA018D9181932150D7 +:100130001216DCF3CA01612F57D11C5F1883DF91BF +:10014000CF911F91089547EA50E0DADF08954CE718 +:1001500050E0D6DF08951F93CF93DF9360918D0019 +:10016000635067FDB3C080918A00CCE0D0E0C81B2B +:10017000D109CF56DF4F80918900803118F4CE012C +:1001800064D49EC08D3209F08BC0683009F098C0ED +:1001900083EC809371008AE58093600010926D007B +:1001A0008881807621F0CE0122D4282F66C09A81E2 +:1001B00010927A008981882321F410927B0022E03A +:1001C00055C0853019F490938E004FC08630B9F534 +:1001D0008B81813041F484E590E090938C00809392 +:1001E0008B0022E128C0823021F4CE01EBD3282FEE +:1001F00022C08330F9F48A81882341F48EE190E0B3 +:1002000090938C0080938B0024E015C0813041F4E2 +:1002100082E290E090938C0080938B0022E20BC0EE +:10022000823041F484E490E090938C0080938B00C2 +:1002300020E101C020E080E480936D001EC0883082 +:1002400021F421E080E990E013C0893019F4909303 +:1002500090000BC08A3011F421E008C08B3029F4E3 +:100260008BE480937D008093A80020E08AE790E0F3 +:1002700090938C0080938B0009C02F3F39F48881C4 +:1002800087FD2E8180E880936D0006C08F818823D2 +:1002900019F48E81821708F0822F8093610010C0BC +:1002A00080916D0087FF0CC0CE012CD48F3F21F4CC +:1002B0008EE18093600004C0882311F010926100E9 +:1002C00080918D00181614F410928D0080916000BA +:1002D00084FF58C0809161008F3F09F453C0182FEC +:1002E000893008F018E0811B8093610080917100D3 +:1002F00098E8892780937100112391F180916D0016 +:1003000087FF08C082E790E0612F90D3182F8930D3 +:1003100098F526C020918B0030918C0086FF0DC08F +:10032000A2E7B0E080E090E0F901E80FF91FE49166 +:10033000ED9301961817C1F708C0912FD901E2E794 +:10034000F0E08D9181939150E1F71150812F90E071 +:100350001F5F0196820F931F90938C0080938B00F8 +:1003600082E790E0612F40D0612F6C5F6C3041F0EC +:100370008FEF8093610004C08FEF809361006EE186 +:100380006093600094E186B3887131F49150D9F79D +:1003900010928E001092880010E0992309F411E069 +:1003A00080916C00811739F0112319F4F894A8D1C9 +:1003B000789410936C00DF91CF911F910895A82F2E +:1003C000B92F80E090E041E050EA609530E009C04C +:1003D0002D9182279795879510F084279527305E79 +:1003E000C8F36F5FA8F30895EADF8D939D93089596 +:1003F000A6E088279927AA9569F00197E1F3B399B8 +:10040000FCCFB39BFECF81E09927A6B3019611F0F4 +:10041000A871D9F70895CF93CFB7CF93C395B39B66 +:10042000E9F7B39B0BC0B39B09C0B39B07C0B39B59 +:1004300005C0B39B03C0B39B01C0D8C00F92DF932C +:10044000C0918A00DD27CF56DF4F012EB39B03C03A +:10045000DF910F90E6CF2F930F931F934F932FEFC2 +:100460004F6F06B303FB20F95F933F9350E03BE0EF +:1004700065C016B30126502953FDC89556B3012710 +:1004800003FB25F92F7306B3B1F05027102713FB98 +:1004900026F906B22230F0F000C016B3012703FBA4 +:1004A00027F90126502906B22430E8F54F77206855 +:1004B00016B30000F6CF50274F7D206206B2102FF2 +:1004C000000000C006B300265029102713FB26F9B0 +:1004D00006B2E2CF4F7B06B3206400C0DACF01261C +:1004E0005029187106B269F14E7F2160012F16B3B1 +:1004F00028C0002650294D7F06B22260102F29C047 +:10050000012650294B7F06B22460012F2DC016B35F +:1005100001265029477F2860000006B22EC04F7E7A +:1005200006B3206130C0422706B349930026502904 +:10053000102706B24FEF13FB20F9297F16B379F28B +:10054000187159F10126502906B2012703FB21F940 +:10055000237F06B371F2002650293150D0F006B245 +:10056000102713FB22F9277E16B351F201265029DA +:10057000012703FB06B223F92F7C49F2000006B3E2 +:10058000102713FB24F90026502906B22F7939F2DF +:1005900070CF10E21ABF00271CC03B503195C31B1F +:1005A000D04010E21ABF0881033C21F10B3411F155 +:1005B000209188001981110F1213EDCF4A81441F39 +:1005C000093669F10D3211F0013E29F74F7009F03B +:1005D000042F00938F003F915F914F911F910F91D6 +:1005E0002F91DF910F90CAB7C5FD18CFCF91CFBF24 +:1005F000CF91189520918F00222369F310918D00DF +:100600001123D1F53430D2F130938D00209389003D +:1006100010918A003BE0311B30938A002FC000917B +:100620008D0001304CF50AE54F7049F430916000BF +:1006300034FD25C000936000C1E7D0E024C0433002 +:1006400049F030917C0034FD1AC000937C00CDE766 +:10065000D0E019C03091A70034FD11C00093A7006D +:10066000C8EAD0E010C0052710E000C021C005276F +:1006700010E0C89508BB14C03AE501C032ED032E66 +:10068000C0E0D0E032E017B31861C39A08B317BBDB +:1006900058E120E84FEF20FF052708BB2795179565 +:1006A0001C3F28F700004552B0F720FF052727958B +:1006B00008BB17951C3FB8F629913A9561F7077E5C +:1006C00010918E00110F08BBC250D04011F0109352 +:1006D000880010E21ABF086017B3177E402F477ECC +:1006E00054E05A95F1F708BB17BB48BB74CF80E0C4 +:1006F00090E038D28F3F11F481B78C5F81BF0895AD +:10070000CF92DF92EF92FF920F931F93CF93DF93DD +:10071000E1B66EDE6C0188E981BF6ADE84539940E0 +:1007200014F400E801C000E080E4F82EC0E0D0E05E +:10073000102F1F0D11BF5CDE9C0189E024333807A8 +:100740000CF0102FF6942196C730D10511F0012F2F +:10075000EFCF2453394037FF03C0309521953F4FE9 +:10076000C6018453994097FF03C0909581959F4F90 +:100770008217930714F4E1BE27C0125011BF1E5F09 +:100780007901C12FD0E0229610C032DE8453994007 +:1007900097FF03C0909581959F4F8E159F0514F488 +:1007A00011B77C0181B78F5F81BF81B790E0C81717 +:1007B000D9075CF711BF80E090E0D4D1811721F018 +:1007C00080E090E0612FD6D1DF91CF911F910F9102 +:1007D000FF90EF90DF90CF900895B29B189501BBEA +:1007E00005B50FBD09E00DBD07E000BF00E20BBF7E +:1007F00001B3189501BB0FB702BB0DB50A950DBD2E +:1008000079F00BB50695B29B00680BBD13BB0FB515 +:100810001EB5011B0FBD13B302B30FBF01B3189573 +:1008200000BF04BD0BB50DBB00E40ABF00E60BBF63 +:1008300002B30FBF01B3189501BBF09907C00BE4D9 +:100840000EB90EBB08B50FB901B3189500E40EB987 +:1008500000E003BF01B31895881F9795881F9795EF +:10086000881F9795881F9795881F9795881F97953C +:10087000881F9795881F9795892F08959C0181E07F +:1008800080BD80E888B9B99ABA988BB78F7B8BBF47 +:100890001ABC13BE10BE80EE8EB984E58DB91FB8A8 +:1008A000B9017695679580E090E06C5E70418C4F61 +:1008B0009F4F40E050E034D121502EBD8EB589BD10 +:1008C0001DBC8EB590E00196959587959595879579 +:1008D000819585BD95B58EB5891718F08EB58F5F5A +:1008E00085BD82E08ABD81E084BD90E499BF85B773 +:1008F000836085BF9ABF8BB780648BBF10923E0127 +:100900001092BB0010923C0110923D01089584B5F5 +:10091000882379F49091BB00983058F48DB3E92F77 +:10092000F0E0ED54FF4F80839F5F9093BB0081E028 +:1009300084BD80917C0084FF12C06091BB0066235F +:1009400021F480913F01882351F083EB90E0FFDB9D +:100950008091BB00887080933F011092BB0083B7E9 +:10096000882379F5E0913E0180913D018E1749F190 +:10097000F0E0E454FF4F80816FDF20913E012F5F54 +:100980002F7720933E0112BE9BE49EB91EBA982F8A +:100990009295907F9F60909598BDF89486958095EC +:1009A0008FB983E083BF789480918D0087FF09C061 +:1009B00080913D018095820F8F77823010F01092E8 +:1009C0008D000895FC018381813049F484E590E035 +:1009D00090938C0080938B0080915400089586E65C +:1009E00090E090938C0080938B0083E40895FC0149 +:1009F0002081822F80768032B9F49181892F8052B4 +:100A0000823010F48FEF0895923239F480916E00A5 +:100A1000882319F482E080936E0027FD05C081E0F1 +:100A200080933F0180E0089580E00895FC0180916B +:100A30006F00808380917000818312821382148200 +:100A4000158288E0868387E00895DC010BC0E92FDA +:100A5000F0E0E454FF4F8D9180839F5F9F779093E8 +:100A60003D01615090913D01662389F780913E01DF +:100A70008150891B8F77823018F48FEF80938D001F +:100A800008952EE088E190E00FB6F894A89581BD16 +:100A90000FBE21BD2CDE87EE88BB88E187BBA89501 +:100AA00084EC99E02CE931E0F9013197F1F70197F5 +:100AB000D9F717BA80EC92E19093700080936F00A1 +:100AC000DDDE0FDB10926E0010923F017894A89546 +:100AD00042DB1DDF90916E009923C9F38091A7003E +:100AE00084FFF5CF923021F482E690E068E003C005 +:100AF0008AE690E062E027DB80916E00815080936F +:100B00006E00E5CFFC01808180936F00818180932E +:100B1000700080916F0090917000B0DE81E00895C8 +:100B2000A1E21A2EAA1BBB1BFD010DC0AA1FBB1FF1 +:100B3000EE1FFF1FA217B307E407F50720F0A21B63 +:100B4000B30BE40BF50B661F771F881F991F1A94D0 +:100B500069F760957095809590959B01AC01BD01FA +:100B6000CF010895E199FECF1FBA8EBBE09A992775 +:100B70008DB30895262FE199FECF1CBA1FBA8EBB04 +:100B80002DBB0FB6F894E29AE19A0FBE0196089534 +:040B9000F894FFCF07 +:0C0B94005AFFA120000000000200030036 +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny85.hex b/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny85.hex new file mode 100755 index 0000000000000000000000000000000000000000..3b6508348db94e071c71c88f8fdf13dcef2065af --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny85.hex @@ -0,0 +1,188 @@ +:1000000054C0EBC308C2F6C36BC06AC069C068C005 +:1000100067C066C065C064C063C062C00DC404032D +:10002000090422037700770077002E007200650034 +:10003000630075007200730069006F006E002E008F +:100040006A00700010035500530042002D0032007A +:10005000330032001201100102000008C016E10551 +:10006000000101020001090243000201008032097F +:100070000400000102020100052400100104240212 +:100080000205240600010524010301070583030876 +:1000900000FF09040100020A000000070501020236 +:1000A0000000070581020800000011241FBECFE5F3 +:1000B000D2E0DEBFCDBF10E0A0E6B0E0E4E9FBE0B7 +:1000C00002C005900D92AC36B107D9F711E0ACE64D +:1000D000B0E001C01D92A034B107E1F7D2D458C5F9 +:1000E0008FCFAC9A8BB780628BBF8BE480937D00FF +:1000F0008093A8008AE580937C008093A7000895F0 +:100100001F93CF93DF93DC01162FEA01888184FFD0 +:1001100005C0898198E88927898302C08AE5888398 +:10012000AE014E5F5F4F212FFA018D9181932150D7 +:100130001216DCF3CA01612F57D11C5F1883DF91BF +:10014000CF911F91089547EA50E0DADF08954CE718 +:1001500050E0D6DF08951F93CF93DF9360918D0019 +:10016000635067FDB3C080918A00CCE0D0E0C81B2B +:10017000D109CF56DF4F80918900803118F4CE012C +:1001800064D49EC08D3209F08BC0683009F098C0ED +:1001900083EC809371008AE58093600010926D007B +:1001A0008881807621F0CE0122D4282F66C09A81E2 +:1001B00010927A008981882321F410927B0022E03A +:1001C00055C0853019F490938E004FC08630B9F534 +:1001D0008B81813041F484E590E090938C00809392 +:1001E0008B0022E128C0823021F4CE01EBD3282FEE +:1001F00022C08330F9F48A81882341F48EE190E0B3 +:1002000090938C0080938B0024E015C0813041F4E2 +:1002100082E290E090938C0080938B0022E20BC0EE +:10022000823041F484E490E090938C0080938B00C2 +:1002300020E101C020E080E480936D001EC0883082 +:1002400021F421E080E990E013C0893019F4909303 +:1002500090000BC08A3011F421E008C08B3029F4E3 +:100260008BE480937D008093A80020E08AE790E0F3 +:1002700090938C0080938B0009C02F3F39F48881C4 +:1002800087FD2E8180E880936D0006C08F818823D2 +:1002900019F48E81821708F0822F8093610010C0BC +:1002A00080916D0087FF0CC0CE012CD48F3F21F4CC +:1002B0008EE18093600004C0882311F010926100E9 +:1002C00080918D00181614F410928D0080916000BA +:1002D00084FF58C0809161008F3F09F453C0182FEC +:1002E000893008F018E0811B8093610080917100D3 +:1002F00098E8892780937100112391F180916D0016 +:1003000087FF08C082E790E0612F90D3182F8930D3 +:1003100098F526C020918B0030918C0086FF0DC08F +:10032000A2E7B0E080E090E0F901E80FF91FE49166 +:10033000ED9301961817C1F708C0912FD901E2E794 +:10034000F0E08D9181939150E1F71150812F90E071 +:100350001F5F0196820F931F90938C0080938B00F8 +:1003600082E790E0612F40D0612F6C5F6C3041F0EC +:100370008FEF8093610004C08FEF809361006EE186 +:100380006093600094E186B3887131F49150D9F79D +:1003900010928E001092880010E0992309F411E069 +:1003A00080916C00811739F0112319F4F894A8D1C9 +:1003B000789410936C00DF91CF911F910895A82F2E +:1003C000B92F80E090E041E050EA609530E009C04C +:1003D0002D9182279795879510F084279527305E79 +:1003E000C8F36F5FA8F30895EADF8D939D93089596 +:1003F000A6E088279927AA9569F00197E1F3B399B8 +:10040000FCCFB39BFECF81E09927A6B3019611F0F4 +:10041000A871D9F70895CF93CFB7CF93C395B39B66 +:10042000E9F7B39B0BC0B39B09C0B39B07C0B39B59 +:1004300005C0B39B03C0B39B01C0D8C00F92DF932C +:10044000C0918A00DD27CF56DF4F012EB39B03C03A +:10045000DF910F90E6CF2F930F931F934F932FEFC2 +:100460004F6F06B303FB20F95F933F9350E03BE0EF +:1004700065C016B30126502953FDC89556B3012710 +:1004800003FB25F92F7306B3B1F05027102713FB98 +:1004900026F906B22230F0F000C016B3012703FBA4 +:1004A00027F90126502906B22430E8F54F77206855 +:1004B00016B30000F6CF50274F7D206206B2102FF2 +:1004C000000000C006B300265029102713FB26F9B0 +:1004D00006B2E2CF4F7B06B3206400C0DACF01261C +:1004E0005029187106B269F14E7F2160012F16B3B1 +:1004F00028C0002650294D7F06B22260102F29C047 +:10050000012650294B7F06B22460012F2DC016B35F +:1005100001265029477F2860000006B22EC04F7E7A +:1005200006B3206130C0422706B349930026502904 +:10053000102706B24FEF13FB20F9297F16B379F28B +:10054000187159F10126502906B2012703FB21F940 +:10055000237F06B371F2002650293150D0F006B245 +:10056000102713FB22F9277E16B351F201265029DA +:10057000012703FB06B223F92F7C49F2000006B3E2 +:10058000102713FB24F90026502906B22F7939F2DF +:1005900070CF10E21ABF00271CC03B503195C31B1F +:1005A000D04010E21ABF0881033C21F10B3411F155 +:1005B000209188001981110F1213EDCF4A81441F39 +:1005C000093669F10D3211F0013E29F74F7009F03B +:1005D000042F00938F003F915F914F911F910F91D6 +:1005E0002F91DF910F90CAB7C5FD18CFCF91CFBF24 +:1005F000CF91189520918F00222369F310918D00DF +:100600001123D1F53430D2F130938D00209389003D +:1006100010918A003BE0311B30938A002FC000917B +:100620008D0001304CF50AE54F7049F430916000BF +:1006300034FD25C000936000C1E7D0E024C0433002 +:1006400049F030917C0034FD1AC000937C00CDE766 +:10065000D0E019C03091A70034FD11C00093A7006D +:10066000C8EAD0E010C0052710E000C021C005276F +:1006700010E0C89508BB14C03AE501C032ED032E66 +:10068000C0E0D0E032E017B31861C39A08B317BBDB +:1006900058E120E84FEF20FF052708BB2795179565 +:1006A0001C3F28F700004552B0F720FF052727958B +:1006B00008BB17951C3FB8F629913A9561F7077E5C +:1006C00010918E00110F08BBC250D04011F0109352 +:1006D000880010E21ABF086017B3177E402F477ECC +:1006E00054E05A95F1F708BB17BB48BB74CF80E0C4 +:1006F00090E038D28F3F11F481B78C5F81BF0895AD +:10070000CF92DF92EF92FF920F931F93CF93DF93DD +:10071000E1B66EDE6C0188E981BF6ADE84539940E0 +:1007200014F400E801C000E080E4F82EC0E0D0E05E +:10073000102F1F0D11BF5CDE9C0189E024333807A8 +:100740000CF0102FF6942196C730D10511F0012F2F +:10075000EFCF2453394037FF03C0309521953F4FE9 +:10076000C6018453994097FF03C0909581959F4F90 +:100770008217930714F4E1BE27C0125011BF1E5F09 +:100780007901C12FD0E0229610C032DE8453994007 +:1007900097FF03C0909581959F4F8E159F0514F488 +:1007A00011B77C0181B78F5F81BF81B790E0C81717 +:1007B000D9075CF711BF80E090E0D4D1811721F018 +:1007C00080E090E0612FD6D1DF91CF911F910F9102 +:1007D000FF90EF90DF90CF900895B299189501BBEC +:1007E00005B50FBD09E00DBD07E000BF00E20BBF7E +:1007F00001B3189501BB0FB702BB0DB50A950DBD2E +:1008000079F00BB50695B29900680BBD13BB0FB517 +:100810001EB5011B0FBD13B302B30FBF01B3189573 +:1008200000BF04BD0BB50DBB00E40ABF00E60BBF63 +:1008300002B30FBF01B3189501BBF09907C00BE4D9 +:100840000EB90EBB08B50FB901B3189500E40EB987 +:1008500000E003BF01B31895881F9795881F9795EF +:10086000881F9795881F9795881F9795881F97953C +:10087000881F9795881F9795892F08959C0181E07F +:1008800080BD80E888B9B99ABA988BB78F7B8BBF47 +:100890001ABC13BE10BE80EE8EB984E58DB98FEF01 +:1008A0008FB9B9017695679580E090E06C5E7041F4 +:1008B0008C4F9F4F40E050E033D121502EBD8EB57C +:1008C00089BD1DBC8EB590E001969595879595954F +:1008D0008795819585BD95B58EB5891718F08EB52C +:1008E0008F5F85BD82E08ABD81E084BD90E499BFC1 +:1008F00085B78C7F826085BF9ABF8BB780648BBFC2 +:1009000010923E011092BB0010923C0110923D01EA +:10091000089584B5882379F49091BB00983058F4F9 +:100920008DB3E92FF0E0ED54FF4F80839F5F9093EC +:10093000BB0081E084BD80917C0084FF12C0609187 +:10094000BB00662321F480913F01882351F083EBA3 +:1009500090E0FDDB8091BB00887080933F01109296 +:10096000BB0083B7882369F5E0913E0180913D018A +:100970008E1739F1F0E0E454FF4F80816DDF209154 +:100980003E012F5F2F7720933E0112BE9BE49EB95C +:100990001EBA982F9295907F9F6098BD8695F89487 +:1009A0008FB983E083BF789480918D0087FF09C061 +:1009B00080913D018095820F8F77823010F01092E8 +:1009C0008D000895FC018381813049F484E590E035 +:1009D00090938C0080938B0080915400089586E65C +:1009E00090E090938C0080938B0083E40895FC0149 +:1009F0002081822F80768032B9F49181892F8052B4 +:100A0000823010F48FEF0895923239F480916E00A5 +:100A1000882319F482E080936E0027FD05C081E0F1 +:100A200080933F0180E0089580E00895FC0180916B +:100A30006F00808380917000818312821382148200 +:100A4000158288E0868387E00895DC010BC0E92FDA +:100A5000F0E0E454FF4F8D9180839F5F9F779093E8 +:100A60003D01615090913D01662389F780913E01DF +:100A70008150891B8F77823018F48FEF80938D001F +:100A800008952EE088E190E00FB6F894A89581BD16 +:100A90000FBE21BD2CDE87EE88BB88E187BBA89501 +:100AA00084EC99E02CE931E0F9013197F1F70197F5 +:100AB000D9F717BA80EC92E19093700080936F00A1 +:100AC000DDDE0FDB10926E0010923F017894A89546 +:100AD00042DB1FDF90916E009923C9F38091A7003C +:100AE00084FFF5CF923021F482E690E068E003C005 +:100AF0008AE690E062E027DB80916E00815080936F +:100B00006E00E5CFFC01808180936F00818180932E +:100B1000700080916F0090917000B0DE81E00895C8 +:100B2000A1E21A2EAA1BBB1BFD010DC0AA1FBB1FF1 +:100B3000EE1FFF1FA217B307E407F50720F0A21B63 +:100B4000B30BE40BF50B661F771F881F991F1A94D0 +:100B500069F760957095809590959B01AC01BD01FA +:100B6000CF010895E199FECF9FBB8EBBE09A9927F4 +:100B70008DB30895262FE199FECF1CBA9FBB8EBB83 +:100B80002DBB0FB6F894E29AE19A0FBE0196089534 +:040B9000F894FFCF07 +:0C0B94005AFFA120000000000200030036 +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny85inv.hex b/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny85inv.hex new file mode 100755 index 0000000000000000000000000000000000000000..6a29203ba71dfe64776a1db878ab82ace8657d7b --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/default/cdctiny85inv.hex @@ -0,0 +1,188 @@ +:1000000054C0EBC308C2F6C36BC06AC069C068C005 +:1000100067C066C065C064C063C062C00DC404032D +:10002000090422037700770077002E007200650034 +:10003000630075007200730069006F006E002E008F +:100040006A00700010035500530042002D0032007A +:10005000330032001201100102000008C016E10551 +:10006000000101020001090243000201008032097F +:100070000400000102020100052400100104240212 +:100080000205240600010524010301070583030876 +:1000900000FF09040100020A000000070501020236 +:1000A0000000070581020800000011241FBECFE5F3 +:1000B000D2E0DEBFCDBF10E0A0E6B0E0E4E9FBE0B7 +:1000C00002C005900D92AC36B107D9F711E0ACE64D +:1000D000B0E001C01D92A034B107E1F7D2D458C5F9 +:1000E0008FCFAC9A8BB780628BBF8BE480937D00FF +:1000F0008093A8008AE580937C008093A7000895F0 +:100100001F93CF93DF93DC01162FEA01888184FFD0 +:1001100005C0898198E88927898302C08AE5888398 +:10012000AE014E5F5F4F212FFA018D9181932150D7 +:100130001216DCF3CA01612F57D11C5F1883DF91BF +:10014000CF911F91089547EA50E0DADF08954CE718 +:1001500050E0D6DF08951F93CF93DF9360918D0019 +:10016000635067FDB3C080918A00CCE0D0E0C81B2B +:10017000D109CF56DF4F80918900803118F4CE012C +:1001800064D49EC08D3209F08BC0683009F098C0ED +:1001900083EC809371008AE58093600010926D007B +:1001A0008881807621F0CE0122D4282F66C09A81E2 +:1001B00010927A008981882321F410927B0022E03A +:1001C00055C0853019F490938E004FC08630B9F534 +:1001D0008B81813041F484E590E090938C00809392 +:1001E0008B0022E128C0823021F4CE01EBD3282FEE +:1001F00022C08330F9F48A81882341F48EE190E0B3 +:1002000090938C0080938B0024E015C0813041F4E2 +:1002100082E290E090938C0080938B0022E20BC0EE +:10022000823041F484E490E090938C0080938B00C2 +:1002300020E101C020E080E480936D001EC0883082 +:1002400021F421E080E990E013C0893019F4909303 +:1002500090000BC08A3011F421E008C08B3029F4E3 +:100260008BE480937D008093A80020E08AE790E0F3 +:1002700090938C0080938B0009C02F3F39F48881C4 +:1002800087FD2E8180E880936D0006C08F818823D2 +:1002900019F48E81821708F0822F8093610010C0BC +:1002A00080916D0087FF0CC0CE012CD48F3F21F4CC +:1002B0008EE18093600004C0882311F010926100E9 +:1002C00080918D00181614F410928D0080916000BA +:1002D00084FF58C0809161008F3F09F453C0182FEC +:1002E000893008F018E0811B8093610080917100D3 +:1002F00098E8892780937100112391F180916D0016 +:1003000087FF08C082E790E0612F90D3182F8930D3 +:1003100098F526C020918B0030918C0086FF0DC08F +:10032000A2E7B0E080E090E0F901E80FF91FE49166 +:10033000ED9301961817C1F708C0912FD901E2E794 +:10034000F0E08D9181939150E1F71150812F90E071 +:100350001F5F0196820F931F90938C0080938B00F8 +:1003600082E790E0612F40D0612F6C5F6C3041F0EC +:100370008FEF8093610004C08FEF809361006EE186 +:100380006093600094E186B3887131F49150D9F79D +:1003900010928E001092880010E0992309F411E069 +:1003A00080916C00811739F0112319F4F894A8D1C9 +:1003B000789410936C00DF91CF911F910895A82F2E +:1003C000B92F80E090E041E050EA609530E009C04C +:1003D0002D9182279795879510F084279527305E79 +:1003E000C8F36F5FA8F30895EADF8D939D93089596 +:1003F000A6E088279927AA9569F00197E1F3B399B8 +:10040000FCCFB39BFECF81E09927A6B3019611F0F4 +:10041000A871D9F70895CF93CFB7CF93C395B39B66 +:10042000E9F7B39B0BC0B39B09C0B39B07C0B39B59 +:1004300005C0B39B03C0B39B01C0D8C00F92DF932C +:10044000C0918A00DD27CF56DF4F012EB39B03C03A +:10045000DF910F90E6CF2F930F931F934F932FEFC2 +:100460004F6F06B303FB20F95F933F9350E03BE0EF +:1004700065C016B30126502953FDC89556B3012710 +:1004800003FB25F92F7306B3B1F05027102713FB98 +:1004900026F906B22230F0F000C016B3012703FBA4 +:1004A00027F90126502906B22430E8F54F77206855 +:1004B00016B30000F6CF50274F7D206206B2102FF2 +:1004C000000000C006B300265029102713FB26F9B0 +:1004D00006B2E2CF4F7B06B3206400C0DACF01261C +:1004E0005029187106B269F14E7F2160012F16B3B1 +:1004F00028C0002650294D7F06B22260102F29C047 +:10050000012650294B7F06B22460012F2DC016B35F +:1005100001265029477F2860000006B22EC04F7E7A +:1005200006B3206130C0422706B349930026502904 +:10053000102706B24FEF13FB20F9297F16B379F28B +:10054000187159F10126502906B2012703FB21F940 +:10055000237F06B371F2002650293150D0F006B245 +:10056000102713FB22F9277E16B351F201265029DA +:10057000012703FB06B223F92F7C49F2000006B3E2 +:10058000102713FB24F90026502906B22F7939F2DF +:1005900070CF10E21ABF00271CC03B503195C31B1F +:1005A000D04010E21ABF0881033C21F10B3411F155 +:1005B000209188001981110F1213EDCF4A81441F39 +:1005C000093669F10D3211F0013E29F74F7009F03B +:1005D000042F00938F003F915F914F911F910F91D6 +:1005E0002F91DF910F90CAB7C5FD18CFCF91CFBF24 +:1005F000CF91189520918F00222369F310918D00DF +:100600001123D1F53430D2F130938D00209389003D +:1006100010918A003BE0311B30938A002FC000917B +:100620008D0001304CF50AE54F7049F430916000BF +:1006300034FD25C000936000C1E7D0E024C0433002 +:1006400049F030917C0034FD1AC000937C00CDE766 +:10065000D0E019C03091A70034FD11C00093A7006D +:10066000C8EAD0E010C0052710E000C021C005276F +:1006700010E0C89508BB14C03AE501C032ED032E66 +:10068000C0E0D0E032E017B31861C39A08B317BBDB +:1006900058E120E84FEF20FF052708BB2795179565 +:1006A0001C3F28F700004552B0F720FF052727958B +:1006B00008BB17951C3FB8F629913A9561F7077E5C +:1006C00010918E00110F08BBC250D04011F0109352 +:1006D000880010E21ABF086017B3177E402F477ECC +:1006E00054E05A95F1F708BB17BB48BB74CF80E0C4 +:1006F00090E038D28F3F11F481B78C5F81BF0895AD +:10070000CF92DF92EF92FF920F931F93CF93DF93DD +:10071000E1B66EDE6C0188E981BF6ADE84539940E0 +:1007200014F400E801C000E080E4F82EC0E0D0E05E +:10073000102F1F0D11BF5CDE9C0189E024333807A8 +:100740000CF0102FF6942196C730D10511F0012F2F +:10075000EFCF2453394037FF03C0309521953F4FE9 +:10076000C6018453994097FF03C0909581959F4F90 +:100770008217930714F4E1BE27C0125011BF1E5F09 +:100780007901C12FD0E0229610C032DE8453994007 +:1007900097FF03C0909581959F4F8E159F0514F488 +:1007A00011B77C0181B78F5F81BF81B790E0C81717 +:1007B000D9075CF711BF80E090E0D4D1811721F018 +:1007C00080E090E0612FD6D1DF91CF911F910F9102 +:1007D000FF90EF90DF90CF900895B29B189501BBEA +:1007E00005B50FBD09E00DBD07E000BF00E20BBF7E +:1007F00001B3189501BB0FB702BB0DB50A950DBD2E +:1008000079F00BB50695B29B00680BBD13BB0FB515 +:100810001EB5011B0FBD13B302B30FBF01B3189573 +:1008200000BF04BD0BB50DBB00E40ABF00E60BBF63 +:1008300002B30FBF01B3189501BBF09907C00BE4D9 +:100840000EB90EBB08B50FB901B3189500E40EB987 +:1008500000E003BF01B31895881F9795881F9795EF +:10086000881F9795881F9795881F9795881F97953C +:10087000881F9795881F9795892F08959C0181E07F +:1008800080BD80E888B9B99ABA988BB78F7B8BBF47 +:100890001ABC13BE10BE80EE8EB984E58DB91FB8A8 +:1008A000B9017695679580E090E06C5E70418C4F61 +:1008B0009F4F40E050E034D121502EBD8EB589BD10 +:1008C0001DBC8EB590E00196959587959595879579 +:1008D000819585BD95B58EB5891718F08EB58F5F5A +:1008E00085BD82E08ABD81E084BD90E499BF85B773 +:1008F000836085BF9ABF8BB780648BBF10923E0127 +:100900001092BB0010923C0110923D01089584B5F5 +:10091000882379F49091BB00983058F48DB3E92F77 +:10092000F0E0ED54FF4F80839F5F9093BB0081E028 +:1009300084BD80917C0084FF12C06091BB0066235F +:1009400021F480913F01882351F083EB90E0FFDB9D +:100950008091BB00887080933F011092BB0083B7E9 +:10096000882379F5E0913E0180913D018E1749F190 +:10097000F0E0E454FF4F80816FDF20913E012F5F54 +:100980002F7720933E0112BE9BE49EB91EBA982F8A +:100990009295907F9F60909598BDF89486958095EC +:1009A0008FB983E083BF789480918D0087FF09C061 +:1009B00080913D018095820F8F77823010F01092E8 +:1009C0008D000895FC018381813049F484E590E035 +:1009D00090938C0080938B0080915400089586E65C +:1009E00090E090938C0080938B0083E40895FC0149 +:1009F0002081822F80768032B9F49181892F8052B4 +:100A0000823010F48FEF0895923239F480916E00A5 +:100A1000882319F482E080936E0027FD05C081E0F1 +:100A200080933F0180E0089580E00895FC0180916B +:100A30006F00808380917000818312821382148200 +:100A4000158288E0868387E00895DC010BC0E92FDA +:100A5000F0E0E454FF4F8D9180839F5F9F779093E8 +:100A60003D01615090913D01662389F780913E01DF +:100A70008150891B8F77823018F48FEF80938D001F +:100A800008952EE088E190E00FB6F894A89581BD16 +:100A90000FBE21BD2CDE87EE88BB88E187BBA89501 +:100AA00084EC99E02CE931E0F9013197F1F70197F5 +:100AB000D9F717BA80EC92E19093700080936F00A1 +:100AC000DDDE0FDB10926E0010923F017894A89546 +:100AD00042DB1DDF90916E009923C9F38091A7003E +:100AE00084FFF5CF923021F482E690E068E003C005 +:100AF0008AE690E062E027DB80916E00815080936F +:100B00006E00E5CFFC01808180936F00818180932E +:100B1000700080916F0090917000B0DE81E00895C8 +:100B2000A1E21A2EAA1BBB1BFD010DC0AA1FBB1FF1 +:100B3000EE1FFF1FA217B307E407F50720F0A21B63 +:100B4000B30BE40BF50B661F771F881F991F1A94D0 +:100B500069F760957095809590959B01AC01BD01FA +:100B6000CF010895E199FECF9FBB8EBBE09A9927F4 +:100B70008DB30895262FE199FECF1CBA9FBB8EBB83 +:100B80002DBB0FB6F894E29AE19A0FBE0196089534 +:040B9000F894FFCF07 +:0C0B94005AFFA120000000000200030036 +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/main.o.d b/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/main.o.d new file mode 100755 index 0000000000000000000000000000000000000000..10de25cb3f42358103c9536f3a6806546a728c00 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/main.o.d @@ -0,0 +1,78 @@ +main.o: ../main.c \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\string.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn45.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotnx5.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\eeprom.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\wdt.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\util\delay.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\util\delay_basic.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\math.h \ + ../../usbdrv/usbdrv.h ../usbconfig.h ../../usbdrv/osccal.h \ + ../../usbdrv/usbportability.h ../../usbdrv/oddebug.h ../uart.h + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\string.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn45.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotnx5.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\eeprom.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\wdt.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\util\delay.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\util\delay_basic.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\math.h: + +../../usbdrv/usbdrv.h: + +../usbconfig.h: + +../../usbdrv/osccal.h: + +../../usbdrv/usbportability.h: + +../../usbdrv/oddebug.h: + +../uart.h: diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/oddebug.o.d b/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/oddebug.o.d new file mode 100755 index 0000000000000000000000000000000000000000..ef4c8bf350b44fa946df90fa9e29f716bbbe164c --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/oddebug.o.d @@ -0,0 +1,48 @@ +oddebug.o: ../../usbdrv/oddebug.c ../../usbdrv/oddebug.h \ + ../../usbdrv/usbportability.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn45.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotnx5.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h + +../../usbdrv/oddebug.h: + +../../usbdrv/usbportability.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn45.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotnx5.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h: diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/osccal.o.d b/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/osccal.o.d new file mode 100755 index 0000000000000000000000000000000000000000..6f209a8e33e16e24151a73a3b01ca2daa56a89a2 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/osccal.o.d @@ -0,0 +1,59 @@ +osccal.o: ../../libs-device/osccal.c \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn45.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotnx5.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\eeprom.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h \ + ../../usbdrv/usbdrv.h ../usbconfig.h ../../usbdrv/osccal.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h \ + ../../usbdrv/usbportability.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn45.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotnx5.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\eeprom.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h: + +../../usbdrv/usbdrv.h: + +../usbconfig.h: + +../../usbdrv/osccal.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h: + +../../usbdrv/usbportability.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h: diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/sw-uart-asm.o.d b/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/sw-uart-asm.o.d new file mode 100755 index 0000000000000000000000000000000000000000..9d68e0d5aecb333f469f90fac0673772e048dba4 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/sw-uart-asm.o.d @@ -0,0 +1,42 @@ +sw-uart-asm.o: ../sw-uart-asm.S ../../usbdrv/usbportability.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn45.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotnx5.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \ + ../../usbdrv/usbdrv.h ../usbconfig.h ../../usbdrv/osccal.h \ + ../../usbdrv/usbportability.h ../uart.h + +../../usbdrv/usbportability.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn45.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotnx5.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h: + +../../usbdrv/usbdrv.h: + +../usbconfig.h: + +../../usbdrv/osccal.h: + +../../usbdrv/usbportability.h: + +../uart.h: diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/sw-uart.o.d b/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/sw-uart.o.d new file mode 100755 index 0000000000000000000000000000000000000000..bf78d6cb2a945297d98ee4e70640f8575a2b5e18 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/sw-uart.o.d @@ -0,0 +1,60 @@ +sw-uart.o: ../sw-uart.c \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn45.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotnx5.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h \ + ../../usbdrv/oddebug.h ../../usbdrv/usbportability.h \ + ../../usbdrv/usbdrv.h ../usbconfig.h ../../usbdrv/osccal.h ../uart.h + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn45.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotnx5.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h: + +../../usbdrv/oddebug.h: + +../../usbdrv/usbportability.h: + +../../usbdrv/usbdrv.h: + +../usbconfig.h: + +../../usbdrv/osccal.h: + +../uart.h: diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/usbdrv.o.d b/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/usbdrv.o.d new file mode 100755 index 0000000000000000000000000000000000000000..a90ac561c026da7cd73b5162336cbd1750831858 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/usbdrv.o.d @@ -0,0 +1,58 @@ +usbdrv.o: ../../usbdrv/usbdrv.c ../../usbdrv/usbportability.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn45.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotnx5.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h \ + ../../usbdrv/usbdrv.h ../usbconfig.h ../../usbdrv/osccal.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h \ + ../../usbdrv/oddebug.h + +../../usbdrv/usbportability.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn45.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotnx5.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\pgmspace.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h: + +../../usbdrv/usbdrv.h: + +../usbconfig.h: + +../../usbdrv/osccal.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h: + +../../usbdrv/oddebug.h: diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/usbdrvasm.o.d b/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/usbdrvasm.o.d new file mode 100755 index 0000000000000000000000000000000000000000..354e8f6fcf64f41b48a7c7474d414cbe9ae6bfee --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/default/dep/usbdrvasm.o.d @@ -0,0 +1,42 @@ +usbdrvasm.o: ../../usbdrv/usbdrvasm.S ../../usbdrv/usbportability.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn45.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotnx5.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \ + c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \ + ../../usbdrv/usbdrv.h ../usbconfig.h ../../usbdrv/osccal.h \ + ../../usbdrv/usbdrvasm165.inc ../../usbdrv/asmcommon.inc + +../../usbdrv/usbportability.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotn45.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iotnx5.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h: + +c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h: + +../../usbdrv/usbdrv.h: + +../usbconfig.h: + +../../usbdrv/osccal.h: + +../../usbdrv/usbdrvasm165.inc: + +../../usbdrv/asmcommon.inc: diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/main.o b/FabFTDI Attiny441/Programing/CDC/tiny45/default/main.o new file mode 100755 index 0000000000000000000000000000000000000000..0a02977be95df606ee0c8f9187bcdfe1b1b95de0 Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/tiny45/default/main.o differ diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/oddebug.o b/FabFTDI Attiny441/Programing/CDC/tiny45/default/oddebug.o new file mode 100755 index 0000000000000000000000000000000000000000..a5cc73ac18d5d3f381e599b4815efea7f69b5866 Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/tiny45/default/oddebug.o differ diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/osccal.o b/FabFTDI Attiny441/Programing/CDC/tiny45/default/osccal.o new file mode 100755 index 0000000000000000000000000000000000000000..cc7c94189d1776e76e4cb8db3bf71af5200fc990 Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/tiny45/default/osccal.o differ diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/sw-uart-asm.o b/FabFTDI Attiny441/Programing/CDC/tiny45/default/sw-uart-asm.o new file mode 100755 index 0000000000000000000000000000000000000000..f3922cee9b3571e3d1985cbce33bd575504b08b0 Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/tiny45/default/sw-uart-asm.o differ diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/sw-uart.o b/FabFTDI Attiny441/Programing/CDC/tiny45/default/sw-uart.o new file mode 100755 index 0000000000000000000000000000000000000000..461e9cc1702a3fc636594d7799f865ea2c9f9813 Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/tiny45/default/sw-uart.o differ diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/usbdrv.o b/FabFTDI Attiny441/Programing/CDC/tiny45/default/usbdrv.o new file mode 100755 index 0000000000000000000000000000000000000000..784d5626ba8d8ac79d78291575da8b1e56d21d12 Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/tiny45/default/usbdrv.o differ diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/default/usbdrvasm.o b/FabFTDI Attiny441/Programing/CDC/tiny45/default/usbdrvasm.o new file mode 100755 index 0000000000000000000000000000000000000000..226272eb00228d6842f46e319f39e101e07514b3 Binary files /dev/null and b/FabFTDI Attiny441/Programing/CDC/tiny45/default/usbdrvasm.o differ diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/main.c b/FabFTDI Attiny441/Programing/CDC/tiny45/main.c new file mode 100755 index 0000000000000000000000000000000000000000..17f5140499f3e99cc87687731d59bd0023ce371b --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/main.c @@ -0,0 +1,291 @@ + +/* Name: main.c + * Project: AVR USB driver for CDC interface on Low-Speed USB + * Author: Osamu Tamura + * Creation Date: 2006-05-12 + * Tabsize: 4 + * Copyright: (c) 2006 by Recursion Co., Ltd. + * License: Proprietary, free under certain conditions. See Documentation. + * + * 2006-07-08 removed zero-sized receive block + * 2006-07-08 adapted to higher baud rate by T.Kitazawa + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "usbdrv.h" +#include "oddebug.h" +#include "uart.h" + + +enum { + SEND_ENCAPSULATED_COMMAND = 0, + GET_ENCAPSULATED_RESPONSE, + SET_COMM_FEATURE, + GET_COMM_FEATURE, + CLEAR_COMM_FEATURE, + SET_LINE_CODING = 0x20, + GET_LINE_CODING, + SET_CONTROL_LINE_STATE, + SEND_BREAK +}; + + +const PROGMEM char configDescrCDC[] = { /* USB configuration descriptor */ + 9, /* sizeof(usbDescrConfig): length of descriptor in bytes */ + USBDESCR_CONFIG, /* descriptor type */ + 67, + 0, /* total length of data returned (including inlined descriptors) */ + 2, /* number of interfaces in this configuration */ + 1, /* index of this configuration */ + 0, /* configuration name string index */ +#if USB_CFG_IS_SELF_POWERED + (1 << 7) | USBATTR_SELFPOWER, /* attributes */ +#else + (1 << 7), /* attributes */ +#endif + USB_CFG_MAX_BUS_POWER/2, /* max USB current in 2mA units */ + + /* interface descriptor follows inline: */ + 9, /* sizeof(usbDescrInterface): length of descriptor in bytes */ + USBDESCR_INTERFACE, /* descriptor type */ + 0, /* index of this interface */ + 0, /* alternate setting for this interface */ + USB_CFG_HAVE_INTRIN_ENDPOINT, /* endpoints excl 0: number of endpoint descriptors to follow */ + USB_CFG_INTERFACE_CLASS, + USB_CFG_INTERFACE_SUBCLASS, + USB_CFG_INTERFACE_PROTOCOL, + 0, /* string index for interface */ + + /* CDC Class-Specific descriptor */ + 5, /* sizeof(usbDescrCDC_HeaderFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 0, /* header functional descriptor */ + 0x10, 0x01, + + 4, /* sizeof(usbDescrCDC_AcmFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 2, /* abstract control management functional descriptor */ + 0x02, /* SET_LINE_CODING, GET_LINE_CODING, SET_CONTROL_LINE_STATE */ + + 5, /* sizeof(usbDescrCDC_UnionFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 6, /* union functional descriptor */ + 0, /* CDC_COMM_INTF_ID */ + 1, /* CDC_DATA_INTF_ID */ + + 5, /* sizeof(usbDescrCDC_CallMgtFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 1, /* call management functional descriptor */ + 3, /* allow management on data interface, handles call management by itself */ + 1, /* CDC_DATA_INTF_ID */ + + /* Endpoint Descriptor */ + 7, /* sizeof(usbDescrEndpoint) */ + USBDESCR_ENDPOINT, /* descriptor type = endpoint */ + 0x80|USB_CFG_EP3_NUMBER, /* IN endpoint number 3 */ + 0x03, /* attrib: Interrupt endpoint */ + 8, 0, /* maximum packet size */ + USB_CFG_INTR_POLL_INTERVAL, /* in ms */ + + /* Interface Descriptor */ + 9, /* sizeof(usbDescrInterface): length of descriptor in bytes */ + USBDESCR_INTERFACE, /* descriptor type */ + 1, /* index of this interface */ + 0, /* alternate setting for this interface */ + 2, /* endpoints excl 0: number of endpoint descriptors to follow */ + 0x0A, /* Data Interface Class Codes */ + 0, + 0, /* Data Interface Class Protocol Codes */ + 0, /* string index for interface */ + + /* Endpoint Descriptor */ + 7, /* sizeof(usbDescrEndpoint) */ + USBDESCR_ENDPOINT, /* descriptor type = endpoint */ + 0x01, /* OUT endpoint number 1 */ + 0x02, /* attrib: Bulk endpoint */ + HW_CDC_BULK_OUT_SIZE, 0, /* maximum packet size */ + 0, /* in ms */ + + /* Endpoint Descriptor */ + 7, /* sizeof(usbDescrEndpoint) */ + USBDESCR_ENDPOINT, /* descriptor type = endpoint */ + 0x81, /* IN endpoint number 1 */ + 0x02, /* attrib: Bulk endpoint */ + HW_CDC_BULK_IN_SIZE, 0, /* maximum packet size */ + 0, /* in ms */ +}; + + +uchar usbFunctionDescriptor(usbRequest_t *rq) +{ + + if(rq->wValue.bytes[1] == USBDESCR_DEVICE){ + usbMsgPtr = (uchar *)usbDescriptorDevice; + return usbDescriptorDevice[0]; + }else{ /* must be config descriptor */ + usbMsgPtr = (uchar *)configDescrCDC; + return sizeof(configDescrCDC); + } +} + + +uchar sendEmptyFrame; +static uchar intr3Status; /* used to control interrupt endpoint transmissions */ + +static usbWord_t baud; + + +/* ------------------------------------------------------------------------- */ +/* ----------------------------- USB interface ----------------------------- */ +/* ------------------------------------------------------------------------- */ + +uchar usbFunctionSetup(uchar data[8]) +{ +usbRequest_t *rq = (void *)data; + + if((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS){ /* class request type */ + + if( rq->bRequest==GET_LINE_CODING || rq->bRequest==SET_LINE_CODING ){ + return 0xff; + /* GET_LINE_CODING -> usbFunctionRead() */ + /* SET_LINE_CODING -> usbFunctionWrite() */ + } + if(rq->bRequest == SET_CONTROL_LINE_STATE){ + /* Report serial state (carrier detect). On several Unix platforms, + * tty devices can only be opened when carrier detect is set. + */ + if( intr3Status==0 ) + intr3Status = 2; + } + + /* Prepare bulk-in endpoint to respond to early termination */ + if((rq->bmRequestType & USBRQ_DIR_MASK) == USBRQ_DIR_HOST_TO_DEVICE) + sendEmptyFrame = 1; + } + + return 0; +} + + +/*---------------------------------------------------------------------------*/ +/* usbFunctionRead */ +/*---------------------------------------------------------------------------*/ + +uchar usbFunctionRead( uchar *data, uchar len ) +{ + + data[0] = baud.bytes[0]; + data[1] = baud.bytes[1]; + data[2] = 0; + data[3] = 0; + data[4] = 0; + data[5] = 0; + data[6] = 8; + + return 7; +} + + +/*---------------------------------------------------------------------------*/ +/* usbFunctionWrite */ +/*---------------------------------------------------------------------------*/ + +uchar usbFunctionWrite( uchar *data, uchar len ) +{ + + /* SET_LINE_CODING */ + baud.bytes[0] = data[0]; + baud.bytes[1] = data[1]; + + uartInit(baud.word); + + return 1; +} + + +void usbFunctionWriteOut( uchar *data, uchar len ) +{ + + /* usb -> rs232c: transmit char */ + for( ; len; len-- ) { + tx_buf[uwptr++] = *data++; + uwptr &= TX_MASK; + } + + /* postpone receiving next data */ + if( uartTxBytesFree() USB reset) */ +#ifdef USB_CFG_PULLUP_IOPORT /* use usbDeviceConnect()/usbDeviceDisconnect() if available */ + USBDDR = 0; /* we do RESET by deactivating pullup */ + usbDeviceDisconnect(); +#else + USBDDR = (1< +#include +#include /* needed by usbdrv.h */ +#include "oddebug.h" +#include "usbdrv.h" +#include "uart.h" + + +/* UART buffer */ +uchar urptr, uwptr, irptr, iwptr; +uchar rx_buf[RX_SIZE], tx_buf[TX_SIZE]; + + +void uartInit(uint baudrate) +{ + + PRR = (1<>6)+(baudrate>>1)) / baudrate - 1; + OCR1C = 0; + RX_DELAY = -((OCR1A+1)>>2); /* 1.25 sample bit */ + if( RX_DELAY<=OCR1A ) + RX_DELAY = OCR1A + 1; /* for 1200 bps */ + + + TCCR0A = 2; /* CTC */ + RX_READY = 1; + TIMSK = (1< rs232c : transmit */ + if( TCCR0B==0 && uwptr!=irptr ) { + uchar data; + + data = bit_reverse( tx_buf[irptr] ); + irptr = (irptr+1) & TX_MASK; + + TCNT0 = 0; + USISR = 0x4b; /* interrupt at D4 */ + EEARL = 0; /* usi_phase */ + +#ifdef UART_INVERT + OCR0B = ~((data<<4) | 0x0f); +#else + OCR0B = ((data<<4) | 0x0f); /* D4-7, stop bit */ +#endif + + data >>= 1; + cli(); +#ifdef UART_INVERT + USIDR = ~data; +#else + USIDR = data; /* startbit, D0-3 */ +#endif + TCCR0B = 3; /* start timer0: 1/64 clk */ + sei(); + + /* host => device : accept */ + if( usbAllRequestsAreDisabled() && uartTxBytesFree()>=HW_CDC_BULK_OUT_SIZE ) { + usbEnableAllRequests(); + } + } +} + + + + + diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/uart.h b/FabFTDI Attiny441/Programing/CDC/tiny45/uart.h new file mode 100755 index 0000000000000000000000000000000000000000..676b450b22c834bbb6be3f5022e29fd7a702a85e --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/uart.h @@ -0,0 +1,99 @@ + +/* Name: uart.h + * Project: AVR USB driver for CDC interface on Low-Speed USB + * Author: Osamu Tamura + * Creation Date: 2006-06-18 + * Tabsize: 4 + * Copyright: (c) 2006 by Recursion Co., Ltd. + * License: Proprietary, free under certain conditions. See Documentation. + */ + +#ifndef __uart_h_included__ +#define __uart_h_included__ + +#ifndef uchar +#define uchar unsigned char +#endif + +#ifndef uint +#define uint unsigned int +#endif + +#define HW_CDC_BULK_OUT_SIZE 2 +#define HW_CDC_BULK_IN_SIZE 8 +/* Size of bulk transfer packets. The standard demands 8 bytes, but we may + * be better off with less. Try smaller values if the communication hangs. + */ + +#ifndef UART_DEFAULT_BPS +#define UART_DEFAULT_BPS 4800 +#endif +/* 4800bps is the maximum speed by software UART. + The baud rate will be automatically configured after opening device anyway. +*/ +/* #define UART_INVERT */ + +/* These are the USART port and TXD, RXD bit numbers. +*/ +/* ATtiny45/85 */ +#define UART_CFG_PORTNAME B + +#define UART_CFG_TXD 1 +#define UART_CFG_RXD 2 /* INT0 */ + +#define UART_INTR_CFG MCUCR +#if UART_INVERT +/* 2011-6-23 bug fixed by Chuck Rohs */ +#define UART_INTR_CFG_SET (_BV(ISC01)|_BV(ISC00)) /* int on rising edge */ +#else +#define UART_INTR_CFG_SET _BV(ISC01) +#endif +#define UART_INTR_ENABLE GIMSK +#define UART_INTR_ENABLE_BIT INT0 +#define UART_INTR_PENDING GIFR +#define UART_INTR_PENDING_BIT INTF0 +#define UART_INTR_VECTOR SIG_INTERRUPT0 + + +#define RX_SIZE 8 /* UART receive buffer size */ +#define TX_SIZE 128 /* UART transmit buffer size */ + +#define RX_DELAY DT1A +#define RX_READY DT1B + +#define TX_MASK (TX_SIZE-1) + +/* ------------------------------------------------------------------------- */ +/* ------------------------ General Purpose Macros ------------------------- */ +/* ------------------------------------------------------------------------- */ +#define OD_CONCAT(a, b) a ## b +#define UART_OUTPORT(name) OD_CONCAT(PORT, name) +#define UART_INPORT(name) OD_CONCAT(PIN, name) +#define UART_DDRPORT(name) OD_CONCAT(DDR, name) + +#define UART_CFG_PORT UART_OUTPORT(UART_CFG_PORTNAME) +#define UART_PIN UART_INPORT(UART_CFG_PORTNAME) +#define UART_DDR UART_DDRPORT(UART_CFG_PORTNAME) + + +#ifndef __ASSEMBLER__ + +extern uchar sendEmptyFrame; +extern uchar urptr, uwptr, irptr, iwptr; +extern uchar rx_buf[RX_SIZE], tx_buf[TX_SIZE]; + +extern void uartInit(uint baudrate); +extern void uartPoll(void); +extern uchar bit_reverse( uchar x ); + +/* The following function returns the amount of bytes available in the TX + * buffer before we have an overflow. + */ +static inline uchar uartTxBytesFree(void) +{ + return (irptr - uwptr - 1) & TX_MASK; +} + +#endif /* #ifndef __ASSEMBLER__ */ +#endif /* __uart_h_included__ */ + diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45/usbconfig.h b/FabFTDI Attiny441/Programing/CDC/tiny45/usbconfig.h new file mode 100755 index 0000000000000000000000000000000000000000..b6a4b21e0e5d66b850dddedf8599420038251379 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45/usbconfig.h @@ -0,0 +1,420 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). ++ To create your own usbconfig.h file, copy this file to your project's ++ firmware source directory) and rename it to "usbconfig.h". ++ Then edit it accordingly. +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +/* #define USB_CFG_IOPORTNAME D */ +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +/* #define USB_CFG_DMINUS_BIT 4 */ +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +/* #define USB_CFG_DPLUS_BIT 2 */ +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#if defined (__AVR_ATtiny44__) || defined (__AVR_ATtiny84__) +#define USB_CFG_IOPORTNAME B +#define USB_CFG_DMINUS_BIT 1 +#define USB_CFG_DPLUS_BIT 2 + +#elif defined (__AVR_ATtiny45__) || defined (__AVR_ATtiny85__) +#define USB_CFG_IOPORTNAME B +#define USB_CFG_DMINUS_BIT 3 +#define USB_CFG_DPLUS_BIT 4 + +#elif defined (__AVR_ATtiny461__) || defined (__AVR_ATtiny861__) +#define USB_CFG_IOPORTNAME B +#define USB_CFG_DMINUS_BIT 5 +#define USB_CFG_DPLUS_BIT 6 +#else +/* ATtiny2313, ATmega8/48/88/168 */ +#define USB_CFG_IOPORTNAME D +#define USB_CFG_DMINUS_BIT 3 +#define USB_CFG_DPLUS_BIT 2 +#endif + +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#if USB_CFG_CLOCK_KHZ==18000 +#define USB_CFG_CHECK_CRC 1 +#else +#define USB_CFG_CHECK_CRC 0 +#endif + +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 255 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 100 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 1 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 1 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 1 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 0 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#if USB_CFG_CLOCK_KHZ==16500 || USB_CFG_CLOCK_KHZ==12800 +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 1 +#include "osccal.h" +#else +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +#endif +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID 0xc0, 0x16 /* = 0x16c0 = 5824 = voti.nl */ +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID 0xe1, 0x05 /* = 0x05e1 = 1505 */ +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x01 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'w', 'w', '.', 'r', 'e', 'c', 'u', 'r', 's', 'i', 'o', 'n', '.', 'j', 'p' +#define USB_CFG_VENDOR_NAME_LEN 16 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'U', 'S', 'B', '-', '2', '3', '2' +#define USB_CFG_DEVICE_NAME_LEN 7 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 2 /* set to 0 if deferred to interface */ +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 2 /* CDC class */ +#define USB_CFG_INTERFACE_SUBCLASS 2 /* Abstract (Modem) */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* AT-Commands */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +/* #define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 42 */ +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* ATmega***p/pa needs SIG_ definitions */ +#ifndef SIG_INTERRUPT0 +#define SIG_INTERRUPT0 _VECTOR(1) +#endif + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +#if defined (__AVR_ATtiny45__) || defined (__AVR_ATtiny85__) +#define USB_INTR_CFG PCMSK +#define USB_INTR_CFG_SET (1<cdctiny20-Mar-2007 23:41:3124-Jun-2011 15:31:07241020-Mar-2007 23:41:3144, 13, 0, 528AVR GCCdefault\cdctiny.elfC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45xtal\AVR SimulatorATtiny45.xmlfalseR00R01R02R03R04R05R06R07R08R09R10R11R12R13R14R15R16R17R18R19R20R21R22R23R24R25R26R27R28R29R30R31Auto000sw-uart-asm.Smain.csw-uart.c..\usbdrv\usbdrv.c..\usbdrv\usbdrvasm.S..\usbdrv\oddebug.cC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\libs-device\osccal.cusbconfig.huart.h..\usbdrv\usbportability.h..\usbdrv\oddebug.h..\usbdrv\usbdrv.hC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\libs-device\osccal.hdefault\cdctiny45.lssdefault\MakefiledefaultYESdefault\Makefileattiny45110cdctiny.elfdefault\1.\..\usbdrv\..\libs-device\-Wall -gdwarf-2 -DF_CPU=16500000UL -Os -fsigned-chardefault1C:\Program Files\WinAVR\bin\avr-gcc.exeC:\Program Files\WinAVR\utils\bin\make.exeC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45xtal\usbconfig.hC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45xtal\uart.hC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45xtal\..\usbdrv\usbportability.hC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45xtal\..\usbdrv\oddebug.hC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45xtal\..\usbdrv\usbdrv.hC:\Project\Recursion\AVR-CDC\cdc232.2010-02-28\libs-device\osccal.hC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45xtal\sw-uart-asm.SC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45xtal\main.cC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45xtal\sw-uart.cC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45xtal\..\usbdrv\usbdrv.cC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45xtal\..\usbdrv\usbdrvasm.SC:\Project\Recursion\AVR-CDC\cdc232.2011-06-24\tiny45xtal\..\usbdrv\oddebug.cC:\Project\Recursion\AVR-CDC\cdc232.2010-02-28\libs-device\osccal.c diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45xtal/cdctiny.aws b/FabFTDI Attiny441/Programing/CDC/tiny45xtal/cdctiny.aws new file mode 100755 index 0000000000000000000000000000000000000000..59b6690ceae3e30c1d9f74b819715c4f8dece982 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45xtal/cdctiny.aws @@ -0,0 +1 @@ + diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45xtal/default/MakeFile b/FabFTDI Attiny441/Programing/CDC/tiny45xtal/default/MakeFile new file mode 100755 index 0000000000000000000000000000000000000000..bd58b73d6f8896dd127c6b981e26af58cc016a7e --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45xtal/default/MakeFile @@ -0,0 +1,114 @@ +############################################################################### +# Makefile for the project cdctiny +############################################################################### + +## General Flags +PROJECT = cdctiny + +MCU = attiny45 +#MCU = attiny85 + +## Fuse bits: +## Xtal FF 6E-FF +## PLL(16.5MHz) FF 6E-F1 + +CLK = 12000000UL +#CLK = 15000000UL +#CLK = 16000000UL +#CLK = 16500000UL ## PLL +#CLK = 18000000UL +#CLK = 20000000UL + +TARGET = cdctiny.elf +CC = avr-gcc + +## Options common to compile, link and assembly rules +COMMON = -mmcu=$(MCU) -DF_CPU=$(CLK) + +## UART_INVERT reverses the polarity of TXD and RXD to +## connect to RS-232C directly. +#COMMON += -DUART_INVERT + +## Compile options common for all C compilation units. +CFLAGS = $(COMMON) +CFLAGS += -Wall -gdwarf-2 -Os -fsigned-char +CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d + +## Assembly specific flags +ASMFLAGS = $(COMMON) +ASMFLAGS += $(CFLAGS) +ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 + +## Linker flags +LDFLAGS = $(COMMON) +LDFLAGS += + + +## Intel Hex file production flags +HEX_FLASH_FLAGS = -R .eeprom -R .fuse -R .lock -R .signature + +HEX_EEPROM_FLAGS = -j .eeprom +HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load" +HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings + + +## Include Directories +INCLUDES = +INCLUDES = -I".." -I"../../usbdrv" -I"../../libs-device" + +## Objects that must be built in order to link +OBJECTS = usbdrv.o usbdrvasm.o oddebug.o osccal.o sw-uart-asm.o sw-uart.o main.o + +## Objects explicitly added by the user +LINKONLYOBJECTS = + +## Build +all: $(TARGET) cdctiny45.hex cdctiny45.eep cdctiny45.lss size + +## Compile +usbdrv.o: ../../usbdrv/usbdrv.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +usbdrvasm.o: ../../usbdrv/usbdrvasm.S + $(CC) $(INCLUDES) $(ASMFLAGS) -c $< + +oddebug.o: ../../usbdrv/oddebug.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +osccal.o: ../../libs-device/osccal.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +sw-uart-asm.o: ../sw-uart-asm.S + $(CC) $(INCLUDES) $(ASMFLAGS) -c $< + +sw-uart.o: ../sw-uart.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +main.o: ../main.c + $(CC) $(INCLUDES) $(CFLAGS) -c $< + +##Link +$(TARGET): $(OBJECTS) + $(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET) + +%.hex: $(TARGET) + avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@ + +%.eep: $(TARGET) + -avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ || exit 0 + +%.lss: $(TARGET) + avr-objdump -h -S $< > $@ + +size: ${TARGET} + @echo + @avr-size -C --mcu=${MCU} ${TARGET} + +## Clean target +.PHONY: clean +clean: + -rm -rf $(OBJECTS) cdctiny45.elf dep/* cdctiny45.hex cdctiny45.eep cdctiny45.lss + +## Other dependencies +-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*) + diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45xtal/default/cdctiny45-12.hex b/FabFTDI Attiny441/Programing/CDC/tiny45xtal/default/cdctiny45-12.hex new file mode 100755 index 0000000000000000000000000000000000000000..203c42925ecb4db3342c6957d9206c5315988ea4 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45xtal/default/cdctiny45-12.hex @@ -0,0 +1,162 @@ +:1000000054C0ECC133C33FC36BC06AC069C068C091 +:1000100067C066C065C064C063C062C056C30403E5 +:10002000090422037700770077002E007200650034 +:10003000630075007200730069006F006E002E008F +:100040006A00700010035500530042002D0032007A +:10005000330032001201100102000008C016E10551 +:10006000000101020001090243000201008032097F +:100070000400000102020100052400100104240212 +:100080000205240600010524010301070583030876 +:1000900000FF09040100020A000000070501020236 +:1000A0000000070581020800000011241FBECFE5F3 +:1000B000D1E0DEBFCDBF10E0A0E6B0E0E4EFF9E0B4 +:1000C00002C005900D92AC36B107D9F711E0ACE64D +:1000D000B0E001C01D92AF33B107E1F719D488C475 +:1000E0008FCF85B7826085BF8BB780648BBF8BE471 +:1000F00080937C008093A7008AE580937B008093A7 +:10010000A60008951F93CF93DF93DC01162FEA0119 +:10011000888184FF05C0898198E88927898302C086 +:100120008AE58883AE014E5F5F4F212FFA018D91E2 +:10013000819321501216DCF3CA01612F4BD11C5F51 +:100140001883DF91CF911F91089546EA50E0DADFDE +:1001500008954BE750E0D6DF08951F93CF93DF93C8 +:1001600060918C00635067FDB6C080918900CCE03F +:10017000D0E0C81BD109C057DF4F80918800803183 +:1001800018F4CE01A9D3A1C08D3209F08EC0683019 +:1001900009F09BC083EC809370008AE58093600037 +:1001A00010926C008881807621F0CE0167D3282FD1 +:1001B00069C09A81109279008981882331F4109264 +:1001C0007A0089E790E022E058C0853019F49093D6 +:1001D0008D0050C08630B9F58B81813041F484E5C3 +:1001E00090E090938B0080938A0022E128C08230B7 +:1001F00021F4CE012ED3282F22C08330F9F48A8136 +:10020000882341F48EE190E090938B0080938A00E4 +:1002100024E015C0813041F482E290E090938B009D +:1002200080938A0022E20BC0823041F484E490E0A3 +:1002300090938B0080938A0020E101C020E080E44D +:1002400080936C001FC0883019F48FE890E009C0DB +:10025000893019F490938F000DC08A3021F489E71A +:1002600090E021E00AC08B3029F48BE480937C007D +:100270008093A70089E790E020E090938B00809323 +:100280008A0009C02F3F39F4888187FD2E8180E8DC +:1002900080936C0006C08F81882319F48E818217A9 +:1002A00008F0822F8093610010C080916C0087FF5E +:1002B0000CC0CE016DD38F3F21F48EE1809360009E +:1002C00004C0882311F01092610080918C001816F0 +:1002D00014F410928C008091600084FF58C08091CB +:1002E00061008F3F09F453C0182F893008F018E0DF +:1002F000811B809361008091700098E8892780932A +:100300007000112391F180916C0087FF08C081E794 +:1003100090E0612FD2D2182F893098F526C0209115 +:100320008A0030918B0086FF0DC0A1E7B0E080E02D +:1003300090E0F901E80FF91FE491ED930196181789 +:10034000C1F708C0D901912FE1E7F0E08D918193C9 +:100350009150E1F71150812F90E01F5F0196820FBD +:10036000931F90938B0080938A0081E790E0612F28 +:1003700031D0612F6C5F6C3041F08FEF8093610062 +:1003800004C08FEF809361006EE16093600094E1A0 +:1003900086B3857031F49150D9F710928D00109288 +:1003A0008700DF91CF911F910895A82FB92F80E08A +:1003B00090E041E050EA609530E009C02D9182273D +:1003C0009795879510F084279527305EC8F36F5F67 +:1003D000A8F30895EADF8D939D930895CF93CFB747 +:1003E000CF93C395B09BE9F7B09B09C0B09B07C002 +:1003F000B09B05C0B09B03C0B09B01C0A6C0DF93FB +:10040000C0918900DD27C057DF4FB09B02C0DF914C +:10041000EBCF2F930F931F9306B32FEF00FB20F921 +:100420004F933F9316B34FEF012700FB21F93BE0B9 +:1004300031C04E7F012F16B3216028C0102F4D7F91 +:100440002260000006B329C04B7F2460012F00000A +:1004500016B32BC016B3477F28602AC04F7E06B361 +:1004600020612CC04F7D16B320622FC04F7B06B396 +:10047000206432C0422706B349934FEF0000102793 +:1004800010FB20F916B31570C9F1297F91F20127ED +:1004900000FB21F906B3237F89F2315058F1102770 +:1004A00010FB22F916B3277E79F2012700FB23F90E +:1004B0002F7C81F206B3102710FB24F92F7971F2FB +:1004C00000C016B3012700FB25F92F7359F200C0B5 +:1004D00006B3102710FB26F9223040F200C016B3F5 +:1004E000012700FB27F9243028F64F77206816B340 +:1004F0000000F9CF10E41ABF00271CC03B50319513 +:10050000C31BD04010E41ABF0881033C11F10B3427 +:1005100001F1209187001981110F1213EDCF4A814B +:10052000441F093659F10D3211F0013E29F74F7081 +:1005300009F0042F00938E003F914F911F910F916E +:100540002F91DF91CAB7C6FD4CCFCF91CFBFCF91CE +:10055000189520918E00222379F310918C0011239D +:10056000C1F53430C2F130938C0020938800109193 +:1005700089003BE0311B309389002DC000918C0035 +:1005800001303CF50AE54F7049F43091600034FDCC +:1005900024C000936000C0E7D0E023C0433049F09E +:1005A00030917B0034FD19C000937B00CCE7D0E094 +:1005B00018C03091A60034FD10C00093A600C7EA11 +:1005C000D0E00FC02795A8F45150A9F4220F0000E5 +:1005D000F9CF4AE503C042ED01C0432FC4E1D0E0AA +:1005E00032E017B31560C09A17BB08B320E415E0DA +:1005F0005F93012756E008BB279520F4515021F462 +:10060000220FF9CF012756E000003B5A08BBD0F279 +:10061000279528F4515029F4220F0000F9CF012723 +:1006200056E0279508BB20F4515021F4220FF9CF52 +:10063000012756E02991332308BB21F60A7F109148 +:100640008D00110FC651D04008BB11F010938700E8 +:1006500010E41ABF016017B31A7F402F4A7F5F91E1 +:1006600000C000C008BB17BB48BB66CFB599189542 +:1006700001BB05B50FBD09E00DBD07E000BF00E4FB +:100680000BBF01B3189501BB0FB702BB0DB50A959F +:100690000DBD79F00BB50695B59900680BBD13BB80 +:1006A0000FB51EB5011B0FBD13B302B30FBF01B3CE +:1006B000189500BF04BD0BB50DBB00E20ABF00E6F4 +:1006C0000BBF02B30FBF01B3189501BBF09907C070 +:1006D0000BE40EB90EBB08B50FB901B3189500E4D1 +:1006E0000EB900E003BF01B31895881F9795881FC6 +:1006F0009795881F9795881F9795881F9795881FAE +:100700009795881F9795881F9795892F08959C0125 +:1007100081E080BD80E888B9B99ABD988BB78F7D9C +:100720008BBF1ABC13BE10BE80EE8EB984E58DB9A6 +:100730008FEF8FB9B9017695679580E090E06459A5 +:1007400073428D4F9F4F40E050E030D121502EBD7D +:100750008EB589BD1DBC8EB590E0019695958795A7 +:1007600095958795819585BD95B58EB5891718F0B6 +:100770008EB58F5F85BD82E08ABD81E084BD80E457 +:1007800089BF80E285BB8ABF8BB780628BBF109226 +:100790003D011092BA0010923B0110923C01089565 +:1007A00084B5882379F49091BA00983058F48DB3C9 +:1007B000E92FF0E0EE54FF4F80839F5F9093BA00E3 +:1007C00081E084BD80917B0084FF12C06091BA00FB +:1007D000662321F480913E01882351F082EB90E062 +:1007E000B8DC8091BA00887080933E011092BA0004 +:1007F00083B7882369F5E0913D0180913C018E1714 +:1008000039F1F0E0E554FF4F80816FDF20913D0129 +:100810002F5F2F7720933D0112BE9BE49EB91EBA35 +:10082000982F9295907F9F6098BD8695F8948FB988 +:1008300083E083BF789480918C0087FF09C080910A +:100840003C018095820F8F77823010F010928C00DF +:100850000895FC018381813049F484E590E0909310 +:100860008B0080938A0080915400089586E690E082 +:1008700090938B0080938A0083E40895FC0120818B +:10088000822F80768032B9F49181892F8052823014 +:1008900010F48FEF0895923239F480916D0088231F +:1008A00019F482E080936D0027FD05C081E08093FC +:1008B0003E0180E0089580E00895FC0180916E0083 +:1008C000808380916F00818312821382148215824B +:1008D00088E0868387E00895DC010BC0E92FF0E013 +:1008E000E554FF4F8D9180839F5F9F7790933C01EC +:1008F000615090913C01662389F780913D018150C0 +:10090000891B8F77823018F48FEF80938C000895C5 +:100910002EE088E190E00FB6F894A89581BD0FBE57 +:1009200021BD8AEF88BB85E087BBA89584EC99E060 +:100930002CE231E0F9013197F1F70197D9F717BAB5 +:1009400080EC92E190936F0080936E00E0DEC9DB53 +:1009500010926D0010923E017894A895FEDB20DF86 +:1009600090916D009923C9F38091A60084FFF5CF83 +:10097000923021F482E690E068E003C08AE690E0DD +:1009800062E0E3DB80916D00815080936D00E5CFE4 +:10099000FC01808180936E00818180936F00809143 +:1009A0006E0090916F00B3DE81E00895A1E21A2EEF +:1009B000AA1BBB1BFD010DC0AA1FBB1FEE1FFF1F03 +:1009C000A217B307E407F50720F0A21BB30BE40B53 +:1009D000F50B661F771F881F991F1A9469F760959A +:1009E0007095809590959B01AC01BD01CF01089554 +:0409F000F894FFCFA9 +:0C09F4005AFFA1200000000002000300D8 +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45xtal/default/cdctiny45-rc.hex b/FabFTDI Attiny441/Programing/CDC/tiny45xtal/default/cdctiny45-rc.hex new file mode 100755 index 0000000000000000000000000000000000000000..512f2d78af1bda321083773314e538dd0fd1e6ab --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45xtal/default/cdctiny45-rc.hex @@ -0,0 +1,188 @@ +:1000000054C00BC2ECC3F8C36BC06AC069C068C0FF +:1000100067C066C065C064C063C062C00FC404032B +:10002000090422037700770077002E007200650034 +:10003000630075007200730069006F006E002E008F +:100040006A00700010035500530042002D0032007A +:10005000330032001201100102000008C016E10551 +:10006000000101020001090243000201008032097F +:100070000400000102020100052400100104240212 +:100080000205240600010524010301070583030876 +:1000900000FF09040100020A000000070501020236 +:1000A0000000070581020800000011241FBECFE5F3 +:1000B000D1E0DEBFCDBF10E0A0E6B0E0E4E9FBE0B8 +:1000C00002C005900D92AC36B107D9F711E0ACE64D +:1000D000B0E001C01D92A034B107E1F7D2D458C5F9 +:1000E0008FCF85B7826085BF8BB780648BBF8BE471 +:1000F00080937D008093A8008AE580937C008093A4 +:10010000A70008951F93CF93DF93DC01162FEA0118 +:10011000888184FF05C0898198E88927898302C086 +:100120008AE58883AE014E5F5F4F212FFA018D91E2 +:10013000819321501216DCF3CA01612F57D11C5F45 +:100140001883DF91CF911F91089547EA50E0DADFDD +:1001500008954CE750E0D6DF08951F93CF93DF93C7 +:1001600060918D00635067FDB3C080918A00CCE040 +:10017000D0E0C81BD109CF56DF4F80918900803174 +:1001800018F4CE0162D49EC08D3209F08BC0683065 +:1001900009F098C083EC809371008AE58093600039 +:1001A00010926D008881807621F0CE0120D4282F16 +:1001B00066C09A8110927A008981882321F4109276 +:1001C0007B0022E055C0853019F490938E004FC01B +:1001D0008630B9F58B81813041F484E590E09093CD +:1001E0008C0080938B0022E128C0823021F4CE0164 +:1001F000E9D3282F22C08330F9F48A81882341F47F +:100200008EE190E090938C0080938B0024E015C0E9 +:10021000813041F482E290E090938C0080938B00D7 +:1002200022E20BC0823041F484E490E090938C0091 +:1002300080938B0020E101C020E080E480936D007A +:100240001EC0883021F421E080E990E013C089309D +:1002500019F4909390000BC08A3011F421E008C08B +:100260008B3029F48BE480937D008093A80020E0FC +:100270008AE790E090938C0080938B0009C02F3F19 +:1002800039F4888187FD2E8180E880936D0006C057 +:100290008F81882319F48E81821708F0822F809332 +:1002A000610010C080916D0087FF0CC0CE012AD480 +:1002B0008F3F21F48EE18093600004C0882311F009 +:1002C0001092610080918D00181614F410928D0028 +:1002D0008091600084FF58C0809161008F3F09F4D5 +:1002E00053C0182F893008F018E0811B80936100FB +:1002F0008091710098E8892780937100112391F112 +:1003000080916D0087FF08C082E790E0612F8ED357 +:10031000182F893098F526C020918B0030918C00E1 +:1003200086FF0DC0A2E7B0E080E090E0F901E80FA1 +:10033000F91FE491ED9301961817C1F708C0912FAA +:10034000D901E2E7F0E08D9181939150E1F71150EE +:10035000812F90E01F5F0196820F931F90938C0076 +:1003600080938B0082E790E0612F40D0612F6C5F1B +:100370006C3041F08FEF8093610004C08FEF809369 +:1003800061006EE16093600094E186B3857031F4A2 +:100390009150D9F710928E001092880010E09923A6 +:1003A00009F411E080916C00811739F0112319F4E0 +:1003B000F894A8D1789410936C00DF91CF911F919D +:1003C0000895A82FB92F80E090E041E050EA6095B1 +:1003D00030E009C02D9182279795879510F08427EA +:1003E0009527305EC8F36F5FA8F30895EADF8D9319 +:1003F0009D930895A6E088279927AA9569F001970B +:10040000E1F3B099FCCFB09BFECF81E09927A6B372 +:10041000019611F0A570D9F70895CF93CFB7CF9378 +:10042000C395B09BE9F7B09B0BC0B09B09C0B09BD4 +:1004300007C0B09B05C0B09B03C0B09B01C0D8C033 +:100440000F92DF93C0918A00DD27CF56DF4F012E38 +:10045000B09B03C0DF910F90E6CF2F930F931F93B4 +:100460004F932FEF4F6F06B300FB20F95F933F933D +:1004700050E03BE065C016B30126502950FDC895F9 +:1004800056B3012700FB25F92F7306B3B1F05027AF +:10049000102710FB26F906B22230F0F000C016B388 +:1004A000012700FB27F90126502906B22430E8F580 +:1004B0004F77206816B30000F6CF50274F7D20629B +:1004C00006B2102F000000C006B3002650291027E6 +:1004D00010FB26F906B2E2CF4F7B06B3206400C0C2 +:1004E000DACF01265029157006B269F14E7F2160DE +:1004F000012F16B328C0002650294D7F06B2226076 +:10050000102F29C0012650294B7F06B22460012FED +:100510002DC016B301265029477F2860000006B27F +:100520002EC04F7E06B3206130C0422706B34993E8 +:1005300000265029102706B24FEF10FB20F9297F23 +:1005400016B379F2157059F10126502906B2012728 +:1005500000FB21F9237F06B371F2002650293150A8 +:10056000D0F006B2102710FB22F9277E16B351F205 +:1005700001265029012700FB06B223F92F7C49F2FE +:10058000000006B3102710FB24F90026502906B2FC +:100590002F7939F270CF10E41ABF00271CC03B50EE +:1005A0003195C31BD04010E41ABF0881033C21F1F0 +:1005B0000B3411F1209188001981110F1213EDCF26 +:1005C0004A81441F093669F10D3211F0013E29F7C5 +:1005D0004F7009F0042F00938F003F915F914F916E +:1005E0001F910F912F91DF910F90CAB7C6FD18CFC1 +:1005F000CF91CFBFCF91189520918F00222369F31F +:1006000010918D001123D1F53430D2F130938D004B +:100610002093890010918A003BE0311B30938A00BF +:100620002FC000918D0001304CF50AE54F7049F460 +:100630003091600034FD25C000936000C1E7D0E038 +:1006400024C0433049F030917C0034FD1AC000933F +:100650007C00CDE7D0E019C03091A70034FD11C077 +:100660000093A700C8EAD0E010C0052710E000C042 +:1006700021C0052710E0C89508BB14C03AE501C0A9 +:1006800032ED032EC0E0D0E032E017B31560C09A1F +:1006900008B317BB55E020E84FEF20FF052708BB44 +:1006A000279517951C3F28F700004552B0F720FF0B +:1006B0000527279508BB17951C3FB8F629913A9551 +:1006C00061F70A7F10918E00110F08BBC250D04015 +:1006D00011F01093880010E41ABF016017B31A7F5D +:1006E000402F4A7F54E05A95F1F708BB17BB48BB2F +:1006F00074CF80E090E036D28F3F11F481B78C5FE9 +:1007000081BF0895CF92DF92EF92FF920F931F93D4 +:10071000CF93DF93E1B66EDE6C0188E981BF6ADEBC +:100720008453994014F400E801C000E080E4F82EFE +:10073000C0E0D0E0102F1F0D11BF5CDE9C0189E0EE +:10074000243338070CF0102FF6942196C730D105CA +:1007500011F0012FEFCF2453394037FF03C03095FC +:1007600021953F4FC6018453994097FF03C0909550 +:1007700081959F4F8217930714F4E1BE27C0125052 +:1007800011BF1E5F7901C12FD0E0229610C032DE6A +:100790008453994097FF03C0909581959F4F8E1584 +:1007A0009F0514F411B77C0181B78F5F81BF81B7BA +:1007B00090E0C817D9075CF711BF80E090E0D2D174 +:1007C000811721F080E090E0612FD4D1DF91CF91AB +:1007D0001F910F91FF90EF90DF90CF900895B59902 +:1007E000189501BB05B50FBD09E00DBD07E000BFC1 +:1007F00000E40BBF01B3189501BB0FB702BB0DB5E9 +:100800000A950DBD79F00BB50695B59900680BBD3D +:1008100013BB0FB51EB5011B0FBD13B302B30FBF42 +:1008200001B3189500BF04BD0BB50DBB00E20ABFB4 +:1008300000E60BBF02B30FBF01B3189501BBF099DF +:1008400007C00BE40EB90EBB08B50FB901B318957C +:1008500000E40EB900E003BF01B31895881F979517 +:10086000881F9795881F9795881F9795881F97953C +:10087000881F9795881F9795881F9795892F0895AA +:100880009C0181E080BD80E888B9B99ABD988BB79A +:100890008F7D8BBF1ABC13BE10BE80EE8EB984E56F +:1008A0008DB98FEF8FB9B9017695679580E090E0AB +:1008B0006C5E70418C4F9F4F40E050E031D1215031 +:1008C0002EBD8EB589BD1DBC8EB590E00196959567 +:1008D000879595958795819585BD95B58EB5891731 +:1008E00018F08EB58F5F85BD82E08ABD81E084BD42 +:1008F00080E489BF80E285BB8ABF8BB780628BBFF3 +:1009000010923E011092BB0010923C0110923D01EA +:10091000089584B5882379F49091BB00983058F4F9 +:100920008DB3E92FF0E0ED54FF4F80839F5F9093EC +:10093000BB0081E084BD80917C0084FF12C0609187 +:10094000BB00662321F480913F01882351F083EBA3 +:1009500090E0FFDB8091BB00887080933F01109294 +:10096000BB0083B7882369F5E0913E0180913D018A +:100970008E1739F1F0E0E454FF4F80816FDF209152 +:100980003E012F5F2F7720933E0112BE9BE49EB95C +:100990001EBA982F9295907F9F6098BD8695F89487 +:1009A0008FB983E083BF789480918D0087FF09C061 +:1009B00080913D018095820F8F77823010F01092E8 +:1009C0008D000895FC018381813049F484E590E035 +:1009D00090938C0080938B0080915400089586E65C +:1009E00090E090938C0080938B0083E40895FC0149 +:1009F0002081822F80768032B9F49181892F8052B4 +:100A0000823010F48FEF0895923239F480916E00A5 +:100A1000882319F482E080936E0027FD05C081E0F1 +:100A200080933F0180E0089580E00895FC0180916B +:100A30006F00808380917000818312821382148200 +:100A4000158288E0868387E00895DC010BC0E92FDA +:100A5000F0E0E454FF4F8D9180839F5F9F779093E8 +:100A60003D01615090913D01662389F780913E01DF +:100A70008150891B8F77823018F48FEF80938D001F +:100A800008952EE088E190E00FB6F894A89581BD16 +:100A90000FBE21BD2EDE8AEF88BB85E087BBA895FF +:100AA00084EC99E02CE931E0F9013197F1F70197F5 +:100AB000D9F717BA80EC92E19093700080936F00A1 +:100AC000DFDE0FDB10926E0010923F017894A89544 +:100AD00044DB1FDF90916E009923C9F38091A7003A +:100AE00084FFF5CF923021F482E690E068E003C005 +:100AF0008AE690E062E029DB80916E00815080936D +:100B00006E00E5CFFC01808180936F00818180932E +:100B1000700080916F0090917000B2DE81E00895C6 +:100B2000A1E21A2EAA1BBB1BFD010DC0AA1FBB1FF1 +:100B3000EE1FFF1FA217B307E407F50720F0A21B63 +:100B4000B30BE40BF50B661F771F881F991F1A94D0 +:100B500069F760957095809590959B01AC01BD01FA +:100B6000CF010895E199FECF1FBA8EBBE09A992775 +:100B70008DB30895262FE199FECF1CBA1FBA8EBB04 +:100B80002DBB0FB6F894E29AE19A0FBE0196089534 +:040B9000F894FFCF07 +:0C0B94005AFFA120000000000200030036 +:00000001FF diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45xtal/main.c b/FabFTDI Attiny441/Programing/CDC/tiny45xtal/main.c new file mode 100755 index 0000000000000000000000000000000000000000..8b5fe791945a3bf418500696800e7fe5dafa8e28 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45xtal/main.c @@ -0,0 +1,291 @@ + +/* Name: main.c + * Project: AVR USB driver for CDC interface on Low-Speed USB + * Author: Osamu Tamura + * Creation Date: 2006-05-12 + * Tabsize: 4 + * Copyright: (c) 2006 by Recursion Co., Ltd. + * License: Proprietary, free under certain conditions. See Documentation. + * + * 2006-07-08 removed zero-sized receive block + * 2006-07-08 adapted to higher baud rate by T.Kitazawa + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "usbdrv.h" +#include "oddebug.h" +#include "uart.h" + + +enum { + SEND_ENCAPSULATED_COMMAND = 0, + GET_ENCAPSULATED_RESPONSE, + SET_COMM_FEATURE, + GET_COMM_FEATURE, + CLEAR_COMM_FEATURE, + SET_LINE_CODING = 0x20, + GET_LINE_CODING, + SET_CONTROL_LINE_STATE, + SEND_BREAK +}; + + +static PROGMEM char configDescrCDC[] = { /* USB configuration descriptor */ + 9, /* sizeof(usbDescrConfig): length of descriptor in bytes */ + USBDESCR_CONFIG, /* descriptor type */ + 67, + 0, /* total length of data returned (including inlined descriptors) */ + 2, /* number of interfaces in this configuration */ + 1, /* index of this configuration */ + 0, /* configuration name string index */ +#if USB_CFG_IS_SELF_POWERED + (1 << 7) | USBATTR_SELFPOWER, /* attributes */ +#else + (1 << 7), /* attributes */ +#endif + USB_CFG_MAX_BUS_POWER/2, /* max USB current in 2mA units */ + + /* interface descriptor follows inline: */ + 9, /* sizeof(usbDescrInterface): length of descriptor in bytes */ + USBDESCR_INTERFACE, /* descriptor type */ + 0, /* index of this interface */ + 0, /* alternate setting for this interface */ + USB_CFG_HAVE_INTRIN_ENDPOINT, /* endpoints excl 0: number of endpoint descriptors to follow */ + USB_CFG_INTERFACE_CLASS, + USB_CFG_INTERFACE_SUBCLASS, + USB_CFG_INTERFACE_PROTOCOL, + 0, /* string index for interface */ + + /* CDC Class-Specific descriptor */ + 5, /* sizeof(usbDescrCDC_HeaderFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 0, /* header functional descriptor */ + 0x10, 0x01, + + 4, /* sizeof(usbDescrCDC_AcmFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 2, /* abstract control management functional descriptor */ + 0x02, /* SET_LINE_CODING, GET_LINE_CODING, SET_CONTROL_LINE_STATE */ + + 5, /* sizeof(usbDescrCDC_UnionFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 6, /* union functional descriptor */ + 0, /* CDC_COMM_INTF_ID */ + 1, /* CDC_DATA_INTF_ID */ + + 5, /* sizeof(usbDescrCDC_CallMgtFn): length of descriptor in bytes */ + 0x24, /* descriptor type */ + 1, /* call management functional descriptor */ + 3, /* allow management on data interface, handles call management by itself */ + 1, /* CDC_DATA_INTF_ID */ + + /* Endpoint Descriptor */ + 7, /* sizeof(usbDescrEndpoint) */ + USBDESCR_ENDPOINT, /* descriptor type = endpoint */ + 0x80|USB_CFG_EP3_NUMBER, /* IN endpoint number 3 */ + 0x03, /* attrib: Interrupt endpoint */ + 8, 0, /* maximum packet size */ + USB_CFG_INTR_POLL_INTERVAL, /* in ms */ + + /* Interface Descriptor */ + 9, /* sizeof(usbDescrInterface): length of descriptor in bytes */ + USBDESCR_INTERFACE, /* descriptor type */ + 1, /* index of this interface */ + 0, /* alternate setting for this interface */ + 2, /* endpoints excl 0: number of endpoint descriptors to follow */ + 0x0A, /* Data Interface Class Codes */ + 0, + 0, /* Data Interface Class Protocol Codes */ + 0, /* string index for interface */ + + /* Endpoint Descriptor */ + 7, /* sizeof(usbDescrEndpoint) */ + USBDESCR_ENDPOINT, /* descriptor type = endpoint */ + 0x01, /* OUT endpoint number 1 */ + 0x02, /* attrib: Bulk endpoint */ + HW_CDC_BULK_OUT_SIZE, 0, /* maximum packet size */ + 0, /* in ms */ + + /* Endpoint Descriptor */ + 7, /* sizeof(usbDescrEndpoint) */ + USBDESCR_ENDPOINT, /* descriptor type = endpoint */ + 0x81, /* IN endpoint number 1 */ + 0x02, /* attrib: Bulk endpoint */ + HW_CDC_BULK_IN_SIZE, 0, /* maximum packet size */ + 0, /* in ms */ +}; + + +uchar usbFunctionDescriptor(usbRequest_t *rq) +{ + + if(rq->wValue.bytes[1] == USBDESCR_DEVICE){ + usbMsgPtr = (uchar *)usbDescriptorDevice; + return usbDescriptorDevice[0]; + }else{ /* must be config descriptor */ + usbMsgPtr = (uchar *)configDescrCDC; + return sizeof(configDescrCDC); + } +} + + +uchar sendEmptyFrame; +static uchar intr3Status; /* used to control interrupt endpoint transmissions */ + +static usbWord_t baud; + + +/* ------------------------------------------------------------------------- */ +/* ----------------------------- USB interface ----------------------------- */ +/* ------------------------------------------------------------------------- */ + +uchar usbFunctionSetup(uchar data[8]) +{ +usbRequest_t *rq = (void *)data; + + if((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS){ /* class request type */ + + if( rq->bRequest==GET_LINE_CODING || rq->bRequest==SET_LINE_CODING ){ + return 0xff; + /* GET_LINE_CODING -> usbFunctionRead() */ + /* SET_LINE_CODING -> usbFunctionWrite() */ + } + if(rq->bRequest == SET_CONTROL_LINE_STATE){ + /* Report serial state (carrier detect). On several Unix platforms, + * tty devices can only be opened when carrier detect is set. + */ + if( intr3Status==0 ) + intr3Status = 2; + } + + /* Prepare bulk-in endpoint to respond to early termination */ + if((rq->bmRequestType & USBRQ_DIR_MASK) == USBRQ_DIR_HOST_TO_DEVICE) + sendEmptyFrame = 1; + } + + return 0; +} + + +/*---------------------------------------------------------------------------*/ +/* usbFunctionRead */ +/*---------------------------------------------------------------------------*/ + +uchar usbFunctionRead( uchar *data, uchar len ) +{ + + data[0] = baud.bytes[0]; + data[1] = baud.bytes[1]; + data[2] = 0; + data[3] = 0; + data[4] = 0; + data[5] = 0; + data[6] = 8; + + return 7; +} + + +/*---------------------------------------------------------------------------*/ +/* usbFunctionWrite */ +/*---------------------------------------------------------------------------*/ + +uchar usbFunctionWrite( uchar *data, uchar len ) +{ + + /* SET_LINE_CODING */ + baud.bytes[0] = data[0]; + baud.bytes[1] = data[1]; + + uartInit(baud.word); + + return 1; +} + + +void usbFunctionWriteOut( uchar *data, uchar len ) +{ + + /* usb -> rs232c: transmit char */ + for( ; len; len-- ) { + tx_buf[uwptr++] = *data++; + uwptr &= TX_MASK; + } + + /* postpone receiving next data */ + if( uartTxBytesFree() USB reset) */ +#ifdef USB_CFG_PULLUP_IOPORT /* use usbDeviceConnect()/usbDeviceDisconnect() if available */ + USBDDR = 0; /* we do RESET by deactivating pullup */ + usbDeviceDisconnect(); +#else + USBDDR = (1< +#include +#include /* needed by usbdrv.h */ +#include "oddebug.h" +#include "usbdrv.h" +#include "uart.h" + + +/* UART buffer */ +uchar urptr, uwptr, irptr, iwptr; +uchar rx_buf[RX_SIZE], tx_buf[TX_SIZE]; + + +void uartInit(uint baudrate) +{ + + PRR = (1<>6)+(baudrate>>1)) / baudrate - 1; + OCR1C = 0; + RX_DELAY = -((OCR1A+1)>>2); /* 1.25 sample bit */ + if( RX_DELAY<=OCR1A ) + RX_DELAY = OCR1A + 1; /* for 1200 bps */ + + + TCCR0A = 2; /* CTC */ + RX_READY = 1; + TIMSK = (1< rs232c : transmit */ + if( TCCR0B==0 && uwptr!=irptr ) { + uchar data; + + data = bit_reverse( tx_buf[irptr] ); + irptr = (irptr+1) & TX_MASK; + + TCNT0 = 0; + USISR = 0x4b; /* interrupt at D4 */ + EEARL = 0; /* usi_phase */ + +#ifdef UART_INVERT + OCR0B = ~((data<<4) | 0x0f); +#else + OCR0B = ((data<<4) | 0x0f); /* D4-7, stop bit */ +#endif + + data >>= 1; + cli(); +#ifdef UART_INVERT + USIDR = ~data; +#else + USIDR = data; /* startbit, D0-3 */ +#endif + TCCR0B = 3; /* start timer0: 1/64 clk */ + sei(); + + /* host => device : accept */ + if( usbAllRequestsAreDisabled() && uartTxBytesFree()>=HW_CDC_BULK_OUT_SIZE ) { + usbEnableAllRequests(); + } + } +} + + + + + diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45xtal/uart.h b/FabFTDI Attiny441/Programing/CDC/tiny45xtal/uart.h new file mode 100755 index 0000000000000000000000000000000000000000..5e348adafa3cd693f48caeb93b51f515d6b1269f --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45xtal/uart.h @@ -0,0 +1,94 @@ + +/* Name: uart.h + * Project: AVR USB driver for CDC interface on Low-Speed USB + * Author: Osamu Tamura + * Creation Date: 2006-06-18 + * Tabsize: 4 + * Copyright: (c) 2006 by Recursion Co., Ltd. + * License: Proprietary, free under certain conditions. See Documentation. + */ + +#ifndef __uart_h_included__ +#define __uart_h_included__ + +#ifndef uchar +#define uchar unsigned char +#endif + +#ifndef uint +#define uint unsigned int +#endif + +#define HW_CDC_BULK_OUT_SIZE 2 +#define HW_CDC_BULK_IN_SIZE 8 +/* Size of bulk transfer packets. The standard demands 8 bytes, but we may + * be better off with less. Try smaller values if the communication hangs. + */ + +#ifndef UART_DEFAULT_BPS +#define UART_DEFAULT_BPS 4800 +#endif +/* 4800bps is the maximum speed by software UART. + The baud rate will be automatically configured after opening device anyway. +*/ +/* #define UART_INVERT */ + +/* These are the USART port and TXD, RXD bit numbers. +*/ +/* ATtiny45/85 */ +#define UART_CFG_PORTNAME B + +#define UART_CFG_TXD 1 +#define UART_CFG_RXD 5 /* PB5 - HVSP */ + +#define UART_INTR_CFG PCMSK +#define UART_INTR_CFG_SET _BV(UART_CFG_RXD) +#define UART_INTR_ENABLE GIMSK +#define UART_INTR_ENABLE_BIT PCIE +#define UART_INTR_PENDING GIFR +#define UART_INTR_PENDING_BIT PCIF +#define UART_INTR_VECTOR SIG_PIN_CHANGE + + +#define RX_SIZE 8 /* UART receive buffer size */ +#define TX_SIZE 128 /* UART transmit buffer size */ + +#define RX_DELAY DT1A +#define RX_READY DT1B + +#define TX_MASK (TX_SIZE-1) + +/* ------------------------------------------------------------------------- */ +/* ------------------------ General Purpose Macros ------------------------- */ +/* ------------------------------------------------------------------------- */ +#define OD_CONCAT(a, b) a ## b +#define UART_OUTPORT(name) OD_CONCAT(PORT, name) +#define UART_INPORT(name) OD_CONCAT(PIN, name) +#define UART_DDRPORT(name) OD_CONCAT(DDR, name) + +#define UART_CFG_PORT UART_OUTPORT(UART_CFG_PORTNAME) +#define UART_PIN UART_INPORT(UART_CFG_PORTNAME) +#define UART_DDR UART_DDRPORT(UART_CFG_PORTNAME) + + +#ifndef __ASSEMBLER__ + +extern uchar sendEmptyFrame; +extern uchar urptr, uwptr, irptr, iwptr; +extern uchar rx_buf[RX_SIZE], tx_buf[TX_SIZE]; + +extern void uartInit(uint baudrate); +extern void uartPoll(void); +extern uchar bit_reverse( uchar x ); + +/* The following function returns the amount of bytes available in the TX + * buffer before we have an overflow. + */ +static inline uchar uartTxBytesFree(void) +{ + return (irptr - uwptr - 1) & TX_MASK; +} + +#endif /* #ifndef __ASSEMBLER__ */ +#endif /* __uart_h_included__ */ + diff --git a/FabFTDI Attiny441/Programing/CDC/tiny45xtal/usbconfig.h b/FabFTDI Attiny441/Programing/CDC/tiny45xtal/usbconfig.h new file mode 100755 index 0000000000000000000000000000000000000000..632e48e55bd74ae403f3f2dccf6e2845c6392110 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/tiny45xtal/usbconfig.h @@ -0,0 +1,412 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). ++ To create your own usbconfig.h file, copy this file to your project's ++ firmware source directory) and rename it to "usbconfig.h". ++ Then edit it accordingly. +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +/* #define USB_CFG_IOPORTNAME D */ +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +/* #define USB_CFG_DMINUS_BIT 4 */ +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +/* #define USB_CFG_DPLUS_BIT 2 */ +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#if defined (__AVR_ATtiny44__) || defined (__AVR_ATtiny84__) +#define USB_CFG_IOPORTNAME B +#define USB_CFG_DMINUS_BIT 1 +#define USB_CFG_DPLUS_BIT 2 + +#elif defined (__AVR_ATtiny45__) || defined (__AVR_ATtiny85__) +#define USB_CFG_IOPORTNAME B +#define USB_CFG_DMINUS_BIT 0 +#define USB_CFG_DPLUS_BIT 2 + +#elif defined (__AVR_ATtiny461__) || defined (__AVR_ATtiny861__) +#define USB_CFG_IOPORTNAME B +#define USB_CFG_DMINUS_BIT 5 +#define USB_CFG_DPLUS_BIT 6 +#else +/* ATtiny2313, ATmega8/48/88/168 */ +#define USB_CFG_IOPORTNAME D +#define USB_CFG_DMINUS_BIT 3 +#define USB_CFG_DPLUS_BIT 2 +#endif + +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#if USB_CFG_CLOCK_KHZ==18000 +#define USB_CFG_CHECK_CRC 1 +#else +#define USB_CFG_CHECK_CRC 0 +#endif + +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 255 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 100 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 1 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 1 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 1 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 0 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#if USB_CFG_CLOCK_KHZ==16500 || USB_CFG_CLOCK_KHZ==12800 +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 1 +#include "osccal.h" +#else +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +#endif +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID 0xc0, 0x16 /* = 0x16c0 = 5824 = voti.nl */ +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID 0xe1, 0x05 /* = 0x05e1 = 1505 */ +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x01 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'w', 'w', '.', 'r', 'e', 'c', 'u', 'r', 's', 'i', 'o', 'n', '.', 'j', 'p' +#define USB_CFG_VENDOR_NAME_LEN 16 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'U', 'S', 'B', '-', '2', '3', '2' +#define USB_CFG_DEVICE_NAME_LEN 7 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 2 /* set to 0 if deferred to interface */ +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 2 /* CDC class */ +#define USB_CFG_INTERFACE_SUBCLASS 2 /* Abstract (Modem) */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* AT-Commands */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +/* #define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 42 */ +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* ATmega***p/pa needs SIG_ definitions */ +#ifndef SIG_INTERRUPT0 +#define SIG_INTERRUPT0 _VECTOR(1) +#endif + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +#endif /* __usbconfig_h_included__ */ diff --git a/FabFTDI Attiny441/Programing/CDC/usbdrv/Changelog.txt b/FabFTDI Attiny441/Programing/CDC/usbdrv/Changelog.txt new file mode 100755 index 0000000000000000000000000000000000000000..5c6354ab1e32ead6d3e607b30e46cd998a26ff45 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/usbdrv/Changelog.txt @@ -0,0 +1,308 @@ +This file documents changes in the firmware-only USB driver for atmel's AVR +microcontrollers. New entries are always appended to the end of the file. +Scroll down to the bottom to see the most recent changes. + +2005-04-01: + - Implemented endpoint 1 as interrupt-in endpoint. + - Moved all configuration options to usbconfig.h which is not part of the + driver. + - Changed interface for usbVendorSetup(). + - Fixed compatibility with ATMega8 device. + - Various minor optimizations. + +2005-04-11: + - Changed interface to application: Use usbFunctionSetup(), usbFunctionRead() + and usbFunctionWrite() now. Added configuration options to choose which + of these functions to compile in. + - Assembler module delivers receive data non-inverted now. + - Made register and bit names compatible with more AVR devices. + +2005-05-03: + - Allow address of usbRxBuf on any memory page as long as the buffer does + not cross 256 byte page boundaries. + - Better device compatibility: works with Mega88 now. + - Code optimization in debugging module. + - Documentation updates. + +2006-01-02: + - Added (free) default Vendor- and Product-IDs bought from voti.nl. + - Added USBID-License.txt file which defines the rules for using the free + shared VID/PID pair. + - Added Readme.txt to the usbdrv directory which clarifies administrative + issues. + +2006-01-25: + - Added "configured state" to become more standards compliant. + - Added "HALT" state for interrupt endpoint. + - Driver passes the "USB Command Verifier" test from usb.org now. + - Made "serial number" a configuration option. + - Minor optimizations, we now recommend compiler option "-Os" for best + results. + - Added a version number to usbdrv.h + +2006-02-03: + - New configuration variable USB_BUFFER_SECTION for the memory section where + the USB rx buffer will go. This defaults to ".bss" if not defined. Since + this buffer MUST NOT cross 256 byte pages (not even touch a page at the + end), the user may want to pass a linker option similar to + "-Wl,--section-start=.mybuffer=0x800060". + - Provide structure for usbRequest_t. + - New defines for USB constants. + - Prepared for HID implementations. + - Increased data size limit for interrupt transfers to 8 bytes. + - New macro usbInterruptIsReady() to query interrupt buffer state. + +2006-02-18: + - Ensure that the data token which is sent as an ack to an OUT transfer is + always zero sized. This fixes a bug where the host reports an error after + sending an out transfer to the device, although all data arrived at the + device. + - Updated docs in usbdrv.h to reflect changed API in usbFunctionWrite(). + +* Release 2006-02-20 + + - Give a compiler warning when compiling with debugging turned on. + - Added Oleg Semyonov's changes for IAR-cc compatibility. + - Added new (optional) functions usbDeviceConnect() and usbDeviceDisconnect() + (also thanks to Oleg!). + - Rearranged tests in usbPoll() to save a couple of instructions in the most + likely case that no actions are pending. + - We need a delay between the SET ADDRESS request until the new address + becomes active. This delay was handled in usbPoll() until now. Since the + spec says that the delay must not exceed 2ms, previous versions required + aggressive polling during the enumeration phase. We have now moved the + handling of the delay into the interrupt routine. + - We must not reply with NAK to a SETUP transaction. We can only achieve this + by making sure that the rx buffer is empty when SETUP tokens are expected. + We therefore don't pass zero sized data packets from the status phase of + a transfer to usbPoll(). This change MAY cause troubles if you rely on + receiving a less than 8 bytes long packet in usbFunctionWrite() to + identify the end of a transfer. usbFunctionWrite() will NEVER be called + with a zero length. + +* Release 2006-03-14 + + - Improved IAR C support: tiny memory model, more devices + - Added template usbconfig.h file under the name usbconfig-prototype.h + +* Release 2006-03-26 + + - Added provision for one more interrupt-in endpoint (endpoint 3). + - Added provision for one interrupt-out endpoint (endpoint 1). + - Added flowcontrol macros for USB. + - Added provision for custom configuration descriptor. + - Allow ANY two port bits for D+ and D-. + - Merged (optional) receive endpoint number into global usbRxToken variable. + - Use USB_CFG_IOPORTNAME instead of USB_CFG_IOPORT. We now construct the + variable name from the single port letter instead of computing the address + of related ports from the output-port address. + +* Release 2006-06-26 + + - Updated documentation in usbdrv.h and usbconfig-prototype.h to reflect the + new features. + - Removed "#warning" directives because IAR does not understand them. Use + unused static variables instead to generate a warning. + - Do not include when compiling with IAR. + - Introduced USB_CFG_DESCR_PROPS_* in usbconfig.h to configure how each + USB descriptor should be handled. It is now possible to provide descriptor + data in Flash, RAM or dynamically at runtime. + - STALL is now a status in usbTxLen* instead of a message. We can now conform + to the spec and leave the stall status pending until it is cleared. + - Made usbTxPacketCnt1 and usbTxPacketCnt3 public. This allows the + application code to reset data toggling on interrupt pipes. + +* Release 2006-07-18 + + - Added an #if !defined __ASSEMBLER__ to the warning in usbdrv.h. This fixes + an assembler error. + - usbDeviceDisconnect() takes pull-up resistor to high impedance now. + +* Release 2007-02-01 + + - Merged in some code size improvements from usbtiny (thanks to Dick + Streefland for these optimizations!) + - Special alignment requirement for usbRxBuf not required any more. Thanks + again to Dick Streefland for this hint! + - Reverted to "#warning" instead of unused static variables -- new versions + of IAR CC should handle this directive. + - Changed Open Source license to GNU GPL v2 in order to make linking against + other free libraries easier. We no longer require publication of the + circuit diagrams, but we STRONGLY encourage it. If you improve the driver + itself, PLEASE grant us a royalty free license to your changes for our + commercial license. + +* Release 2007-03-29 + + - New configuration option "USB_PUBLIC" in usbconfig.h. + - Set USB version number to 1.10 instead of 1.01. + - Code used USB_CFG_DESCR_PROPS_STRING_DEVICE and + USB_CFG_DESCR_PROPS_STRING_PRODUCT inconsistently. Changed all occurrences + to USB_CFG_DESCR_PROPS_STRING_PRODUCT. + - New assembler module for 16.5 MHz RC oscillator clock with PLL in receiver + code. + - New assembler module for 16 MHz crystal. + - usbdrvasm.S contains common code only, clock-specific parts have been moved + to usbdrvasm12.S, usbdrvasm16.S and usbdrvasm165.S respectively. + +* Release 2007-06-25 + + - 16 MHz module: Do SE0 check in stuffed bits as well. + +* Release 2007-07-07 + + - Define hi8(x) for IAR compiler to limit result to 8 bits. This is necessary + for negative values. + - Added 15 MHz module contributed by V. Bosch. + - Interrupt vector name can now be configured. This is useful if somebody + wants to use a different hardware interrupt than INT0. + +* Release 2007-08-07 + + - Moved handleIn3 routine in usbdrvasm16.S so that relative jump range is + not exceeded. + - More config options: USB_RX_USER_HOOK(), USB_INITIAL_DATATOKEN, + USB_COUNT_SOF + - USB_INTR_PENDING can now be a memory address, not just I/O + +* Release 2007-09-19 + + - Split out common parts of assembler modules into separate include file + - Made endpoint numbers configurable so that given interface definitions + can be matched. See USB_CFG_EP3_NUMBER in usbconfig-prototype.h. + - Store endpoint number for interrupt/bulk-out so that usbFunctionWriteOut() + can handle any number of endpoints. + - Define usbDeviceConnect() and usbDeviceDisconnect() even if no + USB_CFG_PULLUP_IOPORTNAME is defined. Directly set D+ and D- to 0 in this + case. + +* Release 2007-12-01 + + - Optimize usbDeviceConnect() and usbDeviceDisconnect() for less code size + when USB_CFG_PULLUP_IOPORTNAME is not defined. + +* Release 2007-12-13 + + - Renamed all include-only assembler modules from *.S to *.inc so that + people don't add them to their project sources. + - Distribute leap bits in tx loop more evenly for 16 MHz module. + - Use "macro" and "endm" instead of ".macro" and ".endm" for IAR + - Avoid compiler warnings for constant expr range by casting some values in + USB descriptors. + +* Release 2008-01-21 + + - Fixed bug in 15 and 16 MHz module where the new address set with + SET_ADDRESS was already accepted at the next NAK or ACK we send, not at + the next data packet we send. This caused problems when the host polled + too fast. Thanks to Alexander Neumann for his help and patience debugging + this issue! + +* Release 2008-02-05 + + - Fixed bug in 16.5 MHz module where a register was used in the interrupt + handler before it was pushed. This bug was introduced with version + 2007-09-19 when common parts were moved to a separate file. + - Optimized CRC routine (thanks to Reimar Doeffinger). + +* Release 2008-02-16 + + - Removed outdated IAR compatibility stuff (code sections). + - Added hook macros for USB_RESET_HOOK() and USB_SET_ADDRESS_HOOK(). + - Added optional routine usbMeasureFrameLength() for calibration of the + internal RC oscillator. + +* Release 2008-02-28 + + - USB_INITIAL_DATATOKEN defaults to USBPID_DATA1 now, which means that we + start with sending USBPID_DATA0. + - Changed defaults in usbconfig-prototype.h + - Added free USB VID/PID pair for MIDI class devices + - Restructured AVR-USB as separate package, not part of PowerSwitch any more. + +* Release 2008-04-18 + + - Restructured usbdrv.c so that it is easier to read and understand. + - Better code optimization with gcc 4. + - If a second interrupt in endpoint is enabled, also add it to config + descriptor. + - Added config option for long transfers (above 254 bytes), see + USB_CFG_LONG_TRANSFERS in usbconfig.h. + - Added 20 MHz module contributed by Jeroen Benschop. + +* Release 2008-05-13 + + - Fixed bug in libs-host/hiddata.c function usbhidGetReport(): length + was not incremented, pointer to length was incremented instead. + - Added code to command line tool(s) which claims an interface. This code + is disabled by default, but may be necessary on newer Linux kernels. + - Added usbconfig.h option "USB_CFG_CHECK_DATA_TOGGLING". + - New header "usbportability.h" prepares ports to other development + environments. + - Long transfers (above 254 bytes) did not work when usbFunctionRead() was + used to supply the data. Fixed this bug. [Thanks to Alexander Neumann!] + - In hiddata.c (example code for sending/receiving data over HID), use + USB_RECIP_DEVICE instead of USB_RECIP_INTERFACE for control transfers so + that we need not claim the interface. + - in usbPoll() loop 20 times polling for RESET state instead of 10 times. + This accounts for the higher clock rates we now support. + - Added a module for 12.8 MHz RC oscillator with PLL in receiver loop. + - Added hook to SOF code so that oscillator can be tuned to USB frame clock. + - Added timeout to waitForJ loop. Helps preventing unexpected hangs. + - Added example code for oscillator tuning to libs-device (thanks to + Henrik Haftmann for the idea to this routine). + - Implemented option USB_CFG_SUPPRESS_INTR_CODE. + +* Release 2008-10-22 + + - Fixed libs-device/osctune.h: OSCCAL is memory address on ATMega88 and + similar, not offset of 0x20 needs to be added. + - Allow distribution under GPLv3 for those who have to link against other + code distributed under GPLv3. + +* Release 2008-11-26 + + - Removed libusb-win32 dependency for hid-data example in Makefile.windows. + It was never required and confused many people. + - Added extern uchar usbRxToken to usbdrv.h. + - Integrated a module with CRC checks at 18 MHz by Lukas Schrittwieser. + +* Release 2009-03-23 + + - Hid-mouse example used settings from hid-data example, fixed that. + - Renamed project to V-USB due to a trademark issue with Atmel(r). + - Changed CommercialLicense.txt and USBID-License.txt to make the + background of USB ID registration clearer. + +* Release 2009-04-15 + + - Changed CommercialLicense.txt to reflect the new range of PIDs from + Jason Kotzin. + - Removed USBID-License.txt in favor of USB-IDs-for-free.txt and + USB-ID-FAQ.txt + - Fixed a bug in the 12.8 MHz module: End Of Packet decection was made in + the center between bit 0 and 1 of each byte. This is where the data lines + are expected to change and the sampled data may therefore be nonsense. + We therefore check EOP ONLY if bits 0 AND 1 have both been read as 0 on D-. + - Fixed a bitstuffing problem in the 16 MHz module: If bit 6 was stuffed, + the unstuffing code in the receiver routine was 1 cycle too long. If + multiple bytes had the unstuffing in bit 6, the error summed up until the + receiver was out of sync. + - Included option for faster CRC routine. + Thanks to Slawomir Fras (BoskiDialer) for this code! + - Updated bits in Configuration Descriptor's bmAttributes according to + USB 1.1 (in particular bit 7, it is a must-be-set bit now). + +* Release 2009-08-22 + + - Moved first DBG1() after odDebugInit() in all examples. + - Use vector INT0_vect instead of SIG_INTERRUPT0 if defined. This makes + V-USB compatible with the new "p" suffix devices (e.g. ATMega328p). + - USB_CFG_CLOCK_KHZ setting is now required in usbconfig.h (no default any + more). + - New option USB_CFG_DRIVER_FLASH_PAGE allows boot loaders on devices with + more than 64 kB flash. + - Built-in configuration descriptor allows custom definition for second + endpoint now. + +* Release 2010-07-15 diff --git a/FabFTDI Attiny441/Programing/CDC/usbdrv/CommercialLicense.txt b/FabFTDI Attiny441/Programing/CDC/usbdrv/CommercialLicense.txt new file mode 100755 index 0000000000000000000000000000000000000000..11d07d9df038d11eb473c8c19c311e2b9a428e30 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/usbdrv/CommercialLicense.txt @@ -0,0 +1,166 @@ +V-USB Driver Software License Agreement +Version 2009-08-03 + +THIS LICENSE AGREEMENT GRANTS YOU CERTAIN RIGHTS IN A SOFTWARE. YOU CAN +ENTER INTO THIS AGREEMENT AND ACQUIRE THE RIGHTS OUTLINED BELOW BY PAYING +THE AMOUNT ACCORDING TO SECTION 4 ("PAYMENT") TO OBJECTIVE DEVELOPMENT. + + +1 DEFINITIONS + +1.1 "OBJECTIVE DEVELOPMENT" shall mean OBJECTIVE DEVELOPMENT Software GmbH, +Grosse Schiffgasse 1A/7, 1020 Wien, AUSTRIA. + +1.2 "You" shall mean the Licensee. + +1.3 "V-USB" shall mean all files included in the package distributed under +the name "vusb" by OBJECTIVE DEVELOPMENT (http://www.obdev.at/vusb/) +unless otherwise noted. This includes the firmware-only USB device +implementation for Atmel AVR microcontrollers, some simple device examples +and host side software examples and libraries. + + +2 LICENSE GRANTS + +2.1 Source Code. OBJECTIVE DEVELOPMENT shall furnish you with the source +code of V-USB. + +2.2 Distribution and Use. OBJECTIVE DEVELOPMENT grants you the +non-exclusive right to use, copy and distribute V-USB with your hardware +product(s), restricted by the limitations in section 3 below. + +2.3 Modifications. OBJECTIVE DEVELOPMENT grants you the right to modify +the source code and your copy of V-USB according to your needs. + +2.4 USB IDs. OBJECTIVE DEVELOPMENT furnishes you with one or two USB +Product ID(s), sent to you in e-mail. These Product IDs are reserved +exclusively for you. OBJECTIVE DEVELOPMENT has obtained USB Product ID +ranges under the Vendor ID 5824 from Wouter van Ooijen (Van Ooijen +Technische Informatica, www.voti.nl) and under the Vendor ID 8352 from +Jason Kotzin (Clay Logic, www.claylogic.com). Both owners of the Vendor IDs +have obtained these IDs from the USB Implementers Forum, Inc. +(www.usb.org). OBJECTIVE DEVELOPMENT disclaims all liability which might +arise from the assignment of USB IDs. + +2.5 USB Certification. Although not part of this agreement, we want to make +it clear that you cannot become USB certified when you use V-USB or a USB +Product ID assigned by OBJECTIVE DEVELOPMENT. AVR microcontrollers don't +meet the electrical specifications required by the USB specification and +the USB Implementers Forum certifies only members who bought a Vendor ID of +their own. + + +3 LICENSE RESTRICTIONS + +3.1 Number of Units. Only one of the following three definitions is +applicable. Which one is determined by the amount you pay to OBJECTIVE +DEVELOPMENT, see section 4 ("Payment") below. + +Hobby License: You may use V-USB according to section 2 above in no more +than 5 hardware units. These units must not be sold for profit. + +Entry Level License: You may use V-USB according to section 2 above in no +more than 150 hardware units. + +Professional License: You may use V-USB according to section 2 above in +any number of hardware units, except for large scale production ("unlimited +fair use"). Quantities below 10,000 units are not considered large scale +production. If your reach quantities which are obviously large scale +production, you must pay a license fee of 0.10 EUR per unit for all units +above 10,000. + +3.2 Rental. You may not rent, lease, or lend V-USB or otherwise encumber +any copy of V-USB, or any of the rights granted herein. + +3.3 Transfer. You may not transfer your rights under this Agreement to +another party without OBJECTIVE DEVELOPMENT's prior written consent. If +such consent is obtained, you may permanently transfer this License to +another party. The recipient of such transfer must agree to all terms and +conditions of this Agreement. + +3.4 Reservation of Rights. OBJECTIVE DEVELOPMENT retains all rights not +expressly granted. + +3.5 Non-Exclusive Rights. Your license rights under this Agreement are +non-exclusive. + +3.6 Third Party Rights. This Agreement cannot grant you rights controlled +by third parties. In particular, you are not allowed to use the USB logo or +other trademarks owned by the USB Implementers Forum, Inc. without their +consent. Since such consent depends on USB certification, it should be +noted that V-USB will not pass certification because it does not +implement checksum verification and the microcontroller ports do not meet +the electrical specifications. + + +4 PAYMENT + +The payment amount depends on the variation of this agreement (according to +section 3.1) into which you want to enter. Concrete prices are listed on +OBJECTIVE DEVELOPMENT's web site, usually at +http://www.obdev.at/vusb/license.html. You agree to pay the amount listed +there to OBJECTIVE DEVELOPMENT or OBJECTIVE DEVELOPMENT's payment processor +or reseller. + + +5 COPYRIGHT AND OWNERSHIP + +V-USB is protected by copyright laws and international copyright +treaties, as well as other intellectual property laws and treaties. V-USB +is licensed, not sold. + + +6 TERM AND TERMINATION + +6.1 Term. This Agreement shall continue indefinitely. However, OBJECTIVE +DEVELOPMENT may terminate this Agreement and revoke the granted license and +USB-IDs if you fail to comply with any of its terms and conditions. + +6.2 Survival of Terms. All provisions regarding secrecy, confidentiality +and limitation of liability shall survive termination of this agreement. + + +7 DISCLAIMER OF WARRANTY AND LIABILITY + +LIMITED WARRANTY. V-USB IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, OBJECTIVE +DEVELOPMENT AND ITS SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES, EITHER +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND +NON-INFRINGEMENT, WITH REGARD TO V-USB, AND THE PROVISION OF OR FAILURE +TO PROVIDE SUPPORT SERVICES. THIS LIMITED WARRANTY GIVES YOU SPECIFIC LEGAL +RIGHTS. YOU MAY HAVE OTHERS, WHICH VARY FROM STATE/JURISDICTION TO +STATE/JURISDICTION. + +LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, +IN NO EVENT SHALL OBJECTIVE DEVELOPMENT OR ITS SUPPLIERS BE LIABLE FOR ANY +SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER +(INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, +BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY +LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE V-USB OR THE +PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES, EVEN IF OBJECTIVE +DEVELOPMENT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN ANY +CASE, OBJECTIVE DEVELOPMENT'S ENTIRE LIABILITY UNDER ANY PROVISION OF THIS +AGREEMENT SHALL BE LIMITED TO THE AMOUNT ACTUALLY PAID BY YOU FOR V-USB. + + +8 MISCELLANEOUS TERMS + +8.1 Marketing. OBJECTIVE DEVELOPMENT has the right to mention for marketing +purposes that you entered into this agreement. + +8.2 Entire Agreement. This document represents the entire agreement between +OBJECTIVE DEVELOPMENT and you. It may only be modified in writing signed by +an authorized representative of both, OBJECTIVE DEVELOPMENT and you. + +8.3 Severability. In case a provision of these terms and conditions should +be or become partly or entirely invalid, ineffective, or not executable, +the validity of all other provisions shall not be affected. + +8.4 Applicable Law. This agreement is governed by the laws of the Republic +of Austria. + +8.5 Responsible Courts. The responsible courts in Vienna/Austria will have +exclusive jurisdiction regarding all disputes in connection with this +agreement. + diff --git a/FabFTDI Attiny441/Programing/CDC/usbdrv/License.txt b/FabFTDI Attiny441/Programing/CDC/usbdrv/License.txt new file mode 100755 index 0000000000000000000000000000000000000000..4460cfbae0033c6a203952cb36a942f0467c1af9 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/usbdrv/License.txt @@ -0,0 +1,361 @@ +OBJECTIVE DEVELOPMENT GmbH's V-USB driver software is distributed under the +terms and conditions of the GNU GPL version 2 or the GNU GPL version 3. It is +your choice whether you apply the terms of version 2 or version 3. The full +text of GPLv2 is included below. In addition to the requirements in the GPL, +we STRONGLY ENCOURAGE you to do the following: + +(1) Publish your entire project on a web site and drop us a note with the URL. +Use the form at http://www.obdev.at/vusb/feedback.html for your submission. + +(2) Adhere to minimum publication standards. Please include AT LEAST: + - a circuit diagram in PDF, PNG or GIF format + - full source code for the host software + - a Readme.txt file in ASCII format which describes the purpose of the + project and what can be found in which directories and which files + - a reference to http://www.obdev.at/vusb/ + +(3) If you improve the driver firmware itself, please give us a free license +to your modifications for our commercial license offerings. + + + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/FabFTDI Attiny441/Programing/CDC/usbdrv/Readme.txt b/FabFTDI Attiny441/Programing/CDC/usbdrv/Readme.txt new file mode 100755 index 0000000000000000000000000000000000000000..970dc66b2f4b61f298a920776fb94983b169deb1 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/usbdrv/Readme.txt @@ -0,0 +1,172 @@ +This is the Readme file to Objective Development's firmware-only USB driver +for Atmel AVR microcontrollers. For more information please visit +http://www.obdev.at/vusb/ + +This directory contains the USB firmware only. Copy it as-is to your own +project and add all .c and .S files to your project (these files are marked +with an asterisk in the list below). Then copy usbconfig-prototype.h as +usbconfig.h to your project and edit it according to your configuration. + + +TECHNICAL DOCUMENTATION +======================= +The technical documentation (API) for the firmware driver is contained in the +file "usbdrv.h". Please read all of it carefully! Configuration options are +documented in "usbconfig-prototype.h". + +The driver consists of the following files: + Readme.txt ............. The file you are currently reading. + Changelog.txt .......... Release notes for all versions of the driver. + usbdrv.h ............... Driver interface definitions and technical docs. +* usbdrv.c ............... High level language part of the driver. Link this + module to your code! +* usbdrvasm.S ............ Assembler part of the driver. This module is mostly + a stub and includes one of the usbdrvasm*.S files + depending on processor clock. Link this module to + your code! + usbdrvasm*.inc ......... Assembler routines for particular clock frequencies. + Included by usbdrvasm.S, don't link it directly! + asmcommon.inc .......... Common assembler routines. Included by + usbdrvasm*.inc, don't link it directly! + usbconfig-prototype.h .. Prototype for your own usbdrv.h file. +* oddebug.c .............. Debug functions. Only used when DEBUG_LEVEL is + defined to a value greater than 0. Link this module + to your code! + oddebug.h .............. Interface definitions of the debug module. + usbportability.h ....... Header with compiler-dependent stuff. + usbdrvasm.asm .......... Compatibility stub for IAR-C-compiler. Use this + module instead of usbdrvasm.S when you assembler + with IAR's tools. + License.txt ............ Open Source license for this driver. + CommercialLicense.txt .. Optional commercial license for this driver. + USB-ID-FAQ.txt ......... General infos about USB Product- and Vendor-IDs. + USB-IDs-for-free.txt ... List and terms of use for free shared PIDs. + +(*) ... These files should be linked to your project. + + +CPU CORE CLOCK FREQUENCY +======================== +We supply assembler modules for clock frequencies of 12 MHz, 12.8 MHz, 15 MHz, +16 MHz, 16.5 MHz 18 MHz and 20 MHz. Other clock rates are not supported. The +actual clock rate must be configured in usbconfig.h. + +12 MHz Clock +This is the traditional clock rate of V-USB because it's the lowest clock +rate where the timing constraints of the USB spec can be met. + +15 MHz Clock +Similar to 12 MHz, but some NOPs inserted. On the other hand, the higher clock +rate allows for some loops which make the resulting code size somewhat smaller +than the 12 MHz version. + +16 MHz Clock +This clock rate has been added for users of the Arduino board and other +ready-made boards which come with a fixed 16 MHz crystal. It's also an option +if you need the slightly higher clock rate for performance reasons. Since +16 MHz is not divisible by the USB low speed bit clock of 1.5 MHz, the code +is somewhat tricky and has to insert a leap cycle every third byte. + +12.8 MHz and 16.5 MHz Clock +The assembler modules for these clock rates differ from the other modules +because they have been built for an RC oscillator with only 1% precision. The +receiver code inserts leap cycles to compensate for clock deviations. 1% is +also the precision which can be achieved by calibrating the internal RC +oscillator of the AVR. Please note that only AVRs with internal 64 MHz PLL +oscillator can reach 16.5 MHz with the RC oscillator. This includes the very +popular ATTiny25, ATTiny45, ATTiny85 series as well as the ATTiny26. Almost +all AVRs can reach 12.8 MHz, although this is outside the specified range. + +See the EasyLogger example at http://www.obdev.at/vusb/easylogger.html for +code which calibrates the RC oscillator based on the USB frame clock. + +18 MHz Clock +This module is closer to the USB specification because it performs an on the +fly CRC check for incoming packets. Packets with invalid checksum are +discarded as required by the spec. If you also implement checks for data +PID toggling on application level (see option USB_CFG_CHECK_DATA_TOGGLING +in usbconfig.h for more info), this ensures data integrity. Due to the CRC +tables and alignment requirements, this code is bigger than modules for other +clock rates. To activate this module, you must define USB_CFG_CHECK_CRC to 1 +and USB_CFG_CLOCK_KHZ to 18000 in usbconfig.h. + +20 MHz Clock +This module is for people who won't do it with less than the maximum. Since +20 MHz is not divisible by the USB low speed bit clock of 1.5 MHz, the code +uses similar tricks as the 16 MHz module to insert leap cycles. + + +USB IDENTIFIERS +=============== +Every USB device needs a vendor- and a product-identifier (VID and PID). VIDs +are obtained from usb.org for a price of 1,500 USD. Once you have a VID, you +can assign PIDs at will. + +Since an entry level cost of 1,500 USD is too high for most small companies +and hobbyists, we provide some VID/PID pairs for free. See the file +USB-IDs-for-free.txt for details. + +Objective Development also has some license offerings which include product +IDs. See http://www.obdev.at/vusb/ for details. + + +DEVELOPMENT SYSTEM +================== +This driver has been developed and optimized for the GNU compiler version 3 +and 4. We recommend that you use the GNU compiler suite because it is freely +available. V-USB has also been ported to the IAR compiler and assembler. It +has been tested with IAR 4.10B/W32 and 4.12A/W32 on an ATmega8 with the +"small" and "tiny" memory model. Not every release is tested with IAR CC and +the driver may therefore fail to compile with IAR. Please note that gcc is +more efficient for usbdrv.c because this module has been deliberately +optimized for gcc. + +Gcc version 3 produces smaller code than version 4 due to new optimizing +capabilities which don't always improve things on 8 bit CPUs. The code size +generated by gcc 4 can be reduced with the compiler options +-fno-move-loop-invariants, -fno-tree-scev-cprop and +-fno-inline-small-functions in addition to -Os. On devices with more than +8k of flash memory, we also recommend the linker option --relax (written as +-Wl,--relax for gcc) to convert absolute calls into relative where possible. + +For more information about optimizing options see: + + http://www.tty1.net/blog/2008-04-29-avr-gcc-optimisations_en.html + +These optimizations are good for gcc 4.x. Version 3.x of gcc does not support +most of these options and produces good code anyway. + + +USING V-USB FOR FREE +==================== +The AVR firmware driver is published under the GNU General Public License +Version 2 (GPL2) and the GNU General Public License Version 3 (GPL3). It is +your choice whether you apply the terms of version 2 or version 3. + +If you decide for the free GPL2 or GPL3, we STRONGLY ENCOURAGE you to do the +following things IN ADDITION to the obligations from the GPL: + +(1) Publish your entire project on a web site and drop us a note with the URL. +Use the form at http://www.obdev.at/vusb/feedback.html for your submission. +If you don't have a web site, you can publish the project in obdev's +documentation wiki at +http://www.obdev.at/goto.php?t=vusb-wiki&p=hosted-projects. + +(2) Adhere to minimum publication standards. Please include AT LEAST: + - a circuit diagram in PDF, PNG or GIF format + - full source code for the host software + - a Readme.txt file in ASCII format which describes the purpose of the + project and what can be found in which directories and which files + - a reference to http://www.obdev.at/vusb/ + +(3) If you improve the driver firmware itself, please give us a free license +to your modifications for our commercial license offerings. + + +COMMERCIAL LICENSES FOR V-USB +============================= +If you don't want to publish your source code under the terms of the GPL, +you can simply pay money for V-USB. As an additional benefit you get +USB PIDs for free, reserved exclusively to you. See the file +"CommercialLicense.txt" for details. + diff --git a/FabFTDI Attiny441/Programing/CDC/usbdrv/USB-ID-FAQ.txt b/FabFTDI Attiny441/Programing/CDC/usbdrv/USB-ID-FAQ.txt new file mode 100755 index 0000000000000000000000000000000000000000..d1de8fb618ac1200e8841e0dde03a31b00ac8015 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/usbdrv/USB-ID-FAQ.txt @@ -0,0 +1,149 @@ +Version 2009-08-22 + +========================== +WHY DO WE NEED THESE IDs? +========================== + +USB is more than a low level protocol for data transport. It also defines a +common set of requests which must be understood by all devices. And as part +of these common requests, the specification defines data structures, the +USB Descriptors, which are used to describe the properties of the device. + +From the perspective of an operating system, it is therefore possible to find +out basic properties of a device (such as e.g. the manufacturer and the name +of the device) without a device-specific driver. This is essential because +the operating system can choose a driver to load based on this information +(Plug-And-Play). + +Among the most important properties in the Device Descriptor are the USB +Vendor- and Product-ID. Both are 16 bit integers. The most simple form of +driver matching is based on these IDs. The driver announces the Vendor- and +Product-IDs of the devices it can handle and the operating system loads the +appropriate driver when the device is connected. + +It is obvious that this technique only works if the pair Vendor- plus +Product-ID is unique: Only devices which require the same driver can have the +same pair of IDs. + + +===================================================== +HOW DOES THE USB STANDARD ENSURE THAT IDs ARE UNIQUE? +===================================================== + +Since it is so important that USB IDs are unique, the USB Implementers Forum, +Inc. (usb.org) needs a way to enforce this legally. It is not forbidden by +law to build a device and assign it any random numbers as IDs. Usb.org +therefore needs an agreement to regulate the use of USB IDs. The agreement +binds only parties who agreed to it, of course. Everybody else is free to use +any numbers for their IDs. + +So how can usb.org ensure that every manufacturer of USB devices enters into +an agreement with them? They do it via trademark licensing. Usb.org has +registered the trademark "USB", all associated logos and related terms. If +you want to put an USB logo on your product or claim that it is USB +compliant, you must license these trademarks from usb.org. And this is where +you enter into an agreement. See the "USB-IF Trademark License Agreement and +Usage Guidelines for the USB-IF Logo" at +http://www.usb.org/developers/logo_license/. + +Licensing the USB trademarks requires that you buy a USB Vendor-ID from +usb.org (one-time fee of ca. 2,000 USD), that you become a member of usb.org +(yearly fee of ca. 4,000 USD) and that you meet all the technical +specifications from the USB spec. + +This means that most hobbyists and small companies will never be able to +become USB compliant, just because membership is so expensive. And you can't +be compliant with a driver based on V-USB anyway, because the AVR's port pins +don't meet the electrical specifications for USB. So, in principle, all +hobbyists and small companies are free to choose any random numbers for their +IDs. They have nothing to lose... + +There is one exception worth noting, though: If you use a sub-component which +implements USB, the vendor of the sub-components may guarantee USB +compliance. This might apply to some or all of FTDI's solutions. + + +======================================================================= +WHY SHOULD YOU OBTAIN USB IDs EVEN IF YOU DON'T LICENSE USB TRADEMARKS? +======================================================================= + +You have learned in the previous section that you are free to choose any +numbers for your IDs anyway. So why not do exactly this? There is still the +technical issue. If you choose IDs which are already in use by somebody else, +operating systems will load the wrong drivers and your device won't work. +Even if you choose IDs which are not currently in use, they may be in use in +the next version of the operating system or even after an automatic update. + +So what you need is a pair of Vendor- and Product-IDs for which you have the +guarantee that no USB compliant product uses them. This implies that no +operating system will ever ship with drivers responsible for these IDs. + + +============================================== +HOW DOES OBJECTIVE DEVELOPMENT HANDLE USB IDs? +============================================== + +Objective Development gives away pairs of USB-IDs with their V-USB licenses. +In order to ensure that these IDs are unique, Objective Development has an +agreement with the company/person who has bought the USB Vendor-ID from +usb.org. This agreement ensures that a range of USB Product-IDs is reserved +for assignment by Objective Development and that the owner of the Vendor-ID +won't give it to anybody else. + +This means that you have to trust three parties to ensure uniqueness of +your IDs: + + - Objective Development, that they don't give the same PID to more than + one person. + - The owner of the Vendor-ID that they don't assign PIDs from the range + assigned to Objective Development to anybody else. + - Usb.org that they don't assign the same Vendor-ID a second time. + + +================================== +WHO IS THE OWNER OF THE VENDOR-ID? +================================== + +Objective Development has obtained ranges of USB Product-IDs under two +Vendor-IDs: Under Vendor-ID 5824 from Wouter van Ooijen (Van Ooijen +Technische Informatica, www.voti.nl) and under Vendor-ID 8352 from Jason +Kotzin (Clay Logic, www.claylogic.com). Both VID owners have received their +Vendor-ID directly from usb.org. + + +========================================================================= +CAN I USE USB-IDs FROM OBJECTIVE DEVELOPMENT WITH OTHER DRIVERS/HARDWARE? +========================================================================= + +The short answer is: Yes. All you get is a guarantee that the IDs are never +assigned to anybody else. What more do you need? + + +============================ +WHAT ABOUT SHARED ID PAIRS? +============================ + +Objective Development has reserved some PID/VID pairs for shared use. You +have no guarantee of uniqueness for them, except that no USB compliant device +uses them. In order to avoid technical problems, we must ensure that all +devices with the same pair of IDs use the same driver on kernel level. For +details, see the file USB-IDs-for-free.txt. + + +====================================================== +I HAVE HEARD THAT SUB-LICENSING OF USB-IDs IS ILLEGAL? +====================================================== + +A 16 bit integer number cannot be protected by copyright laws. It is not +sufficiently complex. And since none of the parties involved entered into the +USB-IF Trademark License Agreement, we are not bound by this agreement. So +there is no reason why it should be illegal to sub-license USB-IDs. + + +============================================= +WHO IS LIABLE IF THERE ARE INCOMPATIBILITIES? +============================================= + +Objective Development disclaims all liabilities which might arise from the +assignment of IDs. If you guarantee product features to your customers +without proper disclaimer, YOU are liable for that. diff --git a/FabFTDI Attiny441/Programing/CDC/usbdrv/USB-IDs-for-free.txt b/FabFTDI Attiny441/Programing/CDC/usbdrv/USB-IDs-for-free.txt new file mode 100755 index 0000000000000000000000000000000000000000..2f4d59ad18e1ec7eb1e845c08717f0587d939836 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/usbdrv/USB-IDs-for-free.txt @@ -0,0 +1,148 @@ +Version 2009-08-22 + +=========================== +FREE USB-IDs FOR SHARED USE +=========================== + +Objective Development has reserved a set of USB Product-IDs for use according +to the guidelines outlined below. For more information about the concept of +USB IDs please see the file USB-ID-FAQ.txt. Objective Development guarantees +that the IDs listed below are not used by any USB compliant devices. + + +==================== +MECHANISM OF SHARING +==================== + +From a technical point of view, two different devices can share the same USB +Vendor- and Product-ID if they require the same driver on operating system +level. We make use of this fact by assigning separate IDs for various device +classes. On application layer, devices must be distinguished by their textual +name or serial number. We offer separate sets of IDs for discrimination by +textual name and for serial number. + +Examples for shared use of USB IDs are included with V-USB in the "examples" +subdirectory. + + +====================================== +IDs FOR DISCRIMINATION BY TEXTUAL NAME +====================================== + +If you use one of the IDs listed below, your device and host-side software +must conform to these rules: + +(1) The USB device MUST provide a textual representation of the manufacturer +and product identification. The manufacturer identification MUST be available +at least in USB language 0x0409 (English/US). + +(2) The textual manufacturer identification MUST contain either an Internet +domain name (e.g. "mycompany.com") registered and owned by you, or an e-mail +address under your control (e.g. "myname@gmx.net"). You can embed the domain +name or e-mail address in any string you like, e.g. "Objective Development +http://www.obdev.at/vusb/". + +(3) You are responsible for retaining ownership of the domain or e-mail +address for as long as any of your products are in use. + +(4) You may choose any string for the textual product identification, as long +as this string is unique within the scope of your textual manufacturer +identification. + +(5) Application side device look-up MUST be based on the textual manufacturer +and product identification in addition to VID/PID matching. The driver +matching MUST be a comparison of the entire strings, NOT a sub-string match. + +(6) For devices which implement a particular USB device class (e.g. HID), the +operating system's default class driver MUST be used. If an operating system +driver for Vendor Class devices is needed, this driver must be libusb or +libusb-win32 (see http://libusb.org/ and +http://libusb-win32.sourceforge.net/). + +Table if IDs for discrimination by textual name: + +PID dec (hex) | VID dec (hex) | Description of use +==============+===============+============================================ +1500 (0x05dc) | 5824 (0x16c0) | For Vendor Class devices with libusb +--------------+---------------+-------------------------------------------- +1503 (0x05df) | 5824 (0x16c0) | For generic HID class devices (which are + | | NOT mice, keyboards or joysticks) +--------------+---------------+-------------------------------------------- +1505 (0x05e1) | 5824 (0x16c0) | For CDC-ACM class devices (modems) +--------------+---------------+-------------------------------------------- +1508 (0x05e4) | 5824 (0x16c0) | For MIDI class devices +--------------+---------------+-------------------------------------------- + +Note that Windows caches the textual product- and vendor-description for +mice, keyboards and joysticks. Name-bsed discrimination is therefore not +recommended for these device classes. + + +======================================= +IDs FOR DISCRIMINATION BY SERIAL NUMBER +======================================= + +If you use one of the IDs listed below, your device and host-side software +must conform to these rules: + +(1) The USB device MUST provide a textual representation of the serial +number. The serial number string MUST be available at least in USB language +0x0409 (English/US). + +(2) The serial number MUST start with either an Internet domain name (e.g. +"mycompany.com") registered and owned by you, or an e-mail address under your +control (e.g. "myname@gmx.net"), both terminated with a colon (":") character. +You MAY append any string you like for further discrimination of your devices. + +(3) You are responsible for retaining ownership of the domain or e-mail +address for as long as any of your products are in use. + +(5) Application side device look-up MUST be based on the serial number string +in addition to VID/PID matching. The matching must start at the first +character of the serial number string and include the colon character +terminating your domain or e-mail address. It MAY stop anywhere after that. + +(6) For devices which implement a particular USB device class (e.g. HID), the +operating system's default class driver MUST be used. If an operating system +driver for Vendor Class devices is needed, this driver must be libusb or +libusb-win32 (see http://libusb.org/ and +http://libusb-win32.sourceforge.net/). + +Table if IDs for discrimination by serial number string: + +PID dec (hex) | VID dec (hex) | Description of use +===============+===============+=========================================== +10200 (0x27d8) | 5824 (0x16c0) | For Vendor Class devices with libusb +---------------+---------------+------------------------------------------- +10201 (0x27d9) | 5824 (0x16c0) | For generic HID class devices (which are + | | NOT mice, keyboards or joysticks) +---------------+---------------+------------------------------------------- +10202 (0x27da) | 5824 (0x16c0) | For USB Mice +---------------+---------------+------------------------------------------- +10203 (0x27db) | 5824 (0x16c0) | For USB Keyboards +---------------+---------------+------------------------------------------- +10204 (0x27db) | 5824 (0x16c0) | For USB Joysticks +---------------+---------------+------------------------------------------- +10205 (0x27dc) | 5824 (0x16c0) | For CDC-ACM class devices (modems) +---------------+---------------+------------------------------------------- +10206 (0x27dd) | 5824 (0x16c0) | For MIDI class devices +---------------+---------------+------------------------------------------- + + +================= +ORIGIN OF USB-IDs +================= + +OBJECTIVE DEVELOPMENT Software GmbH has obtained all VID/PID pairs listed +here from Wouter van Ooijen (see www.voti.nl) for exclusive disposition. +Wouter van Ooijen has obtained the VID from the USB Implementers Forum, Inc. +(see www.usb.org). The VID is registered for the company name "Van Ooijen +Technische Informatica". + + +========== +DISCLAIMER +========== + +OBJECTIVE DEVELOPMENT Software GmbH disclaims all liability for any +problems which are caused by the shared use of these VID/PID pairs. diff --git a/FabFTDI Attiny441/Programing/CDC/usbdrv/asmcommon.inc b/FabFTDI Attiny441/Programing/CDC/usbdrv/asmcommon.inc new file mode 100755 index 0000000000000000000000000000000000000000..07d692be3b9774331258decd71a66fd2fd174771 --- /dev/null +++ b/FabFTDI Attiny441/Programing/CDC/usbdrv/asmcommon.inc @@ -0,0 +1,188 @@ +/* Name: asmcommon.inc + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2007-11-05 + * Tabsize: 4 + * Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * Revision: $Id$ + */ + +/* Do not link this file! Link usbdrvasm.S instead, which includes the + * appropriate implementation! + */ + +/* +General Description: +This file contains assembler code which is shared among the USB driver +implementations for different CPU cocks. Since the code must be inserted +in the middle of the module, it's split out into this file and #included. + +Jump destinations called from outside: + sofError: Called when no start sequence was found. + se0: Called when a package has been successfully received. + overflow: Called when receive buffer overflows. + doReturn: Called after sending data. + +Outside jump destinations used by this module: + waitForJ: Called to receive an already arriving packet. + sendAckAndReti: + sendNakAndReti: + sendCntAndReti: + usbSendAndReti: + +The following macros must