summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--atmel-samd/Makefile4
-rw-r--r--atmel-samd/asf/sam0/drivers/tc/docimg/overview.svg434
-rw-r--r--atmel-samd/asf/sam0/drivers/tc/docimg/pwm_match_ex.svg431
-rw-r--r--atmel-samd/asf/sam0/drivers/tc/docimg/pwm_normal_ex.svg386
-rw-r--r--atmel-samd/asf/sam0/drivers/tc/tc.h1790
-rw-r--r--atmel-samd/asf/sam0/drivers/tc/tc_interrupt.c199
-rw-r--r--atmel-samd/asf/sam0/drivers/tc/tc_interrupt.h179
-rw-r--r--atmel-samd/asf/sam0/drivers/tc/tc_sam_d_r/tc.c685
-rw-r--r--atmel-samd/asf/sam0/drivers/tcc/docimg/overview.svg2278
-rw-r--r--atmel-samd/asf/sam0/drivers/tcc/docimg/pwm_match_ex.svg1464
-rw-r--r--atmel-samd/asf/sam0/drivers/tcc/docimg/pwm_single_ex.svg1387
-rw-r--r--atmel-samd/asf/sam0/drivers/tcc/tcc.c1604
-rw-r--r--atmel-samd/asf/sam0/drivers/tcc/tcc.h2494
-rw-r--r--atmel-samd/asf/sam0/drivers/tcc/tcc_callback.c245
-rw-r--r--atmel-samd/asf/sam0/drivers/tcc/tcc_callback.h93
-rw-r--r--atmel-samd/boards/arduino_zero/pins.c69
-rw-r--r--atmel-samd/boards/feather_m0_ble/pins.c70
-rw-r--r--atmel-samd/modmachine.c2
-rw-r--r--atmel-samd/modmachine_pin.h43
-rw-r--r--atmel-samd/modmachine_pwm.c192
-rw-r--r--atmel-samd/modmachine_pwm.h27
21 files changed, 14036 insertions, 40 deletions
diff --git a/atmel-samd/Makefile b/atmel-samd/Makefile
index 6ce1d0d1b..9e02d7f73 100644
--- a/atmel-samd/Makefile
+++ b/atmel-samd/Makefile
@@ -58,6 +58,7 @@ INC += $(addprefix -Iasf/sam0/,\
drivers/system/power/power_sam_d_r \
drivers/system/reset/reset_sam_d_r \
drivers/sercom/ \
+ drivers/tc/ \
drivers/usb/ \
utils \
utils/cmsis/samd21/include \
@@ -107,6 +108,8 @@ SRC_ASF = $(addprefix asf/sam0/,\
drivers/system/interrupt/system_interrupt.c \
drivers/system/pinmux/pinmux.c \
drivers/system/system.c \
+ drivers/tc/tc_sam_d_r/tc.c \
+ drivers/tcc/tcc.c \
drivers/usb/stack_interface/usb_device_udd.c \
drivers/usb/stack_interface/usb_dual.c \
drivers/usb/usb_sam_d_r/usb.c \
@@ -118,6 +121,7 @@ SRC_C = \
modmachine_adc.c \
modmachine_dac.c \
modmachine_pin.c \
+ modmachine_pwm.c \
modutime.c \
mphalport.c \
pin_named_pins.c \
diff --git a/atmel-samd/asf/sam0/drivers/tc/docimg/overview.svg b/atmel-samd/asf/sam0/drivers/tc/docimg/overview.svg
new file mode 100644
index 000000000..895ba938c
--- /dev/null
+++ b/atmel-samd/asf/sam0/drivers/tc/docimg/overview.svg
@@ -0,0 +1,434 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<svg version="1.2" baseProfile="tiny" width="180mm" height="210mm" viewBox="0 0 18000 21000" preserveAspectRatio="xMidYMid" fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
+ <defs>
+ <font id="EmbeddedFont_1" horiz-adv-x="2048">
+ <font-face font-family="Arial" units-per-em="2048" font-weight="normal" font-style="normal" ascent="1852" descent="450"/>
+ <missing-glyph horiz-adv-x="2048" d="M 0,0 L 2047,0 2047,2047 0,2047 0,0 Z"/>
+ <glyph unicode="x" horiz-adv-x="954" d="M 15,0 L 403,552 44,1062 269,1062 432,813 C 463,766 487,726 506,694 535,738 562,777 587,811 L 766,1062 981,1062 614,562 1009,0 788,0 570,330 512,419 233,0 15,0 Z"/>
+ <glyph unicode="v" horiz-adv-x="954" d="M 430,0 L 26,1062 216,1062 444,426 C 469,357 491,286 512,212 528,268 550,335 579,414 L 815,1062 1000,1062 598,0 430,0 Z"/>
+ <glyph unicode="u" horiz-adv-x="848" d="M 831,0 L 831,156 C 748,36 636,-24 494,-24 431,-24 373,-12 319,12 264,36 224,66 198,103 171,139 153,183 142,236 135,271 131,327 131,404 L 131,1062 311,1062 311,473 C 311,379 315,316 322,283 333,236 357,199 394,172 431,145 476,131 530,131 584,131 635,145 682,173 729,200 763,238 783,286 802,333 812,402 812,493 L 812,1062 992,1062 992,0 831,0 Z"/>
+ <glyph unicode="t" horiz-adv-x="504" d="M 528,161 L 554,2 C 503,-9 458,-14 418,-14 353,-14 302,-4 266,17 230,38 205,65 190,99 175,132 168,203 168,311 L 168,922 36,922 36,1062 168,1062 168,1325 347,1433 347,1062 528,1062 528,922 347,922 347,301 C 347,250 350,217 357,202 363,187 373,176 388,167 402,158 422,154 449,154 469,154 495,156 528,161 Z"/>
+ <glyph unicode="s" horiz-adv-x="874" d="M 63,317 L 241,345 C 251,274 279,219 325,181 370,143 434,124 516,124 599,124 660,141 700,175 740,208 760,248 760,293 760,334 742,366 707,389 682,405 621,425 523,450 391,483 300,512 249,537 198,561 159,595 133,638 106,681 93,728 93,780 93,827 104,871 126,912 147,952 177,985 214,1012 242,1033 280,1050 329,1065 377,1079 429,1086 484,1086 567,1086 641,1074 704,1050 767,1026 813,994 843,953 873,912 894,857 905,788 L 729,764 C 721,819 698,861 660,892 621,923 567,938 497,938 414,938 355,924 320,897 285,870 267,838 267,801 267,778 274,757 289,738 304,719 327,703 358,690 376,683 429,668 517,644 644,610 733,582 784,561 834,539 873,507 902,466 931,425 945,373 945,312 945,252 928,196 893,143 858,90 807,49 741,20 675,-9 600,-24 517,-24 379,-24 274,5 202,62 129,119 83,204 63,317 Z"/>
+ <glyph unicode="r" horiz-adv-x="557" d="M 133,0 L 133,1062 295,1062 295,901 C 336,976 375,1026 410,1050 445,1074 483,1086 525,1086 586,1086 647,1067 710,1028 L 648,861 C 604,887 560,900 516,900 477,900 441,888 410,865 379,841 356,808 343,766 323,702 313,632 313,556 L 313,0 133,0 Z"/>
+ <glyph unicode="p" horiz-adv-x="901" d="M 135,-407 L 135,1062 299,1062 299,924 C 338,978 381,1019 430,1046 479,1073 538,1086 607,1086 698,1086 778,1063 847,1016 916,969 969,904 1004,819 1039,734 1057,640 1057,539 1057,430 1038,333 999,246 960,159 903,92 829,46 754,-1 676,-24 594,-24 534,-24 480,-11 433,14 385,39 346,71 315,110 L 315,-407 135,-407 Z M 298,525 C 298,388 326,287 381,222 436,157 503,124 582,124 662,124 731,158 788,226 845,293 873,398 873,540 873,675 845,777 790,844 734,911 667,945 590,945 513,945 446,909 387,838 328,766 298,662 298,525 Z"/>
+ <glyph unicode="o" horiz-adv-x="980" d="M 68,531 C 68,728 123,873 232,968 323,1047 435,1086 566,1086 712,1086 831,1038 924,943 1017,847 1063,715 1063,546 1063,409 1043,302 1002,224 961,145 901,84 823,41 744,-2 659,-24 566,-24 417,-24 297,24 206,119 114,214 68,352 68,531 Z M 253,531 C 253,395 283,293 342,226 401,158 476,124 566,124 655,124 730,158 789,226 848,294 878,398 878,537 878,668 848,768 789,836 729,903 655,937 566,937 476,937 401,903 342,836 283,769 253,667 253,531 Z"/>
+ <glyph unicode="n" horiz-adv-x="848" d="M 135,0 L 135,1062 297,1062 297,911 C 375,1028 488,1086 635,1086 699,1086 758,1075 812,1052 865,1029 905,998 932,961 959,924 977,879 988,828 995,795 998,736 998,653 L 998,0 818,0 818,646 C 818,719 811,774 797,811 783,847 758,876 723,898 687,919 645,930 597,930 520,930 454,906 399,857 343,808 315,716 315,580 L 315,0 135,0 Z"/>
+ <glyph unicode="m" horiz-adv-x="1457" d="M 135,0 L 135,1062 296,1062 296,913 C 329,965 374,1007 429,1039 484,1070 547,1086 618,1086 697,1086 761,1070 812,1037 862,1004 897,959 918,900 1002,1024 1111,1086 1246,1086 1351,1086 1432,1057 1489,999 1546,940 1574,850 1574,729 L 1574,0 1395,0 1395,669 C 1395,741 1389,793 1378,825 1366,856 1345,882 1314,901 1283,920 1247,930 1206,930 1131,930 1069,905 1020,856 971,806 946,726 946,617 L 946,0 766,0 766,690 C 766,770 751,830 722,870 693,910 645,930 578,930 527,930 481,917 438,890 395,863 363,824 344,773 325,722 315,648 315,551 L 315,0 135,0 Z"/>
+ <glyph unicode="l" horiz-adv-x="186" d="M 131,0 L 131,1466 311,1466 311,0 131,0 Z"/>
+ <glyph unicode="i" horiz-adv-x="160" d="M 136,1259 L 136,1466 316,1466 316,1259 136,1259 Z M 136,0 L 136,1062 316,1062 316,0 136,0 Z"/>
+ <glyph unicode="h" horiz-adv-x="848" d="M 135,0 L 135,1466 315,1466 315,940 C 399,1037 505,1086 633,1086 712,1086 780,1071 838,1040 896,1009 938,966 963,911 988,856 1000,777 1000,673 L 1000,0 820,0 820,673 C 820,763 801,829 762,870 723,911 667,931 596,931 543,931 493,917 446,890 399,862 365,824 345,777 325,730 315,664 315,581 L 315,0 135,0 Z"/>
+ <glyph unicode="g" horiz-adv-x="927" d="M 102,-88 L 277,-114 C 284,-168 305,-207 338,-232 383,-265 444,-282 521,-282 604,-282 669,-265 714,-232 759,-199 790,-152 806,-92 815,-55 820,22 819,139 740,46 642,0 525,0 379,0 266,53 186,158 106,263 66,390 66,537 66,638 84,732 121,818 158,903 211,969 281,1016 350,1063 432,1086 526,1086 651,1086 755,1035 836,934 L 836,1062 1002,1062 1002,144 C 1002,-21 985,-138 952,-207 918,-276 865,-331 792,-371 719,-411 629,-431 522,-431 395,-431 293,-402 215,-345 137,-288 99,-203 102,-88 Z M 251,550 C 251,411 279,309 334,245 389,181 459,149 542,149 625,149 694,181 750,245 806,308 834,408 834,544 834,674 805,772 748,838 690,904 620,937 539,937 459,937 391,905 335,840 279,775 251,678 251,550 Z"/>
+ <glyph unicode="f" horiz-adv-x="610" d="M 178,0 L 178,922 19,922 19,1062 178,1062 178,1175 C 178,1246 184,1299 197,1334 214,1381 245,1419 289,1448 332,1477 393,1491 472,1491 523,1491 579,1485 640,1473 L 613,1316 C 576,1323 540,1326 507,1326 452,1326 414,1314 391,1291 368,1268 357,1224 357,1160 L 357,1062 564,1062 564,922 357,922 357,0 178,0 Z"/>
+ <glyph unicode="e" horiz-adv-x="980" d="M 862,342 L 1048,319 C 1019,210 964,126 885,66 806,6 704,-24 581,-24 426,-24 303,24 212,120 121,215 75,349 75,522 75,701 121,839 213,938 305,1037 424,1086 571,1086 713,1086 829,1038 919,941 1009,844 1054,708 1054,533 1054,522 1054,506 1053,485 L 261,485 C 268,368 301,279 360,217 419,155 493,124 582,124 648,124 704,141 751,176 798,211 835,266 862,342 Z M 271,633 L 864,633 C 856,722 833,789 796,834 739,903 664,938 573,938 490,938 421,910 365,855 308,800 277,726 271,633 Z"/>
+ <glyph unicode="c" horiz-adv-x="927" d="M 828,389 L 1005,366 C 986,244 936,149 857,80 777,11 679,-24 563,-24 418,-24 301,24 213,119 124,214 80,350 80,527 80,642 99,742 137,828 175,914 233,979 311,1022 388,1065 473,1086 564,1086 679,1086 774,1057 847,999 920,940 967,857 988,750 L 813,723 C 796,794 767,848 725,884 682,920 631,938 571,938 480,938 407,906 350,841 293,776 265,673 265,532 265,389 292,286 347,221 402,156 473,124 561,124 632,124 691,146 738,189 785,232 815,299 828,389 Z"/>
+ <glyph unicode="a" horiz-adv-x="980" d="M 828,131 C 761,74 697,34 636,11 574,-12 508,-24 437,-24 320,-24 231,5 168,62 105,119 74,191 74,280 74,332 86,380 110,423 133,466 164,500 203,526 241,552 284,572 332,585 367,594 421,603 492,612 637,629 744,650 813,674 814,699 814,714 814,721 814,794 797,846 763,876 717,917 649,937 558,937 473,937 411,922 371,893 330,863 300,810 281,735 L 105,759 C 121,834 147,895 184,942 221,988 274,1024 343,1049 412,1074 493,1086 584,1086 675,1086 748,1075 805,1054 862,1033 903,1006 930,974 957,941 975,900 986,851 992,820 995,765 995,685 L 995,445 C 995,278 999,172 1007,128 1014,83 1029,41 1052,0 L 864,0 C 845,37 833,81 828,131 Z M 813,533 C 748,506 650,484 519,465 445,454 393,442 362,429 331,416 308,396 291,371 274,345 266,316 266,285 266,237 284,197 321,165 357,133 410,117 480,117 549,117 611,132 665,163 719,193 759,234 784,287 803,328 813,388 813,467 L 813,533 Z"/>
+ <glyph unicode="_" horiz-adv-x="1192" d="M -31,-407 L -31,-277 1162,-277 1162,-407 -31,-407 Z"/>
+ <glyph unicode="W" horiz-adv-x="1986" d="M 414,0 L 25,1466 224,1466 447,505 C 471,404 492,304 509,205 546,362 568,452 575,476 L 854,1466 1088,1466 1298,724 C 1351,540 1389,367 1412,205 1431,298 1455,404 1485,524 L 1715,1466 1910,1466 1508,0 1321,0 1012,1117 C 986,1210 971,1268 966,1289 951,1222 936,1164 923,1117 L 612,0 414,0 Z"/>
+ <glyph unicode="T" horiz-adv-x="1166" d="M 531,0 L 531,1293 48,1293 48,1466 1210,1466 1210,1293 725,1293 725,0 531,0 Z"/>
+ <glyph unicode="P" horiz-adv-x="1113" d="M 158,0 L 158,1466 711,1466 C 808,1466 883,1461 934,1452 1006,1440 1066,1417 1115,1384 1164,1350 1203,1303 1233,1242 1262,1181 1277,1115 1277,1042 1277,917 1237,812 1158,726 1079,639 935,596 728,596 L 352,596 352,0 158,0 Z M 352,769 L 731,769 C 856,769 945,792 998,839 1051,886 1077,951 1077,1036 1077,1097 1062,1150 1031,1194 1000,1237 959,1266 908,1280 875,1289 815,1293 727,1293 L 352,1293 352,769 Z"/>
+ <glyph unicode="O" horiz-adv-x="1404" d="M 99,714 C 99,957 164,1148 295,1286 426,1423 594,1492 801,1492 936,1492 1058,1460 1167,1395 1276,1330 1359,1240 1416,1125 1473,1009 1501,878 1501,731 1501,582 1471,449 1411,332 1351,215 1266,126 1156,66 1046,5 927,-25 800,-25 662,-25 539,8 430,75 321,142 239,233 183,348 127,463 99,585 99,714 Z M 299,711 C 299,534 347,395 442,294 537,192 656,141 799,141 945,141 1065,192 1160,295 1254,398 1301,543 1301,732 1301,851 1281,956 1241,1045 1200,1134 1141,1203 1064,1252 986,1301 899,1325 802,1325 665,1325 547,1278 448,1184 349,1089 299,932 299,711 Z"/>
+ <glyph unicode="L" horiz-adv-x="927" d="M 150,0 L 150,1466 344,1466 344,173 1066,173 1066,0 150,0 Z"/>
+ <glyph unicode="K" horiz-adv-x="1192" d="M 150,0 L 150,1466 344,1466 344,739 1072,1466 1335,1466 720,872 1362,0 1106,0 584,742 344,508 344,0 150,0 Z"/>
+ <glyph unicode="I" horiz-adv-x="186" d="M 191,0 L 191,1466 385,1466 385,0 191,0 Z"/>
+ <glyph unicode="G" horiz-adv-x="1350" d="M 844,575 L 844,747 1465,748 1465,204 C 1370,128 1271,71 1170,33 1069,-6 965,-25 858,-25 714,-25 583,6 466,68 348,129 259,218 199,335 139,452 109,582 109,726 109,869 139,1002 199,1126 258,1249 344,1341 456,1401 568,1461 697,1491 843,1491 949,1491 1045,1474 1131,1440 1216,1405 1283,1357 1332,1296 1381,1235 1418,1155 1443,1056 L 1268,1008 C 1246,1083 1219,1141 1186,1184 1153,1227 1107,1261 1046,1287 985,1312 918,1325 844,1325 755,1325 679,1312 614,1285 549,1258 497,1222 458,1178 418,1134 387,1086 365,1033 328,942 309,844 309,738 309,607 332,498 377,410 422,322 487,257 573,214 659,171 750,150 847,150 931,150 1013,166 1093,199 1173,231 1234,265 1275,302 L 1275,575 844,575 Z"/>
+ <glyph unicode="E" horiz-adv-x="1059" d="M 162,0 L 162,1466 1222,1466 1222,1293 356,1293 356,844 1167,844 1167,672 356,672 356,173 1256,173 1256,0 162,0 Z"/>
+ <glyph unicode="C" horiz-adv-x="1298" d="M 1204,514 L 1398,465 C 1357,306 1284,184 1179,101 1073,17 944,-25 791,-25 633,-25 505,7 406,72 307,136 231,229 180,351 128,473 102,604 102,744 102,897 131,1030 190,1144 248,1257 331,1344 439,1403 546,1462 665,1491 794,1491 941,1491 1064,1454 1164,1379 1264,1304 1334,1199 1373,1064 L 1182,1019 C 1148,1126 1099,1203 1034,1252 969,1301 888,1325 790,1325 677,1325 583,1298 508,1244 432,1190 379,1118 348,1027 317,936 302,842 302,745 302,620 320,512 357,419 393,326 449,256 526,210 603,164 686,141 775,141 884,141 976,172 1051,235 1126,298 1177,391 1204,514 Z"/>
+ <glyph unicode="B" horiz-adv-x="1086" d="M 150,0 L 150,1466 700,1466 C 812,1466 902,1451 970,1422 1037,1392 1090,1346 1129,1285 1167,1223 1186,1158 1186,1091 1186,1028 1169,969 1135,914 1101,859 1050,814 981,780 1070,754 1138,710 1186,647 1233,584 1257,510 1257,425 1257,356 1243,293 1214,234 1185,175 1149,129 1106,97 1063,65 1010,41 946,25 881,8 802,0 709,0 L 150,0 Z M 344,850 L 661,850 C 747,850 809,856 846,867 895,882 933,906 958,940 983,974 995,1017 995,1068 995,1117 983,1160 960,1197 937,1234 903,1259 860,1273 817,1286 742,1293 637,1293 L 344,1293 344,850 Z M 344,173 L 709,173 C 772,173 816,175 841,180 886,188 923,201 953,220 983,239 1008,266 1027,302 1046,337 1056,378 1056,425 1056,480 1042,527 1014,568 986,608 947,636 898,653 848,669 776,677 683,677 L 344,677 344,173 Z"/>
+ <glyph unicode="=" horiz-adv-x="953" d="M 1082,862 L 114,862 114,1030 1082,1030 1082,862 Z M 1082,417 L 114,417 114,585 1082,585 1082,417 Z"/>
+ <glyph unicode="1" horiz-adv-x="530" d="M 763,0 L 583,0 583,1147 C 540,1106 483,1064 413,1023 342,982 279,951 223,930 L 223,1104 C 324,1151 412,1209 487,1276 562,1343 616,1409 647,1472 L 763,1472 763,0 Z"/>
+ <glyph unicode="0" horiz-adv-x="954" d="M 85,723 C 85,896 103,1036 139,1142 174,1247 227,1329 298,1386 368,1443 456,1472 563,1472 642,1472 711,1456 770,1425 829,1393 878,1347 917,1288 956,1228 986,1155 1008,1070 1030,984 1041,868 1041,723 1041,551 1023,412 988,307 953,201 900,119 830,62 759,4 670,-25 563,-25 422,-25 311,26 230,127 133,249 85,448 85,723 Z M 270,723 C 270,482 298,322 355,243 411,163 480,123 563,123 646,123 715,163 772,243 828,323 856,483 856,723 856,964 828,1125 772,1204 715,1283 645,1323 561,1323 478,1323 412,1288 363,1218 301,1129 270,964 270,723 Z"/>
+ <glyph unicode="/" horiz-adv-x="557" d="M 0,-25 L 425,1491 569,1491 145,-25 0,-25 Z"/>
+ <glyph unicode="." horiz-adv-x="212" d="M 186,0 L 186,205 391,205 391,0 186,0 Z"/>
+ <glyph unicode=" " horiz-adv-x="556"/>
+ </font>
+ </defs>
+ <g visibility="visible" id="MasterSlide_1_Default">
+ <desc>Master slide
+ </desc>
+ <rect fill="none" stroke="none" x="0" y="0" width="18000" height="21000"/>
+ </g>
+ <g visibility="visible" id="Slide_1_page1">
+ <g>
+ <path fill="rgb(255,255,255)" stroke="rgb(0,0,0)" id="Drawing_1_0" stroke-width="50" stroke-linejoin="round" d="M 7506,8480 L 900,8480 900,2000 14111,2000 14111,8480 7506,8480 Z"/>
+ </g>
+ <g id="Drawing_2">
+ <path fill="rgb(255,255,255)" stroke="rgb(0,0,0)" stroke-width="50" stroke-linejoin="round" d="M 4966,7508 L 2134,7508 2134,5483 7797,5483 7797,7508 4966,7508 Z"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="423" font-style="normal" font-weight="400">
+ <text x="4210" y="6640">C</text>
+ <text x="4515" y="6640">o</text>
+ <text x="4752" y="6640">u</text>
+ <text x="4989" y="6640">n</text>
+ <text x="5226" y="6640">t</text>
+ <text x="5345" y="6640">e</text>
+ <text x="5582" y="6640">r</text>
+ </g>
+ </g>
+ <g id="Drawing_3">
+ <path fill="rgb(255,255,255)" stroke="rgb(0,0,0)" stroke-width="50" stroke-linejoin="round" d="M 4966,4430 L 2134,4430 2134,3701 7797,3701 7797,4430 4966,4430 Z"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="423" font-style="normal" font-weight="400">
+ <text x="4070" y="4210">P</text>
+ <text x="4354" y="4210">r</text>
+ <text x="4493" y="4210">e</text>
+ <text x="4730" y="4210">s</text>
+ <text x="4942" y="4210">c</text>
+ <text x="5154" y="4210">a</text>
+ <text x="5391" y="4210">l</text>
+ <text x="5484" y="4210">e</text>
+ <text x="5721" y="4210">r</text>
+ </g>
+ </g>
+ <g id="Drawing_4">
+ <rect fill="none" stroke="none" x="1924" y="2040" width="6083" height="1261"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="423" font-style="normal" font-weight="400">
+ <text x="2174" y="2546">B</text>
+ <text x="2458" y="2546">a</text>
+ <text x="2695" y="2546">s</text>
+ <text x="2906" y="2546">e</text>
+ <text x="3143" y="2546"> </text>
+ <text x="3262" y="2546">C</text>
+ <text x="3567" y="2546">o</text>
+ <text x="3804" y="2546">u</text>
+ <text x="4041" y="2546">n</text>
+ <text x="4278" y="2546">t</text>
+ <text x="4397" y="2546">e</text>
+ <text x="4634" y="2546">r</text>
+ </g>
+ </g>
+ <g id="Drawing_5">
+ <path fill="rgb(255,255,255)" stroke="rgb(0,0,0)" stroke-width="50" stroke-linejoin="round" d="M 10963,5605 L 9180,5605 9180,3580 12746,3580 12746,5605 10963,5605 Z"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="423" font-style="normal" font-weight="400">
+ <text x="9714" y="4737">C</text>
+ <text x="10019" y="4737">o</text>
+ <text x="10256" y="4737">n</text>
+ <text x="10493" y="4737">t</text>
+ <text x="10611" y="4737">r</text>
+ <text x="10751" y="4737">o</text>
+ <text x="10988" y="4737">l</text>
+ <text x="11081" y="4737"> </text>
+ <text x="11200" y="4737">L</text>
+ <text x="11437" y="4737">o</text>
+ <text x="11674" y="4737">g</text>
+ <text x="11907" y="4737">i</text>
+ <text x="12000" y="4737">c</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 8247,6495 L 10963,6495 10963,6055"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_6_0" d="M 7797,6495 L 8360,6683 8360,6308 7797,6495 Z"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_6_1" d="M 10963,5605 L 10776,6168 11151,6168 10963,5605 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 4965,4430 L 4965,5033"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_7_0" d="M 4965,5483 L 5153,4921 4778,4921 4965,5483 Z"/>
+ </g>
+ <g>
+ <path fill="rgb(255,255,255)" stroke="rgb(0,0,0)" id="Drawing_8_0" stroke-width="50" stroke-linejoin="round" d="M 8024,17465 L 1500,17465 1500,9605 14548,9605 14548,17465 8024,17465 Z"/>
+ </g>
+ <g id="Drawing_9">
+ <rect fill="none" stroke="none" x="6100" y="9500" width="4455" height="726"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="423" font-style="normal" font-weight="400">
+ <text x="6350" y="10006">C</text>
+ <text x="6655" y="10006">o</text>
+ <text x="6892" y="10006">m</text>
+ <text x="7247" y="10006">p</text>
+ <text x="7485" y="10006">a</text>
+ <text x="7722" y="10006">r</text>
+ <text x="7861" y="10006">e</text>
+ <text x="8098" y="10006"> </text>
+ <text x="8217" y="10006">C</text>
+ <text x="8522" y="10006">a</text>
+ <text x="8759" y="10006">p</text>
+ <text x="8996" y="10006">t</text>
+ <text x="9114" y="10006">u</text>
+ <text x="9351" y="10006">r</text>
+ <text x="9491" y="10006">e</text>
+ <text x="9728" y="10006"> </text>
+ <text x="9847" y="10006">n</text>
+ </g>
+ </g>
+ <g>
+ <path fill="rgb(255,255,255)" stroke="rgb(0,0,0)" id="Drawing_10_0" stroke-width="50" stroke-linejoin="round" d="M 7825,18060 L 1300,18060 1300,10200 14349,10200 14349,18060 7825,18060 Z"/>
+ </g>
+ <g id="Drawing_11">
+ <rect fill="none" stroke="none" x="5805" y="10125" width="4453" height="727"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="423" font-style="normal" font-weight="400">
+ <text x="6055" y="10631">C</text>
+ <text x="6360" y="10631">o</text>
+ <text x="6597" y="10631">m</text>
+ <text x="6952" y="10631">p</text>
+ <text x="7190" y="10631">a</text>
+ <text x="7427" y="10631">r</text>
+ <text x="7566" y="10631">e</text>
+ <text x="7803" y="10631"> </text>
+ <text x="7922" y="10631">C</text>
+ <text x="8227" y="10631">a</text>
+ <text x="8464" y="10631">p</text>
+ <text x="8701" y="10631">t</text>
+ <text x="8819" y="10631">u</text>
+ <text x="9056" y="10631">r</text>
+ <text x="9196" y="10631">e</text>
+ <text x="9433" y="10631"> </text>
+ <text x="9552" y="10631">.</text>
+ <text x="9670" y="10631">.</text>
+ <text x="9789" y="10631">.</text>
+ </g>
+ </g>
+ <g>
+ <path fill="rgb(255,255,255)" stroke="rgb(0,0,0)" id="Drawing_12_0" stroke-width="50" stroke-linejoin="round" d="M 7624,18700 L 1100,18700 1100,10841 14148,10841 14148,18700 7624,18700 Z"/>
+ </g>
+ <g id="Drawing_13">
+ <rect fill="none" stroke="none" x="5319" y="10826" width="4453" height="726"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="423" font-style="normal" font-weight="400">
+ <text x="5569" y="11332">C</text>
+ <text x="5874" y="11332">o</text>
+ <text x="6111" y="11332">m</text>
+ <text x="6466" y="11332">p</text>
+ <text x="6704" y="11332">a</text>
+ <text x="6941" y="11332">r</text>
+ <text x="7080" y="11332">e</text>
+ <text x="7317" y="11332"> </text>
+ <text x="7436" y="11332">C</text>
+ <text x="7741" y="11332">a</text>
+ <text x="7978" y="11332">p</text>
+ <text x="8215" y="11332">t</text>
+ <text x="8333" y="11332">u</text>
+ <text x="8570" y="11332">r</text>
+ <text x="8710" y="11332">e</text>
+ <text x="8947" y="11332"> </text>
+ <text x="9066" y="11332">1</text>
+ </g>
+ </g>
+ <g>
+ <path fill="rgb(255,255,255)" stroke="rgb(0,0,0)" id="Drawing_14_0" stroke-width="50" stroke-linejoin="round" d="M 7433,19323 L 910,19323 910,11462 13956,11462 13956,19323 7433,19323 Z"/>
+ </g>
+ <g id="Drawing_15">
+ <path fill="rgb(255,255,255)" stroke="rgb(0,0,0)" stroke-width="50" stroke-linejoin="round" d="M 10963,14376 L 8840,14376 8840,12350 13086,12350 13086,14376 10963,14376 Z"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="423" font-style="normal" font-weight="400">
+ <text x="9714" y="13507">C</text>
+ <text x="10019" y="13507">o</text>
+ <text x="10256" y="13507">n</text>
+ <text x="10493" y="13507">t</text>
+ <text x="10611" y="13507">r</text>
+ <text x="10751" y="13507">o</text>
+ <text x="10988" y="13507">l</text>
+ <text x="11081" y="13507"> </text>
+ <text x="11200" y="13507">L</text>
+ <text x="11437" y="13507">o</text>
+ <text x="11674" y="13507">g</text>
+ <text x="11907" y="13507">i</text>
+ <text x="12000" y="13507">c</text>
+ </g>
+ </g>
+ <g id="Drawing_16">
+ <rect fill="none" stroke="none" x="4946" y="11400" width="4455" height="726"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="423" font-style="normal" font-weight="400">
+ <text x="5196" y="11906">C</text>
+ <text x="5501" y="11906">o</text>
+ <text x="5738" y="11906">m</text>
+ <text x="6093" y="11906">p</text>
+ <text x="6331" y="11906">a</text>
+ <text x="6568" y="11906">r</text>
+ <text x="6707" y="11906">e</text>
+ <text x="6944" y="11906"> </text>
+ <text x="7063" y="11906">C</text>
+ <text x="7368" y="11906">a</text>
+ <text x="7605" y="11906">p</text>
+ <text x="7842" y="11906">t</text>
+ <text x="7960" y="11906">u</text>
+ <text x="8197" y="11906">r</text>
+ <text x="8337" y="11906">e</text>
+ <text x="8574" y="11906"> </text>
+ <text x="8693" y="11906">0</text>
+ </g>
+ </g>
+ <g id="Drawing_17">
+ <path fill="rgb(255,255,255)" stroke="rgb(0,0,0)" stroke-width="50" stroke-linejoin="round" d="M 10963,17375 L 8840,17375 8840,15349 13086,15349 13086,17375 10963,17375 Z"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="423" font-style="normal" font-weight="400">
+ <text x="9935" y="16269">W</text>
+ <text x="10337" y="16269">a</text>
+ <text x="10574" y="16269">v</text>
+ <text x="10782" y="16269">e</text>
+ <text x="11019" y="16269">f</text>
+ <text x="11142" y="16269">o</text>
+ <text x="11379" y="16269">r</text>
+ <text x="11518" y="16269">m</text>
+ <text x="11874" y="16269"> </text>
+ <text fill="rgb(0,0,0)" stroke="none" x="9911" y="16743">G</text>
+ <text x="10241" y="16743">e</text>
+ <text x="10478" y="16743">n</text>
+ <text x="10715" y="16743">e</text>
+ <text x="10952" y="16743">r</text>
+ <text x="11092" y="16743">a</text>
+ <text x="11329" y="16743">t</text>
+ <text x="11448" y="16743">i</text>
+ <text x="11541" y="16743">o</text>
+ <text x="11778" y="16743">n</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 10963,14376 L 10963,14899"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_18_0" d="M 10963,15349 L 11151,14787 10776,14787 10963,15349 Z"/>
+ </g>
+ <g id="Drawing_19">
+ <path fill="rgb(255,255,255)" stroke="rgb(0,0,0)" stroke-width="50" stroke-linejoin="round" d="M 4966,15735 L 2894,15735 2894,15006 7037,15006 7037,15735 4966,15735 Z"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="423" font-style="normal" font-weight="400">
+ <text x="4542" y="15515">C</text>
+ <text x="4847" y="15515">C</text>
+ <text x="5152" y="15515">0</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 7037,15370 L 7939,15370 7939,16362 8390,16362"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_20_0" d="M 8840,16362 L 8278,16175 8278,16550 8840,16362 Z"/>
+ </g>
+ <g id="Drawing_21">
+ <path fill="rgb(255,255,255)" stroke="rgb(0,0,0)" stroke-width="50" stroke-linejoin="round" d="M 4966,18895 L 2894,18895 2894,18166 7037,18166 7037,18895 4966,18895 Z"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="635" font-style="normal" font-weight="400">
+ <text x="4779" y="18747">=</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 4965,15735 L 4965,17716"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_22_0" d="M 4965,18166 L 5153,17604 4778,17604 4965,18166 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 7037,18530 L 10963,18530 10963,17825"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_23_0" d="M 10963,17375 L 10776,17938 11151,17938 10963,17375 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 10950,18320 L 10958,19888"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_24_0" d="M 10960,20338 L 11145,19775 10770,19776 10960,20338 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 4965,7508 L 4965,14556"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_25_0" d="M 4965,15006 L 5153,14444 4778,14444 4965,15006 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 9180,4592 L 8489,4592 8489,4065 8247,4065"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_26_0" d="M 7797,4065 L 8360,4253 8360,3878 7797,4065 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 17000,2700 L 14812,2700"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_27_0" d="M 14200,2700 L 14965,2955 14965,2445 14200,2700 Z"/>
+ </g>
+ <g id="Drawing_28">
+ <rect fill="none" stroke="none" x="14800" y="1800" width="2501" height="851"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="423" font-style="normal" font-weight="400">
+ <text x="15050" y="2306">G</text>
+ <text x="15380" y="2306">C</text>
+ <text x="15685" y="2306">L</text>
+ <text x="15922" y="2306">K</text>
+ <text x="16206" y="2306">_</text>
+ <text x="16443" y="2306">T</text>
+ <text x="16705" y="2306">C</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 14200,2700 L 4965,2700 4965,3251"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_29_0" d="M 4965,3701 L 5153,3139 4778,3139 4965,3701 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 10963,2700 L 10963,3150"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_30_0" d="M 10963,3600 L 11151,3038 10776,3038 10963,3600 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 15600,2700 L 15600,13535 15160,13535"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_31_0" d="M 14548,13535 L 15313,13790 15313,13280 14548,13535 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 12100,17400 L 12100,19950"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_32_0" d="M 12100,20400 L 12288,19838 11913,19838 12100,20400 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_33_0" stroke-linejoin="round" d=""/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 4965,15006 L 4965,13800 1992,13800 1992,18530 2444,18530"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_34_0" d="M 2894,18530 L 2332,18343 2332,18718 2894,18530 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 11800,3600 L 11800,1150"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_35_0" d="M 11800,700 L 11613,1263 11988,1263 11800,700 Z"/>
+ </g>
+ <g id="Drawing_36">
+ <rect fill="none" stroke="none" x="7200" y="19700" width="3401" height="1200"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="423" font-style="normal" font-weight="400">
+ <text x="7450" y="20206">I</text>
+ <text x="7569" y="20206">n</text>
+ <text x="7806" y="20206">t</text>
+ <text x="7924" y="20206">e</text>
+ <text x="8161" y="20206">r</text>
+ <text x="8301" y="20206">r</text>
+ <text x="8441" y="20206">u</text>
+ <text x="8678" y="20206">p</text>
+ <text x="8915" y="20206">t</text>
+ <text x="9033" y="20206">/</text>
+ <text fill="rgb(0,0,0)" stroke="none" x="7450" y="20680">E</text>
+ <text x="7734" y="20680">v</text>
+ <text x="7941" y="20680">e</text>
+ <text x="8178" y="20680">n</text>
+ <text x="8415" y="20680">t</text>
+ <text x="8534" y="20680"> </text>
+ <text x="8652" y="20680">C</text>
+ <text x="8957" y="20680">h</text>
+ <text x="9194" y="20680">a</text>
+ <text x="9431" y="20680">n</text>
+ <text x="9668" y="20680">n</text>
+ <text x="9905" y="20680">e</text>
+ <text x="10142" y="20680">l</text>
+ </g>
+ </g>
+ <g id="Drawing_37">
+ <rect fill="none" stroke="none" x="12100" y="300" width="3501" height="1200"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="423" font-style="normal" font-weight="400">
+ <text x="12350" y="806">I</text>
+ <text x="12469" y="806">n</text>
+ <text x="12706" y="806">t</text>
+ <text x="12824" y="806">e</text>
+ <text x="13061" y="806">r</text>
+ <text x="13201" y="806">r</text>
+ <text x="13341" y="806">u</text>
+ <text x="13578" y="806">p</text>
+ <text x="13815" y="806">t</text>
+ <text x="13933" y="806">/</text>
+ <text fill="rgb(0,0,0)" stroke="none" x="12350" y="1280">E</text>
+ <text x="12634" y="1280">v</text>
+ <text x="12841" y="1280">e</text>
+ <text x="13078" y="1280">n</text>
+ <text x="13315" y="1280">t</text>
+ <text x="13434" y="1280"> </text>
+ <text x="13552" y="1280">C</text>
+ <text x="13857" y="1280">h</text>
+ <text x="14094" y="1280">a</text>
+ <text x="14331" y="1280">n</text>
+ <text x="14568" y="1280">n</text>
+ <text x="14805" y="1280">e</text>
+ <text x="15042" y="1280">l</text>
+ </g>
+ </g>
+ <g id="Drawing_38">
+ <rect fill="none" stroke="none" x="12300" y="19550" width="2401" height="1151"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="423" font-style="normal" font-weight="400">
+ <text x="12550" y="20056">W</text>
+ <text x="12969" y="20056">O</text>
+ <text x="13299" y="20056">x</text>
+ <text x="13507" y="20056"> </text>
+ <text x="13625" y="20056">O</text>
+ <text x="13955" y="20056">u</text>
+ <text x="14193" y="20056">t</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 11700,6500 L 11700,6068"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_39_0" d="M 11700,5600 L 11505,6185 11895,6185 11700,5600 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_40_0" stroke-width="50" stroke-linejoin="round" d="M 11700,7000 L 11700,6500"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 11700,7000 L 11700,9000 10963,9000 10963,11900"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_41_0" d="M 10963,12350 L 11151,11788 10776,11788 10963,12350 Z"/>
+ </g>
+ </g>
+</svg> \ No newline at end of file
diff --git a/atmel-samd/asf/sam0/drivers/tc/docimg/pwm_match_ex.svg b/atmel-samd/asf/sam0/drivers/tc/docimg/pwm_match_ex.svg
new file mode 100644
index 000000000..3eed8c70f
--- /dev/null
+++ b/atmel-samd/asf/sam0/drivers/tc/docimg/pwm_match_ex.svg
@@ -0,0 +1,431 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<svg version="1.2" baseProfile="tiny" width="160mm" height="90mm" viewBox="0 0 16000 9000" preserveAspectRatio="xMidYMid" fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
+ <defs>
+ <font id="EmbeddedFont_1" horiz-adv-x="2048">
+ <font-face font-family="Arial" units-per-em="2048" font-weight="normal" font-style="normal" ascent="1852" descent="450"/>
+ <missing-glyph horiz-adv-x="2048" d="M 0,0 L 2047,0 2047,2047 0,2047 0,0 Z"/>
+ <glyph unicode="x" horiz-adv-x="954" d="M 15,0 L 403,552 44,1062 269,1062 432,813 C 463,766 487,726 506,694 535,738 562,777 587,811 L 766,1062 981,1062 614,562 1009,0 788,0 570,330 512,419 233,0 15,0 Z"/>
+ <glyph unicode="w" horiz-adv-x="1430" d="M 331,0 L 6,1062 192,1062 361,449 424,221 C 427,232 445,305 479,440 L 648,1062 833,1062 992,446 1045,243 1106,448 1288,1062 1463,1062 1131,0 944,0 775,636 734,817 519,0 331,0 Z"/>
+ <glyph unicode="v" horiz-adv-x="954" d="M 430,0 L 26,1062 216,1062 444,426 C 469,357 491,286 512,212 528,268 550,335 579,414 L 815,1062 1000,1062 598,0 430,0 Z"/>
+ <glyph unicode="u" horiz-adv-x="848" d="M 831,0 L 831,156 C 748,36 636,-24 494,-24 431,-24 373,-12 319,12 264,36 224,66 198,103 171,139 153,183 142,236 135,271 131,327 131,404 L 131,1062 311,1062 311,473 C 311,379 315,316 322,283 333,236 357,199 394,172 431,145 476,131 530,131 584,131 635,145 682,173 729,200 763,238 783,286 802,333 812,402 812,493 L 812,1062 992,1062 992,0 831,0 Z"/>
+ <glyph unicode="t" horiz-adv-x="504" d="M 528,161 L 554,2 C 503,-9 458,-14 418,-14 353,-14 302,-4 266,17 230,38 205,65 190,99 175,132 168,203 168,311 L 168,922 36,922 36,1062 168,1062 168,1325 347,1433 347,1062 528,1062 528,922 347,922 347,301 C 347,250 350,217 357,202 363,187 373,176 388,167 402,158 422,154 449,154 469,154 495,156 528,161 Z"/>
+ <glyph unicode="s" horiz-adv-x="874" d="M 63,317 L 241,345 C 251,274 279,219 325,181 370,143 434,124 516,124 599,124 660,141 700,175 740,208 760,248 760,293 760,334 742,366 707,389 682,405 621,425 523,450 391,483 300,512 249,537 198,561 159,595 133,638 106,681 93,728 93,780 93,827 104,871 126,912 147,952 177,985 214,1012 242,1033 280,1050 329,1065 377,1079 429,1086 484,1086 567,1086 641,1074 704,1050 767,1026 813,994 843,953 873,912 894,857 905,788 L 729,764 C 721,819 698,861 660,892 621,923 567,938 497,938 414,938 355,924 320,897 285,870 267,838 267,801 267,778 274,757 289,738 304,719 327,703 358,690 376,683 429,668 517,644 644,610 733,582 784,561 834,539 873,507 902,466 931,425 945,373 945,312 945,252 928,196 893,143 858,90 807,49 741,20 675,-9 600,-24 517,-24 379,-24 274,5 202,62 129,119 83,204 63,317 Z"/>
+ <glyph unicode="r" horiz-adv-x="557" d="M 133,0 L 133,1062 295,1062 295,901 C 336,976 375,1026 410,1050 445,1074 483,1086 525,1086 586,1086 647,1067 710,1028 L 648,861 C 604,887 560,900 516,900 477,900 441,888 410,865 379,841 356,808 343,766 323,702 313,632 313,556 L 313,0 133,0 Z"/>
+ <glyph unicode="p" horiz-adv-x="901" d="M 135,-407 L 135,1062 299,1062 299,924 C 338,978 381,1019 430,1046 479,1073 538,1086 607,1086 698,1086 778,1063 847,1016 916,969 969,904 1004,819 1039,734 1057,640 1057,539 1057,430 1038,333 999,246 960,159 903,92 829,46 754,-1 676,-24 594,-24 534,-24 480,-11 433,14 385,39 346,71 315,110 L 315,-407 135,-407 Z M 298,525 C 298,388 326,287 381,222 436,157 503,124 582,124 662,124 731,158 788,226 845,293 873,398 873,540 873,675 845,777 790,844 734,911 667,945 590,945 513,945 446,909 387,838 328,766 298,662 298,525 Z"/>
+ <glyph unicode="o" horiz-adv-x="980" d="M 68,531 C 68,728 123,873 232,968 323,1047 435,1086 566,1086 712,1086 831,1038 924,943 1017,847 1063,715 1063,546 1063,409 1043,302 1002,224 961,145 901,84 823,41 744,-2 659,-24 566,-24 417,-24 297,24 206,119 114,214 68,352 68,531 Z M 253,531 C 253,395 283,293 342,226 401,158 476,124 566,124 655,124 730,158 789,226 848,294 878,398 878,537 878,668 848,768 789,836 729,903 655,937 566,937 476,937 401,903 342,836 283,769 253,667 253,531 Z"/>
+ <glyph unicode="n" horiz-adv-x="848" d="M 135,0 L 135,1062 297,1062 297,911 C 375,1028 488,1086 635,1086 699,1086 758,1075 812,1052 865,1029 905,998 932,961 959,924 977,879 988,828 995,795 998,736 998,653 L 998,0 818,0 818,646 C 818,719 811,774 797,811 783,847 758,876 723,898 687,919 645,930 597,930 520,930 454,906 399,857 343,808 315,716 315,580 L 315,0 135,0 Z"/>
+ <glyph unicode="m" horiz-adv-x="1457" d="M 135,0 L 135,1062 296,1062 296,913 C 329,965 374,1007 429,1039 484,1070 547,1086 618,1086 697,1086 761,1070 812,1037 862,1004 897,959 918,900 1002,1024 1111,1086 1246,1086 1351,1086 1432,1057 1489,999 1546,940 1574,850 1574,729 L 1574,0 1395,0 1395,669 C 1395,741 1389,793 1378,825 1366,856 1345,882 1314,901 1283,920 1247,930 1206,930 1131,930 1069,905 1020,856 971,806 946,726 946,617 L 946,0 766,0 766,690 C 766,770 751,830 722,870 693,910 645,930 578,930 527,930 481,917 438,890 395,863 363,824 344,773 325,722 315,648 315,551 L 315,0 135,0 Z"/>
+ <glyph unicode="l" horiz-adv-x="186" d="M 131,0 L 131,1466 311,1466 311,0 131,0 Z"/>
+ <glyph unicode="i" horiz-adv-x="160" d="M 136,1259 L 136,1466 316,1466 316,1259 136,1259 Z M 136,0 L 136,1062 316,1062 316,0 136,0 Z"/>
+ <glyph unicode="h" horiz-adv-x="848" d="M 135,0 L 135,1466 315,1466 315,940 C 399,1037 505,1086 633,1086 712,1086 780,1071 838,1040 896,1009 938,966 963,911 988,856 1000,777 1000,673 L 1000,0 820,0 820,673 C 820,763 801,829 762,870 723,911 667,931 596,931 543,931 493,917 446,890 399,862 365,824 345,777 325,730 315,664 315,581 L 315,0 135,0 Z"/>
+ <glyph unicode="g" horiz-adv-x="927" d="M 102,-88 L 277,-114 C 284,-168 305,-207 338,-232 383,-265 444,-282 521,-282 604,-282 669,-265 714,-232 759,-199 790,-152 806,-92 815,-55 820,22 819,139 740,46 642,0 525,0 379,0 266,53 186,158 106,263 66,390 66,537 66,638 84,732 121,818 158,903 211,969 281,1016 350,1063 432,1086 526,1086 651,1086 755,1035 836,934 L 836,1062 1002,1062 1002,144 C 1002,-21 985,-138 952,-207 918,-276 865,-331 792,-371 719,-411 629,-431 522,-431 395,-431 293,-402 215,-345 137,-288 99,-203 102,-88 Z M 251,550 C 251,411 279,309 334,245 389,181 459,149 542,149 625,149 694,181 750,245 806,308 834,408 834,544 834,674 805,772 748,838 690,904 620,937 539,937 459,937 391,905 335,840 279,775 251,678 251,550 Z"/>
+ <glyph unicode="e" horiz-adv-x="980" d="M 862,342 L 1048,319 C 1019,210 964,126 885,66 806,6 704,-24 581,-24 426,-24 303,24 212,120 121,215 75,349 75,522 75,701 121,839 213,938 305,1037 424,1086 571,1086 713,1086 829,1038 919,941 1009,844 1054,708 1054,533 1054,522 1054,506 1053,485 L 261,485 C 268,368 301,279 360,217 419,155 493,124 582,124 648,124 704,141 751,176 798,211 835,266 862,342 Z M 271,633 L 864,633 C 856,722 833,789 796,834 739,903 664,938 573,938 490,938 421,910 365,855 308,800 277,726 271,633 Z"/>
+ <glyph unicode="d" horiz-adv-x="927" d="M 824,0 L 824,134 C 757,29 658,-24 527,-24 442,-24 365,-1 294,46 223,93 168,158 129,242 90,325 70,421 70,530 70,636 88,732 123,819 158,905 211,971 282,1017 353,1063 432,1086 519,1086 583,1086 640,1073 690,1046 740,1019 781,983 812,940 L 812,1466 991,1466 991,0 824,0 Z M 255,530 C 255,394 284,292 341,225 398,158 466,124 544,124 623,124 690,156 745,221 800,285 827,383 827,515 827,660 799,767 743,835 687,903 618,937 536,937 456,937 389,904 336,839 282,774 255,671 255,530 Z"/>
+ <glyph unicode="c" horiz-adv-x="927" d="M 828,389 L 1005,366 C 986,244 936,149 857,80 777,11 679,-24 563,-24 418,-24 301,24 213,119 124,214 80,350 80,527 80,642 99,742 137,828 175,914 233,979 311,1022 388,1065 473,1086 564,1086 679,1086 774,1057 847,999 920,940 967,857 988,750 L 813,723 C 796,794 767,848 725,884 682,920 631,938 571,938 480,938 407,906 350,841 293,776 265,673 265,532 265,389 292,286 347,221 402,156 473,124 561,124 632,124 691,146 738,189 785,232 815,299 828,389 Z"/>
+ <glyph unicode="b" horiz-adv-x="901" d="M 301,0 L 134,0 134,1466 314,1466 314,943 C 390,1038 487,1086 605,1086 670,1086 732,1073 791,1047 849,1020 897,983 935,936 972,888 1002,830 1023,763 1044,696 1055,624 1055,547 1055,365 1010,224 920,125 830,26 722,-24 596,-24 471,-24 372,28 301,133 L 301,0 Z M 299,539 C 299,412 316,320 351,263 408,170 484,124 581,124 660,124 728,158 785,227 842,295 871,397 871,532 871,671 844,773 789,839 734,905 667,938 589,938 510,938 442,904 385,836 328,767 299,668 299,539 Z"/>
+ <glyph unicode="a" horiz-adv-x="980" d="M 828,131 C 761,74 697,34 636,11 574,-12 508,-24 437,-24 320,-24 231,5 168,62 105,119 74,191 74,280 74,332 86,380 110,423 133,466 164,500 203,526 241,552 284,572 332,585 367,594 421,603 492,612 637,629 744,650 813,674 814,699 814,714 814,721 814,794 797,846 763,876 717,917 649,937 558,937 473,937 411,922 371,893 330,863 300,810 281,735 L 105,759 C 121,834 147,895 184,942 221,988 274,1024 343,1049 412,1074 493,1086 584,1086 675,1086 748,1075 805,1054 862,1033 903,1006 930,974 957,941 975,900 986,851 992,820 995,765 995,685 L 995,445 C 995,278 999,172 1007,128 1014,83 1029,41 1052,0 L 864,0 C 845,37 833,81 828,131 Z M 813,533 C 748,506 650,484 519,465 445,454 393,442 362,429 331,416 308,396 291,371 274,345 266,316 266,285 266,237 284,197 321,165 357,133 410,117 480,117 549,117 611,132 665,163 719,193 759,234 784,287 803,328 813,388 813,467 L 813,533 Z"/>
+ <glyph unicode="_" horiz-adv-x="1192" d="M -31,-407 L -31,-277 1162,-277 1162,-407 -31,-407 Z"/>
+ <glyph unicode="W" horiz-adv-x="1986" d="M 414,0 L 25,1466 224,1466 447,505 C 471,404 492,304 509,205 546,362 568,452 575,476 L 854,1466 1088,1466 1298,724 C 1351,540 1389,367 1412,205 1431,298 1455,404 1485,524 L 1715,1466 1910,1466 1508,0 1321,0 1012,1117 C 986,1210 971,1268 966,1289 951,1222 936,1164 923,1117 L 612,0 414,0 Z"/>
+ <glyph unicode="T" horiz-adv-x="1166" d="M 531,0 L 531,1293 48,1293 48,1466 1210,1466 1210,1293 725,1293 725,0 531,0 Z"/>
+ <glyph unicode="R" horiz-adv-x="1271" d="M 161,0 L 161,1466 811,1466 C 942,1466 1041,1453 1109,1427 1177,1400 1231,1354 1272,1287 1313,1220 1333,1147 1333,1066 1333,962 1299,874 1232,803 1165,732 1061,686 920,667 971,642 1010,618 1037,594 1094,542 1147,477 1198,399 L 1453,0 1209,0 1015,305 C 958,393 912,460 875,507 838,554 806,586 777,605 748,624 718,637 688,644 666,649 630,651 580,651 L 355,651 355,0 161,0 Z M 355,819 L 772,819 C 861,819 930,828 980,847 1030,865 1068,894 1094,935 1120,975 1133,1019 1133,1066 1133,1135 1108,1192 1058,1237 1007,1282 928,1304 819,1304 L 355,1304 355,819 Z"/>
+ <glyph unicode="P" horiz-adv-x="1113" d="M 158,0 L 158,1466 711,1466 C 808,1466 883,1461 934,1452 1006,1440 1066,1417 1115,1384 1164,1350 1203,1303 1233,1242 1262,1181 1277,1115 1277,1042 1277,917 1237,812 1158,726 1079,639 935,596 728,596 L 352,596 352,0 158,0 Z M 352,769 L 731,769 C 856,769 945,792 998,839 1051,886 1077,951 1077,1036 1077,1097 1062,1150 1031,1194 1000,1237 959,1266 908,1280 875,1289 815,1293 727,1293 L 352,1293 352,769 Z"/>
+ <glyph unicode="O" horiz-adv-x="1404" d="M 99,714 C 99,957 164,1148 295,1286 426,1423 594,1492 801,1492 936,1492 1058,1460 1167,1395 1276,1330 1359,1240 1416,1125 1473,1009 1501,878 1501,731 1501,582 1471,449 1411,332 1351,215 1266,126 1156,66 1046,5 927,-25 800,-25 662,-25 539,8 430,75 321,142 239,233 183,348 127,463 99,585 99,714 Z M 299,711 C 299,534 347,395 442,294 537,192 656,141 799,141 945,141 1065,192 1160,295 1254,398 1301,543 1301,732 1301,851 1281,956 1241,1045 1200,1134 1141,1203 1064,1252 986,1301 899,1325 802,1325 665,1325 547,1278 448,1184 349,1089 299,932 299,711 Z"/>
+ <glyph unicode="M" horiz-adv-x="1377" d="M 152,0 L 152,1466 444,1466 791,428 C 823,331 846,259 861,211 878,264 904,343 939,446 L 1290,1466 1551,1466 1551,0 1364,0 1364,1227 938,0 763,0 339,1248 339,0 152,0 Z"/>
+ <glyph unicode="C" horiz-adv-x="1298" d="M 1204,514 L 1398,465 C 1357,306 1284,184 1179,101 1073,17 944,-25 791,-25 633,-25 505,7 406,72 307,136 231,229 180,351 128,473 102,604 102,744 102,897 131,1030 190,1144 248,1257 331,1344 439,1403 546,1462 665,1491 794,1491 941,1491 1064,1454 1164,1379 1264,1304 1334,1199 1373,1064 L 1182,1019 C 1148,1126 1099,1203 1034,1252 969,1301 888,1325 790,1325 677,1325 583,1298 508,1244 432,1190 379,1118 348,1027 317,936 302,842 302,745 302,620 320,512 357,419 393,326 449,256 526,210 603,164 686,141 775,141 884,141 976,172 1051,235 1126,298 1177,391 1204,514 Z"/>
+ <glyph unicode=")" horiz-adv-x="477" d="M 253,-431 L 124,-431 C 323,-111 423,209 423,530 423,655 409,780 380,903 357,1003 326,1099 285,1191 259,1251 205,1351 124,1491 L 253,1491 C 378,1324 471,1156 531,987 582,842 608,690 608,531 608,351 574,177 505,9 436,-159 352,-306 253,-431 Z"/>
+ <glyph unicode="(" horiz-adv-x="478" d="M 479,-431 C 380,-306 296,-159 227,9 158,177 124,351 124,531 124,690 150,842 201,987 261,1156 354,1324 479,1491 L 608,1491 C 527,1352 474,1253 448,1194 407,1102 375,1006 352,906 323,781 309,656 309,530 309,209 409,-111 608,-431 L 479,-431 Z"/>
+ <glyph unicode=" " horiz-adv-x="556"/>
+ </font>
+ </defs>
+ <g visibility="visible" id="MasterSlide_1_Default">
+ <desc>Master slide
+ </desc>
+ <rect fill="none" stroke="none" x="0" y="0" width="16000" height="9000"/>
+ </g>
+ <g visibility="visible" id="Slide_1_page1">
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 2600,5382 L 2600,1732"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_1_0" d="M 2600,1282 L 2413,1845 2788,1845 2600,1282 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 2600,5382 L 13850,5382"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_2_0" d="M 14300,5382 L 13738,5195 13738,5570 14300,5382 Z"/>
+ </g>
+ <g id="Drawing_3">
+ <rect fill="none" stroke="none" x="13200" y="5682" width="1301" height="641"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="13450" y="6120">T</text>
+ <text x="13657" y="6120">i</text>
+ <text x="13734" y="6120">m</text>
+ <text x="14034" y="6120">e</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_4_0" stroke-width="50" stroke-linejoin="round" d="M 3100,5382 L 3100,2882"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_5_0" stroke-width="50" stroke-linejoin="round" d="M 3100,5382 L 2600,4882"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_6_0" stroke-width="50" stroke-linejoin="round" d="M 5600,5382 L 5600,2382"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_7_0" stroke-width="50" stroke-linejoin="round" d="M 8601,5381 L 5601,2383"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_8_0" stroke-width="50" stroke-linejoin="round" d="M 13600,5381 L 12600,4382"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_9_0" stroke-width="30" stroke-linejoin="round" stroke-dasharray="508,508,508,508" d="M 2600,2382 L 14000,2382"/>
+ </g>
+ <g id="Drawing_10">
+ <rect fill="none" stroke="none" x="13600" y="3182" width="2101" height="1419"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="13850" y="3620">C</text>
+ <text x="14104" y="3620">o</text>
+ <text x="14299" y="3620">m</text>
+ <text x="14599" y="3620">p</text>
+ <text x="14794" y="3620">a</text>
+ <text x="14989" y="3620">r</text>
+ <text x="15107" y="3620">e</text>
+ <text x="15302" y="3620"> </text>
+ <text fill="rgb(0,0,0)" stroke="none" x="13850" y="4009">m</text>
+ <text x="14151" y="4009">a</text>
+ <text x="14345" y="4009">t</text>
+ <text x="14443" y="4009">c</text>
+ <text x="14620" y="4009">h</text>
+ <text x="14815" y="4009"> </text>
+ <text fill="rgb(0,0,0)" stroke="none" x="13850" y="4398">v</text>
+ <text x="14024" y="4398">a</text>
+ <text x="14218" y="4398">l</text>
+ <text x="14295" y="4398">u</text>
+ <text x="14489" y="4398">e</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_11_0" stroke-width="50" stroke-linejoin="round" d="M 8600,5382 L 8600,3382"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_12_0" stroke-width="50" stroke-linejoin="round" d="M 9601,4383 L 8601,3383"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_13_0" stroke-width="50" stroke-linejoin="round" d="M 9601,4382 L 9601,2382"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_14_0" stroke-width="50" stroke-linejoin="round" d="M 12602,5383 L 9601,2382"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_15_0" stroke-width="50" stroke-linejoin="round" d="M 12600,5382 L 12600,4382"/>
+ </g>
+ <g id="Drawing_16">
+ <rect fill="none" stroke="none" x="6000" y="6542" width="4401" height="641"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="6250" y="6980">R</text>
+ <text x="6504" y="6980">e</text>
+ <text x="6699" y="6980">l</text>
+ <text x="6775" y="6980">o</text>
+ <text x="6970" y="6980">a</text>
+ <text x="7164" y="6980">d</text>
+ <text x="7359" y="6980"> </text>
+ <text x="7457" y="6980">t</text>
+ <text x="7554" y="6980">o</text>
+ <text x="7749" y="6980"> </text>
+ <text x="7842" y="6980">T</text>
+ <text x="8058" y="6980">O</text>
+ <text x="8333" y="6980">P</text>
+ <text x="8561" y="6980"> </text>
+ <text x="8659" y="6980">v</text>
+ <text x="8832" y="6980">a</text>
+ <text x="9027" y="6980">l</text>
+ <text x="9103" y="6980">u</text>
+ <text x="9298" y="6980">e</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 8400,6482 L 8519,5888"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_17_0" d="M 8600,5482 L 8329,5956 8668,6023 8600,5482 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 9600,6682 L 11917,5738"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_18_0" d="M 12300,5582 L 11756,5618 11886,5937 12300,5582 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 9700,2282 L 10542,1791"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_19_0" d="M 10900,1582 L 10366,1694 10540,1992 10900,1582 Z"/>
+ </g>
+ <g id="Drawing_20">
+ <rect fill="none" stroke="none" x="10651" y="553" width="4150" height="1030"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="10901" y="991">C</text>
+ <text x="11155" y="991">o</text>
+ <text x="11350" y="991">u</text>
+ <text x="11544" y="991">n</text>
+ <text x="11739" y="991">t</text>
+ <text x="11837" y="991"> </text>
+ <text x="11934" y="991">i</text>
+ <text x="12010" y="991">s</text>
+ <text x="12188" y="991"> </text>
+ <text x="12285" y="991">w</text>
+ <text x="12535" y="991">r</text>
+ <text x="12654" y="991">i</text>
+ <text x="12730" y="991">t</text>
+ <text x="12827" y="991">t</text>
+ <text x="12925" y="991">e</text>
+ <text x="13119" y="991">n</text>
+ <text x="13314" y="991"> </text>
+ <text x="13411" y="991">u</text>
+ <text x="13606" y="991">s</text>
+ <text x="13784" y="991">i</text>
+ <text x="13860" y="991">n</text>
+ <text x="14055" y="991">g</text>
+ <text x="14250" y="991"> </text>
+ <text fill="rgb(0,0,0)" stroke="none" x="10901" y="1380">t</text>
+ <text x="10998" y="1380">c</text>
+ <text x="11176" y="1380">_</text>
+ <text x="11371" y="1380">s</text>
+ <text x="11549" y="1380">e</text>
+ <text x="11743" y="1380">t</text>
+ <text x="11841" y="1380">_</text>
+ <text x="12036" y="1380">c</text>
+ <text x="12213" y="1380">o</text>
+ <text x="12408" y="1380">u</text>
+ <text x="12603" y="1380">n</text>
+ <text x="12798" y="1380">t</text>
+ <text x="12895" y="1380">_</text>
+ <text x="13090" y="1380">v</text>
+ <text x="13263" y="1380">a</text>
+ <text x="13458" y="1380">l</text>
+ <text x="13534" y="1380">u</text>
+ <text x="13729" y="1380">e</text>
+ <text x="13924" y="1380">(</text>
+ <text x="14042" y="1380">)</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 5800,2182 L 6152,1713"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_21_0" d="M 6400,1382 L 5952,1693 6228,1900 6400,1382 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 8300,2982 L 7519,1733"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_22_0" d="M 7300,1382 L 7428,1912 7721,1729 7300,1382 Z"/>
+ </g>
+ <g id="Drawing_23">
+ <rect fill="none" stroke="none" x="4500" y="482" width="5601" height="1030"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="4750" y="920">T</text>
+ <text x="4966" y="920">O</text>
+ <text x="5241" y="920">P</text>
+ <text x="5470" y="920"> </text>
+ <text x="5567" y="920">v</text>
+ <text x="5741" y="920">a</text>
+ <text x="5935" y="920">l</text>
+ <text x="6012" y="920">u</text>
+ <text x="6206" y="920">e</text>
+ <text x="6401" y="920"> </text>
+ <text x="6498" y="920">h</text>
+ <text x="6693" y="920">a</text>
+ <text x="6888" y="920">s</text>
+ <text x="7066" y="920"> </text>
+ <text x="7163" y="920">b</text>
+ <text x="7358" y="920">e</text>
+ <text x="7552" y="920">e</text>
+ <text x="7747" y="920">n</text>
+ <text x="7942" y="920"> </text>
+ <text x="8039" y="920">c</text>
+ <text x="8217" y="920">h</text>
+ <text x="8412" y="920">a</text>
+ <text x="8607" y="920">n</text>
+ <text x="8801" y="920">g</text>
+ <text x="8996" y="920">e</text>
+ <text x="9191" y="920">d</text>
+ <text x="9386" y="920"> </text>
+ <text fill="rgb(0,0,0)" stroke="none" x="4750" y="1309">u</text>
+ <text x="4945" y="1309">s</text>
+ <text x="5123" y="1309">i</text>
+ <text x="5199" y="1309">n</text>
+ <text x="5393" y="1309">g</text>
+ <text x="5588" y="1309"> </text>
+ <text x="5686" y="1309">t</text>
+ <text x="5783" y="1309">c</text>
+ <text x="5961" y="1309">_</text>
+ <text x="6155" y="1309">s</text>
+ <text x="6333" y="1309">e</text>
+ <text x="6528" y="1309">t</text>
+ <text x="6625" y="1309">_</text>
+ <text x="6820" y="1309">t</text>
+ <text x="6917" y="1309">o</text>
+ <text x="7112" y="1309">p</text>
+ <text x="7307" y="1309">_</text>
+ <text x="7502" y="1309">v</text>
+ <text x="7675" y="1309">a</text>
+ <text x="7870" y="1309">l</text>
+ <text x="7946" y="1309">u</text>
+ <text x="8141" y="1309">e</text>
+ <text x="8336" y="1309">(</text>
+ <text x="8454" y="1309">)</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_24_0" stroke-width="100" stroke-linejoin="round" stroke-dasharray="197,197" d="M 2600,4882 L 14200,4882"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_25_0" stroke-width="50" stroke-linejoin="round" d="M 3100,8407 L 5100,8407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_26_0" stroke-width="50" stroke-linejoin="round" d="M 5100,7407 L 5100,8407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_27_0" stroke-width="50" stroke-linejoin="round" d="M 5100,7407 L 5600,7407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_28_0" stroke-width="50" stroke-linejoin="round" d="M 5600,7407 L 5600,8407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_29_0" stroke-width="50" stroke-linejoin="round" d="M 5600,8407 L 7600,8407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_30_0" stroke-width="50" stroke-linejoin="round" d="M 7600,7407 L 7600,8407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_31_0" stroke-width="50" stroke-linejoin="round" d="M 7600,7407 L 8100,7407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_32_0" stroke-width="50" stroke-linejoin="round" d="M 8100,7407 L 8100,8407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_33_0" stroke-width="50" stroke-linejoin="round" d="M 12100,7407 L 12100,8407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_34_0" stroke-width="50" stroke-linejoin="round" d="M 12100,7407 L 12600,7407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_35_0" stroke-width="50" stroke-linejoin="round" d="M 12600,7407 L 12600,8407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_36_0" stroke-width="50" stroke-linejoin="round" d="M 13100,7407 L 13100,8407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_37_0" stroke-width="50" stroke-linejoin="round" d="M 13100,7407 L 13600,7407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_38_0" stroke-width="50" stroke-linejoin="round" d="M 13600,7407 L 13600,8407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_39_0" stroke-width="50" stroke-linejoin="round" d="M 8100,8407 L 12100,8407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_40_0" stroke-width="50" stroke-linejoin="round" d="M 4953,4649 L 5203,5082"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_41_0" stroke-width="50" stroke-linejoin="round" d="M 5300,4742 L 4867,4992"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_42_0" stroke-width="50" stroke-linejoin="round" d="M 7986,4682 L 8236,5115"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_43_0" stroke-width="50" stroke-linejoin="round" d="M 8333,4775 L 7900,5025"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_44_0" stroke-width="50" stroke-linejoin="round" d="M 11986,4649 L 12236,5082"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_45_0" stroke-width="50" stroke-linejoin="round" d="M 12333,4742 L 11900,4992"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_46_0" stroke-width="50" stroke-linejoin="round" d="M 12986,4682 L 13236,5115"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_47_0" stroke-width="50" stroke-linejoin="round" d="M 13333,4775 L 12900,5025"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_48_0" stroke-width="50" stroke-linejoin="round" d="M 12853,6453 L 13103,6886"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_49_0" stroke-width="50" stroke-linejoin="round" d="M 13200,6546 L 12767,6796"/>
+ </g>
+ <g id="Drawing_50">
+ <rect fill="none" stroke="none" x="13200" y="6413" width="1701" height="641"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="13450" y="6851">M</text>
+ <text x="13742" y="6851">a</text>
+ <text x="13937" y="6851">t</text>
+ <text x="14034" y="6851">c</text>
+ <text x="14212" y="6851">h</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_51_0" stroke-width="50" stroke-linejoin="round" d="M 12600,8407 L 13100,8407"/>
+ </g>
+ <g id="Drawing_52">
+ <rect fill="none" stroke="none" x="600" y="7182" width="2601" height="1419"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="850" y="7620">P</text>
+ <text x="1083" y="7620">W</text>
+ <text x="1434" y="7620">M</text>
+ <text x="1726" y="7620"> </text>
+ <text fill="rgb(0,0,0)" stroke="none" x="850" y="8009">i</text>
+ <text x="926" y="8009">n</text>
+ <text x="1121" y="8009">v</text>
+ <text x="1295" y="8009">e</text>
+ <text x="1489" y="8009">r</text>
+ <text x="1608" y="8009">t</text>
+ <text x="1705" y="8009">e</text>
+ <text x="1900" y="8009">d</text>
+ <text x="2095" y="8009"> </text>
+ <text fill="rgb(0,0,0)" stroke="none" x="850" y="8398">o</text>
+ <text x="1045" y="8398">u</text>
+ <text x="1239" y="8398">t</text>
+ <text x="1337" y="8398">p</text>
+ <text x="1532" y="8398">u</text>
+ <text x="1726" y="8398">t</text>
+ </g>
+ </g>
+ <g id="Drawing_53">
+ <rect fill="none" stroke="none" x="13300" y="1742" width="2101" height="641"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="13550" y="2180">M</text>
+ <text x="13842" y="2180">a</text>
+ <text x="14037" y="2180">x</text>
+ </g>
+ </g>
+ <g id="Drawing_54">
+ <rect fill="none" stroke="none" x="0" y="1171" width="2001" height="1030"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="376" y="1609">C</text>
+ <text x="630" y="1609">o</text>
+ <text x="825" y="1609">u</text>
+ <text x="1019" y="1609">n</text>
+ <text x="1214" y="1609">t</text>
+ <text x="1312" y="1609">e</text>
+ <text x="1506" y="1609">r</text>
+ <text x="1625" y="1609"> </text>
+ <text fill="rgb(0,0,0)" stroke="none" x="583" y="1998">v</text>
+ <text x="757" y="1998">a</text>
+ <text x="951" y="1998">l</text>
+ <text x="1028" y="1998">u</text>
+ <text x="1222" y="1998">e</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_55_0" stroke-width="50" stroke-linejoin="round" d="M 5600,5379 L 3100,2880"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_56_0" stroke-width="50" stroke-linejoin="round" d="M 2600,7407 L 2600,8407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_57_0" stroke-width="50" stroke-linejoin="round" d="M 2600,7407 L 3100,7407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_58_0" stroke-width="50" stroke-linejoin="round" d="M 3100,7407 L 3100,8407"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 6700,6482 L 6175,5891"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_59_0" d="M 5900,5582 L 6115,6083 6373,5854 5900,5582 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 6000,6682 L 3590,5821"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_60_0" d="M 3200,5682 L 3629,6019 3745,5694 3200,5682 Z"/>
+ </g>
+ </g>
+</svg> \ No newline at end of file
diff --git a/atmel-samd/asf/sam0/drivers/tc/docimg/pwm_normal_ex.svg b/atmel-samd/asf/sam0/drivers/tc/docimg/pwm_normal_ex.svg
new file mode 100644
index 000000000..072e1fc89
--- /dev/null
+++ b/atmel-samd/asf/sam0/drivers/tc/docimg/pwm_normal_ex.svg
@@ -0,0 +1,386 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<svg version="1.2" baseProfile="tiny" width="160mm" height="90mm" viewBox="0 0 16000 9000" preserveAspectRatio="xMidYMid" fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
+ <defs>
+ <font id="EmbeddedFont_1" horiz-adv-x="2048">
+ <font-face font-family="Arial" units-per-em="2048" font-weight="normal" font-style="normal" ascent="1852" descent="450"/>
+ <missing-glyph horiz-adv-x="2048" d="M 0,0 L 2047,0 2047,2047 0,2047 0,0 Z"/>
+ <glyph unicode="z" horiz-adv-x="928" d="M 40,0 L 40,146 716,922 C 639,918 572,916 513,916 L 80,916 80,1062 948,1062 948,943 373,269 262,146 C 343,152 418,155 489,155 L 980,155 980,0 40,0 Z"/>
+ <glyph unicode="x" horiz-adv-x="954" d="M 15,0 L 403,552 44,1062 269,1062 432,813 C 463,766 487,726 506,694 535,738 562,777 587,811 L 766,1062 981,1062 614,562 1009,0 788,0 570,330 512,419 233,0 15,0 Z"/>
+ <glyph unicode="w" horiz-adv-x="1430" d="M 331,0 L 6,1062 192,1062 361,449 424,221 C 427,232 445,305 479,440 L 648,1062 833,1062 992,446 1045,243 1106,448 1288,1062 1463,1062 1131,0 944,0 775,636 734,817 519,0 331,0 Z"/>
+ <glyph unicode="v" horiz-adv-x="954" d="M 430,0 L 26,1062 216,1062 444,426 C 469,357 491,286 512,212 528,268 550,335 579,414 L 815,1062 1000,1062 598,0 430,0 Z"/>
+ <glyph unicode="u" horiz-adv-x="848" d="M 831,0 L 831,156 C 748,36 636,-24 494,-24 431,-24 373,-12 319,12 264,36 224,66 198,103 171,139 153,183 142,236 135,271 131,327 131,404 L 131,1062 311,1062 311,473 C 311,379 315,316 322,283 333,236 357,199 394,172 431,145 476,131 530,131 584,131 635,145 682,173 729,200 763,238 783,286 802,333 812,402 812,493 L 812,1062 992,1062 992,0 831,0 Z"/>
+ <glyph unicode="t" horiz-adv-x="504" d="M 528,161 L 554,2 C 503,-9 458,-14 418,-14 353,-14 302,-4 266,17 230,38 205,65 190,99 175,132 168,203 168,311 L 168,922 36,922 36,1062 168,1062 168,1325 347,1433 347,1062 528,1062 528,922 347,922 347,301 C 347,250 350,217 357,202 363,187 373,176 388,167 402,158 422,154 449,154 469,154 495,156 528,161 Z"/>
+ <glyph unicode="s" horiz-adv-x="874" d="M 63,317 L 241,345 C 251,274 279,219 325,181 370,143 434,124 516,124 599,124 660,141 700,175 740,208 760,248 760,293 760,334 742,366 707,389 682,405 621,425 523,450 391,483 300,512 249,537 198,561 159,595 133,638 106,681 93,728 93,780 93,827 104,871 126,912 147,952 177,985 214,1012 242,1033 280,1050 329,1065 377,1079 429,1086 484,1086 567,1086 641,1074 704,1050 767,1026 813,994 843,953 873,912 894,857 905,788 L 729,764 C 721,819 698,861 660,892 621,923 567,938 497,938 414,938 355,924 320,897 285,870 267,838 267,801 267,778 274,757 289,738 304,719 327,703 358,690 376,683 429,668 517,644 644,610 733,582 784,561 834,539 873,507 902,466 931,425 945,373 945,312 945,252 928,196 893,143 858,90 807,49 741,20 675,-9 600,-24 517,-24 379,-24 274,5 202,62 129,119 83,204 63,317 Z"/>
+ <glyph unicode="r" horiz-adv-x="557" d="M 133,0 L 133,1062 295,1062 295,901 C 336,976 375,1026 410,1050 445,1074 483,1086 525,1086 586,1086 647,1067 710,1028 L 648,861 C 604,887 560,900 516,900 477,900 441,888 410,865 379,841 356,808 343,766 323,702 313,632 313,556 L 313,0 133,0 Z"/>
+ <glyph unicode="p" horiz-adv-x="901" d="M 135,-407 L 135,1062 299,1062 299,924 C 338,978 381,1019 430,1046 479,1073 538,1086 607,1086 698,1086 778,1063 847,1016 916,969 969,904 1004,819 1039,734 1057,640 1057,539 1057,430 1038,333 999,246 960,159 903,92 829,46 754,-1 676,-24 594,-24 534,-24 480,-11 433,14 385,39 346,71 315,110 L 315,-407 135,-407 Z M 298,525 C 298,388 326,287 381,222 436,157 503,124 582,124 662,124 731,158 788,226 845,293 873,398 873,540 873,675 845,777 790,844 734,911 667,945 590,945 513,945 446,909 387,838 328,766 298,662 298,525 Z"/>
+ <glyph unicode="o" horiz-adv-x="980" d="M 68,531 C 68,728 123,873 232,968 323,1047 435,1086 566,1086 712,1086 831,1038 924,943 1017,847 1063,715 1063,546 1063,409 1043,302 1002,224 961,145 901,84 823,41 744,-2 659,-24 566,-24 417,-24 297,24 206,119 114,214 68,352 68,531 Z M 253,531 C 253,395 283,293 342,226 401,158 476,124 566,124 655,124 730,158 789,226 848,294 878,398 878,537 878,668 848,768 789,836 729,903 655,937 566,937 476,937 401,903 342,836 283,769 253,667 253,531 Z"/>
+ <glyph unicode="n" horiz-adv-x="848" d="M 135,0 L 135,1062 297,1062 297,911 C 375,1028 488,1086 635,1086 699,1086 758,1075 812,1052 865,1029 905,998 932,961 959,924 977,879 988,828 995,795 998,736 998,653 L 998,0 818,0 818,646 C 818,719 811,774 797,811 783,847 758,876 723,898 687,919 645,930 597,930 520,930 454,906 399,857 343,808 315,716 315,580 L 315,0 135,0 Z"/>
+ <glyph unicode="m" horiz-adv-x="1457" d="M 135,0 L 135,1062 296,1062 296,913 C 329,965 374,1007 429,1039 484,1070 547,1086 618,1086 697,1086 761,1070 812,1037 862,1004 897,959 918,900 1002,1024 1111,1086 1246,1086 1351,1086 1432,1057 1489,999 1546,940 1574,850 1574,729 L 1574,0 1395,0 1395,669 C 1395,741 1389,793 1378,825 1366,856 1345,882 1314,901 1283,920 1247,930 1206,930 1131,930 1069,905 1020,856 971,806 946,726 946,617 L 946,0 766,0 766,690 C 766,770 751,830 722,870 693,910 645,930 578,930 527,930 481,917 438,890 395,863 363,824 344,773 325,722 315,648 315,551 L 315,0 135,0 Z"/>
+ <glyph unicode="l" horiz-adv-x="186" d="M 131,0 L 131,1466 311,1466 311,0 131,0 Z"/>
+ <glyph unicode="i" horiz-adv-x="160" d="M 136,1259 L 136,1466 316,1466 316,1259 136,1259 Z M 136,0 L 136,1062 316,1062 316,0 136,0 Z"/>
+ <glyph unicode="h" horiz-adv-x="848" d="M 135,0 L 135,1466 315,1466 315,940 C 399,1037 505,1086 633,1086 712,1086 780,1071 838,1040 896,1009 938,966 963,911 988,856 1000,777 1000,673 L 1000,0 820,0 820,673 C 820,763 801,829 762,870 723,911 667,931 596,931 543,931 493,917 446,890 399,862 365,824 345,777 325,730 315,664 315,581 L 315,0 135,0 Z"/>
+ <glyph unicode="g" horiz-adv-x="927" d="M 102,-88 L 277,-114 C 284,-168 305,-207 338,-232 383,-265 444,-282 521,-282 604,-282 669,-265 714,-232 759,-199 790,-152 806,-92 815,-55 820,22 819,139 740,46 642,0 525,0 379,0 266,53 186,158 106,263 66,390 66,537 66,638 84,732 121,818 158,903 211,969 281,1016 350,1063 432,1086 526,1086 651,1086 755,1035 836,934 L 836,1062 1002,1062 1002,144 C 1002,-21 985,-138 952,-207 918,-276 865,-331 792,-371 719,-411 629,-431 522,-431 395,-431 293,-402 215,-345 137,-288 99,-203 102,-88 Z M 251,550 C 251,411 279,309 334,245 389,181 459,149 542,149 625,149 694,181 750,245 806,308 834,408 834,544 834,674 805,772 748,838 690,904 620,937 539,937 459,937 391,905 335,840 279,775 251,678 251,550 Z"/>
+ <glyph unicode="e" horiz-adv-x="980" d="M 862,342 L 1048,319 C 1019,210 964,126 885,66 806,6 704,-24 581,-24 426,-24 303,24 212,120 121,215 75,349 75,522 75,701 121,839 213,938 305,1037 424,1086 571,1086 713,1086 829,1038 919,941 1009,844 1054,708 1054,533 1054,522 1054,506 1053,485 L 261,485 C 268,368 301,279 360,217 419,155 493,124 582,124 648,124 704,141 751,176 798,211 835,266 862,342 Z M 271,633 L 864,633 C 856,722 833,789 796,834 739,903 664,938 573,938 490,938 421,910 365,855 308,800 277,726 271,633 Z"/>
+ <glyph unicode="d" horiz-adv-x="927" d="M 824,0 L 824,134 C 757,29 658,-24 527,-24 442,-24 365,-1 294,46 223,93 168,158 129,242 90,325 70,421 70,530 70,636 88,732 123,819 158,905 211,971 282,1017 353,1063 432,1086 519,1086 583,1086 640,1073 690,1046 740,1019 781,983 812,940 L 812,1466 991,1466 991,0 824,0 Z M 255,530 C 255,394 284,292 341,225 398,158 466,124 544,124 623,124 690,156 745,221 800,285 827,383 827,515 827,660 799,767 743,835 687,903 618,937 536,937 456,937 389,904 336,839 282,774 255,671 255,530 Z"/>
+ <glyph unicode="c" horiz-adv-x="927" d="M 828,389 L 1005,366 C 986,244 936,149 857,80 777,11 679,-24 563,-24 418,-24 301,24 213,119 124,214 80,350 80,527 80,642 99,742 137,828 175,914 233,979 311,1022 388,1065 473,1086 564,1086 679,1086 774,1057 847,999 920,940 967,857 988,750 L 813,723 C 796,794 767,848 725,884 682,920 631,938 571,938 480,938 407,906 350,841 293,776 265,673 265,532 265,389 292,286 347,221 402,156 473,124 561,124 632,124 691,146 738,189 785,232 815,299 828,389 Z"/>
+ <glyph unicode="b" horiz-adv-x="901" d="M 301,0 L 134,0 134,1466 314,1466 314,943 C 390,1038 487,1086 605,1086 670,1086 732,1073 791,1047 849,1020 897,983 935,936 972,888 1002,830 1023,763 1044,696 1055,624 1055,547 1055,365 1010,224 920,125 830,26 722,-24 596,-24 471,-24 372,28 301,133 L 301,0 Z M 299,539 C 299,412 316,320 351,263 408,170 484,124 581,124 660,124 728,158 785,227 842,295 871,397 871,532 871,671 844,773 789,839 734,905 667,938 589,938 510,938 442,904 385,836 328,767 299,668 299,539 Z"/>
+ <glyph unicode="a" horiz-adv-x="980" d="M 828,131 C 761,74 697,34 636,11 574,-12 508,-24 437,-24 320,-24 231,5 168,62 105,119 74,191 74,280 74,332 86,380 110,423 133,466 164,500 203,526 241,552 284,572 332,585 367,594 421,603 492,612 637,629 744,650 813,674 814,699 814,714 814,721 814,794 797,846 763,876 717,917 649,937 558,937 473,937 411,922 371,893 330,863 300,810 281,735 L 105,759 C 121,834 147,895 184,942 221,988 274,1024 343,1049 412,1074 493,1086 584,1086 675,1086 748,1075 805,1054 862,1033 903,1006 930,974 957,941 975,900 986,851 992,820 995,765 995,685 L 995,445 C 995,278 999,172 1007,128 1014,83 1029,41 1052,0 L 864,0 C 845,37 833,81 828,131 Z M 813,533 C 748,506 650,484 519,465 445,454 393,442 362,429 331,416 308,396 291,371 274,345 266,316 266,285 266,237 284,197 321,165 357,133 410,117 480,117 549,117 611,132 665,163 719,193 759,234 784,287 803,328 813,388 813,467 L 813,533 Z"/>
+ <glyph unicode="_" horiz-adv-x="1192" d="M -31,-407 L -31,-277 1162,-277 1162,-407 -31,-407 Z"/>
+ <glyph unicode="W" horiz-adv-x="1986" d="M 414,0 L 25,1466 224,1466 447,505 C 471,404 492,304 509,205 546,362 568,452 575,476 L 854,1466 1088,1466 1298,724 C 1351,540 1389,367 1412,205 1431,298 1455,404 1485,524 L 1715,1466 1910,1466 1508,0 1321,0 1012,1117 C 986,1210 971,1268 966,1289 951,1222 936,1164 923,1117 L 612,0 414,0 Z"/>
+ <glyph unicode="T" horiz-adv-x="1166" d="M 531,0 L 531,1293 48,1293 48,1466 1210,1466 1210,1293 725,1293 725,0 531,0 Z"/>
+ <glyph unicode="R" horiz-adv-x="1271" d="M 161,0 L 161,1466 811,1466 C 942,1466 1041,1453 1109,1427 1177,1400 1231,1354 1272,1287 1313,1220 1333,1147 1333,1066 1333,962 1299,874 1232,803 1165,732 1061,686 920,667 971,642 1010,618 1037,594 1094,542 1147,477 1198,399 L 1453,0 1209,0 1015,305 C 958,393 912,460 875,507 838,554 806,586 777,605 748,624 718,637 688,644 666,649 630,651 580,651 L 355,651 355,0 161,0 Z M 355,819 L 772,819 C 861,819 930,828 980,847 1030,865 1068,894 1094,935 1120,975 1133,1019 1133,1066 1133,1135 1108,1192 1058,1237 1007,1282 928,1304 819,1304 L 355,1304 355,819 Z"/>
+ <glyph unicode="P" horiz-adv-x="1113" d="M 158,0 L 158,1466 711,1466 C 808,1466 883,1461 934,1452 1006,1440 1066,1417 1115,1384 1164,1350 1203,1303 1233,1242 1262,1181 1277,1115 1277,1042 1277,917 1237,812 1158,726 1079,639 935,596 728,596 L 352,596 352,0 158,0 Z M 352,769 L 731,769 C 856,769 945,792 998,839 1051,886 1077,951 1077,1036 1077,1097 1062,1150 1031,1194 1000,1237 959,1266 908,1280 875,1289 815,1293 727,1293 L 352,1293 352,769 Z"/>
+ <glyph unicode="O" horiz-adv-x="1404" d="M 99,714 C 99,957 164,1148 295,1286 426,1423 594,1492 801,1492 936,1492 1058,1460 1167,1395 1276,1330 1359,1240 1416,1125 1473,1009 1501,878 1501,731 1501,582 1471,449 1411,332 1351,215 1266,126 1156,66 1046,5 927,-25 800,-25 662,-25 539,8 430,75 321,142 239,233 183,348 127,463 99,585 99,714 Z M 299,711 C 299,534 347,395 442,294 537,192 656,141 799,141 945,141 1065,192 1160,295 1254,398 1301,543 1301,732 1301,851 1281,956 1241,1045 1200,1134 1141,1203 1064,1252 986,1301 899,1325 802,1325 665,1325 547,1278 448,1184 349,1089 299,932 299,711 Z"/>
+ <glyph unicode="M" horiz-adv-x="1377" d="M 152,0 L 152,1466 444,1466 791,428 C 823,331 846,259 861,211 878,264 904,343 939,446 L 1290,1466 1551,1466 1551,0 1364,0 1364,1227 938,0 763,0 339,1248 339,0 152,0 Z"/>
+ <glyph unicode="C" horiz-adv-x="1298" d="M 1204,514 L 1398,465 C 1357,306 1284,184 1179,101 1073,17 944,-25 791,-25 633,-25 505,7 406,72 307,136 231,229 180,351 128,473 102,604 102,744 102,897 131,1030 190,1144 248,1257 331,1344 439,1403 546,1462 665,1491 794,1491 941,1491 1064,1454 1164,1379 1264,1304 1334,1199 1373,1064 L 1182,1019 C 1148,1126 1099,1203 1034,1252 969,1301 888,1325 790,1325 677,1325 583,1298 508,1244 432,1190 379,1118 348,1027 317,936 302,842 302,745 302,620 320,512 357,419 393,326 449,256 526,210 603,164 686,141 775,141 884,141 976,172 1051,235 1126,298 1177,391 1204,514 Z"/>
+ <glyph unicode="=" horiz-adv-x="953" d="M 1082,862 L 114,862 114,1030 1082,1030 1082,862 Z M 1082,417 L 114,417 114,585 1082,585 1082,417 Z"/>
+ <glyph unicode=")" horiz-adv-x="477" d="M 253,-431 L 124,-431 C 323,-111 423,209 423,530 423,655 409,780 380,903 357,1003 326,1099 285,1191 259,1251 205,1351 124,1491 L 253,1491 C 378,1324 471,1156 531,987 582,842 608,690 608,531 608,351 574,177 505,9 436,-159 352,-306 253,-431 Z"/>
+ <glyph unicode="(" horiz-adv-x="478" d="M 479,-431 C 380,-306 296,-159 227,9 158,177 124,351 124,531 124,690 150,842 201,987 261,1156 354,1324 479,1491 L 608,1491 C 527,1352 474,1253 448,1194 407,1102 375,1006 352,906 323,781 309,656 309,530 309,209 409,-111 608,-431 L 479,-431 Z"/>
+ <glyph unicode=" " horiz-adv-x="556"/>
+ </font>
+ </defs>
+ <g visibility="visible" id="MasterSlide_1_Default">
+ <desc>Master slide
+ </desc>
+ <rect fill="none" stroke="none" x="0" y="0" width="16000" height="9000"/>
+ </g>
+ <g visibility="visible" id="Slide_1_page1">
+ <g id="Drawing_1">
+ <rect fill="none" stroke="none" x="200" y="1171" width="1801" height="1030"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="476" y="1609">C</text>
+ <text x="730" y="1609">o</text>
+ <text x="925" y="1609">u</text>
+ <text x="1119" y="1609">n</text>
+ <text x="1314" y="1609">t</text>
+ <text x="1412" y="1609">e</text>
+ <text x="1606" y="1609">r</text>
+ <text x="1725" y="1609"> </text>
+ <text fill="rgb(0,0,0)" stroke="none" x="683" y="1998">v</text>
+ <text x="857" y="1998">a</text>
+ <text x="1051" y="1998">l</text>
+ <text x="1128" y="1998">u</text>
+ <text x="1322" y="1998">e</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_2_0" stroke-width="50" stroke-linejoin="round" d="M 12486,1900 L 12736,2333"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_3_0" stroke-width="50" stroke-linejoin="round" d="M 12833,1993 L 12400,2243"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 2100,4600 L 2100,950"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_4_0" d="M 2100,500 L 1913,1063 2288,1063 2100,500 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 2100,4600 L 13350,4600"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_5_0" d="M 13800,4600 L 13238,4413 13238,4788 13800,4600 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_6_0" stroke-width="50" stroke-linejoin="round" d="M 2600,4600 L 5100,2100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_7_0" stroke-width="50" stroke-linejoin="round" d="M 5100,4600 L 5100,2100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_8_0" stroke-width="50" stroke-linejoin="round" d="M 5100,4600 L 7600,2100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_9_0" stroke-width="50" stroke-linejoin="round" d="M 7600,4600 L 7600,2100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_10_0" stroke-width="50" stroke-linejoin="round" d="M 7600,4600 L 10100,2100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_11_0" stroke-width="50" stroke-linejoin="round" d="M 10100,4600 L 10100,2100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_12_0" stroke-width="50" stroke-linejoin="round" d="M 10100,4600 L 12600,2100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_13_0" stroke-width="50" stroke-linejoin="round" d="M 12590,4556 L 12590,2056"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_14_0" stroke-width="30" stroke-linejoin="round" stroke-dasharray="508,508,508,508" d="M 2100,2100 L 13500,2100"/>
+ </g>
+ <g id="Drawing_15">
+ <rect fill="none" stroke="none" x="12600" y="4967" width="1301" height="641"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="12850" y="5405">T</text>
+ <text x="13057" y="5405">i</text>
+ <text x="13134" y="5405">m</text>
+ <text x="13434" y="5405">e</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_16_0" stroke-width="100" stroke-linejoin="round" stroke-dasharray="197,197" d="M 2100,3630 L 4100,3630"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_17_0" stroke-width="100" stroke-linejoin="round" stroke-dasharray="197,197" d="M 4100,4600 L 7600,4600"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_18_0" stroke-width="100" stroke-linejoin="round" stroke-dasharray="197,197" d="M 7600,3200 L 8100,3200"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_19_0" stroke-width="100" stroke-linejoin="round" stroke-dasharray="197,197" d="M 8100,4300 L 10100,4300"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_20_0" stroke-width="100" stroke-linejoin="round" stroke-dasharray="197,197" d="M 10100,2100 L 12600,2100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_21_0" stroke-width="50" stroke-linejoin="round" d="M 3386,3367 L 3636,3800"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_22_0" stroke-width="50" stroke-linejoin="round" d="M 3733,3460 L 3300,3710"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_23_0" stroke-width="50" stroke-linejoin="round" d="M 5053,4400 L 5303,4833"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_24_0" stroke-width="50" stroke-linejoin="round" d="M 5400,4493 L 4967,4743"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_25_0" stroke-width="50" stroke-linejoin="round" d="M 12600,4600 L 13100,4100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_26_0" stroke-width="50" stroke-linejoin="round" d="M 2600,7100 L 3600,7100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_27_0" stroke-width="50" stroke-linejoin="round" d="M 2600,8100 L 2600,7100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_28_0" stroke-width="50" stroke-linejoin="round" d="M 3600,7100 L 3600,8100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_29_0" stroke-width="50" stroke-linejoin="round" d="M 3600,8100 L 7100,8100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_30_0" stroke-width="50" stroke-linejoin="round" d="M 7100,7100 L 12900,7100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_31_0" stroke-width="50" stroke-linejoin="round" d="M 7100,7100 L 7100,8100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_32_0" stroke-width="50" stroke-linejoin="round" d="M 12900,7100 L 12900,8100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_33_0" stroke-width="100" stroke-linejoin="round" stroke-dasharray="197,197" d="M 12600,4300 L 14600,4300"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_34_0" stroke-width="50" stroke-linejoin="round" d="M 11686,5800 L 11936,6233"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_35_0" stroke-width="50" stroke-linejoin="round" d="M 12033,5893 L 11600,6143"/>
+ </g>
+ <g id="Drawing_36">
+ <rect fill="none" stroke="none" x="12300" y="5760" width="1701" height="641"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="12550" y="6198">M</text>
+ <text x="12842" y="6198">a</text>
+ <text x="13037" y="6198">t</text>
+ <text x="13134" y="6198">c</text>
+ <text x="13312" y="6198">h</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_37_0" stroke-width="50" stroke-linejoin="round" d="M 12853,4067 L 13103,4500"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_38_0" stroke-width="50" stroke-linejoin="round" d="M 13200,4160 L 12767,4410"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_39_0" stroke-width="50" stroke-linejoin="round" d="M 12900,8100 L 13500,8100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_40_0" stroke-width="50" stroke-linejoin="round" d="M 2100,8100 L 2600,8100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_41_0" stroke-width="50" stroke-linejoin="round" d="M 2600,4600 L 2600,2100"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" id="Drawing_42_0" stroke-width="50" stroke-linejoin="round" d="M 2100,2600 L 2600,2100"/>
+ </g>
+ <g id="Drawing_43">
+ <rect fill="none" stroke="none" x="500" y="7171" width="1901" height="1030"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="750" y="7609">P</text>
+ <text x="983" y="7609">W</text>
+ <text x="1334" y="7609">M</text>
+ <text x="1626" y="7609"> </text>
+ <text fill="rgb(0,0,0)" stroke="none" x="750" y="7998">o</text>
+ <text x="945" y="7998">u</text>
+ <text x="1139" y="7998">t</text>
+ <text x="1237" y="7998">p</text>
+ <text x="1432" y="7998">u</text>
+ <text x="1626" y="7998">t</text>
+ </g>
+ </g>
+ <g id="Drawing_44">
+ <rect fill="none" stroke="none" x="6000" y="200" width="4401" height="641"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="6250" y="638">R</text>
+ <text x="6504" y="638">e</text>
+ <text x="6699" y="638">l</text>
+ <text x="6775" y="638">o</text>
+ <text x="6970" y="638">a</text>
+ <text x="7164" y="638">d</text>
+ <text x="7359" y="638"> </text>
+ <text x="7457" y="638">c</text>
+ <text x="7634" y="638">o</text>
+ <text x="7829" y="638">u</text>
+ <text x="8024" y="638">n</text>
+ <text x="8219" y="638">t</text>
+ <text x="8316" y="638">e</text>
+ <text x="8511" y="638">r</text>
+ <text x="8629" y="638"> </text>
+ <text x="8727" y="638">t</text>
+ <text x="8824" y="638">o</text>
+ <text x="9019" y="638"> </text>
+ <text x="9116" y="638">z</text>
+ <text x="9285" y="638">e</text>
+ <text x="9480" y="638">r</text>
+ <text x="9599" y="638">o</text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 9200,800 L 11910,1762"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_45_0" d="M 12300,1900 L 11870,1564 11755,1890 12300,1900 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 8500,800 L 9586,1731"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_46_0" d="M 9900,2000 L 9619,1532 9395,1794 9900,2000 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 7800,700 L 7668,1492"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_47_0" d="M 7600,1900 L 7855,1418 7515,1361 7600,1900 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 7200,700 L 5452,1782"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_48_0" d="M 5100,2000 L 5631,1874 5449,1581 5100,2000 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 6600,700 L 3294,1772"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_49_0" d="M 2900,1900 L 3445,1904 3339,1576 2900,1900 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 7700,5400 L 7870,5144"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_50_0" d="M 8100,4800 L 7669,5135 7956,5326 8100,4800 Z"/>
+ </g>
+ <g id="Drawing_51">
+ <rect fill="none" stroke="none" x="4100" y="5571" width="5901" height="1030"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="4350" y="6009">C</text>
+ <text x="4604" y="6009">o</text>
+ <text x="4799" y="6009">m</text>
+ <text x="5099" y="6009">p</text>
+ <text x="5294" y="6009">a</text>
+ <text x="5489" y="6009">r</text>
+ <text x="5607" y="6009">e</text>
+ <text x="5802" y="6009"> </text>
+ <text x="5899" y="6009">v</text>
+ <text x="6073" y="6009">a</text>
+ <text x="6268" y="6009">l</text>
+ <text x="6344" y="6009">u</text>
+ <text x="6539" y="6009">e</text>
+ <text x="6733" y="6009"> </text>
+ <text x="6831" y="6009">h</text>
+ <text x="7025" y="6009">a</text>
+ <text x="7220" y="6009">s</text>
+ <text x="7398" y="6009"> </text>
+ <text x="7495" y="6009">b</text>
+ <text x="7690" y="6009">e</text>
+ <text x="7885" y="6009">e</text>
+ <text x="8080" y="6009">n</text>
+ <text x="8274" y="6009"> </text>
+ <text x="8372" y="6009">c</text>
+ <text x="8549" y="6009">h</text>
+ <text x="8744" y="6009">a</text>
+ <text x="8939" y="6009">n</text>
+ <text x="9134" y="6009">g</text>
+ <text x="9328" y="6009">e</text>
+ <text x="9523" y="6009">d</text>
+ <text x="9718" y="6009"> </text>
+ <text fill="rgb(0,0,0)" stroke="none" x="4350" y="6398">w</text>
+ <text x="4600" y="6398">i</text>
+ <text x="4676" y="6398">t</text>
+ <text x="4773" y="6398">h</text>
+ <text x="4968" y="6398"> </text>
+ <text x="5065" y="6398">t</text>
+ <text x="5163" y="6398">c</text>
+ <text x="5341" y="6398">_</text>
+ <text x="5535" y="6398">s</text>
+ <text x="5713" y="6398">e</text>
+ <text x="5908" y="6398">t</text>
+ <text x="6005" y="6398">_</text>
+ <text x="6200" y="6398">c</text>
+ <text x="6378" y="6398">o</text>
+ <text x="6573" y="6398">m</text>
+ <text x="6873" y="6398">p</text>
+ <text x="7068" y="6398">a</text>
+ <text x="7263" y="6398">r</text>
+ <text x="7381" y="6398">e</text>
+ <text x="7576" y="6398">_</text>
+ <text x="7771" y="6398">v</text>
+ <text x="7944" y="6398">a</text>
+ <text x="8139" y="6398">l</text>
+ <text x="8215" y="6398">u</text>
+ <text x="8410" y="6398">e</text>
+ <text x="8605" y="6398">(</text>
+ <text x="8723" y="6398">)</text>
+ <text x="8842" y="6398"> </text>
+ </g>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 4800,5500 L 4393,5093"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_52_0" d="M 4100,4800 L 4344,5288 4588,5044 4100,4800 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 9600,5500 L 11899,4904"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_53_0" d="M 12300,4800 L 11756,4763 11842,5097 12300,4800 Z"/>
+ </g>
+ <g>
+ <path fill="none" stroke="rgb(0,0,0)" d="M 9085,5400 L 9554,5048"/>
+ <path fill="rgb(0,0,0)" stroke="none" id="Drawing_54_0" d="M 9885,4800 L 9368,4973 9575,5249 9885,4800 Z"/>
+ </g>
+ <g id="Drawing_55">
+ <rect fill="none" stroke="none" x="12600" y="1360" width="2601" height="641"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="12850" y="1798">T</text>
+ <text x="13066" y="1798">O</text>
+ <text x="13341" y="1798">P</text>
+ <text x="13570" y="1798"> </text>
+ <text x="13667" y="1798">=</text>
+ <text x="13870" y="1798"> </text>
+ <text x="13968" y="1798">M</text>
+ <text x="14260" y="1798">a</text>
+ <text x="14454" y="1798">x</text>
+ </g>
+ </g>
+ <g id="Drawing_56">
+ <rect fill="none" stroke="none" x="13100" y="2782" width="2101" height="1419"/>
+ <g fill="rgb(0,0,0)" stroke="none" font-family="Arial" font-size="353" font-style="normal" font-weight="400">
+ <text x="13350" y="3220">C</text>
+ <text x="13604" y="3220">o</text>
+ <text x="13799" y="3220">m</text>
+ <text x="14099" y="3220">p</text>
+ <text x="14294" y="3220">a</text>
+ <text x="14489" y="3220">r</text>
+ <text x="14607" y="3220">e</text>
+ <text x="14802" y="3220"> </text>
+ <text fill="rgb(0,0,0)" stroke="none" x="13350" y="3609">m</text>
+ <text x="13651" y="3609">a</text>
+ <text x="13845" y="3609">t</text>
+ <text x="13943" y="3609">c</text>
+ <text x="14120" y="3609">h</text>
+ <text x="14315" y="3609"> </text>
+ <text fill="rgb(0,0,0)" stroke="none" x="13350" y="3998">v</text>
+ <text x="13524" y="3998">a</text>
+ <text x="13718" y="3998">l</text>
+ <text x="13795" y="3998">u</text>
+ <text x="13989" y="3998">e</text>
+ </g>
+ </g>
+ </g>
+</svg> \ No newline at end of file
diff --git a/atmel-samd/asf/sam0/drivers/tc/tc.h b/atmel-samd/asf/sam0/drivers/tc/tc.h
new file mode 100644
index 000000000..7bf742046
--- /dev/null
+++ b/atmel-samd/asf/sam0/drivers/tc/tc.h
@@ -0,0 +1,1790 @@
+/**
+ * \file
+ *
+ * \brief SAM TC - Timer Counter Driver
+ *
+ * Copyright (C) 2013-2016 Atmel Corporation. All rights reserved.
+ *
+ * \asf_license_start
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel microcontroller product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * \asf_license_stop
+ *
+ */
+/*
+ * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
+ */
+
+#ifndef TC_H_INCLUDED
+#define TC_H_INCLUDED
+
+/**
+ * \defgroup asfdoc_sam0_tc_group SAM Timer/Counter (TC) Driver
+ *
+ * This driver for Atmel&reg; | SMART ARM&reg;-based microcontrollers provides an interface for the configuration
+ * and management of the timer modules within the device, for waveform
+ * generation and timing operations. The following driver API modes are covered
+ * by this manual:
+ *
+ * - Polled APIs
+ * \if TC_CALLBACK_MODE
+ * - Callback APIs
+ * \endif
+ *
+ *
+ * The following peripheral is used by this module:
+ * - TC (Timer/Counter)
+ *
+ * The following devices can use this module:
+ * - Atmel | SMART SAM D20/D21
+ * - Atmel | SMART SAM R21
+ * - Atmel | SMART SAM D09/D10/D11
+ * - Atmel | SMART SAM L21/L22
+ * - Atmel | SMART SAM DA1
+ * - Atmel | SMART SAM C20/C21
+ *
+ * The outline of this documentation is as follows:
+ * - \ref asfdoc_sam0_tc_prerequisites
+ * - \ref asfdoc_sam0_tc_module_overview
+ * - \ref asfdoc_sam0_tc_special_considerations
+ * - \ref asfdoc_sam0_tc_extra_info
+ * - \ref asfdoc_sam0_tc_examples
+ * - \ref asfdoc_sam0_tc_api_overview
+ *
+ *
+ * \section asfdoc_sam0_tc_prerequisites Prerequisites
+ *
+ * There are no prerequisites for this module.
+ *
+ *
+ * \section asfdoc_sam0_tc_module_overview Module Overview
+ *
+ * The Timer/Counter (TC) module provides a set of timing and counting related
+ * functionality, such as the generation of periodic waveforms, the capturing
+ * of a periodic waveform's frequency/duty cycle, and software timekeeping for
+ * periodic operations. TC modules can be configured to use an 8-, 16-, or
+ * 32-bit counter size.
+ *
+ * This TC module for the SAM is capable of the following functions:
+ *
+ * - Generation of PWM signals
+ * - Generation of timestamps for events
+ * - General time counting
+ * - Waveform period capture
+ * - Waveform frequency capture
+ *
+ * \ref asfdoc_sam0_tc_block_diagram "The diagram below" shows the overview
+ * of the TC module design.
+ *
+ * \anchor asfdoc_sam0_tc_block_diagram
+ * \image html overview.svg "Basic Overview of the TC Module"
+ *
+ *
+ * \subsection asfdoc_sam0_tc_features Driver Feature Macro Definition
+ * <table>
+ * <tr>
+ * <th>Driver Feature Macro</th>
+ * <th>Supported devices</th>
+ * </tr>
+ * <tr>
+ * <td>FEATURE_TC_DOUBLE_BUFFERED</td>
+ * <td>SAM L21/L22/C20/C21</td>
+ * </tr>
+ * <tr>
+ * <td>FEATURE_TC_SYNCBUSY_SCHEME_VERSION_2</td>
+ * <td>SAM L21/L22/C20/C21</td>
+ * </tr>
+ * <tr>
+ * <td>FEATURE_TC_STAMP_PW_CAPTURE</td>
+ * <td>SAM L21/L22/C20/C21</td>
+ * </tr>
+ * <tr>
+ * <td>FEATURE_TC_READ_SYNC</td>
+ * <td>SAM L21/L22/C20/C21</td>
+ * </tr>
+ * <tr>
+ * <td>FEATURE_TC_IO_CAPTURE</td>
+ * <td>SAM L21/L22/C20/C21</td>
+ * </tr>
+ * <tr>
+ * <td>FEATURE_TC_GENERATE_DMA_TRIGGER</td>
+ * <td>SAM L21/L22</td>
+ * </tr>
+ * </table>
+ * \note The specific features are only available in the driver when the
+ * selected device supports those features.
+ *
+ * \subsection asfdoc_sam0_tc_module_overview_func_desc Functional Description
+ * Independent of the configured counter size, each TC module can be set up
+ * in one of two different modes; capture and compare.
+ *
+ * In capture mode, the counter value is stored when a configurable event
+ * occurs. This mode can be used to generate timestamps used in event capture,
+ * or it can be used for the measurement of a periodic input signal's
+ * frequency/duty cycle.
+ *
+ * In compare mode, the counter value is compared against one or more of the
+ * configured channel compare values. When the counter value coincides with a
+ * compare value an action can be taken automatically by the module, such as
+ * generating an output event or toggling a pin when used for frequency or
+ * Pulse Width Modulation (PWM) signal generation.
+ *
+ * \note The connection of events between modules requires the use of the
+ * \ref asfdoc_sam0_events_group "SAM Event System Driver (EVENTS)"
+ * to route output event of one module to the input event of another.
+ * For more information on event routing, refer to the event driver
+ * documentation.
+ *
+ * \subsection asfdoc_sam0_tc_module_overview_tc_size Timer/Counter Size
+ * Each timer module can be configured in one of three different counter
+ * sizes; 8-, 16-, and 32-bit. The size of the counter determines the maximum
+ * value it can count to before an overflow occurs and the count is reset back
+ * to zero. \ref asfdoc_sam0_tc_count_size_vs_top "The table below" shows the
+ * maximum values for each of the possible counter sizes.
+ *
+ * \anchor asfdoc_sam0_tc_count_size_vs_top
+ * <table>
+ * <caption>Timer Counter Sizes and Their Maximum Count Values</caption>
+ * <tr>
+ * <th>Counter size</th>
+ * <th>Max. (hexadecimal)</th>
+ * <th>Max. (decimal)</th>
+ * </tr>
+ * <tr>
+ * <td>8-bit</td>
+ * <td>0xFF</td>
+ * <td>255</td>
+ * </tr>
+ * <tr>
+ * <td>16-bit</td>
+ * <td>0xFFFF</td>
+ * <td>65,535</td>
+ * </tr>
+ * <tr>
+ * <td>32-bit</td>
+ * <td>0xFFFFFFFF</td>
+ * <td>4,294,967,295</td>
+ * </tr>
+ * </table>
+ *
+ * When using the counter in 16- or 32-bit count mode, Compare Capture
+ * register 0 (CC0) is used to store the period value when running in PWM
+ * generation match mode.
+ *
+ * When using 32-bit counter size, two 16-bit counters are chained together
+ * in a cascade formation. Except in SAM D09/D10/D11. Even numbered TC modules
+ * (e.g. TC0, TC2) can be configured as 32-bit counters. The odd numbered
+ * counters will act as slaves to the even numbered masters, and will not
+ * be reconfigurable until the master timer is disabled. The pairing of timer
+ * modules for 32-bit mode is shown in \ref asfdoc_sam0_tc_module_ms_pairs
+ * "the table below".
+ *
+ * \anchor asfdoc_sam0_tc_module_ms_pairs
+ * <table>
+ * <caption>TC Master and Slave Module Pairings</caption>
+ * <tr>
+ * <th>Master TC module</th>
+ * <th>Slave TC module</th>
+ * </tr>
+ * <tr>
+ * <td>TC0</td>
+ * <td>TC1</td>
+ * </tr>
+ * <tr>
+ * <td>TC2</td>
+ * <td>TC3</td>
+ * </tr>
+ * <tr>
+ * <td>...</td>
+ * <td>...</td>
+ * </tr>
+ * <tr>
+ * <td>TCn-1</td>
+ * <td>TCn</td>
+ * </tr>
+ * </table>
+ *
+ * In SAM D09/D10/D11, odd numbered TC modules (e.g. TC1) can be configured as 32-bit
+ * counters. The even numbered (e.g. TC2) counters will act as slaves to the odd
+ * numbered masters.
+ *
+ * \subsection asfdoc_sam0_tc_module_overview_clock Clock Settings
+ *
+ * \subsubsection asfdoc_sam0_tc_module_overview_clock_selection Clock Selection
+ * Each TC peripheral is clocked asynchronously to the system clock by a GCLK
+ * (Generic Clock) channel. The GCLK channel connects to any of the GCLK
+ * generators. The GCLK generators are configured to use one of the available
+ * clock sources on the system such as internal oscillator, external crystals,
+ * etc. See the \ref asfdoc_sam0_system_clock_group "Generic Clock driver"
+ *for
+ * more information.
+ *
+ * \subsubsection asfdoc_sam0_tc_module_overview_clock_prescaler Prescaler
+ * Each TC module in the SAM has its own individual clock prescaler, which
+ * can be used to divide the input clock frequency used in the counter. This
+ * prescaler only scales the clock used to provide clock pulses for the counter
+ * to count, and does not affect the digital register interface portion of
+ * the module, thus the timer registers will synchronize to the raw GCLK
+ * frequency input to the module.
+ *
+ * As a result of this, when selecting a GCLK frequency and timer prescaler
+ * value the user application should consider both the timer resolution
+ * required and the synchronization frequency, to avoid lengthy
+ * synchronization times of the module if a very slow GCLK frequency is fed
+ * into the TC module. It is preferable to use a higher module GCLK frequency
+ * as the input to the timer, and prescale this down as much as possible to
+ * obtain a suitable counter frequency in latency-sensitive applications.
+ *
+ * \subsubsection asfdoc_sam0_tc_module_overview_clock_reloading Reloading
+ * Timer modules also contain a configurable reload action, used when a
+ * re-trigger event occurs. Examples of a re-trigger event are the counter
+ * reaching the maximum value when counting up, or when an event from the event
+ * system tells the counter to re-trigger. The reload action determines if the
+ * prescaler should be reset, and when this should happen. The counter will
+ * always be reloaded with the value it is set to start counting from. The user
+ * can choose between three different reload actions, described in
+ * \ref asfdoc_sam0_tc_module_reload_act "the table below".
+ *
+ * \anchor asfdoc_sam0_tc_module_reload_act
+ * <table>
+ * <caption>TC Module Reload Actions</caption>
+ * <tr>
+ * <th>Reload action</th>
+ * <th>Description</th>
+ * </tr>
+ * <tr>
+ * <td>\ref TC_RELOAD_ACTION_GCLK </td>
+ * <td>Reload TC counter value on next GCLK cycle. Leave prescaler
+ * as-is.</td>
+ * </tr>
+ * <tr>
+ * <td>\ref TC_RELOAD_ACTION_PRESC </td>
+ * <td>Reloads TC counter value on next prescaler clock. Leave prescaler
+ * as-is.</td>
+ * </tr>
+ * <tr>
+ * <td> \ref TC_RELOAD_ACTION_RESYNC </td>
+ * <td>Reload TC counter value on next GCLK cycle. Clear prescaler to
+ * zero.</td>
+ * </tr>
+ * </table>
+ *
+ * The reload action to use will depend on the specific application being
+ * implemented. One example is when an external trigger for a reload occurs; if
+ * the TC uses the prescaler, the counter in the prescaler should not have a
+ * value between zero and the division factor. The TC counter and the counter
+ * in the prescaler should both start at zero. When the counter is set to
+ * re-trigger when it reaches the maximum value on the other hand, this is not the
+ * right option to use. In such a case it would be better if the prescaler is
+ * left unaltered when the re-trigger happens, letting the counter reset on the
+ * next GCLK cycle.
+ *
+ * \subsection asfdoc_sam0_tc_module_overview_compare_match Compare Match Operations
+ * In compare match operation, Compare/Capture registers are used in comparison
+ * with the counter value. When the timer's count value matches the value of a
+ * compare channel, a user defined action can be taken.
+ *
+ * \subsubsection asfdoc_sam0_tc_module_overview_compare_match_timer Basic Timer
+ *
+ * A Basic Timer is a simple application where compare match operations are used
+ * to determine when a specific period has elapsed. In Basic Timer operations,
+ * one or more values in the module's Compare/Capture registers are used to
+ * specify the time (as a number of prescaled GCLK cycles) when an action should
+ * be taken by the microcontroller. This can be an Interrupt Service Routine
+ * (ISR), event generator via the event system, or a software flag that is
+ * polled via the user application.
+ *
+ * \subsubsection asfdoc_sam0_tc_module_overview_compare_match_wg Waveform Generation
+ *
+ * Waveform generation enables the TC module to generate square waves, or if
+ * combined with an external passive low-pass filter; analog waveforms.
+ *
+ * \subsubsection asfdoc_sam0_tc_module_overview_compare_match_wg_pwm Waveform Generation - PWM
+ *
+ * Pulse width modulation is a form of waveform generation and a signalling
+ * technique that can be useful in many situations. When PWM mode is used,
+ * a digital pulse train with a configurable frequency and duty cycle can be
+ * generated by the TC module and output to a GPIO pin of the device.
+ *
+ * Often PWM is used to communicate a control or information parameter to an
+ * external circuit or component. Differing impedances of the source generator
+ * and sink receiver circuits are less of an issue when using PWM compared to
+ * using an analog voltage value, as noise will not generally affect the
+ * signal's integrity to a meaningful extent.
+ *
+ * \ref asfdoc_sam0_tc_module_pwm_normal_diag "The figure below" illustrates
+ * operations and different states of the counter and its output when running
+ * the counter in PWM normal mode. As can be seen, the TOP value is unchanged
+ * and is set to MAX. The compare match value is changed at several points to
+ * illustrate the resulting waveform output changes. The PWM output is set to
+ * normal (i.e. non-inverted) output mode.
+ *
+ * \anchor asfdoc_sam0_tc_module_pwm_normal_diag
+ * \image html pwm_normal_ex.svg "Example of PWM in Normal Mode, and Different Counter Operations"
+ *
+ *
+ * In \ref asfdoc_sam0_tc_module_pwm_match_diag "the figure below", the
+ * counter is set to generate PWM in Match mode. The PWM output is inverted via
+ * the appropriate configuration option in the TC driver configuration
+ * structure. In this example, the counter value is changed once, but the
+ * compare match value is kept unchanged. As can be seen, it is possible to
+ * change the TOP value when running in PWM match mode.
+ *
+ * \anchor asfdoc_sam0_tc_module_pwm_match_diag
+ * \image html pwm_match_ex.svg "Example of PWM in Match Mode and Different Counter Operations"
+ *
+ * \subsubsection asfdoc_sam0_tc_module_overview_compare_match_wg_freq Waveform Generation - Frequency
+ *
+ * Frequency Generation mode is in many ways identical to PWM
+ * generation. However, in Frequency Generation a toggle only occurs
+ * on the output when a match on a capture channels occurs. When the
+ * match is made, the timer value is reset, resulting in a variable
+ * frequency square wave with a fixed 50% duty cycle.
+ *
+ * \subsubsection asfdoc_sam0_tc_module_overview_compare_match_capt Capture Operations
+ *
+ * In capture operations, any event from the event system or a pin change can
+ * trigger a capture of the counter value. This captured counter value can be
+ * used as a timestamp for the event, or it can be used in frequency and pulse
+ * width capture.
+ *
+ * \subsubsection asfdoc_sam0_tc_module_overview_compare_match_capt_event_capture Capture Operations - Event
+ *
+ * Event capture is a simple use of the capture functionality,
+ * designed to create timestamps for specific events. When the TC
+ * module's input capture pin is externally toggled, the current timer
+ * count value is copied into a buffered register which can then be
+ * read out by the user application.
+ *
+ * Note that when performing any capture operation, there is a risk that the
+ * counter reaches its top value (MAX) when counting up, or the bottom value
+ * (zero) when counting down, before the capture event occurs. This can distort
+ * the result, making event timestamps to appear shorter than reality; the
+ * user application should check for timer overflow when reading a capture
+ * result in order to detect this situation and perform an appropriate
+ * adjustment.
+ *
+ * Before checking for a new capture, \ref TC_STATUS_COUNT_OVERFLOW
+ * should be checked. The response to an overflow error is left to the user
+ * application, however it may be necessary to clear both the capture overflow
+ * flag and the capture flag upon each capture reading.
+ *
+ * \subsubsection asfdoc_sam0_tc_module_overview_compare_match_capt_pwc Capture Operations - Pulse Width
+ *
+ * Pulse Width Capture mode makes it possible to measure the pulse width and
+ * period of PWM signals. This mode uses two capture channels of the counter.
+ * This means that the counter module used for Pulse Width Capture can not be
+ * used for any other purpose. There are two modes for pulse width capture;
+ * Pulse Width Period (PWP) and Period Pulse Width (PPW). In PWP mode, capture
+ * channel 0 is used for storing the pulse width and capture channel 1 stores
+ * the observed period. While in PPW mode, the roles of the two capture channels
+ * are reversed.
+ *
+ * As in the above example it is necessary to poll on interrupt flags to see
+ * if a new capture has happened and check that a capture overflow error has
+ * not occurred.
+ *
+ * \subsection asfdoc_sam0_tc_module_overview_oneshot One-shot Mode
+ *
+ * TC modules can be configured into a one-shot mode. When configured in this
+ * manner, starting the timer will cause it to count until the next overflow
+ * or underflow condition before automatically halting, waiting to be manually
+ * triggered by the user application software or an event signal from the event
+ * system.
+ *
+ * \subsubsection asfdoc_sam0_tc_module_overview_inversion Wave Generation Output Inversion
+ *
+ * The output of the wave generation can be inverted by hardware if desired,
+ * resulting in the logically inverted value being output to the configured
+ * device GPIO pin.
+ *
+ *
+ * \section asfdoc_sam0_tc_special_considerations Special Considerations
+ *
+ * The number of capture compare registers in each TC module is dependent on
+ * the specific SAM device being used, and in some cases the counter size.
+ *
+ * The maximum amount of capture compare registers available in any SAM
+ * device is two when running in 32-bit mode and four in 8- and 16-bit modes.
+ *
+ *
+ * \section asfdoc_sam0_tc_extra_info Extra Information
+ *
+ * For extra information, see \ref asfdoc_sam0_tc_extra. This includes:
+ * - \ref asfdoc_sam0_tc_extra_acronyms
+ * - \ref asfdoc_sam0_tc_extra_dependencies
+ * - \ref asfdoc_sam0_tc_extra_errata
+ * - \ref asfdoc_sam0_tc_extra_history
+ *
+ *
+ * \section asfdoc_sam0_tc_examples Examples
+ *
+ * For a list of examples related to this driver, see
+ * \ref asfdoc_sam0_tc_exqsg.
+ *
+ * \section asfdoc_sam0_tc_api_overview API Overview
+ * @{
+ */
+
+#include <compiler.h>
+#include <clock.h>
+#include <gclk.h>
+#include <pinmux.h>
+
+/**
+ * Define port features set according to different device family
+ * @{
+*/
+#if (SAML21) || (SAML22) || (SAMC20) || (SAMC21) || (SAMR30) || defined(__DOXYGEN__)
+/** TC double buffered. */
+# define FEATURE_TC_DOUBLE_BUFFERED
+/** SYNCBUSY scheme version 2. */
+# define FEATURE_TC_SYNCBUSY_SCHEME_VERSION_2
+/** TC time stamp capture and pulse width capture. */
+# define FEATURE_TC_STAMP_PW_CAPTURE
+/** Read synchronization of COUNT. */
+# define FEATURE_TC_READ_SYNC
+/** I/O pin edge capture. */
+# define FEATURE_TC_IO_CAPTURE
+#endif
+
+#if (SAML21XXXB) || (SAMR30) || defined(__DOXYGEN__)
+/** Generate Direct Memory Access (DMA) triggers. */
+# define FEATURE_TC_GENERATE_DMA_TRIGGER
+#endif
+/*@}*/
+
+#if !defined(__DOXYGEN__)
+#if SAMD20 || SAML21 || SAML22 || SAMC20 || SAMC21 || SAMR30
+# define TC_INSTANCE_OFFSET 0
+#endif
+#if SAMD21 || SAMR21 || SAMDA1
+# define TC_INSTANCE_OFFSET 3
+#endif
+#if SAMD09 || SAMD10 || SAMD11
+# define TC_INSTANCE_OFFSET 1
+#endif
+
+#if SAMD20
+# define NUMBER_OF_COMPARE_CAPTURE_CHANNELS TC0_CC8_NUM
+#elif SAML21 || SAML22 || SAMC20 || SAMC21 || SAMR30
+# define NUMBER_OF_COMPARE_CAPTURE_CHANNELS TC0_CC_NUM
+#elif SAMD09 || SAMD10 || SAMD11
+# define NUMBER_OF_COMPARE_CAPTURE_CHANNELS TC1_CC8_NUM
+#else
+# define NUMBER_OF_COMPARE_CAPTURE_CHANNELS TC3_CC8_NUM
+ /* Same number for 8-, 16- or 32-bit TC and all TC instances */
+#endif
+
+/** TC Instance MAX ID Number. */
+#if SAMD20E || SAMD20G || SAMD21G || SAMD21E || SAMR21
+# if SAMD21GXXL
+# define TC_INST_MAX_ID 7
+# else
+# define TC_INST_MAX_ID 5
+# endif
+#elif SAML21 || SAMC20 || SAMC21 || SAMR30
+# define TC_INST_MAX_ID 4
+#elif SAML22
+# define TC_INST_MAX_ID 3
+#elif SAMD09 || SAMD10 || SAMD11
+# define TC_INST_MAX_ID 2
+#else
+# define TC_INST_MAX_ID 7
+#endif
+
+#endif
+
+#if TC_ASYNC == true
+# include <system_interrupt.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if TC_ASYNC == true
+/** Enum for the possible callback types for the TC module. */
+enum tc_callback {
+ /** Callback for TC overflow */
+ TC_CALLBACK_OVERFLOW,
+ /** Callback for capture overflow error */
+ TC_CALLBACK_ERROR,
+ /** Callback for capture compare channel 0 */
+ TC_CALLBACK_CC_CHANNEL0,
+ /** Callback for capture compare channel 1 */
+ TC_CALLBACK_CC_CHANNEL1,
+# if !defined(__DOXYGEN__)
+ /** Number of available callbacks */
+ TC_CALLBACK_N,
+# endif
+};
+#endif
+
+/**
+ * \name Module Status Flags
+ *
+ * TC status flags, returned by \ref tc_get_status() and cleared by
+ * \ref tc_clear_status().
+ *
+ * @{
+ */
+
+/** Timer channel 0 has matched against its compare value, or has captured a
+ * new value.
+ */
+#define TC_STATUS_CHANNEL_0_MATCH (1UL << 0)
+
+/** Timer channel 1 has matched against its compare value, or has captured a
+ * new value.
+ */
+#define TC_STATUS_CHANNEL_1_MATCH (1UL << 1)
+
+/** Timer register synchronization has completed, and the synchronized count
+ * value may be read.
+ */
+#define TC_STATUS_SYNC_READY (1UL << 2)
+
+/** A new value was captured before the previous value was read, resulting in
+ * lost data.
+ */
+#define TC_STATUS_CAPTURE_OVERFLOW (1UL << 3)
+
+/** The timer count value has overflowed from its maximum value to its minimum
+ * when counting upward, or from its minimum value to its maximum when
+ * counting downward.
+ */
+#define TC_STATUS_COUNT_OVERFLOW (1UL << 4)
+
+#ifdef FEATURE_TC_DOUBLE_BUFFERED
+/** Channel 0 compare or capture buffer valid. */
+#define TC_STATUS_CHN0_BUFFER_VALID (1UL << 5)
+/** Channel 1 compare or capture buffer valid. */
+#define TC_STATUS_CHN1_BUFFER_VALID (1UL << 6)
+/** Period buffer valid. */
+#define TC_STATUS_PERIOD_BUFFER_VALID (1UL << 7)
+#endif
+/** @} */
+
+/**
+ * \brief Index of the compare capture channels.
+ *
+ * This enum is used to specify which capture/compare channel to do
+ * operations on.
+ */
+enum tc_compare_capture_channel {
+ /** Index of compare capture channel 0 */
+ TC_COMPARE_CAPTURE_CHANNEL_0,
+ /** Index of compare capture channel 1 */
+ TC_COMPARE_CAPTURE_CHANNEL_1,
+};
+
+/**
+ * \name TC Wave Generation Mode
+ *
+ * @{
+ */
+#if SAML21 || SAML22 || SAMC20 || SAMC21 || SAMR30
+/** TC wave generation mode: normal frequency. */
+#define TC_WAVE_GENERATION_NORMAL_FREQ_MODE TC_WAVE_WAVEGEN_NFRQ
+/** TC wave generation mode: match frequency. */
+#define TC_WAVE_GENERATION_MATCH_FREQ_MODE TC_WAVE_WAVEGEN_MFRQ
+/** TC wave generation mode: normal PWM. */
+#define TC_WAVE_GENERATION_NORMAL_PWM_MODE TC_WAVE_WAVEGEN_NPWM
+/** TC wave generation mode: match PWM. */
+#define TC_WAVE_GENERATION_MATCH_PWM_MODE TC_WAVE_WAVEGEN_MPWM
+#else
+/** TC wave generation mode: normal frequency. */
+#define TC_WAVE_GENERATION_NORMAL_FREQ_MODE TC_CTRLA_WAVEGEN_NFRQ
+/** TC wave generation mode: match frequency. */
+#define TC_WAVE_GENERATION_MATCH_FREQ_MODE TC_CTRLA_WAVEGEN_MFRQ
+/** TC wave generation mode: normal PWM. */
+#define TC_WAVE_GENERATION_NORMAL_PWM_MODE TC_CTRLA_WAVEGEN_NPWM
+/** TC wave generation mode: match PWM. */
+#define TC_WAVE_GENERATION_MATCH_PWM_MODE TC_CTRLA_WAVEGEN_MPWM
+#endif
+/** @} */
+
+/**
+ * \brief TC wave generation mode enum.
+ *
+ * This enum is used to select which mode to run the wave
+ * generation in.
+ *
+ */
+enum tc_wave_generation {
+ /** Top is maximum, except in 8-bit counter size where it is the PER
+ * register
+ */
+ TC_WAVE_GENERATION_NORMAL_FREQ = TC_WAVE_GENERATION_NORMAL_FREQ_MODE,
+
+ /** Top is CC0, except in 8-bit counter size where it is the PER
+ * register
+ */
+ TC_WAVE_GENERATION_MATCH_FREQ = TC_WAVE_GENERATION_MATCH_FREQ_MODE,
+
+ /** Top is maximum, except in 8-bit counter size where it is the PER
+ * register
+ */
+ TC_WAVE_GENERATION_NORMAL_PWM = TC_WAVE_GENERATION_NORMAL_PWM_MODE,
+
+ /** Top is CC0, except in 8-bit counter size where it is the PER
+ * register
+ */
+ TC_WAVE_GENERATION_MATCH_PWM = TC_WAVE_GENERATION_MATCH_PWM_MODE,
+};
+
+/**
+ * \brief Specifies if the counter is 8-, 16-, or 32-bit.
+ *
+ * This enum specifies the maximum value it is possible to count to.
+ */
+enum tc_counter_size {
+ /** The counter's maximum value is 0xFF, the period register is
+ * available to be used as top value
+ */
+ TC_COUNTER_SIZE_8BIT = TC_CTRLA_MODE_COUNT8,
+
+ /** The counter's maximum value is 0xFFFF. There is no separate
+ * period register, to modify top one of the capture compare
+ * registers has to be used. This limits the amount of
+ * available channels.
+ */
+ TC_COUNTER_SIZE_16BIT = TC_CTRLA_MODE_COUNT16,
+
+ /** The counter's maximum value is 0xFFFFFFFF. There is no separate
+ * period register, to modify top one of the capture compare
+ * registers has to be used. This limits the amount of
+ * available channels.
+ */
+ TC_COUNTER_SIZE_32BIT = TC_CTRLA_MODE_COUNT32,
+};
+
+/**
+ * \brief TC Counter reload action enum.
+ *
+ * This enum specify how the counter and prescaler should reload.
+ */
+enum tc_reload_action {
+ /** The counter is reloaded/reset on the next GCLK and starts
+ * counting on the prescaler clock
+ */
+ TC_RELOAD_ACTION_GCLK = TC_CTRLA_PRESCSYNC_GCLK,
+
+ /** The counter is reloaded/reset on the next prescaler clock
+ */
+ TC_RELOAD_ACTION_PRESC = TC_CTRLA_PRESCSYNC_PRESC,
+
+ /** The counter is reloaded/reset on the next GCLK, and the
+ * prescaler is restarted as well
+ */
+ TC_RELOAD_ACTION_RESYNC = TC_CTRLA_PRESCSYNC_RESYNC,
+};
+
+/**
+ * \brief TC clock prescaler values.
+ *
+ * This enum is used to choose the clock prescaler
+ * configuration. The prescaler divides the clock frequency of the TC
+ * module to make the counter count slower.
+ */
+enum tc_clock_prescaler {
+ /** Divide clock by 1 */
+ TC_CLOCK_PRESCALER_DIV1 = TC_CTRLA_PRESCALER(0),
+ /** Divide clock by 2 */
+ TC_CLOCK_PRESCALER_DIV2 = TC_CTRLA_PRESCALER(1),
+ /** Divide clock by 4 */
+ TC_CLOCK_PRESCALER_DIV4 = TC_CTRLA_PRESCALER(2),
+ /** Divide clock by 8 */
+ TC_CLOCK_PRESCALER_DIV8 = TC_CTRLA_PRESCALER(3),
+ /** Divide clock by 16 */
+ TC_CLOCK_PRESCALER_DIV16 = TC_CTRLA_PRESCALER(4),
+ /** Divide clock by 64 */
+ TC_CLOCK_PRESCALER_DIV64 = TC_CTRLA_PRESCALER(5),
+ /** Divide clock by 256 */
+ TC_CLOCK_PRESCALER_DIV256 = TC_CTRLA_PRESCALER(6),
+ /** Divide clock by 1024 */
+ TC_CLOCK_PRESCALER_DIV1024 = TC_CTRLA_PRESCALER(7),
+};
+
+/**
+ * \brief TC module count direction.
+ *
+ * Timer/Counter count direction.
+ */
+enum tc_count_direction {
+ /** Timer should count upward from zero to MAX */
+ TC_COUNT_DIRECTION_UP,
+
+ /** Timer should count downward to zero from MAX */
+ TC_COUNT_DIRECTION_DOWN,
+};
+
+/**
+ * \name Waveform Inversion Mode
+ *
+ * @{
+ */
+#if SAML21 || SAML22 || SAMC20 || SAMC21 || SAMR30
+/** Waveform inversion CC0 mode. */
+#define TC_WAVEFORM_INVERT_CC0_MODE TC_DRVCTRL_INVEN(1)
+/** Waveform inversion CC1 mode. */
+#define TC_WAVEFORM_INVERT_CC1_MODE TC_DRVCTRL_INVEN(2)
+#else
+/** Waveform inversion CC0 mode. */
+#define TC_WAVEFORM_INVERT_CC0_MODE TC_CTRLC_INVEN(1)
+/** Waveform inversion CC1 mode. */
+#define TC_WAVEFORM_INVERT_CC1_MODE TC_CTRLC_INVEN(2)
+#endif
+
+/**
+ * \brief Waveform inversion mode.
+ *
+ * Output waveform inversion mode.
+ */
+enum tc_waveform_invert_output {
+ /** No inversion of the waveform output */
+ TC_WAVEFORM_INVERT_OUTPUT_NONE = 0,
+ /** Invert output from compare channel 0 */
+ TC_WAVEFORM_INVERT_OUTPUT_CHANNEL_0 = TC_WAVEFORM_INVERT_CC0_MODE,
+ /** Invert output from compare channel 1 */
+ TC_WAVEFORM_INVERT_OUTPUT_CHANNEL_1 = TC_WAVEFORM_INVERT_CC1_MODE,
+};
+
+/**
+ * \brief Action to perform when the TC module is triggered by an event.
+ *
+ * Event action to perform when the module is triggered by an event.
+ */
+enum tc_event_action {
+ /** No event action */
+ TC_EVENT_ACTION_OFF = TC_EVCTRL_EVACT_OFF,
+ /** Re-trigger on event */
+ TC_EVENT_ACTION_RETRIGGER = TC_EVCTRL_EVACT_RETRIGGER,
+ /** Increment counter on event */
+ TC_EVENT_ACTION_INCREMENT_COUNTER = TC_EVCTRL_EVACT_COUNT,
+ /** Start counter on event */
+ TC_EVENT_ACTION_START = TC_EVCTRL_EVACT_START,
+
+ /** Store period in capture register 0, pulse width in capture
+ * register 1
+ */
+ TC_EVENT_ACTION_PPW = TC_EVCTRL_EVACT_PPW,
+
+ /** Store pulse width in capture register 0, period in capture
+ * register 1
+ */
+ TC_EVENT_ACTION_PWP = TC_EVCTRL_EVACT_PWP,
+#ifdef FEATURE_TC_STAMP_PW_CAPTURE
+ /** Time stamp capture */
+ TC_EVENT_ACTION_STAMP = TC_EVCTRL_EVACT_STAMP,
+ /** Pulse width capture */
+ TC_EVENT_ACTION_PW = TC_EVCTRL_EVACT_PW,
+#endif
+};
+
+/**
+ * \brief TC event enable/disable structure.
+ *
+ * Event flags for the \ref tc_enable_events() and \ref tc_disable_events().
+ */
+struct tc_events {
+ /** Generate an output event on a compare channel match */
+ bool generate_event_on_compare_channel
+ [NUMBER_OF_COMPARE_CAPTURE_CHANNELS];
+ /** Generate an output event on counter overflow */
+ bool generate_event_on_overflow;
+ /** Perform the configured event action when an incoming event is signalled */
+ bool on_event_perform_action;
+ /** Specifies if the input event source is inverted, when used in PWP or
+ * PPW event action modes
+ */
+ bool invert_event_input;
+ /** Specifies which event to trigger if an event is triggered */
+ enum tc_event_action event_action;
+};
+
+/**
+ * \brief Configuration struct for TC module in 8-bit size counter mode.
+ */
+struct tc_8bit_config {
+ /** Initial timer count value */
+ uint8_t value;
+ /** Where to count to or from depending on the direction on the counter */
+ uint8_t period;
+ /** Value to be used for compare match on each channel */
+ uint8_t compare_capture_channel[NUMBER_OF_COMPARE_CAPTURE_CHANNELS];
+};
+
+/**
+ * \brief Configuration struct for TC module in 16-bit size counter mode.
+ */
+struct tc_16bit_config {
+ /** Initial timer count value */
+ uint16_t value;
+ /** Value to be used for compare match on each channel */
+ uint16_t compare_capture_channel[NUMBER_OF_COMPARE_CAPTURE_CHANNELS];
+};
+
+/**
+ * \brief Configuration struct for TC module in 32-bit size counter mode.
+ */
+struct tc_32bit_config {
+ /** Initial timer count value */
+ uint32_t value;
+ /** Value to be used for compare match on each channel */
+ uint32_t compare_capture_channel[NUMBER_OF_COMPARE_CAPTURE_CHANNELS];
+};
+
+/**
+ * \brief Configuration struct for TC module in 32-bit size counter mode.
+ */
+struct tc_pwm_channel {
+ /** When \c true, PWM output for the given channel is enabled */
+ bool enabled;
+ /** Specifies pin output for each channel */
+ uint32_t pin_out;
+ /** Specifies Multiplexer (MUX) setting for each output channel pin */
+ uint32_t pin_mux;
+};
+
+/**
+ * \brief TC configuration structure.
+ *
+ * Configuration struct for a TC instance. This structure should be
+ * initialized by the \ref tc_get_config_defaults function before being
+ * modified by the user application.
+ */
+struct tc_config {
+ /** GCLK generator used to clock the peripheral */
+ enum gclk_generator clock_source;
+
+ /** When \c true the module is enabled during standby */
+ bool run_in_standby;
+#if (SAML21) || (SAML22) || (SAMC20) || (SAMC21) || (SAMR30)
+ /** Run on demand */
+ bool on_demand;
+#endif
+ /** Specifies either 8-, 16-, or 32-bit counter size */
+ enum tc_counter_size counter_size;
+ /** Specifies the prescaler value for GCLK_TC */
+ enum tc_clock_prescaler clock_prescaler;
+ /** Specifies which waveform generation mode to use */
+ enum tc_wave_generation wave_generation;
+
+ /** Specifies the reload or reset time of the counter and prescaler
+ * resynchronization on a re-trigger event for the TC
+ */
+ enum tc_reload_action reload_action;
+
+ /** Specifies which channel(s) to invert the waveform on.
+ For SAM L21/L22/C20/C21, it's also used to invert I/O input pin. */
+ uint8_t waveform_invert_output;
+
+ /** Specifies which channel(s) to enable channel capture
+ * operation on
+ */
+ bool enable_capture_on_channel[NUMBER_OF_COMPARE_CAPTURE_CHANNELS];
+#ifdef FEATURE_TC_IO_CAPTURE
+ /** Specifies which channel(s) to enable I/O capture
+ * operation on
+ */
+ bool enable_capture_on_IO[NUMBER_OF_COMPARE_CAPTURE_CHANNELS];
+#endif
+
+ /** When \c true, one-shot will stop the TC on next hardware or software
+ * re-trigger event or overflow/underflow
+ */
+ bool oneshot;
+
+ /** Specifies the direction for the TC to count */
+ enum tc_count_direction count_direction;
+
+ /** Specifies the PWM channel for TC */
+ struct tc_pwm_channel pwm_channel[NUMBER_OF_COMPARE_CAPTURE_CHANNELS];
+
+ /** Access the different counter size settings through this configuration member. */
+ union {
+ /** Struct for 8-bit specific timer configuration */
+ struct tc_8bit_config counter_8_bit;
+ /** Struct for 16-bit specific timer configuration */
+ struct tc_16bit_config counter_16_bit;
+ /** Struct for 32-bit specific timer configuration */
+ struct tc_32bit_config counter_32_bit;
+ };
+
+#ifdef FEATURE_TC_DOUBLE_BUFFERED
+ /** Set to \c true to enable double buffering write. When enabled any write
+ * through \ref tc_set_top_value(), \ref tc_set_compare_value() and
+ * will direct to the buffer register as buffered
+ * value, and the buffered value will be committed to effective register
+ * on UPDATE condition, if update is not locked.
+ */
+ bool double_buffering_enabled;
+#endif
+};
+
+#if TC_ASYNC == true
+/** Forward Declaration for the device instance. */
+struct tc_module;
+
+/** Type of the callback functions. */
+typedef void (*tc_callback_t)(struct tc_module *const module);
+#endif
+
+/**
+ * \brief TC software device instance structure.
+ *
+ * TC software instance structure, used to retain software state information
+ * of an associated hardware module instance.
+ *
+ * \note The fields of this structure should not be altered by the user
+ * application; they are reserved for module-internal use only.
+ */
+struct tc_module {
+#if !defined(__DOXYGEN__)
+ /** Hardware module pointer of the associated Timer/Counter peripheral */
+ Tc *hw;
+
+ /** Size of the initialized Timer/Counter module configuration */
+ enum tc_counter_size counter_size;
+# if TC_ASYNC == true
+ /** Array of callbacks */
+ tc_callback_t callback[TC_CALLBACK_N];
+ /** Bit mask for callbacks registered */
+ uint8_t register_callback_mask;
+ /** Bit mask for callbacks enabled */
+ uint8_t enable_callback_mask;
+# endif
+#ifdef FEATURE_TC_DOUBLE_BUFFERED
+ /** Set to \c true to enable double buffering write */
+ bool double_buffering_enabled;
+#endif
+#endif
+};
+
+#if !defined(__DOXYGEN__)
+uint8_t _tc_get_inst_index(
+ Tc *const hw);
+#endif
+
+/**
+ * \name Driver Initialization and Configuration
+ * @{
+ */
+
+/**
+ * \brief Determines if the hardware module(s) are currently synchronizing to
+ * the bus.
+ *
+ * Checks to see if the underlying hardware peripheral module(s) are currently
+ * synchronizing across multiple clock domains to the hardware bus. This
+ * function can be used to delay further operations on a module until such time
+ * that it is ready, to prevent blocking delays for synchronization in the
+ * user application.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ *
+ * \return Synchronization status of the underlying hardware module(s).
+ *
+ * \retval false If the module has completed synchronization
+ * \retval true If the module synchronization is ongoing
+ */
+static inline bool tc_is_syncing(
+ const struct tc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ TcCount8 *const tc_module = &(module_inst->hw->COUNT8);
+
+#if (SAML21) || (SAML22) || (SAMC20) || (SAMC21) || (SAMR30)
+ return (tc_module->SYNCBUSY.reg);
+#else
+ return (tc_module->STATUS.reg & TC_STATUS_SYNCBUSY);
+#endif
+}
+
+/**
+ * \brief Initializes config with predefined default values.
+ *
+ * This function will initialize a given TC configuration structure to
+ * a set of known default values. This function should be called on
+ * any new instance of the configuration structures before being
+ * modified by the user application.
+ *
+ * The default configuration is as follows:
+ * \li GCLK generator 0 (GCLK main) clock source
+ * \li 16-bit counter size on the counter
+ * \li No prescaler
+ * \li Normal frequency wave generation
+ * \li GCLK reload action
+ * \li Don't run in standby
+ * \li Don't run on demand for SAM L21/L22/C20/C21
+ * \li No inversion of waveform output
+ * \li No capture enabled
+ * \li No I/O capture enabled for SAM L21/L22/C20/C21
+ * \li No event input enabled
+ * \li Count upward
+ * \li Don't perform one-shot operations
+ * \li No event action
+ * \li No channel 0 PWM output
+ * \li No channel 1 PWM output
+ * \li Counter starts on 0
+ * \li Capture compare channel 0 set to 0
+ * \li Capture compare channel 1 set to 0
+ * \li No PWM pin output enabled
+ * \li Pin and MUX configuration not set
+ * \li Double buffer disabled (if have this feature)
+ *
+ * \param[out] config Pointer to a TC module configuration structure to set
+ */
+static inline void tc_get_config_defaults(
+ struct tc_config *const config)
+{
+ /* Sanity check arguments */
+ Assert(config);
+
+ /* Write default config to config struct */
+ config->clock_source = GCLK_GENERATOR_0;
+ config->counter_size = TC_COUNTER_SIZE_16BIT;
+ config->clock_prescaler = TC_CLOCK_PRESCALER_DIV1;
+ config->wave_generation = TC_WAVE_GENERATION_NORMAL_FREQ;
+ config->reload_action = TC_RELOAD_ACTION_GCLK;
+ config->run_in_standby = false;
+#if (SAML21) || (SAML22) || (SAMC20) || (SAMC21) || (SAMR30)
+ config->on_demand = false;
+#endif
+ config->waveform_invert_output = TC_WAVEFORM_INVERT_OUTPUT_NONE;
+ config->enable_capture_on_channel[TC_COMPARE_CAPTURE_CHANNEL_0] = false;
+ config->enable_capture_on_channel[TC_COMPARE_CAPTURE_CHANNEL_1] = false;
+#ifdef FEATURE_TC_IO_CAPTURE
+ config->enable_capture_on_IO[TC_COMPARE_CAPTURE_CHANNEL_0] = false;
+ config->enable_capture_on_IO[TC_COMPARE_CAPTURE_CHANNEL_1] = false;
+#endif
+
+ config->count_direction = TC_COUNT_DIRECTION_UP;
+ config->oneshot = false;
+
+ config->pwm_channel[TC_COMPARE_CAPTURE_CHANNEL_0].enabled = false;
+ config->pwm_channel[TC_COMPARE_CAPTURE_CHANNEL_0].pin_out = 0;
+ config->pwm_channel[TC_COMPARE_CAPTURE_CHANNEL_0].pin_mux = 0;
+
+ config->pwm_channel[TC_COMPARE_CAPTURE_CHANNEL_1].enabled = false;
+ config->pwm_channel[TC_COMPARE_CAPTURE_CHANNEL_1].pin_out = 0;
+ config->pwm_channel[TC_COMPARE_CAPTURE_CHANNEL_1].pin_mux = 0;
+
+ config->counter_16_bit.value = 0x0000;
+ config->counter_16_bit.compare_capture_channel\
+ [TC_COMPARE_CAPTURE_CHANNEL_0] = 0x0000;
+ config->counter_16_bit.compare_capture_channel\
+ [TC_COMPARE_CAPTURE_CHANNEL_1] = 0x0000;
+#ifdef FEATURE_TC_DOUBLE_BUFFERED
+ config->double_buffering_enabled = false;
+#endif
+
+}
+
+enum status_code tc_init(
+ struct tc_module *const module_inst,
+ Tc *const hw,
+ const struct tc_config *const config);
+
+/** @} */
+
+/**
+ * \name Event Management
+ * @{
+ */
+
+/**
+ * \brief Enables a TC module event input or output.
+ *
+ * Enables one or more input or output events to or from the TC module.
+ * See \ref tc_events for a list of events this module supports.
+ *
+ * \note Events cannot be altered while the module is enabled.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] events Struct containing flags of events to enable
+ */
+static inline void tc_enable_events(
+ struct tc_module *const module_inst,
+ struct tc_events *const events)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+ Assert(events);
+
+ Tc *const tc_module = module_inst->hw;
+
+ uint32_t event_mask = 0;
+
+ if (events->invert_event_input == true) {
+ event_mask |= TC_EVCTRL_TCINV;
+ }
+
+ if (events->on_event_perform_action == true) {
+ event_mask |= TC_EVCTRL_TCEI;
+ }
+
+ if (events->generate_event_on_overflow == true) {
+ event_mask |= TC_EVCTRL_OVFEO;
+ }
+
+ for (uint8_t i = 0; i < NUMBER_OF_COMPARE_CAPTURE_CHANNELS; i++) {
+ if (events->generate_event_on_compare_channel[i] == true) {
+ event_mask |= (TC_EVCTRL_MCEO(1) << i);
+ }
+ }
+
+ tc_module->COUNT8.EVCTRL.reg |= event_mask | events->event_action;
+}
+
+/**
+ * \brief Disables a TC module event input or output.
+ *
+ * Disables one or more input or output events to or from the TC module.
+ * See \ref tc_events for a list of events this module supports.
+ *
+ * \note Events cannot be altered while the module is enabled.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] events Struct containing flags of events to disable
+ */
+static inline void tc_disable_events(
+ struct tc_module *const module_inst,
+ struct tc_events *const events)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+ Assert(events);
+
+ Tc *const tc_module = module_inst->hw;
+
+ uint32_t event_mask = 0;
+
+ if (events->invert_event_input == true) {
+ event_mask |= TC_EVCTRL_TCINV;
+ }
+
+ if (events->on_event_perform_action == true) {
+ event_mask |= TC_EVCTRL_TCEI;
+ }
+
+ if (events->generate_event_on_overflow == true) {
+ event_mask |= TC_EVCTRL_OVFEO;
+ }
+
+ for (uint8_t i = 0; i < NUMBER_OF_COMPARE_CAPTURE_CHANNELS; i++) {
+ if (events->generate_event_on_compare_channel[i] == true) {
+ event_mask |= (TC_EVCTRL_MCEO(1) << i);
+ }
+ }
+
+ tc_module->COUNT8.EVCTRL.reg &= ~event_mask;
+}
+
+/** @} */
+
+/**
+ * \name Enable/Disable/Reset
+ * @{
+ */
+
+enum status_code tc_reset(
+ const struct tc_module *const module_inst);
+
+/**
+ * \brief Enable the TC module.
+ *
+ * Enables a TC module that has been previously initialized. The counter will
+ * start when the counter is enabled.
+ *
+ * \note When the counter is configured to re-trigger on an event, the counter
+ * will not start until the start function is used.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ */
+static inline void tc_enable(
+ const struct tc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ TcCount8 *const tc_module = &(module_inst->hw->COUNT8);
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ /* Enable TC module */
+ tc_module->CTRLA.reg |= TC_CTRLA_ENABLE;
+}
+
+/**
+ * \brief Disables the TC module.
+ *
+ * Disables a TC module and stops the counter.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ */
+static inline void tc_disable(
+ const struct tc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ TcCount8 *const tc_module = &(module_inst->hw->COUNT8);
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ /* Disbale interrupt */
+ tc_module->INTENCLR.reg = TC_INTENCLR_MASK;
+ /* Clear interrupt flag */
+ tc_module->INTFLAG.reg = TC_INTFLAG_MASK;
+
+ /* Disable TC module */
+ tc_module->CTRLA.reg &= ~TC_CTRLA_ENABLE;
+}
+
+/** @} */
+
+/**
+ * \name Get/Set Count Value
+ * @{
+ */
+
+uint32_t tc_get_count_value(
+ const struct tc_module *const module_inst);
+
+enum status_code tc_set_count_value(
+ const struct tc_module *const module_inst,
+ const uint32_t count);
+
+/** @} */
+
+/**
+ * \name Start/Stop Counter
+ * @{
+ */
+
+/**
+ * \brief Stops the counter.
+ *
+ * This function will stop the counter. When the counter is stopped
+ * the value in the count value is set to 0 if the counter was
+ * counting up, or maximum if the counter was counting
+ * down when stopped.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ */
+static inline void tc_stop_counter(
+ const struct tc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ TcCount8 *const tc_module = &(module_inst->hw->COUNT8);
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ /* Write command to execute */
+ tc_module->CTRLBSET.reg = TC_CTRLBSET_CMD(TC_CTRLBSET_CMD_STOP_Val);
+}
+
+/**
+ * \brief Starts the counter.
+ *
+ * Starts or restarts an initialized TC module's counter.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ */
+static inline void tc_start_counter(
+ const struct tc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ TcCount8 *const tc_module = &(module_inst->hw->COUNT8);
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ /* Make certain that there are no conflicting commands in the register */
+ tc_module->CTRLBCLR.reg = TC_CTRLBCLR_CMD_NONE;
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ /* Write command to execute */
+ tc_module->CTRLBSET.reg = TC_CTRLBSET_CMD(TC_CTRLBSET_CMD_RETRIGGER_Val);
+}
+
+/** @} */
+
+#ifdef FEATURE_TC_DOUBLE_BUFFERED
+/**
+ * \name Double Buffering
+ * @{
+ */
+
+/**
+ * \brief Update double buffer.
+ *
+ * Update double buffer.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ */
+static inline void tc_update_double_buffer(
+ const struct tc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ TcCount8 *const tc_module = &(module_inst->hw->COUNT8);
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ /* Make certain that there are no conflicting commands in the register */
+ tc_module->CTRLBCLR.reg = TC_CTRLBCLR_CMD_NONE;
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ /* Write command to execute */
+ tc_module->CTRLBSET.reg = TC_CTRLBSET_CMD(TC_CTRLBSET_CMD_UPDATE_Val);
+}
+/** @} */
+#endif
+
+#ifdef FEATURE_TC_READ_SYNC
+/**
+ * \name Count Read Synchronization
+ * @{
+ */
+
+/**
+ * \brief Read synchronization of COUNT.
+ *
+ * Read synchronization of COUNT.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ */
+static inline void tc_sync_read_count(
+ const struct tc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ TcCount8 *const tc_module = &(module_inst->hw->COUNT8);
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ /* Make certain that there are no conflicting commands in the register */
+ tc_module->CTRLBCLR.reg = TC_CTRLBCLR_CMD_NONE;
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ /* Write command to execute */
+ tc_module->CTRLBSET.reg = TC_CTRLBSET_CMD(TC_CTRLBSET_CMD_READSYNC_Val);
+}
+/** @} */
+#endif
+
+#ifdef FEATURE_TC_GENERATE_DMA_TRIGGER
+/**
+ * \name Generate TC DMA Triggers Command
+ * @{
+ */
+
+/**
+ * \brief TC DMA Trigger.
+ *
+ * TC DMA trigger command.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ */
+static inline void tc_dma_trigger_command(
+ const struct tc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ TcCount8 *const tc_module = &(module_inst->hw->COUNT8);
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ /* Make certain that there are no conflicting commands in the register */
+ tc_module->CTRLBCLR.reg = TC_CTRLBCLR_CMD_NONE;
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+#if (SAMC20) || (SAMC21) || (SAML22) || (SAML21XXXB) || (SAMR30)
+ /* Write command to execute */
+ tc_module->CTRLBSET.reg = TC_CTRLBSET_CMD(TC_CTRLBSET_CMD_DMAOS_Val);
+#endif
+}
+/** @} */
+#endif
+
+/**
+ * \name Get Capture Set Compare
+ * @{
+ */
+
+uint32_t tc_get_capture_value(
+ const struct tc_module *const module_inst,
+ const enum tc_compare_capture_channel channel_index);
+
+enum status_code tc_set_compare_value(
+ const struct tc_module *const module_inst,
+ const enum tc_compare_capture_channel channel_index,
+ const uint32_t compare_value);
+
+/** @} */
+
+/**
+ * \name Set Top Value
+ * @{
+ */
+
+enum status_code tc_set_top_value(
+ const struct tc_module *const module_inst,
+ const uint32_t top_value);
+
+/** @} */
+
+/**
+ * \name Status Management
+ * @{
+ */
+
+/**
+ * \brief Retrieves the current module status.
+ *
+ * Retrieves the status of the module, giving overall state information.
+ *
+ * \param[in] module_inst Pointer to the TC software instance struct
+ *
+ * \return Bitmask of \c TC_STATUS_* flags.
+ *
+ * \retval TC_STATUS_CHANNEL_0_MATCH Timer channel 0 compare/capture match
+ * \retval TC_STATUS_CHANNEL_1_MATCH Timer channel 1 compare/capture match
+ * \retval TC_STATUS_SYNC_READY Timer read synchronization has completed
+ * \retval TC_STATUS_CAPTURE_OVERFLOW Timer capture data has overflowed
+ * \retval TC_STATUS_COUNT_OVERFLOW Timer count value has overflowed
+ * \retval TC_STATUS_CHN0_BUFFER_VALID Timer count channel 0 compare/capture buffer valid
+ * \retval TC_STATUS_CHN1_BUFFER_VALID Timer count channel 1 compare/capture buffer valid
+ * \retval TC_STATUS_PERIOD_BUFFER_VALID Timer count period buffer valid
+ */
+static inline uint32_t tc_get_status(
+ struct tc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ TcCount8 *const tc_module = &(module_inst->hw->COUNT8);
+
+ uint32_t int_flags = tc_module->INTFLAG.reg;
+
+ uint32_t status_flags = 0;
+
+ /* Check for TC channel 0 match */
+ if (int_flags & TC_INTFLAG_MC(1)) {
+ status_flags |= TC_STATUS_CHANNEL_0_MATCH;
+ }
+
+ /* Check for TC channel 1 match */
+ if (int_flags & TC_INTFLAG_MC(2)) {
+ status_flags |= TC_STATUS_CHANNEL_1_MATCH;
+ }
+
+#if !defined(FEATURE_TC_SYNCBUSY_SCHEME_VERSION_2)
+ /* Check for TC read synchronization ready */
+ if (int_flags & TC_INTFLAG_SYNCRDY) {
+ status_flags |= TC_STATUS_SYNC_READY;
+ }
+#endif
+
+ /* Check for TC capture overflow */
+ if (int_flags & TC_INTFLAG_ERR) {
+ status_flags |= TC_STATUS_CAPTURE_OVERFLOW;
+ }
+
+ /* Check for TC count overflow */
+ if (int_flags & TC_INTFLAG_OVF) {
+ status_flags |= TC_STATUS_COUNT_OVERFLOW;
+ }
+#ifdef FEATURE_TC_DOUBLE_BUFFERED
+ uint8_t double_buffer_valid_status = tc_module->STATUS.reg;
+
+ /* Check channel 0 compare or capture buffer valid */
+ if (double_buffer_valid_status & TC_STATUS_CCBUFV0) {
+ status_flags |= TC_STATUS_CHN0_BUFFER_VALID;
+ }
+ /* Check channel 0 compare or capture buffer valid */
+ if (double_buffer_valid_status & TC_STATUS_CCBUFV1) {
+ status_flags |= TC_STATUS_CHN1_BUFFER_VALID;
+ }
+ /* Check period buffer valid */
+ if (double_buffer_valid_status & TC_STATUS_PERBUFV) {
+ status_flags |= TC_STATUS_PERIOD_BUFFER_VALID;
+ }
+#endif
+
+ return status_flags;
+}
+
+/**
+ * \brief Clears a module status flag.
+ *
+ * Clears the given status flag of the module.
+ *
+ * \param[in] module_inst Pointer to the TC software instance struct
+ * \param[in] status_flags Bitmask of \c TC_STATUS_* flags to clear
+ */
+static inline void tc_clear_status(
+ struct tc_module *const module_inst,
+ const uint32_t status_flags)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ TcCount8 *const tc_module = &(module_inst->hw->COUNT8);
+
+ uint32_t int_flags = 0;
+
+ /* Check for TC channel 0 match */
+ if (status_flags & TC_STATUS_CHANNEL_0_MATCH) {
+ int_flags |= TC_INTFLAG_MC(1);
+ }
+
+ /* Check for TC channel 1 match */
+ if (status_flags & TC_STATUS_CHANNEL_1_MATCH) {
+ int_flags |= TC_INTFLAG_MC(2);
+ }
+
+#if !defined(FEATURE_TC_SYNCBUSY_SCHEME_VERSION_2)
+ /* Check for TC read synchronization ready */
+ if (status_flags & TC_STATUS_SYNC_READY) {
+ int_flags |= TC_INTFLAG_SYNCRDY;
+ }
+#endif
+
+ /* Check for TC capture overflow */
+ if (status_flags & TC_STATUS_CAPTURE_OVERFLOW) {
+ int_flags |= TC_INTFLAG_ERR;
+ }
+
+ /* Check for TC count overflow */
+ if (status_flags & TC_STATUS_COUNT_OVERFLOW) {
+ int_flags |= TC_INTFLAG_OVF;
+ }
+
+ /* Clear interrupt flag */
+ tc_module->INTFLAG.reg = int_flags;
+}
+
+/** @} */
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+/**
+ * \page asfdoc_sam0_tc_extra Extra Information for TC Driver
+ *
+ * \section asfdoc_sam0_tc_extra_acronyms Acronyms
+ * The table below presents the acronyms used in this module:
+ *
+ * <table>
+ * <tr>
+ * <th>Acronym</th>
+ * <th>Description</th>
+ * </tr>
+ * <tr>
+ * <td>DMA</td>
+ * <td>Direct Memory Access</td>
+ * </tr>
+ * <tr>
+ * <td>TC</td>
+ * <td>Timer Counter</td>
+ * </tr>
+ * <tr>
+ * <td>PWM</td>
+ * <td>Pulse Width Modulation</td>
+ * </tr>
+ * <tr>
+ * <td>PWP</td>
+ * <td>Pulse Width Period</td>
+ * </tr>
+ * <tr>
+ * <td>PPW</td>
+ * <td>Period Pulse Width</td>
+ * </tr>
+ * </table>
+ *
+ *
+ * \section asfdoc_sam0_tc_extra_dependencies Dependencies
+ * This driver has the following dependencies:
+ *
+ * - \ref asfdoc_sam0_system_pinmux_group "System Pin Multiplexer Driver"
+ *
+ *
+ * \section asfdoc_sam0_tc_extra_errata Errata
+ * There are no errata related to this driver.
+ *
+ *
+ * \section asfdoc_sam0_tc_extra_history Module History
+ * An overview of the module history is presented in the table below, with
+ * details on the enhancements and fixes made to the module since its first
+ * release. The current version of this corresponds to the newest version in
+ * the table.
+ *
+ * <table>
+ * <tr>
+ * <th>Changelog</th>
+ * </tr>
+ * <tr>
+ * <td>Added support for SAM D21 and do some modifications as below:
+ * \li Clean up in the configuration structure, the counter size
+ * setting specific registers is accessed through the counter_8_bit,
+ * counter_16_bit, and counter_32_bit structures
+ * \li All event related settings moved into the tc_event structure </td>
+ * </tr>
+ * <tr>
+ * <td>Added automatic digital clock interface enable for the slave TC
+ * module when a timer is initialized in 32-bit mode</td>
+ * </tr>
+ * <tr>
+ * <td>Initial release</td>
+ * </tr>
+ * </table>
+ */
+
+/**
+ * \page asfdoc_sam0_tc_exqsg Examples for TC Driver
+ *
+ * This is a list of the available Quick Start guides (QSGs) and example
+ * applications for \ref asfdoc_sam0_tc_group. QSGs are simple examples with
+ * step-by-step instructions to configure and use this driver in a selection of
+ * use cases. Note that QSGs can be compiled as a standalone application or be
+ * added to the user application.
+ *
+ * - \subpage asfdoc_sam0_tc_basic_use_case
+ * - \subpage asfdoc_sam0_tc_macth_freq_use_case
+ * \if TC_CALLBACK_MODE
+ * - \subpage asfdoc_sam0_tc_timer_use_case
+ * - \subpage asfdoc_sam0_tc_callback_use_case
+ * \endif
+ * - \subpage asfdoc_sam0_tc_dma_use_case
+ *
+ * \page asfdoc_sam0_tc_document_revision_history Document Revision History
+ *
+ * <table>
+ * <tr>
+ * <th>Doc. Rev.</td>
+ * <th>Date</td>
+ * <th>Comments</td>
+ * </tr>
+ * <tr>
+ * <td>42123E</td>
+ * <td>12/2015</td>
+ * <td>Added support for SAM L21/L22, SAM DA1, SAM D09, and SAM C21</td>
+ * </tr>
+ * <tr>
+ * <td>42123D</td>
+ * <td>12/2014</td>
+ * <td>Added timer use case.
+ * Added support for SAM R21 and SAM D10/D11</td>
+ * </tr>
+ * <tr>
+ * <td>42123C</td>
+ * <td>01/2014</td>
+ * <td>Added support for SAM D21</td>
+ * </tr>
+ * <tr>
+ * <td>42123B</td>
+ * <td>06/2013</td>
+ * <td>Corrected documentation typos</td>
+ * </tr>
+ * <tr>
+ * <td>42123A</td>
+ * <td>06/2013</td>
+ * <td>Initial document release</td>
+ * </tr>
+ * </table>
+ */
+
+#endif /* TC_H_INCLUDED */
diff --git a/atmel-samd/asf/sam0/drivers/tc/tc_interrupt.c b/atmel-samd/asf/sam0/drivers/tc/tc_interrupt.c
new file mode 100644
index 000000000..3a5cf7e45
--- /dev/null
+++ b/atmel-samd/asf/sam0/drivers/tc/tc_interrupt.c
@@ -0,0 +1,199 @@
+/**
+ * \file
+ *
+ * \brief SAM TC - Timer Counter Callback Driver
+ *
+ * Copyright (C) 2013-2016 Atmel Corporation. All rights reserved.
+ *
+ * \asf_license_start
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel microcontroller product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * \asf_license_stop
+ *
+ */
+
+/*
+ * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
+ */
+
+#include "tc_interrupt.h"
+
+void *_tc_instances[TC_INST_NUM];
+
+void _tc_interrupt_handler(uint8_t instance);
+
+/**
+ * \brief Registers a callback.
+ *
+ * Registers a callback function which is implemented by the user.
+ *
+ * \note The callback must be enabled by \ref tc_enable_callback,
+ * in order for the interrupt handler to call it when the conditions for the
+ * callback type is met.
+ *
+ * \param[in] module Pointer to TC software instance struct
+ * \param[in] callback_func Pointer to callback function
+ * \param[in] callback_type Callback type given by an enum
+ */
+enum status_code tc_register_callback(
+ struct tc_module *const module,
+ tc_callback_t callback_func,
+ const enum tc_callback callback_type)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(callback_func);
+
+ /* Register callback function */
+ module->callback[callback_type] = callback_func;
+
+ /* Set the bit corresponding to the callback_type */
+ if (callback_type == TC_CALLBACK_CC_CHANNEL0) {
+ module->register_callback_mask |= TC_INTFLAG_MC(1);
+ }
+ else if (callback_type == TC_CALLBACK_CC_CHANNEL1) {
+ module->register_callback_mask |= TC_INTFLAG_MC(2);
+ }
+ else {
+ module->register_callback_mask |= (1 << callback_type);
+ }
+ return STATUS_OK;
+}
+
+/**
+ * \brief Unregisters a callback.
+ *
+ * Unregisters a callback function implemented by the user. The callback should be
+ * disabled before it is unregistered.
+ *
+ * \param[in] module Pointer to TC software instance struct
+ * \param[in] callback_type Callback type given by an enum
+ */
+enum status_code tc_unregister_callback(
+ struct tc_module *const module,
+ const enum tc_callback callback_type)
+{
+ /* Sanity check arguments */
+ Assert(module);
+
+ /* Unregister callback function */
+ module->callback[callback_type] = NULL;
+
+ /* Clear the bit corresponding to the callback_type */
+ if (callback_type == TC_CALLBACK_CC_CHANNEL0) {
+ module->register_callback_mask &= ~TC_INTFLAG_MC(1);
+ }
+ else if (callback_type == TC_CALLBACK_CC_CHANNEL1) {
+ module->register_callback_mask &= ~TC_INTFLAG_MC(2);
+ }
+ else {
+ module->register_callback_mask &= ~(1 << callback_type);
+ }
+ return STATUS_OK;
+}
+
+/**
+ * \internal ISR handler for TC
+ *
+ * Auto-generate a set of interrupt handlers for each TC in the device.
+ */
+#define _TC_INTERRUPT_HANDLER(n, m) \
+ void TC##n##_Handler(void) \
+ { \
+ _tc_interrupt_handler(m); \
+ }
+
+#if (SAML21E) || (SAML21G) || (SAMR30E) || (SAMR30G)
+ _TC_INTERRUPT_HANDLER(0,0)
+ _TC_INTERRUPT_HANDLER(1,1)
+ _TC_INTERRUPT_HANDLER(4,2)
+#else
+ MRECURSION(TC_INST_NUM, _TC_INTERRUPT_HANDLER, TC_INST_MAX_ID)
+#endif
+
+
+/**
+ * \internal Interrupt Handler for TC module
+ *
+ * Handles interrupts as they occur, it will run the callback functions
+ * that are registered and enabled.
+ *
+ * \param[in] instance ID of the TC instance calling the interrupt
+ * handler
+ */
+void _tc_interrupt_handler(
+ uint8_t instance)
+{
+ /* Temporary variable */
+ uint8_t interrupt_and_callback_status_mask;
+
+ /* Get device instance from the look-up table */
+ struct tc_module *module
+ = (struct tc_module *)_tc_instances[instance];
+
+ /* Read and mask interrupt flag register */
+ interrupt_and_callback_status_mask = module->hw->COUNT8.INTFLAG.reg &
+ module->register_callback_mask &
+ module->enable_callback_mask;
+
+ /* Check if an Overflow interrupt has occurred */
+ if (interrupt_and_callback_status_mask & TC_INTFLAG_OVF) {
+ /* Invoke registered and enabled callback function */
+ (module->callback[TC_CALLBACK_OVERFLOW])(module);
+ /* Clear interrupt flag */
+ module->hw->COUNT8.INTFLAG.reg = TC_INTFLAG_OVF;
+ }
+
+ /* Check if an Error interrupt has occurred */
+ if (interrupt_and_callback_status_mask & TC_INTFLAG_ERR) {
+ /* Invoke registered and enabled callback function */
+ (module->callback[TC_CALLBACK_ERROR])(module);
+ /* Clear interrupt flag */
+ module->hw->COUNT8.INTFLAG.reg = TC_INTFLAG_ERR;
+ }
+
+ /* Check if an Match/Capture Channel 0 interrupt has occurred */
+ if (interrupt_and_callback_status_mask & TC_INTFLAG_MC(1)) {
+ /* Invoke registered and enabled callback function */
+ (module->callback[TC_CALLBACK_CC_CHANNEL0])(module);
+ /* Clear interrupt flag */
+ module->hw->COUNT8.INTFLAG.reg = TC_INTFLAG_MC(1);
+ }
+
+ /* Check if an Match/Capture Channel 1 interrupt has occurred */
+ if (interrupt_and_callback_status_mask & TC_INTFLAG_MC(2)) {
+ /* Invoke registered and enabled callback function */
+ (module->callback[TC_CALLBACK_CC_CHANNEL1])(module);
+ /* Clear interrupt flag */
+ module->hw->COUNT8.INTFLAG.reg = TC_INTFLAG_MC(2);
+ }
+}
diff --git a/atmel-samd/asf/sam0/drivers/tc/tc_interrupt.h b/atmel-samd/asf/sam0/drivers/tc/tc_interrupt.h
new file mode 100644
index 000000000..56c7264ad
--- /dev/null
+++ b/atmel-samd/asf/sam0/drivers/tc/tc_interrupt.h
@@ -0,0 +1,179 @@
+/**
+ * \file
+ *
+ * \brief SAM TC - Timer Counter Callback Driver
+ *
+ * Copyright (C) 2013-2016 Atmel Corporation. All rights reserved.
+ *
+ * \asf_license_start
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel microcontroller product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * \asf_license_stop
+ *
+ */
+
+/*
+ * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
+ */
+
+#ifndef TC_INTERRUPT_H_INCLUDED
+#define TC_INTERRUPT_H_INCLUDED
+
+#include "tc.h"
+#include <system_interrupt.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(__DOXYGEN__)
+extern void *_tc_instances[TC_INST_NUM];
+
+# define _TC_INTERRUPT_VECT_NUM(n, unused) \
+ SYSTEM_INTERRUPT_MODULE_TC##n,
+/**
+ * \internal Get the interrupt vector for the given device instance
+ *
+ * \param[in] TC module instance number
+ *
+ * \return Interrupt vector for of the given TC module instance.
+ */
+static enum system_interrupt_vector _tc_interrupt_get_interrupt_vector(
+ uint32_t inst_num)
+{
+ static uint8_t tc_interrupt_vectors[TC_INST_NUM] =
+ {
+#if (SAML21E) || (SAML21G) || (SAMR30E) || (SAMR30G)
+ SYSTEM_INTERRUPT_MODULE_TC0,
+ SYSTEM_INTERRUPT_MODULE_TC1,
+ SYSTEM_INTERRUPT_MODULE_TC4
+#else
+ MRECURSION(TC_INST_NUM, _TC_INTERRUPT_VECT_NUM, TC_INST_MAX_ID)
+#endif
+ };
+
+ return (enum system_interrupt_vector)tc_interrupt_vectors[inst_num];
+}
+#endif /* !defined(__DOXYGEN__) */
+
+/**
+ * \name Callback Management
+ * {@
+ */
+
+enum status_code tc_register_callback(
+ struct tc_module *const module,
+ tc_callback_t callback_func,
+ const enum tc_callback callback_type);
+
+enum status_code tc_unregister_callback(
+ struct tc_module *const module,
+ const enum tc_callback callback_type);
+
+/**
+ * \brief Enables callback.
+ *
+ * Enables the callback function registered by the \ref
+ * tc_register_callback. The callback function will be called from the
+ * interrupt handler when the conditions for the callback type are
+ * met. This function will also enable the appropriate interrupts.
+ *
+ * \param[in] module Pointer to TC software instance struct
+ * \param[in] callback_type Callback type given by an enum
+ */
+static inline void tc_enable_callback(
+ struct tc_module *const module,
+ const enum tc_callback callback_type)
+{
+ /* Sanity check arguments */
+ Assert(module);
+
+
+ /* Enable interrupts for this TC module */
+ system_interrupt_enable(_tc_interrupt_get_interrupt_vector(_tc_get_inst_index(module->hw)));
+
+ /* Enable callback */
+ if (callback_type == TC_CALLBACK_CC_CHANNEL0) {
+ module->enable_callback_mask |= TC_INTFLAG_MC(1);
+ module->hw->COUNT8.INTENSET.reg = TC_INTFLAG_MC(1);
+ }
+ else if (callback_type == TC_CALLBACK_CC_CHANNEL1) {
+ module->enable_callback_mask |= TC_INTFLAG_MC(2);
+ module->hw->COUNT8.INTENSET.reg = TC_INTFLAG_MC(2);
+ }
+ else {
+ module->enable_callback_mask |= (1 << callback_type);
+ module->hw->COUNT8.INTENSET.reg = (1 << callback_type);
+ }
+}
+
+/**
+ * \brief Disables callback.
+ *
+ * Disables the callback function registered by the \ref
+ * tc_register_callback, and the callback will not be called from the
+ * interrupt routine. The function will also disable the appropriate
+ * interrupts.
+ *
+ * \param[in] module Pointer to TC software instance struct
+ * \param[in] callback_type Callback type given by an enum
+ */
+static inline void tc_disable_callback(
+ struct tc_module *const module,
+ const enum tc_callback callback_type){
+ /* Sanity check arguments */
+ Assert(module);
+
+ /* Disable callback */
+ if (callback_type == TC_CALLBACK_CC_CHANNEL0) {
+ module->hw->COUNT8.INTENCLR.reg = TC_INTFLAG_MC(1);
+ module->enable_callback_mask &= ~TC_INTFLAG_MC(1);
+ }
+ else if (callback_type == TC_CALLBACK_CC_CHANNEL1) {
+ module->hw->COUNT8.INTENCLR.reg = TC_INTFLAG_MC(2);
+ module->enable_callback_mask &= ~TC_INTFLAG_MC(2);
+ }
+ else {
+ module->hw->COUNT8.INTENCLR.reg = (1 << callback_type);
+ module->enable_callback_mask &= ~(1 << callback_type);
+ }
+}
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TC_INTERRUPT_H_INCLUDED */
diff --git a/atmel-samd/asf/sam0/drivers/tc/tc_sam_d_r/tc.c b/atmel-samd/asf/sam0/drivers/tc/tc_sam_d_r/tc.c
new file mode 100644
index 000000000..546c36cd1
--- /dev/null
+++ b/atmel-samd/asf/sam0/drivers/tc/tc_sam_d_r/tc.c
@@ -0,0 +1,685 @@
+/**
+ * \file
+ *
+ * \brief SAM TC - Timer Counter Driver
+ *
+ * Copyright (C) 2013-2015 Atmel Corporation. All rights reserved.
+ *
+ * \asf_license_start
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel microcontroller product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * \asf_license_stop
+ *
+ */
+/*
+ * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
+ */
+
+#include "tc.h"
+
+#if TC_ASYNC == true
+# include "tc_interrupt.h"
+# include <system_interrupt.h>
+
+/** \internal
+ * Converts a given TC index to its interrupt vector index.
+ */
+# define _TC_INTERRUPT_VECT_NUM(n, unused) \
+ SYSTEM_INTERRUPT_MODULE_TC##n,
+#endif
+
+#if !defined(__DOXYGEN__)
+# define _TC_GCLK_ID(n,unused) TPASTE3(TC,n,_GCLK_ID) ,
+# define _TC_PM_APBCMASK(n,unused) TPASTE2(PM_APBCMASK_TC,n) ,
+
+# define TC_INST_GCLK_ID { MRECURSION(TC_INST_NUM, _TC_GCLK_ID, TC_INST_MAX_ID) }
+# define TC_INST_PM_APBCMASK { MRECURSION(TC_INST_NUM, _TC_PM_APBCMASK, TC_INST_MAX_ID) }
+
+#endif
+
+/**
+ * \internal Find the index of given TC module instance.
+ *
+ * \param[in] TC module instance pointer
+ *
+ * \return Index of the given TC module instance.
+ */
+uint8_t _tc_get_inst_index(
+ Tc *const hw)
+{
+ /* List of available TC modules. */
+ Tc *const tc_modules[TC_INST_NUM] = TC_INSTS;
+
+ /* Find index for TC instance. */
+ for (uint32_t i = 0; i < TC_INST_NUM; i++) {
+ if (hw == tc_modules[i]) {
+ return i;
+ }
+ }
+
+ /* Invalid data given. */
+ Assert(false);
+ return 0;
+}
+
+
+/**
+ * \brief Initializes a hardware TC module instance.
+ *
+ * Enables the clock and initializes the TC module, based on the given
+ * configuration values.
+ *
+ * \param[in,out] module_inst Pointer to the software module instance struct
+ * \param[in] hw Pointer to the TC hardware module
+ * \param[in] config Pointer to the TC configuration options struct
+ *
+ * \return Status of the initialization procedure.
+ *
+ * \retval STATUS_OK The module was initialized successfully
+ * \retval STATUS_BUSY Hardware module was busy when the
+ * initialization procedure was attempted
+ * \retval STATUS_INVALID_ARG An invalid configuration option or argument
+ * was supplied
+ * \retval STATUS_ERR_DENIED Hardware module was already enabled, or the
+ * hardware module is configured in 32-bit
+ * slave mode
+ */
+enum status_code tc_init(
+ struct tc_module *const module_inst,
+ Tc *const hw,
+ const struct tc_config *const config)
+{
+ /* Sanity check arguments */
+ Assert(hw);
+ Assert(module_inst);
+ Assert(config);
+
+ /* Temporary variable to hold all updates to the CTRLA
+ * register before they are written to it */
+ uint16_t ctrla_tmp = 0;
+ /* Temporary variable to hold all updates to the CTRLBSET
+ * register before they are written to it */
+ uint8_t ctrlbset_tmp = 0;
+ /* Temporary variable to hold all updates to the CTRLC
+ * register before they are written to it */
+ uint8_t ctrlc_tmp = 0;
+ /* Temporary variable to hold TC instance number */
+ uint8_t instance = _tc_get_inst_index(hw);
+
+ /* Array of GLCK ID for different TC instances */
+ uint8_t inst_gclk_id[] = TC_INST_GCLK_ID;
+ /* Array of PM APBC mask bit position for different TC instances */
+ uint16_t inst_pm_apbmask[] = TC_INST_PM_APBCMASK;
+
+ struct system_pinmux_config pin_config;
+ struct system_gclk_chan_config gclk_chan_config;
+
+#if TC_ASYNC == true
+ /* Initialize parameters */
+ for (uint8_t i = 0; i < TC_CALLBACK_N; i++) {
+ module_inst->callback[i] = NULL;
+ }
+ module_inst->register_callback_mask = 0x00;
+ module_inst->enable_callback_mask = 0x00;
+
+ /* Register this instance for callbacks*/
+ _tc_instances[instance] = module_inst;
+#endif
+
+ /* Associate the given device instance with the hardware module */
+ module_inst->hw = hw;
+
+#if SAMD09 || SAMD10 || SAMD11
+ /* Check if even numbered TC modules are being configured in 32-bit
+ * counter size. Only odd numbered counters are allowed to be
+ * configured in 32-bit counter size.
+ */
+ if ((config->counter_size == TC_COUNTER_SIZE_32BIT) &&
+ !((instance + TC_INSTANCE_OFFSET) & 0x01)) {
+ Assert(false);
+ return STATUS_ERR_INVALID_ARG;
+ }
+#else
+ /* Check if odd numbered TC modules are being configured in 32-bit
+ * counter size. Only even numbered counters are allowed to be
+ * configured in 32-bit counter size.
+ */
+ if ((config->counter_size == TC_COUNTER_SIZE_32BIT) &&
+ ((instance + TC_INSTANCE_OFFSET) & 0x01)) {
+ Assert(false);
+ return STATUS_ERR_INVALID_ARG;
+ }
+#endif
+
+ /* Make the counter size variable in the module_inst struct reflect
+ * the counter size in the module
+ */
+ module_inst->counter_size = config->counter_size;
+
+ if (hw->COUNT8.CTRLA.reg & TC_CTRLA_SWRST) {
+ /* We are in the middle of a reset. Abort. */
+ return STATUS_BUSY;
+ }
+
+ if (hw->COUNT8.STATUS.reg & TC_STATUS_SLAVE) {
+ /* Module is used as a slave */
+ return STATUS_ERR_DENIED;
+ }
+
+ if (hw->COUNT8.CTRLA.reg & TC_CTRLA_ENABLE) {
+ /* Module must be disabled before initialization. Abort. */
+ return STATUS_ERR_DENIED;
+ }
+
+ /* Set up the TC PWM out pin for channel 0 */
+ if (config->pwm_channel[0].enabled) {
+ system_pinmux_get_config_defaults(&pin_config);
+ pin_config.mux_position = config->pwm_channel[0].pin_mux;
+ pin_config.direction = SYSTEM_PINMUX_PIN_DIR_OUTPUT;
+ system_pinmux_pin_set_config(
+ config->pwm_channel[0].pin_out, &pin_config);
+ }
+
+ /* Set up the TC PWM out pin for channel 1 */
+ if (config->pwm_channel[1].enabled) {
+ system_pinmux_get_config_defaults(&pin_config);
+ pin_config.mux_position = config->pwm_channel[1].pin_mux;
+ pin_config.direction = SYSTEM_PINMUX_PIN_DIR_OUTPUT;
+ system_pinmux_pin_set_config(
+ config->pwm_channel[1].pin_out, &pin_config);
+ }
+
+ /* Enable the user interface clock in the PM */
+ system_apb_clock_set_mask(SYSTEM_CLOCK_APB_APBC,
+ inst_pm_apbmask[instance]);
+
+ /* Enable the slave counter if counter_size is 32-bit */
+ if ((config->counter_size == TC_COUNTER_SIZE_32BIT))
+ {
+ /* Enable the user interface clock in the PM */
+ system_apb_clock_set_mask(SYSTEM_CLOCK_APB_APBC,
+ inst_pm_apbmask[instance + 1]);
+ }
+
+ /* Setup clock for module */
+ system_gclk_chan_get_config_defaults(&gclk_chan_config);
+ gclk_chan_config.source_generator = config->clock_source;
+ system_gclk_chan_set_config(inst_gclk_id[instance], &gclk_chan_config);
+ system_gclk_chan_enable(inst_gclk_id[instance]);
+
+ /* Set ctrla register */
+ ctrla_tmp =
+ (uint32_t)config->counter_size |
+ (uint32_t)config->wave_generation |
+ (uint32_t)config->reload_action |
+ (uint32_t)config->clock_prescaler;
+
+ if (config->run_in_standby) {
+ ctrla_tmp |= TC_CTRLA_RUNSTDBY;
+ }
+
+ /* Write configuration to register */
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+ hw->COUNT8.CTRLA.reg = ctrla_tmp;
+
+ /* Set ctrlb register */
+ if (config->oneshot) {
+ ctrlbset_tmp = TC_CTRLBSET_ONESHOT;
+ }
+
+ if (config->count_direction) {
+ ctrlbset_tmp |= TC_CTRLBSET_DIR;
+ }
+
+ /* Clear old ctrlb configuration */
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+ hw->COUNT8.CTRLBCLR.reg = 0xFF;
+
+ /* Check if we actually need to go into a wait state. */
+ if (ctrlbset_tmp) {
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+ /* Write configuration to register */
+ hw->COUNT8.CTRLBSET.reg = ctrlbset_tmp;
+ }
+
+ /* Set ctrlc register*/
+ ctrlc_tmp = config->waveform_invert_output;
+ for (uint8_t i = 0; i < NUMBER_OF_COMPARE_CAPTURE_CHANNELS; i++) {
+ if (config->enable_capture_on_channel[i] == true) {
+ ctrlc_tmp |= (TC_CTRLC_CPTEN(1) << i);
+ }
+ }
+
+ /* Write configuration to register */
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+ hw->COUNT8.CTRLC.reg = ctrlc_tmp;
+
+ /* Write configuration to register */
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ /* Switch for TC counter size */
+ switch (module_inst->counter_size) {
+ case TC_COUNTER_SIZE_8BIT:
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ hw->COUNT8.COUNT.reg =
+ config->counter_8_bit.value;
+
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ hw->COUNT8.PER.reg =
+ config->counter_8_bit.period;
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ hw->COUNT8.CC[0].reg =
+ config->counter_8_bit.compare_capture_channel[0];
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ hw->COUNT8.CC[1].reg =
+ config->counter_8_bit.compare_capture_channel[1];
+
+ return STATUS_OK;
+
+ case TC_COUNTER_SIZE_16BIT:
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ hw->COUNT16.COUNT.reg
+ = config->counter_16_bit.value;
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ hw->COUNT16.CC[0].reg =
+ config->counter_16_bit.compare_capture_channel[0];
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ hw->COUNT16.CC[1].reg =
+ config->counter_16_bit.compare_capture_channel[1];
+
+ return STATUS_OK;
+
+ case TC_COUNTER_SIZE_32BIT:
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ hw->COUNT32.COUNT.reg
+ = config->counter_32_bit.value;
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ hw->COUNT32.CC[0].reg =
+ config->counter_32_bit.compare_capture_channel[0];
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ hw->COUNT32.CC[1].reg =
+ config->counter_32_bit.compare_capture_channel[1];
+
+ return STATUS_OK;
+ }
+
+ Assert(false);
+ return STATUS_ERR_INVALID_ARG;
+}
+
+/**
+ * \brief Sets TC module count value.
+ *
+ * Sets the current timer count value of a initialized TC module. The
+ * specified TC module may be started or stopped.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] count New timer count value to set
+ *
+ * \return Status of the count update procedure.
+ *
+ * \retval STATUS_OK The timer count was updated successfully
+ * \retval STATUS_ERR_INVALID_ARG An invalid timer counter size was specified
+ */
+enum status_code tc_set_count_value(
+ const struct tc_module *const module_inst,
+ const uint32_t count)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance*/
+ Tc *const tc_module = module_inst->hw;
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ /* Write to based on the TC counter_size */
+ switch (module_inst->counter_size) {
+ case TC_COUNTER_SIZE_8BIT:
+ tc_module->COUNT8.COUNT.reg = (uint8_t)count;
+ return STATUS_OK;
+
+ case TC_COUNTER_SIZE_16BIT:
+ tc_module->COUNT16.COUNT.reg = (uint16_t)count;
+ return STATUS_OK;
+
+ case TC_COUNTER_SIZE_32BIT:
+ tc_module->COUNT32.COUNT.reg = (uint32_t)count;
+ return STATUS_OK;
+
+ default:
+ return STATUS_ERR_INVALID_ARG;
+ }
+}
+
+/**
+ * \brief Get TC module count value.
+ *
+ * Retrieves the current count value of a TC module. The specified TC module
+ * may be started or stopped.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ *
+ * \return Count value of the specified TC module.
+ */
+uint32_t tc_get_count_value(
+ const struct tc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tc *const tc_module = module_inst->hw;
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ /* Read from based on the TC counter size */
+ switch (module_inst->counter_size) {
+ case TC_COUNTER_SIZE_8BIT:
+ return (uint32_t)tc_module->COUNT8.COUNT.reg;
+
+ case TC_COUNTER_SIZE_16BIT:
+ return (uint32_t)tc_module->COUNT16.COUNT.reg;
+
+ case TC_COUNTER_SIZE_32BIT:
+ return tc_module->COUNT32.COUNT.reg;
+ }
+
+ Assert(false);
+ return 0;
+}
+
+/**
+ * \brief Gets the TC module capture value.
+ *
+ * Retrieves the capture value in the indicated TC module capture channel.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] channel_index Index of the Compare Capture channel to read
+ *
+ * \return Capture value stored in the specified timer channel.
+ */
+uint32_t tc_get_capture_value(
+ const struct tc_module *const module_inst,
+ const enum tc_compare_capture_channel channel_index)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tc *const tc_module = module_inst->hw;
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ /* Read out based on the TC counter size */
+ switch (module_inst->counter_size) {
+ case TC_COUNTER_SIZE_8BIT:
+ if (channel_index <
+ NUMBER_OF_COMPARE_CAPTURE_CHANNELS) {
+ return tc_module->COUNT8.CC[channel_index].reg;
+ }
+
+ case TC_COUNTER_SIZE_16BIT:
+ if (channel_index <
+ NUMBER_OF_COMPARE_CAPTURE_CHANNELS) {
+ return tc_module->COUNT16.CC[channel_index].reg;
+ }
+
+ case TC_COUNTER_SIZE_32BIT:
+ if (channel_index <
+ NUMBER_OF_COMPARE_CAPTURE_CHANNELS) {
+ return tc_module->COUNT32.CC[channel_index].reg;
+ }
+ }
+
+ Assert(false);
+ return 0;
+}
+
+/**
+ * \brief Sets a TC module compare value.
+ *
+ * Writes a compare value to the given TC module compare/capture channel.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] channel_index Index of the compare channel to write to
+ * \param[in] compare New compare value to set
+ *
+ * \return Status of the compare update procedure.
+ *
+ * \retval STATUS_OK The compare value was updated successfully
+ * \retval STATUS_ERR_INVALID_ARG An invalid channel index was supplied
+ */
+enum status_code tc_set_compare_value(
+ const struct tc_module *const module_inst,
+ const enum tc_compare_capture_channel channel_index,
+ const uint32_t compare)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tc *const tc_module = module_inst->hw;
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ /* Read out based on the TC counter size */
+ switch (module_inst->counter_size) {
+ case TC_COUNTER_SIZE_8BIT:
+ if (channel_index <
+ NUMBER_OF_COMPARE_CAPTURE_CHANNELS) {
+ tc_module->COUNT8.CC[channel_index].reg =
+ (uint8_t)compare;
+ return STATUS_OK;
+ }
+
+ case TC_COUNTER_SIZE_16BIT:
+ if (channel_index <
+ NUMBER_OF_COMPARE_CAPTURE_CHANNELS) {
+ tc_module->COUNT16.CC[channel_index].reg =
+ (uint16_t)compare;
+ return STATUS_OK;
+ }
+
+ case TC_COUNTER_SIZE_32BIT:
+ if (channel_index <
+ NUMBER_OF_COMPARE_CAPTURE_CHANNELS) {
+ tc_module->COUNT32.CC[channel_index].reg =
+ (uint32_t)compare;
+ return STATUS_OK;
+ }
+ }
+
+ return STATUS_ERR_INVALID_ARG;
+}
+
+/**
+ * \brief Resets the TC module.
+ *
+ * Resets the TC module, restoring all hardware module registers to their
+ * default values and disabling the module. The TC module will not be
+ * accessible while the reset is being performed.
+ *
+ * \note When resetting a 32-bit counter only the master TC module's instance
+ * structure should be passed to the function.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ *
+ * \return Status of the procedure.
+ * \retval STATUS_OK The module was reset successfully
+ * \retval STATUS_ERR_UNSUPPORTED_DEV A 32-bit slave TC module was passed to
+ * the function. Only use reset on master
+ * TC
+ */
+enum status_code tc_reset(
+ const struct tc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module hardware instance */
+ TcCount8 *const tc_module = &(module_inst->hw->COUNT8);
+
+ if (tc_module->STATUS.reg & TC_STATUS_SLAVE) {
+ return STATUS_ERR_UNSUPPORTED_DEV;
+ }
+
+ /* Disable this module if it is running */
+ if (tc_module->CTRLA.reg & TC_CTRLA_ENABLE) {
+ tc_disable(module_inst);
+ while (tc_is_syncing(module_inst)) {
+ /* wait while module is disabling */
+ }
+ }
+
+ /* Reset this TC module */
+ tc_module->CTRLA.reg |= TC_CTRLA_SWRST;
+
+ return STATUS_OK;
+}
+
+/**
+ * \brief Set the timer TOP/period value.
+ *
+ * For 8-bit counter size this function writes the top value to the period
+ * register.
+ *
+ * For 16- and 32-bit counter size this function writes the top value to
+ * Capture Compare register 0. The value in this register can not be used for
+ * any other purpose.
+ *
+ * \note This function is designed to be used in PWM or frequency
+ * match modes only, when the counter is set to 16- or 32-bit counter
+ * size. In 8-bit counter size it will always be possible to change the
+ * top value even in normal mode.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] top_value New timer TOP value to set
+ *
+ * \return Status of the TOP set procedure.
+ *
+ * \retval STATUS_OK The timer TOP value was updated successfully
+ * \retval STATUS_ERR_INVALID_ARG The configured TC module counter size in the
+ * module instance is invalid
+ */
+enum status_code tc_set_top_value (
+ const struct tc_module *const module_inst,
+ const uint32_t top_value)
+{
+ Assert(module_inst);
+ Assert(module_inst->hw);
+ Assert(top_value);
+
+ Tc *const tc_module = module_inst->hw;
+
+ while (tc_is_syncing(module_inst)) {
+ /* Wait for sync */
+ }
+
+ switch (module_inst->counter_size) {
+ case TC_COUNTER_SIZE_8BIT:
+ tc_module->COUNT8.PER.reg = (uint8_t)top_value;
+ return STATUS_OK;
+
+ case TC_COUNTER_SIZE_16BIT:
+ tc_module->COUNT16.CC[0].reg = (uint16_t)top_value;
+ return STATUS_OK;
+
+ case TC_COUNTER_SIZE_32BIT:
+ tc_module->COUNT32.CC[0].reg = (uint32_t)top_value;
+ return STATUS_OK;
+
+ default:
+ Assert(false);
+ return STATUS_ERR_INVALID_ARG;
+ }
+}
diff --git a/atmel-samd/asf/sam0/drivers/tcc/docimg/overview.svg b/atmel-samd/asf/sam0/drivers/tcc/docimg/overview.svg
new file mode 100644
index 000000000..b3d7ef0b3
--- /dev/null
+++ b/atmel-samd/asf/sam0/drivers/tcc/docimg/overview.svg
@@ -0,0 +1,2278 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.2"
+ width="1015.2"
+ height="638.09998"
+ id="svg16945">
+ <title
+ id="title22270">TCC_Block</title>
+ <defs
+ id="defs16947" />
+ <metadata
+ id="metadata16951">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title>TCC_Block</dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(0,-126.9)"
+ id="layer1">
+ <g
+ transform="matrix(0.6108612,0,0,0.59248808,0.55829414,130.78209)"
+ id="g20883">
+ <path
+ d="m 2.8883488,2.8883488 0,560.5738512 796.6378212,0 0,-560.5738512 -796.6378212,0 z"
+ id="path20901"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 2.8883488,563.4622 796.6378212,0 0,-560.5738512 -796.6378212,0 0,560.5738512 z"
+ id="path20903"
+ style="fill:none;stroke:#000000;stroke-width:0.46838087px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="7.4940939"
+ y="26.229328"
+ id="text20905"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">Base Counter</text>
+ <path
+ d="m 47.150342,637.23219 0,383.52591 796.637818,0 0,-383.52591 -796.637818,0 z"
+ id="path20907"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 47.150342,1020.7581 796.637818,0 0,-383.52591 -796.637818,0 0,383.52591 z"
+ id="path20909"
+ style="fill:none;stroke:#000000;stroke-width:0.46838087px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 32.396344,651.98619 0,383.52591 796.637816,0 0,-383.52591 -796.637816,0 z"
+ id="path20911"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 32.396344,1035.5121 796.637816,0 0,-383.52591 -796.637816,0 0,383.52591 z"
+ id="path20913"
+ style="fill:none;stroke:#000000;stroke-width:0.46838087px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 17.642347,666.74019 0,383.52591 796.637823,0 0,-383.52591 -796.637823,0 z"
+ id="path20915"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 17.642347,1050.2661 796.637823,0 0,-383.52591 -796.637823,0 0,383.52591 z"
+ id="path20917"
+ style="fill:none;stroke:#000000;stroke-width:0.46838087px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 2.8883488,681.49419 0,383.52591 796.6378212,0 0,-383.52591 -796.6378212,0 z"
+ id="path20919"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 2.8883488,1065.0201 796.6378212,0 0,-383.52591 -796.6378212,0 0,383.52591 z"
+ id="path20921"
+ style="fill:none;stroke:#000000;stroke-width:0.46838087px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="7.4940939"
+ y="704.44482"
+ id="text20923"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">Compare</text>
+ <text
+ x="97.423225"
+ y="704.44482"
+ id="text20925"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">/</text>
+ <text
+ x="102.41929"
+ y="704.44482"
+ id="text20927"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">Capture</text>
+ <text
+ x="7.4940939"
+ y="729.42517"
+ id="text20929"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">(</text>
+ <text
+ x="13.739173"
+ y="729.42517"
+ id="text20931"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">Unit x </text>
+ <text
+ x="77.438972"
+ y="729.42517"
+ id="text20933"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">= </text>
+ <text
+ x="94.925194"
+ y="729.42517"
+ id="text20935"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">{</text>
+ <text
+ x="103.6683"
+ y="729.42517"
+ id="text20937"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">0</text>
+ <text
+ x="114.90944"
+ y="729.42517"
+ id="text20939"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">,</text>
+ <text
+ x="121.15452"
+ y="729.42517"
+ id="text20941"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">1</text>
+ <text
+ x="132.39566"
+ y="729.42517"
+ id="text20943"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">,</text>
+ <text
+ x="138.64075"
+ y="729.42517"
+ id="text20945"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">…</text>
+ <text
+ x="158.62498"
+ y="729.42517"
+ id="text20947"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">,</text>
+ <text
+ x="164.87007"
+ y="729.42517"
+ id="text20949"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">3</text>
+ <text
+ x="176.11121"
+ y="729.42517"
+ id="text20951"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">}</text>
+ <text
+ x="184.85432"
+ y="729.42517"
+ id="text20953"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">)</text>
+ <path
+ d="m 61.90434,238.87425 0,118.03198 354.01788,0 0,-118.03198 -354.01788,0 z"
+ id="path20955"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 62.528848,240.12327 0,8.74311 c 0,0.39031 -0.312254,0.6245 -0.624508,0.6245 -0.390317,0 -0.624508,-0.23419 -0.624508,-0.6245 l 0,-8.74311 c 0,-0.31226 0.234191,-0.62451 0.624508,-0.62451 0.312254,0 0.624508,0.31225 0.624508,0.62451 z m 0,14.98818 0,8.74311 c 0,0.39032 -0.312254,0.62451 -0.624508,0.62451 -0.390317,0 -0.624508,-0.23419 -0.624508,-0.62451 l 0,-8.74311 c 0,-0.31225 0.234191,-0.6245 0.624508,-0.6245 0.312254,0 0.624508,0.31225 0.624508,0.6245 z m 0,14.98819 0,8.74311 c 0,0.39032 -0.312254,0.62451 -0.624508,0.62451 -0.390317,0 -0.624508,-0.23419 -0.624508,-0.62451 l 0,-8.74311 c 0,-0.31225 0.234191,-0.62451 0.624508,-0.62451 0.312254,0 0.624508,0.31226 0.624508,0.62451 z m 0,14.98819 0,8.74311 c 0,0.39032 -0.312254,0.62451 -0.624508,0.62451 -0.390317,0 -0.624508,-0.23419 -0.624508,-0.62451 l 0,-8.74311 c 0,-0.31225 0.234191,-0.62451 0.624508,-0.62451 0.312254,0 0.624508,0.31226 0.624508,0.62451 z m 0,14.98819 0,8.74311 c 0,0.39032 -0.312254,0.62451 -0.624508,0.62451 -0.390317,0 -0.624508,-0.23419 -0.624508,-0.62451 l 0,-8.74311 c 0,-0.31225 0.234191,-0.62451 0.624508,-0.62451 0.312254,0 0.624508,0.31226 0.624508,0.62451 z m 0,14.98819 0,8.74311 c 0,0.39031 -0.312254,0.62451 -0.624508,0.62451 -0.390317,0 -0.624508,-0.2342 -0.624508,-0.62451 l 0,-8.74311 c 0,-0.31226 0.234191,-0.62451 0.624508,-0.62451 0.312254,0 0.624508,0.31225 0.624508,0.62451 z m 0,14.98819 0,8.74311 c 0,0.39031 -0.312254,0.6245 -0.624508,0.6245 -0.390317,0 -0.624508,-0.23419 -0.624508,-0.6245 l 0,-8.74311 c 0,-0.31226 0.234191,-0.62451 0.624508,-0.62451 0.312254,0 0.624508,0.31225 0.624508,0.62451 z m 0,14.98818 0,8.74311 c 0,0.39032 -0.312254,0.62451 -0.624508,0.62451 -0.390317,0 -0.624508,-0.23419 -0.624508,-0.62451 l 0,-8.74311 c 0,-0.31225 0.234191,-0.6245 0.624508,-0.6245 0.312254,0 0.624508,0.31225 0.624508,0.6245 z m 2.498031,11.24115 8.74311,0 c 0.312254,0 0.624508,0.31225 0.624508,0.6245 0,0.39032 -0.312254,0.62451 -0.624508,0.62451 l -8.74311,0 c -0.312254,0 -0.624508,-0.23419 -0.624508,-0.62451 0,-0.31225 0.312254,-0.6245 0.624508,-0.6245 z m 14.988189,0 8.743109,0 c 0.312254,0 0.624508,0.31225 0.624508,0.6245 0,0.39032 -0.312254,0.62451 -0.624508,0.62451 l -8.743109,0 c -0.312254,0 -0.624508,-0.23419 -0.624508,-0.62451 0,-0.31225 0.312254,-0.6245 0.624508,-0.6245 z m 14.988188,0 8.743114,0 c 0.31225,0 0.6245,0.31225 0.6245,0.6245 0,0.39032 -0.31225,0.62451 -0.6245,0.62451 l -8.743114,0 c -0.312254,0 -0.624508,-0.23419 -0.624508,-0.62451 0,-0.31225 0.312254,-0.6245 0.624508,-0.6245 z m 14.988184,0 8.74311,0 c 0.31226,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31225,0.62451 -0.62451,0.62451 l -8.74311,0 c -0.31225,0 -0.6245,-0.23419 -0.6245,-0.62451 0,-0.31225 0.31225,-0.6245 0.6245,-0.6245 z m 14.98819,0 8.74311,0 c 0.31226,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31225,0.62451 -0.62451,0.62451 l -8.74311,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.6245 0.62451,-0.6245 z m 14.98819,0 8.74311,0 c 0.31225,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31226,0.62451 -0.62451,0.62451 l -8.74311,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.6245 0.62451,-0.6245 z m 14.98819,0 8.74311,0 c 0.31225,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31226,0.62451 -0.62451,0.62451 l -8.74311,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.6245 0.62451,-0.6245 z m 14.98819,0 8.74311,0 c 0.31225,0 0.6245,0.31225 0.6245,0.6245 0,0.39032 -0.31225,0.62451 -0.6245,0.62451 l -8.74311,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.6245 0.62451,-0.6245 z m 14.98819,0 8.74311,0 c 0.31225,0 0.6245,0.31225 0.6245,0.6245 0,0.39032 -0.31225,0.62451 -0.6245,0.62451 l -8.74311,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.6245 0.62451,-0.6245 z m 14.98818,0 8.74311,0 c 0.31226,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31225,0.62451 -0.62451,0.62451 l -8.74311,0 c -0.31225,0 -0.6245,-0.23419 -0.6245,-0.62451 0,-0.31225 0.31225,-0.6245 0.6245,-0.6245 z m 14.98819,0 8.74311,0 c 0.31226,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31225,0.62451 -0.62451,0.62451 l -8.74311,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.6245 0.62451,-0.6245 z m 14.98819,0 8.74311,0 c 0.31225,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31226,0.62451 -0.62451,0.62451 l -8.74311,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.6245 0.62451,-0.6245 z m 14.98819,0 8.74311,0 c 0.31225,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31226,0.62451 -0.62451,0.62451 l -8.74311,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.6245 0.62451,-0.6245 z m 14.98819,0 8.74311,0 c 0.31225,0 0.6245,0.31225 0.6245,0.6245 0,0.39032 -0.31225,0.62451 -0.6245,0.62451 l -8.74311,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.6245 0.62451,-0.6245 z m 14.98819,0 8.7431,0 c 0.31226,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31225,0.62451 -0.62451,0.62451 l -8.7431,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.6245 0.62451,-0.6245 z m 14.98818,0 8.74311,0 c 0.31226,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31225,0.62451 -0.62451,0.62451 l -8.74311,0 c -0.31225,0 -0.6245,-0.23419 -0.6245,-0.62451 0,-0.31225 0.31225,-0.6245 0.6245,-0.6245 z m 14.98819,0 8.74311,0 c 0.31226,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31225,0.62451 -0.62451,0.62451 l -8.74311,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.6245 0.62451,-0.6245 z m 14.98819,0 8.74311,0 c 0.31225,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31226,0.62451 -0.62451,0.62451 l -8.74311,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.6245 0.62451,-0.6245 z m 14.98819,0 8.74311,0 c 0.31225,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31226,0.62451 -0.62451,0.62451 l -8.74311,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.6245 0.62451,-0.6245 z m 14.98819,0 8.74311,0 c 0.31225,0 0.6245,0.31225 0.6245,0.6245 0,0.39032 -0.31225,0.62451 -0.6245,0.62451 l -8.74311,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.6245 0.62451,-0.6245 z m 14.98818,0 8.74311,0 c 0.31226,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31225,0.62451 -0.62451,0.62451 l -8.74311,0 c -0.31225,0 -0.6245,-0.23419 -0.6245,-0.62451 0,-0.31225 0.31225,-0.6245 0.6245,-0.6245 z m 14.98819,0 8.74311,0 c 0.31226,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31225,0.62451 -0.62451,0.62451 l -8.74311,0 c -0.31225,0 -0.6245,-0.23419 -0.6245,-0.62451 0,-0.31225 0.31225,-0.6245 0.6245,-0.6245 z m 14.98819,0 8.74311,0 c 0.31225,0 0.62451,0.31225 0.62451,0.6245 0,0.39032 -0.31226,0.62451 -0.62451,0.62451 l -8.74311,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.6245 0.62451,-0.6245 z m 14.98819,0 6.16701,0 -0.6245,0.6245 0,-2.49803 c 0,-0.39032 0.31225,-0.62451 0.6245,-0.62451 0.39032,0 0.62451,0.23419 0.62451,0.62451 l 0,2.49803 c 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 l -6.16701,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.6245 0.62451,-0.6245 z m 5.54251,-8.11861 0,-8.74311 c 0,-0.39031 0.31225,-0.6245 0.6245,-0.6245 0.39032,0 0.62451,0.23419 0.62451,0.6245 l 0,8.74311 c 0,0.31226 -0.23419,0.62451 -0.62451,0.62451 -0.31225,0 -0.6245,-0.31225 -0.6245,-0.62451 z m 0,-14.98818 0,-8.74311 c 0,-0.39032 0.31225,-0.62451 0.6245,-0.62451 0.39032,0 0.62451,0.23419 0.62451,0.62451 l 0,8.74311 c 0,0.31225 -0.23419,0.6245 -0.62451,0.6245 -0.31225,0 -0.6245,-0.31225 -0.6245,-0.6245 z m 0,-14.98819 0,-8.74311 c 0,-0.39032 0.31225,-0.62451 0.6245,-0.62451 0.39032,0 0.62451,0.23419 0.62451,0.62451 l 0,8.74311 c 0,0.31225 -0.23419,0.6245 -0.62451,0.6245 -0.31225,0 -0.6245,-0.31225 -0.6245,-0.6245 z m 0,-14.98819 0,-8.74311 c 0,-0.39032 0.31225,-0.62451 0.6245,-0.62451 0.39032,0 0.62451,0.23419 0.62451,0.62451 l 0,8.74311 c 0,0.31225 -0.23419,0.62451 -0.62451,0.62451 -0.31225,0 -0.6245,-0.31226 -0.6245,-0.62451 z m 0,-14.98819 0,-8.74311 c 0,-0.39032 0.31225,-0.62451 0.6245,-0.62451 0.39032,0 0.62451,0.23419 0.62451,0.62451 l 0,8.74311 c 0,0.31225 -0.23419,0.62451 -0.62451,0.62451 -0.31225,0 -0.6245,-0.31226 -0.6245,-0.62451 z m 0,-14.98819 0,-8.74311 c 0,-0.39032 0.31225,-0.62451 0.6245,-0.62451 0.39032,0 0.62451,0.23419 0.62451,0.62451 l 0,8.74311 c 0,0.31226 -0.23419,0.62451 -0.62451,0.62451 -0.31225,0 -0.6245,-0.31225 -0.6245,-0.62451 z m 0,-14.98819 0,-8.74311 c 0,-0.39031 0.31225,-0.6245 0.6245,-0.6245 0.39032,0 0.62451,0.23419 0.62451,0.6245 l 0,8.74311 c 0,0.31226 -0.23419,0.62451 -0.62451,0.62451 -0.31225,0 -0.6245,-0.31225 -0.6245,-0.62451 z m 0,-14.98818 0,-4.37156 0.6245,0.62451 -4.44961,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.62451 0.62451,-0.62451 l 4.44961,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 l 0,4.37156 c 0,0.31225 -0.23419,0.6245 -0.62451,0.6245 -0.31225,0 -0.6245,-0.31225 -0.6245,-0.6245 z m -10.07019,-3.74705 -8.74311,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.62451 0.62451,-0.62451 l 8.74311,0 c 0.39031,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.2342,0.62451 -0.62451,0.62451 z m -14.98819,0 -8.74311,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.62451 0.62451,-0.62451 l 8.74311,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.98819,0 -8.74311,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.62451 0.62451,-0.62451 l 8.74311,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.98819,0 -8.74311,0 c -0.31225,0 -0.6245,-0.23419 -0.6245,-0.62451 0,-0.31225 0.31225,-0.62451 0.6245,-0.62451 l 8.74311,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.98819,0 -8.74311,0 c -0.31225,0 -0.6245,-0.23419 -0.6245,-0.62451 0,-0.31225 0.31225,-0.62451 0.6245,-0.62451 l 8.74311,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.98818,0 -8.74311,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.62451 0.62451,-0.62451 l 8.74311,0 c 0.39031,0 0.6245,0.31226 0.6245,0.62451 0,0.39032 -0.23419,0.62451 -0.6245,0.62451 z m -14.98819,0 -8.74311,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.62451 0.62451,-0.62451 l 8.74311,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.98819,0 -8.74311,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.62451 0.62451,-0.62451 l 8.74311,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.98819,0 -8.74311,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.62451 0.62451,-0.62451 l 8.74311,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.98819,0 -8.74311,0 c -0.31225,0 -0.6245,-0.23419 -0.6245,-0.62451 0,-0.31225 0.31225,-0.62451 0.6245,-0.62451 l 8.74311,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.98819,0 -8.7431,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.62451 0.62451,-0.62451 l 8.7431,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.98818,0 -8.74311,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.62451 0.62451,-0.62451 l 8.74311,0 c 0.39031,0 0.6245,0.31226 0.6245,0.62451 0,0.39032 -0.23419,0.62451 -0.6245,0.62451 z m -14.98819,0 -8.74311,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.62451 0.62451,-0.62451 l 8.74311,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.98819,0 -8.74311,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.62451 0.62451,-0.62451 l 8.74311,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.98819,0 -8.74311,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.62451 0.62451,-0.62451 l 8.74311,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.98819,0 -8.74311,0 c -0.31225,0 -0.6245,-0.23419 -0.6245,-0.62451 0,-0.31225 0.31225,-0.62451 0.6245,-0.62451 l 8.74311,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.98818,0 -8.74311,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.62451 0.62451,-0.62451 l 8.74311,0 c 0.39031,0 0.6245,0.31226 0.6245,0.62451 0,0.39032 -0.23419,0.62451 -0.6245,0.62451 z m -14.98819,0 -8.74311,0 c -0.31226,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31225,-0.62451 0.62451,-0.62451 l 8.74311,0 c 0.39031,0 0.6245,0.31226 0.6245,0.62451 0,0.39032 -0.23419,0.62451 -0.6245,0.62451 z m -14.98819,0 -8.74311,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.62451 0.62451,-0.62451 l 8.74311,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.98819,0 -8.74311,0 c -0.31225,0 -0.62451,-0.23419 -0.62451,-0.62451 0,-0.31225 0.31226,-0.62451 0.62451,-0.62451 l 8.74311,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.98819,0 -8.743108,0 c -0.312254,0 -0.624507,-0.23419 -0.624507,-0.62451 0,-0.31225 0.312253,-0.62451 0.624507,-0.62451 l 8.743108,0 c 0.39032,0 0.62451,0.31226 0.62451,0.62451 0,0.39032 -0.23419,0.62451 -0.62451,0.62451 z m -14.988186,0 -8.74311,0 c -0.312254,0 -0.624508,-0.23419 -0.624508,-0.62451 0,-0.31225 0.312254,-0.62451 0.624508,-0.62451 l 8.74311,0 c 0.390317,0 0.624508,0.31226 0.624508,0.62451 0,0.39032 -0.234191,0.62451 -0.624508,0.62451 z m -14.988188,0 -8.74311,0 c -0.312254,0 -0.624508,-0.23419 -0.624508,-0.62451 0,-0.31225 0.312254,-0.62451 0.624508,-0.62451 l 8.74311,0 c 0.390317,0 0.624508,0.31226 0.624508,0.62451 0,0.39032 -0.234191,0.62451 -0.624508,0.62451 z"
+ id="path20957"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.24901569px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="66.19783"
+ y="262.2933"
+ id="text20959"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">Counter</text>
+ <path
+ d="m 238.87425,829.03416 0,41.60784"
+ id="path20961"
+ style="fill:none;stroke:#000000;stroke-width:8.50891972px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 238.87425,887.97209 -11.47533,-22.95066 c 7.2599,3.59092 15.76882,3.59092 23.02873,0 l 0,0 -11.5534,22.95066 z"
+ id="path20963"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 238.87425,917.48009 0,71.11583"
+ id="path20965"
+ style="fill:none;stroke:#000000;stroke-width:8.50891972px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 238.87425,1006.0041 -11.47533,-22.95069 c 7.2599,3.59092 15.76882,3.59092 23.02873,0 l 0,0 -11.5534,22.95069 z"
+ id="path20967"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 209.44432,1006.0041 0,29.508 117.95392,0 0,-29.508 -117.95392,0 z"
+ id="path20969"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 209.44432,1035.5121 117.95392,0 0,-29.508 -117.95392,0 0,29.508 z"
+ id="path20971"
+ style="fill:none;stroke:#000000;stroke-width:2.49803138px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="261.04428"
+ y="1027.9399"
+ id="text20973"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">=</text>
+ <path
+ d="m 91.412336,887.97209 0,29.508 295.001894,0 0,-29.508 -295.001894,0 z"
+ id="path20975"
+ style="fill:#36a8e4;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 91.412336,917.48009 295.001894,0 0,-29.508 -295.001894,0 0,29.508 z"
+ id="path20977"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="213.58168"
+ y="910.53241"
+ id="text20979"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">CCx</text>
+ <path
+ d="m 91.412336,799.52617 0,29.50799 295.001894,0 0,-29.50799 -295.001894,0 z"
+ id="path20981"
+ style="fill:#36a8e4;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 91.412336,829.03416 295.001894,0 0,-29.50799 -295.001894,0 0,29.50799 z"
+ id="path20983"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="204.83858"
+ y="821.85229"
+ id="text20985"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">CCBx</text>
+ <path
+ d="m 415.92222,740.51018 -177.04797,0 0,41.60783"
+ id="path20987"
+ style="fill:none;stroke:#000000;stroke-width:8.50891972px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 238.87425,799.52617 11.5534,-23.02873 c -7.25991,3.66898 -15.76883,3.66898 -23.02873,0 l 11.47533,23.02873 z"
+ id="path20989"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 415.92222,740.51018 0,206.4779 -118.03198,0 0,41.60784"
+ id="path20991"
+ style="fill:none;stroke:#000000;stroke-width:8.50891972px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 297.89024,1006.0041 11.5534,-22.95069 c -7.25991,3.59092 -15.76883,3.59092 -23.02873,0 l 11.47533,22.95069 z"
+ id="path20993"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 637.23219,887.97209 0,88.52399 147.53998,0 0,-88.52399 -147.53998,0 z"
+ id="path20995"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 637.23219,976.49608 147.53998,0 0,-88.52399 -147.53998,0 0,88.52399 z"
+ id="path20997"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="660.72931"
+ y="925.52063"
+ id="text20999"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">Waveform </text>
+ <text
+ x="655.73322"
+ y="950.50092"
+ id="text21001"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">Generation</text>
+ <path
+ d="m 238.87425,327.39824 0,59.01599 177.04797,0 0,41.60783"
+ id="path21003"
+ style="fill:none;stroke:#000000;stroke-width:8.50891972px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 415.92222,445.43022 -11.47533,-22.95066 c 7.25991,3.59092 15.76883,3.59092 22.95067,0 l 0,0 -11.47534,22.95066 z"
+ id="path21005"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 238.87425,91.412336 0,41.607834"
+ id="path21007"
+ style="fill:none;stroke:#000000;stroke-width:8.50891972px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="M 238.87425,150.42833 227.39892,127.3996 c 7.2599,3.66898 15.76882,3.66898 23.02873,0 l 0,0 -11.5534,23.02873 z"
+ id="path21009"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 238.87425,179.93632 0,100.62383"
+ id="path21011"
+ style="fill:none;stroke:#000000;stroke-width:8.50891972px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 238.87425,297.89024 -11.47533,-22.95066 c 7.2599,3.59092 15.76882,3.59092 23.02873,0 l 0,0 -11.5534,22.95066 z"
+ id="path21013"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 474.93822,356.90623 0,71.11583"
+ id="path21015"
+ style="fill:none;stroke:#000000;stroke-width:8.50891972px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 474.93822,445.43022 -11.47534,-22.95066 c 7.25991,3.59092 15.76883,3.59092 22.95067,0 l -11.47533,22.95066 z"
+ id="path21017"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 238.87425,179.93632 0,29.508 236.06397,0 0,147.46191"
+ id="path21019"
+ style="fill:none;stroke:#000000;stroke-width:8.50891972px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 47.150342,799.52617 0,29.50799 44.261994,0 0,-29.50799 -44.261994,0 z"
+ id="path21021"
+ style="fill:#36a8e4;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 47.150342,829.03416 44.261994,0 0,-29.50799 -44.261994,0 0,29.50799 z"
+ id="path21023"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="52.45866"
+ y="821.85229"
+ id="text21025"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">BV</text>
+ <path
+ d="m 238.87425,327.39824 0,59.01599 118.03198,0 0,100.62383"
+ id="path21027"
+ style="fill:none;stroke:#000000;stroke-width:8.50891972px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="M 356.90623,504.44621 345.4309,481.49555 c 7.25991,3.59092 15.76882,3.59092 23.02873,0 l -11.5534,22.95066 z"
+ id="path21029"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 386.41423,445.43022 0,29.508 118.03198,0 0,-29.508 -118.03198,0 z"
+ id="path21031"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 386.41423,474.93822 118.03198,0 0,-29.508 -118.03198,0 0,29.508 z"
+ id="path21033"
+ style="fill:none;stroke:#000000;stroke-width:2.49803138px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="438.40451"
+ y="467.13187"
+ id="text21035"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">=</text>
+ <path
+ d="m 91.412336,61.90434 0,29.507996 295.001894,0 0,-29.507996 -295.001894,0 z"
+ id="path21037"
+ style="fill:#36a8e4;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 91.412336,91.412336 295.001894,0 0,-29.507996 -295.001894,0 0,29.507996 z"
+ id="path21039"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="203.58955"
+ y="83.684052"
+ id="text21041"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">PER</text>
+ <text
+ x="256.04822"
+ y="83.684052"
+ id="text21043"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">B</text>
+ <path
+ d="m 91.412336,150.42833 0,29.50799 295.001894,0 0,-29.50799 -295.001894,0 z"
+ id="path21045"
+ style="fill:#36a8e4;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 91.412336,179.93632 295.001894,0 0,-29.50799 -295.001894,0 0,29.50799 z"
+ id="path21047"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="213.58168"
+ y="172.36417"
+ id="text21049"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">PER</text>
+ <path
+ d="m 91.412336,297.89024 0,29.508 295.001894,0 0,-29.508 -295.001894,0 z"
+ id="path21051"
+ style="fill:#36a8e4;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 91.412336,327.39824 295.001894,0 0,-29.508 -295.001894,0 0,29.508 z"
+ id="path21053"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="194.84645"
+ y="319.74802"
+ id="text21055"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">COUNT</text>
+ <path
+ d="m 47.150342,61.90434 0,29.507996 44.261994,0 0,-29.507996 -44.261994,0 z"
+ id="path21057"
+ style="fill:#36a8e4;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 47.150342,91.412336 44.261994,0 0,-29.507996 -44.261994,0 0,29.507996 z"
+ id="path21059"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="52.45866"
+ y="83.684052"
+ id="text21061"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">BV</text>
+ <path
+ d="m 297.89024,504.44621 0,29.508 118.03198,0 0,-29.508 -118.03198,0 z"
+ id="path21063"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 297.89024,533.95421 118.03198,0 0,-29.508 -118.03198,0 0,29.508 z"
+ id="path21065"
+ style="fill:none;stroke:#000000;stroke-width:2.49803138px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="339.73227"
+ y="527.08459"
+ id="text21067"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">= </text>
+ <text
+ x="360.96552"
+ y="527.08459"
+ id="text21069"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">0</text>
+ <text
+ x="508.3494"
+ y="244.80708"
+ id="text21071"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;</text>
+ <text
+ x="515.84351"
+ y="244.80708"
+ id="text21073"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">count</text>
+ <text
+ x="567.0531"
+ y="244.80708"
+ id="text21075"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;</text>
+ <text
+ x="508.3494"
+ y="274.78345"
+ id="text21077"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;</text>
+ <text
+ x="515.84351"
+ y="274.78345"
+ id="text21079"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">clear</text>
+ <text
+ x="560.80804"
+ y="274.78345"
+ id="text21081"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;</text>
+ <text
+ x="508.3494"
+ y="333.48718"
+ id="text21083"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;</text>
+ <text
+ x="515.84351"
+ y="333.48718"
+ id="text21085"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">direction</text>
+ <text
+ x="594.53149"
+ y="333.48718"
+ id="text21087"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;</text>
+ <text
+ x="508.3494"
+ y="303.5108"
+ id="text21089"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;</text>
+ <text
+ x="515.84351"
+ y="303.5108"
+ id="text21091"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">load</text>
+ <text
+ x="555.81195"
+ y="303.5108"
+ id="text21093"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;</text>
+ <path
+ d="m 426.14854,253.62825 196.32965,0"
+ id="path21095"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 415.92222,253.62825 13.50499,-6.71346 c -2.10772,4.21543 -2.10772,9.21149 0,13.50498 l -13.50499,-6.79152 z"
+ id="path21097"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 426.14854,283.13624 196.32965,0"
+ id="path21099"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 415.92222,283.13624 13.50499,-6.71346 c -2.10772,4.21543 -2.10772,9.2115 0,13.50499 l -13.50499,-6.79153 z"
+ id="path21101"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 426.14854,312.64424 196.32965,0"
+ id="path21103"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 415.92222,312.64424 13.50499,-6.71346 c -2.10772,4.21543 -2.10772,9.21149 0,13.50498 l -13.50499,-6.79152 z"
+ id="path21105"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 426.14854,342.15224 196.32965,0"
+ id="path21107"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 415.92222,342.15224 13.50499,-6.71346 c -2.10772,4.21542 -2.10772,9.21149 0,13.50498 l -13.50499,-6.79152 z"
+ id="path21109"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 622.47819,224.19832 0,176.96991 147.53998,0 0,-176.96991 -147.53998,0 z"
+ id="path21111"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 622.47819,401.16823 147.53998,0 0,-176.96991 -147.53998,0 0,176.96991 z"
+ id="path21113"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="628.25488"
+ y="318.49899"
+ id="text21115"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">Control Logic</text>
+ <path
+ d="m 474.93822,150.42833 0,29.50799 147.53997,0 0,-29.50799 -147.53997,0 z"
+ id="path21117"
+ style="fill:#36a8e4;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 474.93822,179.93632 147.53997,0 0,-29.50799 -147.53997,0 0,29.50799 z"
+ id="path21119"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="492.11218"
+ y="172.36417"
+ id="text21121"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">Prescaler</text>
+ <path
+ d="m 818.80785,253.62825 -48.78968,0"
+ id="path21123"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 829.03416,253.62825 -13.50498,6.79152 c 2.10772,-4.29349 2.10772,-9.28955 0,-13.50498 l 0,0 13.50498,6.71346 z"
+ id="path21125"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <text
+ x="833.09344"
+ y="259.79526"
+ id="text21127"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">OVF</text>
+ <text
+ x="879.8587"
+ y="258.42081"
+ id="text21133"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">(</text>
+ <text
+ x="886.10382"
+ y="258.42081"
+ id="text21135"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">INT</text>
+ <text
+ x="919.82721"
+ y="258.42081"
+ id="text21137"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">/</text>
+ <text
+ x="926.07233"
+ y="258.42081"
+ id="text21139"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">Event</text>
+ <text
+ x="978.53088"
+ y="258.42081"
+ id="text21141"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">/</text>
+ <text
+ x="984.776"
+ y="258.42081"
+ id="text21143"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">DMA Req</text>
+ <text
+ x="1074.7052"
+ y="258.42081"
+ id="text21145"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">.)</text>
+ <path
+ d="m 818.80785,283.13624 -48.78968,0"
+ id="path21147"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 829.03416,283.13624 -13.50498,6.79153 c 2.10772,-4.29349 2.10772,-9.28956 0,-13.50499 l 0,0 13.50498,6.71346 z"
+ id="path21149"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <text
+ x="833.09344"
+ y="289.77164"
+ id="text21151"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">ERR</text>
+ <text
+ x="881.40454"
+ y="288.31381"
+ id="text21153"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">(</text>
+ <text
+ x="888.89862"
+ y="288.31381"
+ id="text21155"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">INT Req</text>
+ <text
+ x="966.33759"
+ y="288.31381"
+ id="text21157"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">.)</text>
+ <text
+ x="538.32574"
+ y="452.14368"
+ id="text21159"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">TOP</text>
+ <text
+ x="434.65747"
+ y="1011.7027"
+ id="text21161"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;</text>
+ <text
+ x="442.15155"
+ y="1011.7027"
+ id="text21163"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">match</text>
+ <text
+ x="498.35727"
+ y="1011.7027"
+ id="text21165"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;</text>
+ <path
+ d="m 238.87425,386.41423 0,336.68779"
+ id="path21167"
+ style="fill:none;stroke:#000000;stroke-width:8.50891972px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 238.87425,740.51018 -11.47533,-23.02873 c 7.2599,3.66898 15.76882,3.66898 23.02873,0 l 0,0 -11.5534,23.02873 z"
+ id="path21169"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 681.49419,419.74733 0,99.45288 -265.57197,0"
+ id="path21171"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 674.70266,421.38667 6.79153,-20.21844 6.71345,20.21844 -13.50498,0 z"
+ id="path21173"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 651.98619,419.74733 0,40.43689 -147.53998,0"
+ id="path21175"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 645.19467,421.38667 6.79152,-20.21844 6.71346,20.21844 -13.50498,0 z"
+ id="path21177"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 711.00218,986.72239 0,34.03571 -383.60394,0"
+ id="path21179"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 711.00218,976.49608 6.71346,13.50498 c -4.21543,-2.10771 -9.21149,-2.10771 -13.50498,0 l 0,0 6.79152,-13.50498 z"
+ id="path21181"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <text
+ x="1357.4336"
+ y="1028.2067"
+ id="text21183"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">MC</text>
+ <text
+ x="1389.9081"
+ y="1028.2067"
+ id="text21185"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">x</text>
+ <text
+ x="1406.1453"
+ y="1028.2067"
+ id="text21187"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">(</text>
+ <text
+ x="1413.6394"
+ y="1028.2067"
+ id="text21189"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">INT</text>
+ <text
+ x="1447.3628"
+ y="1028.2067"
+ id="text21191"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">/</text>
+ <text
+ x="1453.6078"
+ y="1028.2067"
+ id="text21193"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">Event</text>
+ <text
+ x="1506.0665"
+ y="1028.2067"
+ id="text21195"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">/</text>
+ <text
+ x="1512.3115"
+ y="1028.2067"
+ id="text21197"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">DMA Req</text>
+ <text
+ x="1602.2407"
+ y="1028.2067"
+ id="text21199"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">.)</text>
+ <path
+ d="m 711.00218,401.16823 0,358.62363"
+ id="path21201"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 711.00218,770.01817 -6.79152,-13.50498 c 4.29349,2.10771 9.28955,2.10771 13.50498,0 l 0,0 -6.71346,13.50498 z"
+ id="path21203"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 637.23219,770.01817 0,88.44593 147.53998,0 0,-88.44593 -147.53998,0 z"
+ id="path21205"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 637.23219,858.4641 147.53998,0 0,-88.44593 -147.53998,0 0,88.44593 z"
+ id="path21207"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="643.2431"
+ y="820.60333"
+ id="text21209"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">Control Logic</text>
+ <text
+ x="434.65747"
+ y="805.61511"
+ id="text21211"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;</text>
+ <text
+ x="442.15155"
+ y="805.61511"
+ id="text21213"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">capture</text>
+ <text
+ x="512.09644"
+ y="805.61511"
+ id="text21215"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;</text>
+ <path
+ d="m 396.64054,814.28017 240.59165,0"
+ id="path21217"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 386.41423,814.28017 13.50498,-6.79153 c -2.10771,4.29349 -2.10771,9.28956 0,13.50499 l -13.50498,-6.71346 z"
+ id="path21219"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 740.51018,401.16823 0,358.62363"
+ id="path21221"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 740.51018,770.01817 -6.79153,-13.50498 c 4.2935,2.10771 9.28956,2.10771 13.50499,0 l 0,0 -6.71346,13.50498 z"
+ id="path21223"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 710.19064,991.21821 0,29.57179 625.90416,0"
+ id="path21225"
+ style="fill:none;stroke:#000000;stroke-width:1.42044067px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1348.4954,1020.7581 -13.505,-6.7135 c 2.1077,4.2154 2.1077,9.2115 0,13.505 l 0,0 13.505,-6.7915 z"
+ id="path21227"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <text
+ x="701.94684"
+ y="529.58264"
+ transform="matrix(0,-1,1,0,172.36417,1231.5295)"
+ id="text21229"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;</text>
+ <text
+ x="701.94684"
+ y="522.08856"
+ transform="matrix(0,-1,1,0,179.85826,1224.0354)"
+ id="text21231"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">e</text>
+ <text
+ x="701.94684"
+ y="510.84741"
+ transform="matrix(0,-1,1,0,191.0994,1212.7942)"
+ id="text21233"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">v</text>
+ <text
+ x="701.94684"
+ y="500.85529"
+ transform="matrix(0,-1,1,0,201.09153,1202.8021)"
+ id="text21235"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;</text>
+ <text
+ x="731.92322"
+ y="529.58264"
+ transform="matrix(0,-1,1,0,202.34054,1261.5058)"
+ id="text21237"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">U</text>
+ <text
+ x="731.92322"
+ y="514.59448"
+ transform="matrix(0,-1,1,0,217.32873,1246.5177)"
+ id="text21239"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">P</text>
+ <text
+ x="731.92322"
+ y="500.85529"
+ transform="matrix(0,-1,1,0,231.0679,1232.7785)"
+ id="text21241"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">D</text>
+ <text
+ x="731.92322"
+ y="485.8671"
+ transform="matrix(0,-1,1,0,246.05609,1217.7903)"
+ id="text21243"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">A</text>
+ <text
+ x="731.92322"
+ y="470.87891"
+ transform="matrix(0,-1,1,0,261.04428,1202.8021)"
+ id="text21245"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">T</text>
+ <text
+ x="731.92322"
+ y="458.38876"
+ transform="matrix(0,-1,1,0,273.53443,1190.312)"
+ id="text21247"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">E</text>
+ <text
+ x="538.32574"
+ y="510.84741"
+ id="text21249"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">BOTTOM</text>
+ <g
+ id="g3928">
+ <path
+ d="m 874.62309,931.81135 -74.91434,0"
+ id="path21251"
+ style="fill:none;stroke:#000000;stroke-width:1.42971087px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 885.22802,932.0121 -13.42692,6.79153 c 2.10772,-4.29349 2.10772,-9.28956 0,-13.50498 l 13.42692,6.71345 z"
+ id="path21253"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ </g>
+ <path
+ d="m 474.93822,165.18232 -70.80358,0 0,63.54368"
+ id="path21255"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 404.13464,238.87425 -6.71346,-13.42692 c 4.21543,2.10772 9.21149,2.10772 13.42692,0 l 0,0 -6.71346,13.42692 z"
+ id="path21257"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 938.84697,991.78523 0,-136.19255 -53.10759,0 0,136.19255 53.10759,0 z"
+ id="path21259"
+ style="fill:none;stroke:#000000;stroke-width:1.51137304px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="-961.35443"
+ y="910.47162"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21261"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">Recoverable</text>
+ <text
+ x="-937.62317"
+ y="930.45587"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21285"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">Faults</text>
+ <g
+ id="g3924">
+ <path
+ d="m 872.7487,887.53034 -58.14973,0"
+ id="path21297"
+ style="fill:none;stroke:#000000;stroke-width:1.42635524px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 884.94583,888.01806 -13.42692,6.79152 c 2.10772,-4.29349 2.10772,-9.28955 0,-13.50498 l 0,0 13.42692,6.71346 z"
+ id="path21299"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ </g>
+ <g
+ transform="matrix(1,0,0,1.0190469,-62.772695,-3.3029105)"
+ id="g3447">
+ <path
+ d="m 1094.5281,976.49608 0,-398.27988 -59.016,0 0,398.27988 59.016,0 z"
+ id="path21301"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="1060.4143"
+ y="801.86804"
+ transform="matrix(0,-1,1,0,258.54623,1862.2824)"
+ id="text21303"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">O</text>
+ <text
+ x="1060.4143"
+ y="789.37793"
+ transform="matrix(0,-1,1,0,271.03638,1849.7922)"
+ id="text21305"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">u</text>
+ <text
+ x="1060.4143"
+ y="780.63483"
+ transform="matrix(0,-1,1,0,279.77949,1841.0491)"
+ id="text21307"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">t</text>
+ <text
+ x="1060.4143"
+ y="775.63873"
+ transform="matrix(0,-1,1,0,284.77556,1836.053)"
+ id="text21309"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">p</text>
+ <text
+ x="1060.4143"
+ y="765.64661"
+ transform="matrix(0,-1,1,0,294.76768,1826.0609)"
+ id="text21311"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">u</text>
+ <text
+ x="1060.4143"
+ y="756.9035"
+ transform="matrix(0,-1,1,0,303.51079,1817.3178)"
+ id="text21313"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">t</text>
+ <text
+ x="1080.3986"
+ y="800.61908"
+ transform="matrix(0,-1,1,0,279.77954,1881.0177)"
+ id="text21315"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">M</text>
+ <text
+ x="1080.3986"
+ y="785.63086"
+ transform="matrix(0,-1,1,0,294.76773,1866.0295)"
+ id="text21317"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">a</text>
+ <text
+ x="1080.3986"
+ y="776.88776"
+ transform="matrix(0,-1,1,0,303.51084,1857.2864)"
+ id="text21319"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">t</text>
+ <text
+ x="1080.3986"
+ y="771.89172"
+ transform="matrix(0,-1,1,0,308.5069,1852.2903)"
+ id="text21321"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">r</text>
+ <text
+ x="1080.3986"
+ y="766.89563"
+ transform="matrix(0,-1,1,0,313.50297,1847.2942)"
+ id="text21323"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">i</text>
+ <text
+ x="1080.3986"
+ y="763.14856"
+ transform="matrix(0,-1,1,0,317.25001,1843.5472)"
+ id="text21325"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">x</text>
+ </g>
+ <g
+ transform="translate(-15.436818,3.5135653)"
+ id="g4299">
+ <path
+ d="m 1134.1557,988.24819 0,-214.98041 -58.9427,0 0,214.98041 58.9427,0 z"
+ id="path21327"
+ style="fill:none;stroke:#000000;stroke-width:1.55761099px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="-923.74011"
+ y="1100.2346"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21329"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">D</text>
+ <text
+ x="-911.24988"
+ y="1100.2346"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21331"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">e</text>
+ <text
+ x="-902.50677"
+ y="1100.2346"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21333"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">a</text>
+ <text
+ x="-892.51471"
+ y="1100.2346"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21335"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">d</text>
+ <text
+ x="-883.77161"
+ y="1100.2346"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21337"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">-</text>
+ <text
+ x="-878.77551"
+ y="1100.2346"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21339"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">T</text>
+ <text
+ x="-867.53436"
+ y="1100.2346"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21341"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">i</text>
+ <text
+ x="-863.78729"
+ y="1100.2346"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21343"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">m</text>
+ <text
+ x="-850.0481"
+ y="1100.2346"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21345"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">e</text>
+ <text
+ x="-913.7478"
+ y="1120.2189"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21347"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">I</text>
+ <text
+ x="-910.00079"
+ y="1120.2189"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21349"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">n</text>
+ <text
+ x="-900.00873"
+ y="1120.2189"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21351"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">s</text>
+ <text
+ x="-892.51459"
+ y="1120.2189"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21353"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">e</text>
+ <text
+ x="-882.5224"
+ y="1120.219"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21355"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">r</text>
+ <text
+ x="-877.52643"
+ y="1120.2189"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21357"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">t</text>
+ <text
+ x="-872.53033"
+ y="1120.2189"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21359"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">i</text>
+ <text
+ x="-868.78333"
+ y="1120.2189"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21361"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">o</text>
+ <text
+ x="-860.04022"
+ y="1120.2189"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21363"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">n</text>
+ </g>
+ <path
+ d="m 1271.2616,991.7827 0,-405.86091 -58.3872,0 0,405.86091 58.3872,0 z"
+ id="path21365"
+ style="fill:none;stroke:#000000;stroke-width:1.51635635;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="-807.54523"
+ y="1253.1334"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="text21367"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">SWAP</text>
+ <path
+ d="m 1360.2389,991.79247 0,-405.88045 -59.0022,0 0,405.88045 59.0022,0 z"
+ id="path21375"
+ style="fill:none;stroke:#000000;stroke-width:1.49711788px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="1325.2056"
+ y="804.36609"
+ transform="matrix(0,-1,1,0,520.8395,2129.5717)"
+ id="text21377"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">P</text>
+ <text
+ x="1325.2056"
+ y="793.12494"
+ transform="matrix(0,-1,1,0,532.08064,2118.3306)"
+ id="text21379"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">a</text>
+ <text
+ x="1325.2056"
+ y="784.38184"
+ transform="matrix(0,-1,1,0,540.82375,2109.5875)"
+ id="text21381"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">t</text>
+ <text
+ x="1325.2056"
+ y="779.3858"
+ transform="matrix(0,-1,1,0,545.81981,2104.5914)"
+ id="text21383"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">t</text>
+ <text
+ x="1325.2056"
+ y="774.38971"
+ transform="matrix(0,-1,1,0,550.81587,2099.5953)"
+ id="text21385"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">e</text>
+ <text
+ x="1325.2056"
+ y="765.64661"
+ transform="matrix(0,-1,1,0,559.55898,2090.8522)"
+ id="text21387"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">r</text>
+ <text
+ x="1325.2056"
+ y="759.40155"
+ transform="matrix(0,-1,1,0,565.80406,2084.6071)"
+ id="text21389"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">n</text>
+ <text
+ x="1345.1899"
+ y="818.10529"
+ transform="matrix(0,-1,1,0,527.08462,2163.2952)"
+ id="text21391"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">G</text>
+ <text
+ x="1345.1899"
+ y="805.61511"
+ transform="matrix(0,-1,1,0,539.57478,2150.805)"
+ id="text21393"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">e</text>
+ <text
+ x="1345.1899"
+ y="796.87201"
+ transform="matrix(0,-1,1,0,548.31789,2142.0619)"
+ id="text21395"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">n</text>
+ <text
+ x="1345.1899"
+ y="786.87988"
+ transform="matrix(0,-1,1,0,558.31002,2132.0698)"
+ id="text21397"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">e</text>
+ <text
+ x="1345.1899"
+ y="778.13678"
+ transform="matrix(0,-1,1,0,567.05313,2123.3267)"
+ id="text21399"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">r</text>
+ <text
+ x="1345.1899"
+ y="771.89172"
+ transform="matrix(0,-1,1,0,573.2982,2117.0816)"
+ id="text21401"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">a</text>
+ <text
+ x="1345.1899"
+ y="763.14856"
+ transform="matrix(0,-1,1,0,582.04131,2108.3385)"
+ id="text21403"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">t</text>
+ <text
+ x="1345.1899"
+ y="758.15253"
+ transform="matrix(0,-1,1,0,587.03738,2103.3424)"
+ id="text21405"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">i</text>
+ <text
+ x="1345.1899"
+ y="754.40546"
+ transform="matrix(0,-1,1,0,590.78442,2099.5954)"
+ id="text21407"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">o</text>
+ <text
+ x="1345.1899"
+ y="745.66235"
+ transform="matrix(0,-1,1,0,599.52753,2090.8523)"
+ id="text21409"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">n</text>
+ <path
+ d="m 1448.6171,991.78588 0,-405.91823 -59.0022,0 0,405.91823 59.0022,0 z"
+ id="path21411"
+ style="fill:none;stroke:#000000;stroke-width:1.51009905;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="1413.8857"
+ y="839.33856"
+ transform="matrix(0,-1,1,0,574.54726,2253.2243)"
+ id="text21413"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">N</text>
+ <text
+ x="1413.8857"
+ y="826.84839"
+ transform="matrix(0,-1,1,0,587.03741,2240.7342)"
+ id="text21415"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">o</text>
+ <text
+ x="1413.8857"
+ y="818.10529"
+ transform="matrix(0,-1,1,0,595.78052,2231.9911)"
+ id="text21417"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">n</text>
+ <text
+ x="1413.8857"
+ y="808.11316"
+ transform="matrix(0,-1,1,0,605.77265,2221.999)"
+ id="text21419"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">-</text>
+ <text
+ x="1413.8857"
+ y="803.11707"
+ transform="matrix(0,-1,1,0,610.76871,2217.0029)"
+ id="text21421"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">r</text>
+ <text
+ x="1413.8857"
+ y="796.87201"
+ transform="matrix(0,-1,1,0,617.01379,2210.7578)"
+ id="text21423"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">e</text>
+ <text
+ x="1413.8857"
+ y="788.12891"
+ transform="matrix(0,-1,1,0,625.7569,2202.0147)"
+ id="text21425"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">c</text>
+ <text
+ x="1413.8857"
+ y="779.3858"
+ transform="matrix(0,-1,1,0,634.50001,2193.2716)"
+ id="text21427"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">o</text>
+ <text
+ x="1413.8857"
+ y="770.6427"
+ transform="matrix(0,-1,1,0,643.24312,2184.5285)"
+ id="text21429"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">v</text>
+ <text
+ x="1413.8857"
+ y="761.8996"
+ transform="matrix(0,-1,1,0,651.98623,2175.7854)"
+ id="text21431"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">e</text>
+ <text
+ x="1413.8857"
+ y="753.15643"
+ transform="matrix(0,-1,1,0,660.72934,2167.0423)"
+ id="text21433"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">r</text>
+ <text
+ x="1413.8857"
+ y="746.91138"
+ transform="matrix(0,-1,1,0,666.97442,2160.7972)"
+ id="text21435"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">a</text>
+ <text
+ x="1413.8857"
+ y="738.16827"
+ transform="matrix(0,-1,1,0,675.71753,2152.0541)"
+ id="text21437"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">b</text>
+ <text
+ x="1413.8857"
+ y="728.17615"
+ transform="matrix(0,-1,1,0,685.70965,2142.062)"
+ id="text21439"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">l</text>
+ <text
+ x="1413.8857"
+ y="724.42908"
+ transform="matrix(0,-1,1,0,689.4567,2138.3149)"
+ id="text21441"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">e</text>
+ <text
+ x="1433.87"
+ y="800.61908"
+ transform="matrix(0,-1,1,0,633.25094,2234.4891)"
+ id="text21443"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">F</text>
+ <text
+ x="1433.87"
+ y="789.37793"
+ transform="matrix(0,-1,1,0,644.49208,2223.2479)"
+ id="text21445"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">a</text>
+ <text
+ x="1433.87"
+ y="780.63483"
+ transform="matrix(0,-1,1,0,653.23519,2214.5048)"
+ id="text21447"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">u</text>
+ <text
+ x="1433.87"
+ y="771.89172"
+ transform="matrix(0,-1,1,0,661.9783,2205.7617)"
+ id="text21449"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">l</text>
+ <text
+ x="1433.87"
+ y="768.14465"
+ transform="matrix(0,-1,1,0,665.72535,2202.0147)"
+ id="text21451"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">t</text>
+ <text
+ x="1433.87"
+ y="763.14856"
+ transform="matrix(0,-1,1,0,670.72141,2197.0186)"
+ id="text21453"
+ xml:space="preserve"
+ style="font-size:16.2372036px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">s</text>
+ <g
+ transform="translate(0,-3.2192186e-6)"
+ id="g3916">
+ <path
+ d="m 960.57849,799.46003 -116.4104,0"
+ id="path21471"
+ style="fill:none;stroke:#000000;stroke-width:1.45568323;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 972.4447,799.60465 -13.50504,6.71346 c 2.1858,-4.21543 2.1858,-9.21149 0,-13.50498 l 0,0 13.50504,6.79152 z"
+ id="path21473"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ </g>
+ <path
+ d="m 1271.576,933.57932 19.2817,0"
+ id="path21535"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1301.6038,934.37769 -13.505,6.79153 c 2.1078,-4.29349 2.1078,-9.28956 0,-13.50498 l 13.505,6.71345 z"
+ id="path21537"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1271.576,887.97209 19.2817,0"
+ id="path21539"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1301.084,887.97209 -13.505,6.79152 c 2.1078,-4.29349 2.1078,-9.28955 0,-13.50498 l 0,0 13.505,6.71346 z"
+ id="path21541"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1271.576,843.78816 19.2817,0"
+ id="path21543"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1301.084,843.78816 -13.505,6.71346 c 2.1078,-4.21543 2.1078,-9.21149 0,-13.50498 l 13.505,6.79152 z"
+ id="path21545"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1271.576,799.52617 19.2817,0"
+ id="path21547"
+ style="fill:none;stroke:#000000;stroke-width:1.49599946;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1301.084,799.52617 -13.505,6.71346 c 2.1078,-4.21543 2.1078,-9.21149 0,-13.50498 l 0,0 13.505,6.79152 z"
+ id="path21549"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1360.1,932.23408 19.2817,0"
+ id="path21551"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1389.608,932.23408 -13.505,6.79153 c 2.1077,-4.29349 2.1077,-9.28956 0,-13.50498 l 13.505,6.71345 z"
+ id="path21553"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1360.1,887.97209 19.2817,0"
+ id="path21555"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1389.608,887.97209 -13.505,6.79152 c 2.1077,-4.29349 2.1077,-9.28955 0,-13.50498 l 0,0 13.505,6.71346 z"
+ id="path21557"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1360.1,843.78816 19.2817,0"
+ id="path21559"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1389.608,843.78816 -13.505,6.71346 c 2.1077,-4.21543 2.1077,-9.21149 0,-13.50498 l 13.505,6.79152 z"
+ id="path21561"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1360.1,799.52617 19.2817,0"
+ id="path21563"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1389.608,799.52617 -13.505,6.71346 c 2.1077,-4.21543 2.1077,-9.21149 0,-13.50498 l 0,0 13.505,6.79152 z"
+ id="path21565"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1360.1,755.26417 19.2817,0"
+ id="path21567"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1389.608,755.26417 -13.505,6.71346 c 2.1077,-4.21542 2.1077,-9.21149 0,-13.50498 l 13.505,6.79152 z"
+ id="path21569"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1360.1,711.00218 19.2817,0"
+ id="path21571"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1389.608,711.00218 -13.505,6.71346 c 2.1077,-4.21543 2.1077,-9.21149 0,-13.50498 l 13.505,6.79152 z"
+ id="path21573"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1360.1,666.74019 19.2817,0"
+ id="path21575"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1389.608,666.74019 -13.505,6.71346 c 2.1077,-4.21543 2.1077,-9.21149 0,-13.50499 l 13.505,6.79153 z"
+ id="path21577"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1360.1,622.47819 19.2817,0"
+ id="path21579"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1389.608,622.47819 -13.505,6.71346 c 2.1077,-4.21542 2.1077,-9.21149 0,-13.50498 l 13.505,6.79152 z"
+ id="path21581"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1448.624,932.9067 19.2817,0"
+ id="path21583"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,932.23408 -13.505,6.79153 c 2.1077,-4.29349 2.1077,-9.28956 0,-13.50498 l 13.505,6.71345 z"
+ id="path21585"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1448.624,887.97209 19.2817,0"
+ id="path21587"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,887.97209 -13.505,6.79152 c 2.1077,-4.29349 2.1077,-9.28955 0,-13.50498 l 0,0 13.505,6.71346 z"
+ id="path21589"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1448.624,843.78816 19.2817,0"
+ id="path21591"
+ style="fill:none;stroke:#000000;stroke-width:1.49599946;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,843.78816 -13.505,6.71346 c 2.1077,-4.21543 2.1077,-9.21149 0,-13.50498 l 13.505,6.79152 z"
+ id="path21593"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1448.624,799.52617 19.2817,0"
+ id="path21595"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,799.52617 -13.505,6.71346 c 2.1077,-4.21543 2.1077,-9.21149 0,-13.50498 l 0,0 13.505,6.79152 z"
+ id="path21597"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1448.624,755.26417 19.2817,0"
+ id="path21599"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,755.26417 -13.505,6.71346 c 2.1077,-4.21542 2.1077,-9.21149 0,-13.50498 l 13.505,6.79152 z"
+ id="path21601"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1448.624,711.00218 19.2817,0"
+ id="path21603"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,711.00218 -13.505,6.71346 c 2.1077,-4.21543 2.1077,-9.21149 0,-13.50498 l 13.505,6.79152 z"
+ id="path21605"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1448.624,666.74019 19.2817,0"
+ id="path21607"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,666.74019 -13.505,6.71346 c 2.1077,-4.21543 2.1077,-9.21149 0,-13.50499 l 13.505,6.79153 z"
+ id="path21609"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1448.624,622.47819 19.2817,0"
+ id="path21611"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,622.47819 -13.505,6.71346 c 2.1077,-4.21542 2.1077,-9.21149 0,-13.50498 l 13.505,6.79152 z"
+ id="path21613"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1478.132,917.48009 0,29.50799 29.4299,0 0,-29.50799 -29.4299,0 z"
+ id="path21615"
+ style="fill:#c0c0c0;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1478.132,946.98808 29.4299,0 0,-29.50799 -29.4299,0 0,29.50799 z"
+ id="path21617"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,946.98808 29.4299,-29.50799"
+ id="path21619"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,917.48009 29.4299,29.50799"
+ id="path21621"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,873.21809 0,29.508 29.4299,0 0,-29.508 -29.4299,0 z"
+ id="path21623"
+ style="fill:#c0c0c0;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1478.132,902.72609 29.4299,0 0,-29.508 -29.4299,0 0,29.508 z"
+ id="path21625"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,902.72609 29.4299,-29.508"
+ id="path21627"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,873.21809 29.4299,29.508"
+ id="path21629"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,829.03416 0,29.42994 29.4299,0 0,-29.42994 -29.4299,0 z"
+ id="path21631"
+ style="fill:#c0c0c0;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1478.132,858.4641 29.4299,0 0,-29.42994 -29.4299,0 0,29.42994 z"
+ id="path21633"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,858.4641 29.4299,-29.42994"
+ id="path21635"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,829.03416 29.4299,29.42994"
+ id="path21637"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,784.77217 0,29.508 29.4299,0 0,-29.508 -29.4299,0 z"
+ id="path21639"
+ style="fill:#c0c0c0;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1478.132,814.28017 29.4299,0 0,-29.508 -29.4299,0 0,29.508 z"
+ id="path21641"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,814.28017 29.4299,-29.508"
+ id="path21643"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,784.77217 29.4299,29.508"
+ id="path21645"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,740.51018 0,29.50799 29.4299,0 0,-29.50799 -29.4299,0 z"
+ id="path21647"
+ style="fill:#c0c0c0;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1478.132,770.01817 29.4299,0 0,-29.50799 -29.4299,0 0,29.50799 z"
+ id="path21649"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,770.01817 29.4299,-29.50799"
+ id="path21651"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,740.51018 29.4299,29.50799"
+ id="path21653"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,696.24818 0,29.508 29.4299,0 0,-29.508 -29.4299,0 z"
+ id="path21655"
+ style="fill:#c0c0c0;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1478.132,725.75618 29.4299,0 0,-29.508 -29.4299,0 0,29.508 z"
+ id="path21657"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,725.75618 29.4299,-29.508"
+ id="path21659"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,696.24818 29.4299,29.508"
+ id="path21661"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,651.98619 0,29.508 29.4299,0 0,-29.508 -29.4299,0 z"
+ id="path21663"
+ style="fill:#c0c0c0;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1478.132,681.49419 29.4299,0 0,-29.508 -29.4299,0 0,29.508 z"
+ id="path21665"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,681.49419 29.4299,-29.508"
+ id="path21667"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,651.98619 29.4299,29.508"
+ id="path21669"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,607.7242 0,29.50799 29.4299,0 0,-29.50799 -29.4299,0 z"
+ id="path21671"
+ style="fill:#c0c0c0;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1478.132,637.23219 29.4299,0 0,-29.50799 -29.4299,0 0,29.50799 z"
+ id="path21673"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,637.23219 29.4299,-29.50799"
+ id="path21675"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1478.132,607.7242 29.4299,29.50799"
+ id="path21677"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="1516.3051"
+ y="939.25983"
+ id="text21679"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">WO</text>
+ <text
+ x="1560.0206"
+ y="939.25983"
+ id="text21681"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">[</text>
+ <text
+ x="1566.2657"
+ y="939.25983"
+ id="text21683"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">0</text>
+ <text
+ x="1580.0048"
+ y="939.25983"
+ id="text21685"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">]</text>
+ <text
+ x="1516.3051"
+ y="895.54425"
+ id="text21687"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">WO</text>
+ <text
+ x="1560.0206"
+ y="895.54425"
+ id="text21689"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">[</text>
+ <text
+ x="1566.2657"
+ y="895.54425"
+ id="text21691"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">1</text>
+ <text
+ x="1580.0048"
+ y="895.54425"
+ id="text21693"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">]</text>
+ <text
+ x="1516.3051"
+ y="851.82867"
+ id="text21695"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">WO</text>
+ <text
+ x="1560.0206"
+ y="851.82867"
+ id="text21697"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">[</text>
+ <text
+ x="1566.2657"
+ y="851.82867"
+ id="text21699"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">2</text>
+ <text
+ x="1580.0048"
+ y="851.82867"
+ id="text21701"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">]</text>
+ <text
+ x="1516.3051"
+ y="806.86414"
+ id="text21703"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">WO</text>
+ <text
+ x="1560.0206"
+ y="806.86414"
+ id="text21705"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">[</text>
+ <text
+ x="1566.2657"
+ y="806.86414"
+ id="text21707"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">3</text>
+ <text
+ x="1580.0048"
+ y="806.86414"
+ id="text21709"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">]</text>
+ <text
+ x="1516.3051"
+ y="763.14856"
+ id="text21711"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">WO</text>
+ <text
+ x="1560.0206"
+ y="763.14856"
+ id="text21713"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">[</text>
+ <text
+ x="1566.2657"
+ y="763.14856"
+ id="text21715"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">4</text>
+ <text
+ x="1580.0048"
+ y="763.14856"
+ id="text21717"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">]</text>
+ <text
+ x="1516.3051"
+ y="718.18402"
+ id="text21719"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">WO</text>
+ <text
+ x="1560.0206"
+ y="718.18402"
+ id="text21721"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">[</text>
+ <text
+ x="1566.2657"
+ y="718.18402"
+ id="text21723"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">5</text>
+ <text
+ x="1580.0048"
+ y="718.18402"
+ id="text21725"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">]</text>
+ <text
+ x="1516.3051"
+ y="674.46844"
+ id="text21727"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">WO</text>
+ <text
+ x="1560.0206"
+ y="674.46844"
+ id="text21729"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">[</text>
+ <text
+ x="1566.2657"
+ y="674.46844"
+ id="text21731"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">6</text>
+ <text
+ x="1580.0048"
+ y="674.46844"
+ id="text21733"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">]</text>
+ <text
+ x="1516.3051"
+ y="629.50391"
+ id="text21735"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">WO</text>
+ <text
+ x="1560.0206"
+ y="629.50391"
+ id="text21737"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">[</text>
+ <text
+ x="1566.2657"
+ y="629.50391"
+ id="text21739"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">7</text>
+ <text
+ x="1580.0048"
+ y="629.50391"
+ id="text21741"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">]</text>
+ <path
+ d="m 1035.5121,430.67622 0,88.52399 103.278,0 0,-88.52399 -103.278,0 z"
+ id="path21743"
+ style="fill:#c0c0c0;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1035.5121,519.20021 103.278,0 0,-88.52399 -103.278,0 0,88.52399 z"
+ id="path21745"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="1055.4183"
+ y="467.13187"
+ id="text21747"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">Event</text>
+ <text
+ x="1045.4261"
+ y="497.10825"
+ id="text21749"
+ xml:space="preserve"
+ style="font-size:24.98031425px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">System</text>
+ <path
+ d="m 1035.5121,474.93822 -265.49393,0 0,284.85364"
+ id="path21751"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 770.01817,770.01817 -6.79152,-13.50498 c 4.29349,2.10771 9.28955,2.10771 13.50498,0 l 0,0 -6.71346,13.50498 z"
+ id="path21753"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <text
+ x="900.771"
+ y="347.10092"
+ id="text21779"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;TCCx_EV0&quot;</text>
+ <path
+ d="m 780.16642,386.41423 624.19558,0 0,181.57565"
+ id="path21789"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 770.01817,386.41423 13.42692,-6.71346 c -2.10771,4.21543 -2.10771,9.21149 0,13.50498 l 0,0 -13.42692,-6.79152 z"
+ id="path21791"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1404.362,578.2162 -6.7915,-13.50498 c 4.2935,2.10771 9.2895,2.10771 13.505,0 l -6.7135,13.50498 z"
+ id="path21793"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 780.16642,356.90623 653.70358,0 0,211.08365"
+ id="path21795"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 770.01817,356.90623 13.42692,-6.71346 c -2.10771,4.21543 -2.10771,9.21149 0,13.50499 l -13.42692,-6.79153 z"
+ id="path21797"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1433.87,578.2162 -6.7915,-13.50498 c 4.2935,2.10771 9.2895,2.10771 13.505,0 l 0,0 -6.7135,13.50498 z"
+ id="path21799"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1079.7741,430.67622 0,-44.26199"
+ id="path21801"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1094.5281,430.67622 0,-73.76999"
+ id="path21803"
+ style="fill:none;stroke:#000000;stroke-width:1.48320615px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <text
+ x="897.35315"
+ y="378.86383"
+ id="text21779-1"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;TCCx_EV1&quot;</text>
+ <text
+ x="900.01935"
+ y="467.17191"
+ id="text21779-1-7"
+ xml:space="preserve"
+ style="font-size:21.23326683px;font-style:italic;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial">&quot;TCCx_MCx&quot;</text>
+ <flowRoot
+ id="flowRoot4320"
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"><flowRegion
+ id="flowRegion4322"><rect
+ width="14.60575"
+ height="46.35738"
+ x="545.65179"
+ y="518.87262"
+ id="rect4324" /></flowRegion><flowPara
+ id="flowPara4326" /></flowRoot> <path
+ d="m 1205.82,663.94475 -173.146,0"
+ id="path21471-8"
+ style="fill:none;stroke:#000000;stroke-width:1.45084238px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1203.989,618.88695 -171.5054,0"
+ id="path21471-8-8"
+ style="fill:none;stroke:#000000;stroke-width:1.44395244px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1202.7088,709.00252 -170.0476,0"
+ id="path21471-8-2"
+ style="fill:none;stroke:#000000;stroke-width:1.43780196px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1203.806,754.06029 -171.3233,0"
+ id="path21471-8-4"
+ style="fill:none;stroke:#000000;stroke-width:1.44318497px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1119.5256,806.77156 82.7262,0"
+ id="path21503-4-5"
+ style="fill:none;stroke:#000000;stroke-width:1.55515647;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1119.7321,849.03594 84.7021,0"
+ id="path21503-4-5-5"
+ style="fill:none;stroke:#000000;stroke-width:1.55745232;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1119.7426,891.55548 85.6,0"
+ id="path21503-4-5-1"
+ style="fill:none;stroke:#000000;stroke-width:1.55847919;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1118.849,934.29139 87.7547,0"
+ id="path21503-4-5-7"
+ style="fill:none;stroke:#000000;stroke-width:1.56090248;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1133.4527,785.11918 0,-163.09966"
+ id="path21803-1"
+ style="fill:none;stroke:#000000;stroke-width:1.40398824;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1147.8308,827.31498 0,-159.22821"
+ id="path21803-15"
+ style="fill:none;stroke:#000000;stroke-width:1.46569908px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1162.1587,869.91868 0,-156.37225"
+ id="path21803-15-7"
+ style="fill:none;stroke:#000000;stroke-width:1.43717289px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1176.505,912.76546 0,-154.32872"
+ id="path21803-15-6"
+ style="fill:none;stroke:#000000;stroke-width:1.44554079px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1212.8508,619.15195 -13.5051,6.71346 c 2.1858,-4.21543 2.1858,-9.21149 0,-13.50498 l 0,0 13.5051,6.79152 z"
+ id="path21473-1"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1212.8508,663.29856 -13.5051,6.71346 c 2.1858,-4.21543 2.1858,-9.21149 0,-13.50498 l 0,0 13.5051,6.79152 z"
+ id="path21473-7"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1212.2994,708.39253 -13.5051,6.71346 c 2.1858,-4.21543 2.1858,-9.21149 0,-13.50498 l 0,0 13.5051,6.79152 z"
+ id="path21473-4"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1212.1157,753.48648 -13.5051,6.71346 c 2.1858,-4.21543 2.1858,-9.21149 0,-13.50498 l 0,0 13.5051,6.79152 z"
+ id="path21473-0"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1212.2772,806.84097 -13.5051,6.71346 c 2.1858,-4.21543 2.1858,-9.21149 0,-13.50498 l 0,0 13.5051,6.79152 z"
+ id="path21473-0-9"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1212.2994,933.67285 -13.5051,6.71346 c 2.1858,-4.21543 2.1858,-9.21149 0,-13.50498 l 0,0 13.5051,6.79152 z"
+ id="path21473-0-4"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1212.2995,891.264 -13.5051,6.71346 c 2.1858,-4.21543 2.1858,-9.21149 0,-13.50498 l 0,0 13.5051,6.79152 z"
+ id="path21473-0-8"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1212.3756,848.93196 -13.5051,6.71346 c 2.1858,-4.21543 2.1858,-9.21149 0,-13.50498 l 0,0 13.5051,6.79152 z"
+ id="path21473-0-82"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1271.6873,756.43118 19.2817,0"
+ id="path21547-4"
+ style="fill:none;stroke:#000000;stroke-width:1.49599946;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1301.1953,756.43118 -13.505,6.71346 c 2.1078,-4.21543 2.1078,-9.21149 0,-13.50498 l 0,0 13.505,6.79152 z"
+ id="path21549-5"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1272.467,712.75506 19.2817,0"
+ id="path21547-5"
+ style="fill:none;stroke:#000000;stroke-width:1.49599946;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1301.975,712.75506 -13.505,6.71346 c 2.1078,-4.21543 2.1078,-9.21149 0,-13.50498 l 0,0 13.505,6.79152 z"
+ id="path21549-1"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1271.9472,668.00713 19.2817,0"
+ id="path21547-7"
+ style="fill:none;stroke:#000000;stroke-width:1.49599946;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1301.4552,668.00713 -13.505,6.71346 c 2.1078,-4.21543 2.1078,-9.21149 0,-13.50498 l 0,0 13.505,6.79152 z"
+ id="path21549-11"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1272.4669,620.31174 19.2817,0"
+ id="path21547-52"
+ style="fill:none;stroke:#000000;stroke-width:1.49599946;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1301.9749,620.31174 -13.505,6.71346 c 2.1078,-4.21543 2.1078,-9.21149 0,-13.50498 l 0,0 13.505,6.79152 z"
+ id="path21549-7"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <g
+ transform="translate(0,4.9016106)"
+ id="g3912">
+ <path
+ d="m 971.91819,884.50777 -13.50504,6.79152 c 2.1858,-4.29349 2.1858,-9.28955 0,-13.50498 l 0,0 13.50504,6.71346 z"
+ id="path21481"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 939.61578,884.18204 21.16083,0"
+ id="path21551-6"
+ style="fill:none;stroke:#000000;stroke-width:1.55380034px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ <g
+ transform="translate(-0.5197847,4.8231295)"
+ id="g3908">
+ <path
+ d="m 972.28565,929.52763 -13.50496,6.79153 c 2.1858,-4.29349 2.1858,-9.28956 0,-13.50498 l 13.50496,6.71345 z"
+ id="path21485"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 939.95097,929.46547 20.30668,0"
+ id="path21551-1"
+ style="fill:none;stroke:#000000;stroke-width:1.52211797px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ <g
+ id="g3920">
+ <path
+ d="m 972.11087,843.97763 -13.50499,6.71346 c 2.1858,-4.21543 2.1858,-9.21149 0,-13.50498 l 13.50499,6.79152 z"
+ id="path21477"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 961.22563,844.50701 -131.67954,0"
+ id="path21471-2"
+ style="fill:none;stroke:#000000;stroke-width:1.54821098;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ <g
+ transform="translate(0,-8.5744493)"
+ id="g3892">
+ <path
+ d="m 1032.4854,809.26303 20.4269,0"
+ id="path21503-4"
+ style="fill:none;stroke:#000000;stroke-width:1.42498088;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1059.1823,809.4856 -13.505,6.71346 c 2.1858,-4.21543 2.1858,-9.21149 0,-13.50498 l 13.505,6.79152 z"
+ id="path21477-1"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ </g>
+ <g
+ transform="translate(0,-8.3065041)"
+ id="g3896">
+ <path
+ d="m 1031.5608,853.92654 20.4269,0"
+ id="path21503-4-4"
+ style="fill:none;stroke:#000000;stroke-width:1.42498088;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1059.4421,853.69762 -13.505,6.71346 c 2.1858,-4.21543 2.1858,-9.21149 0,-13.50498 l 13.505,6.79152 z"
+ id="path21477-7"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ </g>
+ <g
+ transform="translate(0,-7.7705911)"
+ id="g3900">
+ <path
+ d="m 1031.8206,897.87061 20.4269,0"
+ id="path21503-4-2"
+ style="fill:none;stroke:#000000;stroke-width:1.42498088;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1059.4421,897.64169 -13.505,6.71346 c 2.1858,-4.21543 2.1858,-9.21149 0,-13.50498 l 13.505,6.79152 z"
+ id="path21477-4"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ </g>
+ <g
+ transform="translate(0,-8.5744525)"
+ id="g3904">
+ <path
+ d="m 1031.8206,942.61854 20.4269,0"
+ id="path21503-4-3"
+ style="fill:none;stroke:#000000;stroke-width:1.42498088;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1059.702,942.92552 -13.505,6.71346 c 2.1858,-4.21543 2.1858,-9.21149 0,-13.50498 l 13.505,6.79152 z"
+ id="path21477-0"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ </g>
+ <path
+ d="m 1133.2705,619.35085 6.5115,13.9239 c -4.0886,-2.25358 -8.9344,-2.25358 -13.0987,0 l 0,0 6.5872,-13.9239 z"
+ id="path21473-1-1"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1147.6967,664.53954 6.5115,13.9239 c -4.0886,-2.25358 -8.9344,-2.25358 -13.0987,0 l 0,0 6.5872,-13.9239 z"
+ id="path21473-1-1-4"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1162.0309,709.6335 6.5115,13.9239 c -4.0886,-2.25358 -8.9344,-2.25358 -13.0987,0 l 0,0 6.5872,-13.9239 z"
+ id="path21473-1-1-0"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1176.4569,754.63273 6.5115,13.9239 c -4.0886,-2.25358 -8.9344,-2.25358 -13.0987,0 l 0,0 6.5872,-13.9239 z"
+ id="path21473-1-1-9"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1119.5366,912.92282 56.7957,0"
+ id="path21543-4"
+ style="fill:none;stroke:#000000;stroke-width:1.56713641px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1119.3663,870.29545 42.6183,0"
+ id="path21543-4-8"
+ style="fill:none;stroke:#000000;stroke-width:1.35752261px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1118.9023,827.54528 28.3852,0"
+ id="path21543-4-82"
+ style="fill:none;stroke:#000000;stroke-width:1.44087696px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 1119.2803,785.47341 13.9382,0"
+ id="path21543-4-4"
+ style="fill:none;stroke:#000000;stroke-width:1.4359076px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ </g>
+</svg>
diff --git a/atmel-samd/asf/sam0/drivers/tcc/docimg/pwm_match_ex.svg b/atmel-samd/asf/sam0/drivers/tcc/docimg/pwm_match_ex.svg
new file mode 100644
index 000000000..dbce68d31
--- /dev/null
+++ b/atmel-samd/asf/sam0/drivers/tcc/docimg/pwm_match_ex.svg
@@ -0,0 +1,1464 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="581.41901"
+ height="318.89764"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="pwm_match_ex.svg">
+ <defs
+ id="defs4">
+ <font
+ horiz-adv-x="2048"
+ id="EmbeddedFont_1"
+ horiz-origin-x="0"
+ horiz-origin-y="0"
+ vert-origin-x="45"
+ vert-origin-y="90"
+ vert-adv-y="90">
+ <font-face
+ id="font-face2990"
+ descent="450"
+ ascent="1852"
+ font-style="normal"
+ font-weight="normal"
+ units-per-em="2048"
+ font-family="Arial" />
+ <missing-glyph
+ id="missing-glyph2992"
+ d="M 0,0 L 2047,0 2047,2047 0,2047 0,0 Z"
+ horiz-adv-x="2048" />
+ <glyph
+ id="glyph2994"
+ d="M 15,0 L 403,552 44,1062 269,1062 432,813 C 463,766 487,726 506,694 535,738 562,777 587,811 L 766,1062 981,1062 614,562 1009,0 788,0 570,330 512,419 233,0 15,0 Z"
+ horiz-adv-x="954"
+ unicode="x" />
+ <glyph
+ id="glyph2996"
+ d="M 331,0 L 6,1062 192,1062 361,449 424,221 C 427,232 445,305 479,440 L 648,1062 833,1062 992,446 1045,243 1106,448 1288,1062 1463,1062 1131,0 944,0 775,636 734,817 519,0 331,0 Z"
+ horiz-adv-x="1430"
+ unicode="w" />
+ <glyph
+ id="glyph2998"
+ d="M 430,0 L 26,1062 216,1062 444,426 C 469,357 491,286 512,212 528,268 550,335 579,414 L 815,1062 1000,1062 598,0 430,0 Z"
+ horiz-adv-x="954"
+ unicode="v" />
+ <glyph
+ id="glyph3000"
+ d="M 831,0 L 831,156 C 748,36 636,-24 494,-24 431,-24 373,-12 319,12 264,36 224,66 198,103 171,139 153,183 142,236 135,271 131,327 131,404 L 131,1062 311,1062 311,473 C 311,379 315,316 322,283 333,236 357,199 394,172 431,145 476,131 530,131 584,131 635,145 682,173 729,200 763,238 783,286 802,333 812,402 812,493 L 812,1062 992,1062 992,0 831,0 Z"
+ horiz-adv-x="848"
+ unicode="u" />
+ <glyph
+ id="glyph3002"
+ d="M 528,161 L 554,2 C 503,-9 458,-14 418,-14 353,-14 302,-4 266,17 230,38 205,65 190,99 175,132 168,203 168,311 L 168,922 36,922 36,1062 168,1062 168,1325 347,1433 347,1062 528,1062 528,922 347,922 347,301 C 347,250 350,217 357,202 363,187 373,176 388,167 402,158 422,154 449,154 469,154 495,156 528,161 Z"
+ horiz-adv-x="504"
+ unicode="t" />
+ <glyph
+ id="glyph3004"
+ d="M 63,317 L 241,345 C 251,274 279,219 325,181 370,143 434,124 516,124 599,124 660,141 700,175 740,208 760,248 760,293 760,334 742,366 707,389 682,405 621,425 523,450 391,483 300,512 249,537 198,561 159,595 133,638 106,681 93,728 93,780 93,827 104,871 126,912 147,952 177,985 214,1012 242,1033 280,1050 329,1065 377,1079 429,1086 484,1086 567,1086 641,1074 704,1050 767,1026 813,994 843,953 873,912 894,857 905,788 L 729,764 C 721,819 698,861 660,892 621,923 567,938 497,938 414,938 355,924 320,897 285,870 267,838 267,801 267,778 274,757 289,738 304,719 327,703 358,690 376,683 429,668 517,644 644,610 733,582 784,561 834,539 873,507 902,466 931,425 945,373 945,312 945,252 928,196 893,143 858,90 807,49 741,20 675,-9 600,-24 517,-24 379,-24 274,5 202,62 129,119 83,204 63,317 Z"
+ horiz-adv-x="874"
+ unicode="s" />
+ <glyph
+ id="glyph3006"
+ d="M 133,0 L 133,1062 295,1062 295,901 C 336,976 375,1026 410,1050 445,1074 483,1086 525,1086 586,1086 647,1067 710,1028 L 648,861 C 604,887 560,900 516,900 477,900 441,888 410,865 379,841 356,808 343,766 323,702 313,632 313,556 L 313,0 133,0 Z"
+ horiz-adv-x="557"
+ unicode="r" />
+ <glyph
+ id="glyph3008"
+ d="M 135,-407 L 135,1062 299,1062 299,924 C 338,978 381,1019 430,1046 479,1073 538,1086 607,1086 698,1086 778,1063 847,1016 916,969 969,904 1004,819 1039,734 1057,640 1057,539 1057,430 1038,333 999,246 960,159 903,92 829,46 754,-1 676,-24 594,-24 534,-24 480,-11 433,14 385,39 346,71 315,110 L 315,-407 135,-407 Z M 298,525 C 298,388 326,287 381,222 436,157 503,124 582,124 662,124 731,158 788,226 845,293 873,398 873,540 873,675 845,777 790,844 734,911 667,945 590,945 513,945 446,909 387,838 328,766 298,662 298,525 Z"
+ horiz-adv-x="901"
+ unicode="p" />
+ <glyph
+ id="glyph3010"
+ d="M 68,531 C 68,728 123,873 232,968 323,1047 435,1086 566,1086 712,1086 831,1038 924,943 1017,847 1063,715 1063,546 1063,409 1043,302 1002,224 961,145 901,84 823,41 744,-2 659,-24 566,-24 417,-24 297,24 206,119 114,214 68,352 68,531 Z M 253,531 C 253,395 283,293 342,226 401,158 476,124 566,124 655,124 730,158 789,226 848,294 878,398 878,537 878,668 848,768 789,836 729,903 655,937 566,937 476,937 401,903 342,836 283,769 253,667 253,531 Z"
+ horiz-adv-x="980"
+ unicode="o" />
+ <glyph
+ id="glyph3012"
+ d="M 135,0 L 135,1062 297,1062 297,911 C 375,1028 488,1086 635,1086 699,1086 758,1075 812,1052 865,1029 905,998 932,961 959,924 977,879 988,828 995,795 998,736 998,653 L 998,0 818,0 818,646 C 818,719 811,774 797,811 783,847 758,876 723,898 687,919 645,930 597,930 520,930 454,906 399,857 343,808 315,716 315,580 L 315,0 135,0 Z"
+ horiz-adv-x="848"
+ unicode="n" />
+ <glyph
+ id="glyph3014"
+ d="M 135,0 L 135,1062 296,1062 296,913 C 329,965 374,1007 429,1039 484,1070 547,1086 618,1086 697,1086 761,1070 812,1037 862,1004 897,959 918,900 1002,1024 1111,1086 1246,1086 1351,1086 1432,1057 1489,999 1546,940 1574,850 1574,729 L 1574,0 1395,0 1395,669 C 1395,741 1389,793 1378,825 1366,856 1345,882 1314,901 1283,920 1247,930 1206,930 1131,930 1069,905 1020,856 971,806 946,726 946,617 L 946,0 766,0 766,690 C 766,770 751,830 722,870 693,910 645,930 578,930 527,930 481,917 438,890 395,863 363,824 344,773 325,722 315,648 315,551 L 315,0 135,0 Z"
+ horiz-adv-x="1457"
+ unicode="m" />
+ <glyph
+ id="glyph3016"
+ d="M 131,0 L 131,1466 311,1466 311,0 131,0 Z"
+ horiz-adv-x="186"
+ unicode="l" />
+ <glyph
+ id="glyph3018"
+ d="M 136,1259 L 136,1466 316,1466 316,1259 136,1259 Z M 136,0 L 136,1062 316,1062 316,0 136,0 Z"
+ horiz-adv-x="160"
+ unicode="i" />
+ <glyph
+ id="glyph3020"
+ d="M 135,0 L 135,1466 315,1466 315,940 C 399,1037 505,1086 633,1086 712,1086 780,1071 838,1040 896,1009 938,966 963,911 988,856 1000,777 1000,673 L 1000,0 820,0 820,673 C 820,763 801,829 762,870 723,911 667,931 596,931 543,931 493,917 446,890 399,862 365,824 345,777 325,730 315,664 315,581 L 315,0 135,0 Z"
+ horiz-adv-x="848"
+ unicode="h" />
+ <glyph
+ id="glyph3022"
+ d="M 102,-88 L 277,-114 C 284,-168 305,-207 338,-232 383,-265 444,-282 521,-282 604,-282 669,-265 714,-232 759,-199 790,-152 806,-92 815,-55 820,22 819,139 740,46 642,0 525,0 379,0 266,53 186,158 106,263 66,390 66,537 66,638 84,732 121,818 158,903 211,969 281,1016 350,1063 432,1086 526,1086 651,1086 755,1035 836,934 L 836,1062 1002,1062 1002,144 C 1002,-21 985,-138 952,-207 918,-276 865,-331 792,-371 719,-411 629,-431 522,-431 395,-431 293,-402 215,-345 137,-288 99,-203 102,-88 Z M 251,550 C 251,411 279,309 334,245 389,181 459,149 542,149 625,149 694,181 750,245 806,308 834,408 834,544 834,674 805,772 748,838 690,904 620,937 539,937 459,937 391,905 335,840 279,775 251,678 251,550 Z"
+ horiz-adv-x="927"
+ unicode="g" />
+ <glyph
+ id="glyph3024"
+ d="M 862,342 L 1048,319 C 1019,210 964,126 885,66 806,6 704,-24 581,-24 426,-24 303,24 212,120 121,215 75,349 75,522 75,701 121,839 213,938 305,1037 424,1086 571,1086 713,1086 829,1038 919,941 1009,844 1054,708 1054,533 1054,522 1054,506 1053,485 L 261,485 C 268,368 301,279 360,217 419,155 493,124 582,124 648,124 704,141 751,176 798,211 835,266 862,342 Z M 271,633 L 864,633 C 856,722 833,789 796,834 739,903 664,938 573,938 490,938 421,910 365,855 308,800 277,726 271,633 Z"
+ horiz-adv-x="980"
+ unicode="e" />
+ <glyph
+ id="glyph3026"
+ d="M 824,0 L 824,134 C 757,29 658,-24 527,-24 442,-24 365,-1 294,46 223,93 168,158 129,242 90,325 70,421 70,530 70,636 88,732 123,819 158,905 211,971 282,1017 353,1063 432,1086 519,1086 583,1086 640,1073 690,1046 740,1019 781,983 812,940 L 812,1466 991,1466 991,0 824,0 Z M 255,530 C 255,394 284,292 341,225 398,158 466,124 544,124 623,124 690,156 745,221 800,285 827,383 827,515 827,660 799,767 743,835 687,903 618,937 536,937 456,937 389,904 336,839 282,774 255,671 255,530 Z"
+ horiz-adv-x="927"
+ unicode="d" />
+ <glyph
+ id="glyph3028"
+ d="M 828,389 L 1005,366 C 986,244 936,149 857,80 777,11 679,-24 563,-24 418,-24 301,24 213,119 124,214 80,350 80,527 80,642 99,742 137,828 175,914 233,979 311,1022 388,1065 473,1086 564,1086 679,1086 774,1057 847,999 920,940 967,857 988,750 L 813,723 C 796,794 767,848 725,884 682,920 631,938 571,938 480,938 407,906 350,841 293,776 265,673 265,532 265,389 292,286 347,221 402,156 473,124 561,124 632,124 691,146 738,189 785,232 815,299 828,389 Z"
+ horiz-adv-x="927"
+ unicode="c" />
+ <glyph
+ id="glyph3030"
+ d="M 301,0 L 134,0 134,1466 314,1466 314,943 C 390,1038 487,1086 605,1086 670,1086 732,1073 791,1047 849,1020 897,983 935,936 972,888 1002,830 1023,763 1044,696 1055,624 1055,547 1055,365 1010,224 920,125 830,26 722,-24 596,-24 471,-24 372,28 301,133 L 301,0 Z M 299,539 C 299,412 316,320 351,263 408,170 484,124 581,124 660,124 728,158 785,227 842,295 871,397 871,532 871,671 844,773 789,839 734,905 667,938 589,938 510,938 442,904 385,836 328,767 299,668 299,539 Z"
+ horiz-adv-x="901"
+ unicode="b" />
+ <glyph
+ id="glyph3032"
+ d="M 828,131 C 761,74 697,34 636,11 574,-12 508,-24 437,-24 320,-24 231,5 168,62 105,119 74,191 74,280 74,332 86,380 110,423 133,466 164,500 203,526 241,552 284,572 332,585 367,594 421,603 492,612 637,629 744,650 813,674 814,699 814,714 814,721 814,794 797,846 763,876 717,917 649,937 558,937 473,937 411,922 371,893 330,863 300,810 281,735 L 105,759 C 121,834 147,895 184,942 221,988 274,1024 343,1049 412,1074 493,1086 584,1086 675,1086 748,1075 805,1054 862,1033 903,1006 930,974 957,941 975,900 986,851 992,820 995,765 995,685 L 995,445 C 995,278 999,172 1007,128 1014,83 1029,41 1052,0 L 864,0 C 845,37 833,81 828,131 Z M 813,533 C 748,506 650,484 519,465 445,454 393,442 362,429 331,416 308,396 291,371 274,345 266,316 266,285 266,237 284,197 321,165 357,133 410,117 480,117 549,117 611,132 665,163 719,193 759,234 784,287 803,328 813,388 813,467 L 813,533 Z"
+ horiz-adv-x="980"
+ unicode="a" />
+ <glyph
+ id="glyph3034"
+ d="M -31,-407 L -31,-277 1162,-277 1162,-407 -31,-407 Z"
+ horiz-adv-x="1192"
+ unicode="_" />
+ <glyph
+ id="glyph3036"
+ d="M 414,0 L 25,1466 224,1466 447,505 C 471,404 492,304 509,205 546,362 568,452 575,476 L 854,1466 1088,1466 1298,724 C 1351,540 1389,367 1412,205 1431,298 1455,404 1485,524 L 1715,1466 1910,1466 1508,0 1321,0 1012,1117 C 986,1210 971,1268 966,1289 951,1222 936,1164 923,1117 L 612,0 414,0 Z"
+ horiz-adv-x="1986"
+ unicode="W" />
+ <glyph
+ id="glyph3038"
+ d="M 531,0 L 531,1293 48,1293 48,1466 1210,1466 1210,1293 725,1293 725,0 531,0 Z"
+ horiz-adv-x="1166"
+ unicode="T" />
+ <glyph
+ id="glyph3040"
+ d="M 161,0 L 161,1466 811,1466 C 942,1466 1041,1453 1109,1427 1177,1400 1231,1354 1272,1287 1313,1220 1333,1147 1333,1066 1333,962 1299,874 1232,803 1165,732 1061,686 920,667 971,642 1010,618 1037,594 1094,542 1147,477 1198,399 L 1453,0 1209,0 1015,305 C 958,393 912,460 875,507 838,554 806,586 777,605 748,624 718,637 688,644 666,649 630,651 580,651 L 355,651 355,0 161,0 Z M 355,819 L 772,819 C 861,819 930,828 980,847 1030,865 1068,894 1094,935 1120,975 1133,1019 1133,1066 1133,1135 1108,1192 1058,1237 1007,1282 928,1304 819,1304 L 355,1304 355,819 Z"
+ horiz-adv-x="1271"
+ unicode="R" />
+ <glyph
+ id="glyph3042"
+ d="M 158,0 L 158,1466 711,1466 C 808,1466 883,1461 934,1452 1006,1440 1066,1417 1115,1384 1164,1350 1203,1303 1233,1242 1262,1181 1277,1115 1277,1042 1277,917 1237,812 1158,726 1079,639 935,596 728,596 L 352,596 352,0 158,0 Z M 352,769 L 731,769 C 856,769 945,792 998,839 1051,886 1077,951 1077,1036 1077,1097 1062,1150 1031,1194 1000,1237 959,1266 908,1280 875,1289 815,1293 727,1293 L 352,1293 352,769 Z"
+ horiz-adv-x="1113"
+ unicode="P" />
+ <glyph
+ id="glyph3044"
+ d="M 99,714 C 99,957 164,1148 295,1286 426,1423 594,1492 801,1492 936,1492 1058,1460 1167,1395 1276,1330 1359,1240 1416,1125 1473,1009 1501,878 1501,731 1501,582 1471,449 1411,332 1351,215 1266,126 1156,66 1046,5 927,-25 800,-25 662,-25 539,8 430,75 321,142 239,233 183,348 127,463 99,585 99,714 Z M 299,711 C 299,534 347,395 442,294 537,192 656,141 799,141 945,141 1065,192 1160,295 1254,398 1301,543 1301,732 1301,851 1281,956 1241,1045 1200,1134 1141,1203 1064,1252 986,1301 899,1325 802,1325 665,1325 547,1278 448,1184 349,1089 299,932 299,711 Z"
+ horiz-adv-x="1404"
+ unicode="O" />
+ <glyph
+ id="glyph3046"
+ d="M 152,0 L 152,1466 444,1466 791,428 C 823,331 846,259 861,211 878,264 904,343 939,446 L 1290,1466 1551,1466 1551,0 1364,0 1364,1227 938,0 763,0 339,1248 339,0 152,0 Z"
+ horiz-adv-x="1377"
+ unicode="M" />
+ <glyph
+ id="glyph3048"
+ d="M 1204,514 L 1398,465 C 1357,306 1284,184 1179,101 1073,17 944,-25 791,-25 633,-25 505,7 406,72 307,136 231,229 180,351 128,473 102,604 102,744 102,897 131,1030 190,1144 248,1257 331,1344 439,1403 546,1462 665,1491 794,1491 941,1491 1064,1454 1164,1379 1264,1304 1334,1199 1373,1064 L 1182,1019 C 1148,1126 1099,1203 1034,1252 969,1301 888,1325 790,1325 677,1325 583,1298 508,1244 432,1190 379,1118 348,1027 317,936 302,842 302,745 302,620 320,512 357,419 393,326 449,256 526,210 603,164 686,141 775,141 884,141 976,172 1051,235 1126,298 1177,391 1204,514 Z"
+ horiz-adv-x="1298"
+ unicode="C" />
+ <glyph
+ id="glyph3050"
+ d="M 253,-431 L 124,-431 C 323,-111 423,209 423,530 423,655 409,780 380,903 357,1003 326,1099 285,1191 259,1251 205,1351 124,1491 L 253,1491 C 378,1324 471,1156 531,987 582,842 608,690 608,531 608,351 574,177 505,9 436,-159 352,-306 253,-431 Z"
+ horiz-adv-x="477"
+ unicode=")" />
+ <glyph
+ id="glyph3052"
+ d="M 479,-431 C 380,-306 296,-159 227,9 158,177 124,351 124,531 124,690 150,842 201,987 261,1156 354,1324 479,1491 L 608,1491 C 527,1352 474,1253 448,1194 407,1102 375,1006 352,906 323,781 309,656 309,530 309,209 409,-111 608,-431 L 479,-431 Z"
+ horiz-adv-x="478"
+ unicode="(" />
+ <glyph
+ id="glyph3054"
+ horiz-adv-x="556"
+ unicode=" " />
+ </font>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.979899"
+ inkscape:cx="305.84649"
+ inkscape:cy="179.82498"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1366"
+ inkscape:window-height="716"
+ inkscape:window-x="1592"
+ inkscape:window-y="33"
+ inkscape:window-maximized="1"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-185.10687,-464.34194)">
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ visibility="visible"
+ id="MasterSlide_1_Default"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <desc
+ id="desc3057">Master slide
+ </desc>
+ <rect
+ style="fill:none;stroke:none"
+ x="0"
+ y="0"
+ width="16000"
+ height="9000"
+ id="rect3059" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3062"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ id="path3064"
+ d="m 2600,5382 0,-3650"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 2600,1282 -187,563 375,0 -188,-563 z"
+ id="Drawing_1_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3067"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ id="path3069"
+ d="m 2600,5382 11250,0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 14300,5382 -562,-187 0,375 562,-188 z"
+ id="Drawing_2_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_3"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <rect
+ id="rect3073"
+ height="641"
+ width="1301"
+ y="5682"
+ x="13200"
+ style="fill:none;stroke:none" />
+ <g
+ id="g3075"
+ font-weight="400"
+ font-style="normal"
+ font-size="353"
+ style="font-size:353px;font-style:normal;font-weight:400;fill:#000000;stroke:none;font-family:Arial">
+ <text
+ id="text3077"
+ y="6120"
+ x="13450">T</text>
+ <text
+ id="text3079"
+ y="6120"
+ x="13657">i</text>
+ <text
+ id="text3081"
+ y="6120"
+ x="13734">m</text>
+ <text
+ id="text3083"
+ y="6120"
+ x="14034">e</text>
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3085"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 3100,5382 0,-2500"
+ id="Drawing_4_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3088"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="M 3100,5382 2600,4882"
+ id="Drawing_5_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3091"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 5600,5382 0,-3000"
+ id="Drawing_6_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3094"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="M 8601,5381 5601,2383"
+ id="Drawing_7_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3097"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="M 13600,5381 12600,4382"
+ id="Drawing_8_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3100"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 2600,2382 11400,0"
+ id="Drawing_9_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:30;stroke-linejoin:round;stroke-dasharray:508, 508, 508, 508" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3146"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 8600,5382 0,-2000"
+ id="Drawing_11_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3149"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="M 9601,4383 8601,3383"
+ id="Drawing_12_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3152"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 9601,4382 0,-2000"
+ id="Drawing_13_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3155"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="M 12602,5383 9601,2382"
+ id="Drawing_14_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3158"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 12600,5382 0,-1000"
+ id="Drawing_15_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_16"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,458.34194)">
+ <rect
+ id="rect3162"
+ height="641"
+ width="4401"
+ y="6542"
+ x="6000"
+ style="fill:none;stroke:none" />
+ <g
+ id="g3164"
+ font-weight="400"
+ font-style="normal"
+ font-size="353"
+ style="font-size:353px;font-style:normal;font-weight:400;fill:#000000;stroke:none;font-family:Arial">
+ <text
+ id="text3166"
+ y="6980"
+ x="6250">R</text>
+ <text
+ id="text3168"
+ y="6980"
+ x="6504">e</text>
+ <text
+ id="text3170"
+ y="6980"
+ x="6699">l</text>
+ <text
+ id="text3172"
+ y="6980"
+ x="6775">o</text>
+ <text
+ id="text3174"
+ y="6980"
+ x="6970">a</text>
+ <text
+ id="text3176"
+ y="6980"
+ x="7164">d</text>
+ <text
+ id="text3178"
+ y="6980"
+ x="7359" />
+ <text
+ id="text3180"
+ y="6980"
+ x="7457">t</text>
+ <text
+ id="text3182"
+ y="6980"
+ x="7554">o</text>
+ <text
+ id="text3184"
+ y="6980"
+ x="7749" />
+ <text
+ id="text3186"
+ y="6980"
+ x="7842">T</text>
+ <text
+ id="text3188"
+ y="6980"
+ x="8058">O</text>
+ <text
+ id="text3190"
+ y="6980"
+ x="8333">P</text>
+ <text
+ id="text3192"
+ y="6980"
+ x="8561" />
+ <text
+ id="text3194"
+ y="6980"
+ x="8659">v</text>
+ <text
+ id="text3196"
+ y="6980"
+ x="8832">a</text>
+ <text
+ id="text3198"
+ y="6980"
+ x="9027">l</text>
+ <text
+ id="text3200"
+ y="6980"
+ x="9103">u</text>
+ <text
+ id="text3202"
+ y="6980"
+ x="9298">e</text>
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3204"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ id="path3206"
+ d="m 8400,6482 119,-594"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 8600,5482 -271,474 339,67 -68,-541 z"
+ id="Drawing_17_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3209"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ id="path3211"
+ d="m 9600,6682 2317,-944"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 12300,5582 -544,36 130,319 414,-355 z"
+ id="Drawing_18_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3214"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ id="path3216"
+ d="m 9700,2282 842,-491"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 10900,1582 -534,112 174,298 360,-410 z"
+ id="Drawing_19_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_20"
+ transform="matrix(0.03543307,0,0,0.03543307,175.10687,464.34194)">
+ <rect
+ id="rect3220"
+ height="1030"
+ width="4150"
+ y="553"
+ x="10651"
+ style="fill:none;stroke:none" />
+ <g
+ id="g3222"
+ font-weight="400"
+ font-style="normal"
+ font-size="353"
+ style="font-size:353px;font-style:normal;font-weight:400;fill:#000000;stroke:none;font-family:Arial">
+ <text
+ id="text3224"
+ y="991"
+ x="10901">C</text>
+ <text
+ id="text3226"
+ y="991"
+ x="11155">o</text>
+ <text
+ id="text3228"
+ y="991"
+ x="11350">u</text>
+ <text
+ id="text3230"
+ y="991"
+ x="11544">n</text>
+ <text
+ id="text3232"
+ y="991"
+ x="11739">t</text>
+ <text
+ id="text3234"
+ y="991"
+ x="11837" />
+ <text
+ id="text3236"
+ y="991"
+ x="11934">i</text>
+ <text
+ id="text3238"
+ y="991"
+ x="12010">s</text>
+ <text
+ id="text3240"
+ y="991"
+ x="12188" />
+ <text
+ id="text3242"
+ y="991"
+ x="12285">w</text>
+ <text
+ id="text3244"
+ y="991"
+ x="12535">r</text>
+ <text
+ id="text3246"
+ y="991"
+ x="12654">i</text>
+ <text
+ id="text3248"
+ y="991"
+ x="12730">t</text>
+ <text
+ id="text3250"
+ y="991"
+ x="12827">t</text>
+ <text
+ id="text3252"
+ y="991"
+ x="12925">e</text>
+ <text
+ id="text3254"
+ y="991"
+ x="13119">n</text>
+ <text
+ id="text3256"
+ y="991"
+ x="13314" />
+ <text
+ id="text3268"
+ y="991"
+ x="14250" />
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3310"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ id="path3312"
+ d="m 5800,2182 352,-469"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 6400,1382 -448,311 276,207 172,-518 z"
+ id="Drawing_21_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3315"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ id="path3317"
+ d="M 8300,2982 7519,1733"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 7300,1382 128,530 293,-183 -421,-347 z"
+ id="Drawing_22_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_23"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <rect
+ id="rect3321"
+ height="1030"
+ width="5601"
+ y="482"
+ x="4500"
+ style="fill:none;stroke:none" />
+ <g
+ id="g3323"
+ font-weight="400"
+ font-style="normal"
+ font-size="353"
+ style="font-size:353px;font-style:normal;font-weight:400;fill:#000000;stroke:none;font-family:Arial">
+ <text
+ id="text3325"
+ y="920"
+ x="4750">T</text>
+ <text
+ id="text3327"
+ y="920"
+ x="4966">O</text>
+ <text
+ id="text3329"
+ y="920"
+ x="5241">P</text>
+ <text
+ id="text3331"
+ y="920"
+ x="5470" />
+ <text
+ id="text3333"
+ y="920"
+ x="5567">v</text>
+ <text
+ id="text3335"
+ y="920"
+ x="5741">a</text>
+ <text
+ id="text3337"
+ y="920"
+ x="5935">l</text>
+ <text
+ id="text3339"
+ y="920"
+ x="6012">u</text>
+ <text
+ id="text3341"
+ y="920"
+ x="6206">e</text>
+ <text
+ id="text3343"
+ y="920"
+ x="6401" />
+ <text
+ id="text3345"
+ y="920"
+ x="6498">h</text>
+ <text
+ id="text3347"
+ y="920"
+ x="6693">a</text>
+ <text
+ id="text3349"
+ y="920"
+ x="6888">s</text>
+ <text
+ id="text3351"
+ y="920"
+ x="7066" />
+ <text
+ id="text3353"
+ y="920"
+ x="7163">b</text>
+ <text
+ id="text3355"
+ y="920"
+ x="7358">e</text>
+ <text
+ id="text3357"
+ y="920"
+ x="7552">e</text>
+ <text
+ id="text3359"
+ y="920"
+ x="7747">n</text>
+ <text
+ id="text3361"
+ y="920"
+ x="7942" />
+ <text
+ id="text3363"
+ y="920"
+ x="8039">c</text>
+ <text
+ id="text3365"
+ y="920"
+ x="8217">h</text>
+ <text
+ id="text3367"
+ y="920"
+ x="8412">a</text>
+ <text
+ id="text3369"
+ y="920"
+ x="8607">n</text>
+ <text
+ id="text3371"
+ y="920"
+ x="8801">g</text>
+ <text
+ id="text3373"
+ y="920"
+ x="8996">e</text>
+ <text
+ id="text3375"
+ y="920"
+ x="9191">d</text>
+ <text
+ id="text3377"
+ y="920"
+ x="9386" />
+ <text
+ id="text3389"
+ y="1309"
+ x="5588" />
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3427"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 2600,4882 11600,0"
+ id="Drawing_24_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:100;stroke-linejoin:round;stroke-dasharray:197, 197" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3430"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 3100,8407 2000,0"
+ id="Drawing_25_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3433"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 5100,7407 0,1000"
+ id="Drawing_26_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3436"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 5100,7407 500,0"
+ id="Drawing_27_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3439"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 5600,7407 0,1000"
+ id="Drawing_28_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3442"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 5600,8407 2000,0"
+ id="Drawing_29_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3445"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 7600,7407 0,1000"
+ id="Drawing_30_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3448"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 7600,7407 500,0"
+ id="Drawing_31_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3451"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 8100,7407 0,1000"
+ id="Drawing_32_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3454"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 12100,7407 0,1000"
+ id="Drawing_33_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3457"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 12100,7407 500,0"
+ id="Drawing_34_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3460"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 12600,7407 0,1000"
+ id="Drawing_35_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3463"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 13100,7407 0,1000"
+ id="Drawing_36_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3466"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 13100,7407 500,0"
+ id="Drawing_37_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3469"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 13600,7407 0,1000"
+ id="Drawing_38_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3472"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 8100,8407 4000,0"
+ id="Drawing_39_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3475"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 4953,4649 250,433"
+ id="Drawing_40_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3478"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 5300,4742 -433,250"
+ id="Drawing_41_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3481"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 7986,4682 250,433"
+ id="Drawing_42_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3484"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 8333,4775 -433,250"
+ id="Drawing_43_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3487"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 11986,4649 250,433"
+ id="Drawing_44_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3490"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 12333,4742 -433,250"
+ id="Drawing_45_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3493"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 12986,4682 250,433"
+ id="Drawing_46_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3496"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 13333,4775 -433,250"
+ id="Drawing_47_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ id="g4702">
+ <g
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)"
+ id="g3499"
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round"
+ inkscape:connector-curvature="0"
+ id="Drawing_48_0"
+ d="m 12853,6453 250,433" />
+ </g>
+ <g
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)"
+ id="g3502"
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round"
+ inkscape:connector-curvature="0"
+ id="Drawing_49_0"
+ d="m 13200,6546 -433,250" />
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_50"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <rect
+ id="rect3506"
+ height="641"
+ width="1701"
+ y="6413"
+ x="13200"
+ style="fill:none;stroke:none" />
+ <g
+ id="g3508"
+ font-weight="400"
+ font-style="normal"
+ font-size="353"
+ style="font-size:353px;font-style:normal;font-weight:400;fill:#000000;stroke:none;font-family:Arial">
+ <text
+ id="text3510"
+ y="6851"
+ x="13450">M</text>
+ <text
+ id="text3512"
+ y="6851"
+ x="13742">a</text>
+ <text
+ id="text3514"
+ y="6851"
+ x="13937">t</text>
+ <text
+ id="text3516"
+ y="6851"
+ x="14034">c</text>
+ <text
+ id="text3518"
+ y="6851"
+ x="14212">h</text>
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3520"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 12600,8407 500,0"
+ id="Drawing_51_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_52"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <rect
+ id="rect3524"
+ height="1419"
+ width="2601"
+ y="7182"
+ x="600"
+ style="fill:none;stroke:none" />
+ <g
+ id="g3526"
+ font-weight="400"
+ font-style="normal"
+ font-size="353"
+ style="font-size:353px;font-style:normal;font-weight:400;fill:#000000;stroke:none;font-family:Arial">
+ <text
+ id="text3528"
+ y="7620"
+ x="850">P</text>
+ <text
+ id="text3530"
+ y="7620"
+ x="1083">W</text>
+ <text
+ id="text3532"
+ y="7620"
+ x="1434">M</text>
+ <text
+ id="text3534"
+ y="7620"
+ x="1726" />
+ <text
+ id="text3536"
+ y="8009"
+ x="850"
+ style="fill:#000000;stroke:none">i</text>
+ <text
+ id="text3538"
+ y="8009"
+ x="926">n</text>
+ <text
+ id="text3540"
+ y="8009"
+ x="1121">v</text>
+ <text
+ id="text3542"
+ y="8009"
+ x="1295">e</text>
+ <text
+ id="text3544"
+ y="8009"
+ x="1489">r</text>
+ <text
+ id="text3546"
+ y="8009"
+ x="1608">t</text>
+ <text
+ id="text3548"
+ y="8009"
+ x="1705">e</text>
+ <text
+ id="text3550"
+ y="8009"
+ x="1900">d</text>
+ <text
+ id="text3552"
+ y="8009"
+ x="2095" />
+ <text
+ id="text3554"
+ y="8398"
+ x="850"
+ style="fill:#000000;stroke:none">o</text>
+ <text
+ id="text3556"
+ y="8398"
+ x="1045">u</text>
+ <text
+ id="text3558"
+ y="8398"
+ x="1239">t</text>
+ <text
+ id="text3560"
+ y="8398"
+ x="1337">p</text>
+ <text
+ id="text3562"
+ y="8398"
+ x="1532">u</text>
+ <text
+ id="text3564"
+ y="8398"
+ x="1726">t</text>
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_53"
+ transform="matrix(0.03543307,0,0,0.03543307,220.82115,475.77051)">
+ <rect
+ id="rect3567"
+ height="641"
+ width="2101"
+ y="1742"
+ x="13300"
+ style="fill:none;stroke:none" />
+ <g
+ id="g3569"
+ font-weight="400"
+ font-style="normal"
+ font-size="353"
+ style="font-size:353px;font-style:normal;font-weight:400;fill:#000000;stroke:none;font-family:Arial">
+ <text
+ id="text3571"
+ y="2180"
+ x="13550">M</text>
+ <text
+ id="text3573"
+ y="2180"
+ x="13842">a</text>
+ <text
+ id="text3575"
+ y="2180"
+ x="14037">x</text>
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_54"
+ transform="matrix(0.03543307,0,0,0.03543307,197.24973,461.4848)">
+ <rect
+ id="rect3578"
+ height="1030"
+ width="2001"
+ y="1171"
+ x="0"
+ style="fill:none;stroke:none" />
+ <g
+ id="g3580"
+ font-weight="400"
+ font-style="normal"
+ font-size="353"
+ style="font-size:353px;font-style:normal;font-weight:400;fill:#000000;stroke:none;font-family:Arial">
+ <text
+ id="text3582"
+ y="1609"
+ x="376">C</text>
+ <text
+ id="text3584"
+ y="1609"
+ x="630">o</text>
+ <text
+ id="text3586"
+ y="1609"
+ x="825">u</text>
+ <text
+ id="text3588"
+ y="1609"
+ x="1019">n</text>
+ <text
+ id="text3590"
+ y="1609"
+ x="1214">t</text>
+ <text
+ id="text3592"
+ y="1609"
+ x="1312">e</text>
+ <text
+ id="text3594"
+ y="1609"
+ x="1506">r</text>
+ <text
+ id="text3596"
+ y="1609"
+ x="1625" />
+ <text
+ id="text3598"
+ y="1998"
+ x="583"
+ style="fill:#000000;stroke:none">v</text>
+ <text
+ id="text3600"
+ y="1998"
+ x="757">a</text>
+ <text
+ id="text3602"
+ y="1998"
+ x="951">l</text>
+ <text
+ id="text3604"
+ y="1998"
+ x="1028">u</text>
+ <text
+ id="text3606"
+ y="1998"
+ x="1222">e</text>
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3608"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="M 5600,5379 3100,2880"
+ id="Drawing_55_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3611"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 2600,7407 0,1000"
+ id="Drawing_56_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3614"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 2600,7407 500,0"
+ id="Drawing_57_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3617"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ d="m 3100,7407 0,1000"
+ id="Drawing_58_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3620"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ id="path3622"
+ d="M 6700,6482 6175,5891"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 5900,5582 215,501 258,-229 -473,-272 z"
+ id="Drawing_59_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3625"
+ transform="matrix(0.03543307,0,0,0.03543307,185.10687,464.34194)">
+ <path
+ id="path3627"
+ d="M 6000,6682 3590,5821"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 3200,5682 429,337 116,-325 -545,-12 z"
+ id="Drawing_60_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial"
+ x="231.28572"
+ y="546.64789"
+ id="text4620"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan4622"
+ x="231.28572"
+ y="546.64789">(COUNT)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial"
+ x="463.57144"
+ y="715.93365"
+ id="text4624"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan4626"
+ x="463.57144"
+ y="715.93365">(CC0)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial"
+ x="435.57367"
+ y="509.03906"
+ id="text4624-1"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan4626-7"
+ x="435.57367"
+ y="509.03906">(CC0)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial"
+ x="605.43085"
+ y="511.89914"
+ id="text4620-4"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan4622-0"
+ x="605.43085"
+ y="511.89914">(COUNT)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial"
+ x="710"
+ y="624.50507"
+ id="text4670"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan4672"
+ x="710"
+ y="624.50507">Compare/Match</tspan><tspan
+ sodipodi:role="line"
+ x="710"
+ y="639.50507"
+ id="tspan4674">value</tspan><tspan
+ sodipodi:role="line"
+ x="710"
+ y="654.50507"
+ id="tspan4676">(CCx)</tspan></text>
+ </g>
+</svg>
diff --git a/atmel-samd/asf/sam0/drivers/tcc/docimg/pwm_single_ex.svg b/atmel-samd/asf/sam0/drivers/tcc/docimg/pwm_single_ex.svg
new file mode 100644
index 000000000..8450d0440
--- /dev/null
+++ b/atmel-samd/asf/sam0/drivers/tcc/docimg/pwm_single_ex.svg
@@ -0,0 +1,1387 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="608.82367"
+ height="318.89764"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="pwm_single_ex.svg">
+ <defs
+ id="defs4">
+ <font
+ horiz-adv-x="2048"
+ id="EmbeddedFont_1"
+ horiz-origin-x="0"
+ horiz-origin-y="0"
+ vert-origin-x="45"
+ vert-origin-y="90"
+ vert-adv-y="90">
+ <font-face
+ id="font-face2990"
+ descent="450"
+ ascent="1852"
+ font-style="normal"
+ font-weight="normal"
+ units-per-em="2048"
+ font-family="Arial" />
+ <missing-glyph
+ id="missing-glyph2992"
+ d="M 0,0 L 2047,0 2047,2047 0,2047 0,0 Z"
+ horiz-adv-x="2048" />
+ <glyph
+ id="glyph2994"
+ d="M 40,0 L 40,146 716,922 C 639,918 572,916 513,916 L 80,916 80,1062 948,1062 948,943 373,269 262,146 C 343,152 418,155 489,155 L 980,155 980,0 40,0 Z"
+ horiz-adv-x="928"
+ unicode="z" />
+ <glyph
+ id="glyph2996"
+ d="M 15,0 L 403,552 44,1062 269,1062 432,813 C 463,766 487,726 506,694 535,738 562,777 587,811 L 766,1062 981,1062 614,562 1009,0 788,0 570,330 512,419 233,0 15,0 Z"
+ horiz-adv-x="954"
+ unicode="x" />
+ <glyph
+ id="glyph2998"
+ d="M 331,0 L 6,1062 192,1062 361,449 424,221 C 427,232 445,305 479,440 L 648,1062 833,1062 992,446 1045,243 1106,448 1288,1062 1463,1062 1131,0 944,0 775,636 734,817 519,0 331,0 Z"
+ horiz-adv-x="1430"
+ unicode="w" />
+ <glyph
+ id="glyph3000"
+ d="M 430,0 L 26,1062 216,1062 444,426 C 469,357 491,286 512,212 528,268 550,335 579,414 L 815,1062 1000,1062 598,0 430,0 Z"
+ horiz-adv-x="954"
+ unicode="v" />
+ <glyph
+ id="glyph3002"
+ d="M 831,0 L 831,156 C 748,36 636,-24 494,-24 431,-24 373,-12 319,12 264,36 224,66 198,103 171,139 153,183 142,236 135,271 131,327 131,404 L 131,1062 311,1062 311,473 C 311,379 315,316 322,283 333,236 357,199 394,172 431,145 476,131 530,131 584,131 635,145 682,173 729,200 763,238 783,286 802,333 812,402 812,493 L 812,1062 992,1062 992,0 831,0 Z"
+ horiz-adv-x="848"
+ unicode="u" />
+ <glyph
+ id="glyph3004"
+ d="M 528,161 L 554,2 C 503,-9 458,-14 418,-14 353,-14 302,-4 266,17 230,38 205,65 190,99 175,132 168,203 168,311 L 168,922 36,922 36,1062 168,1062 168,1325 347,1433 347,1062 528,1062 528,922 347,922 347,301 C 347,250 350,217 357,202 363,187 373,176 388,167 402,158 422,154 449,154 469,154 495,156 528,161 Z"
+ horiz-adv-x="504"
+ unicode="t" />
+ <glyph
+ id="glyph3006"
+ d="M 63,317 L 241,345 C 251,274 279,219 325,181 370,143 434,124 516,124 599,124 660,141 700,175 740,208 760,248 760,293 760,334 742,366 707,389 682,405 621,425 523,450 391,483 300,512 249,537 198,561 159,595 133,638 106,681 93,728 93,780 93,827 104,871 126,912 147,952 177,985 214,1012 242,1033 280,1050 329,1065 377,1079 429,1086 484,1086 567,1086 641,1074 704,1050 767,1026 813,994 843,953 873,912 894,857 905,788 L 729,764 C 721,819 698,861 660,892 621,923 567,938 497,938 414,938 355,924 320,897 285,870 267,838 267,801 267,778 274,757 289,738 304,719 327,703 358,690 376,683 429,668 517,644 644,610 733,582 784,561 834,539 873,507 902,466 931,425 945,373 945,312 945,252 928,196 893,143 858,90 807,49 741,20 675,-9 600,-24 517,-24 379,-24 274,5 202,62 129,119 83,204 63,317 Z"
+ horiz-adv-x="874"
+ unicode="s" />
+ <glyph
+ id="glyph3008"
+ d="M 133,0 L 133,1062 295,1062 295,901 C 336,976 375,1026 410,1050 445,1074 483,1086 525,1086 586,1086 647,1067 710,1028 L 648,861 C 604,887 560,900 516,900 477,900 441,888 410,865 379,841 356,808 343,766 323,702 313,632 313,556 L 313,0 133,0 Z"
+ horiz-adv-x="557"
+ unicode="r" />
+ <glyph
+ id="glyph3010"
+ d="M 135,-407 L 135,1062 299,1062 299,924 C 338,978 381,1019 430,1046 479,1073 538,1086 607,1086 698,1086 778,1063 847,1016 916,969 969,904 1004,819 1039,734 1057,640 1057,539 1057,430 1038,333 999,246 960,159 903,92 829,46 754,-1 676,-24 594,-24 534,-24 480,-11 433,14 385,39 346,71 315,110 L 315,-407 135,-407 Z M 298,525 C 298,388 326,287 381,222 436,157 503,124 582,124 662,124 731,158 788,226 845,293 873,398 873,540 873,675 845,777 790,844 734,911 667,945 590,945 513,945 446,909 387,838 328,766 298,662 298,525 Z"
+ horiz-adv-x="901"
+ unicode="p" />
+ <glyph
+ id="glyph3012"
+ d="M 68,531 C 68,728 123,873 232,968 323,1047 435,1086 566,1086 712,1086 831,1038 924,943 1017,847 1063,715 1063,546 1063,409 1043,302 1002,224 961,145 901,84 823,41 744,-2 659,-24 566,-24 417,-24 297,24 206,119 114,214 68,352 68,531 Z M 253,531 C 253,395 283,293 342,226 401,158 476,124 566,124 655,124 730,158 789,226 848,294 878,398 878,537 878,668 848,768 789,836 729,903 655,937 566,937 476,937 401,903 342,836 283,769 253,667 253,531 Z"
+ horiz-adv-x="980"
+ unicode="o" />
+ <glyph
+ id="glyph3014"
+ d="M 135,0 L 135,1062 297,1062 297,911 C 375,1028 488,1086 635,1086 699,1086 758,1075 812,1052 865,1029 905,998 932,961 959,924 977,879 988,828 995,795 998,736 998,653 L 998,0 818,0 818,646 C 818,719 811,774 797,811 783,847 758,876 723,898 687,919 645,930 597,930 520,930 454,906 399,857 343,808 315,716 315,580 L 315,0 135,0 Z"
+ horiz-adv-x="848"
+ unicode="n" />
+ <glyph
+ id="glyph3016"
+ d="M 135,0 L 135,1062 296,1062 296,913 C 329,965 374,1007 429,1039 484,1070 547,1086 618,1086 697,1086 761,1070 812,1037 862,1004 897,959 918,900 1002,1024 1111,1086 1246,1086 1351,1086 1432,1057 1489,999 1546,940 1574,850 1574,729 L 1574,0 1395,0 1395,669 C 1395,741 1389,793 1378,825 1366,856 1345,882 1314,901 1283,920 1247,930 1206,930 1131,930 1069,905 1020,856 971,806 946,726 946,617 L 946,0 766,0 766,690 C 766,770 751,830 722,870 693,910 645,930 578,930 527,930 481,917 438,890 395,863 363,824 344,773 325,722 315,648 315,551 L 315,0 135,0 Z"
+ horiz-adv-x="1457"
+ unicode="m" />
+ <glyph
+ id="glyph3018"
+ d="M 131,0 L 131,1466 311,1466 311,0 131,0 Z"
+ horiz-adv-x="186"
+ unicode="l" />
+ <glyph
+ id="glyph3020"
+ d="M 136,1259 L 136,1466 316,1466 316,1259 136,1259 Z M 136,0 L 136,1062 316,1062 316,0 136,0 Z"
+ horiz-adv-x="160"
+ unicode="i" />
+ <glyph
+ id="glyph3022"
+ d="M 135,0 L 135,1466 315,1466 315,940 C 399,1037 505,1086 633,1086 712,1086 780,1071 838,1040 896,1009 938,966 963,911 988,856 1000,777 1000,673 L 1000,0 820,0 820,673 C 820,763 801,829 762,870 723,911 667,931 596,931 543,931 493,917 446,890 399,862 365,824 345,777 325,730 315,664 315,581 L 315,0 135,0 Z"
+ horiz-adv-x="848"
+ unicode="h" />
+ <glyph
+ id="glyph3024"
+ d="M 102,-88 L 277,-114 C 284,-168 305,-207 338,-232 383,-265 444,-282 521,-282 604,-282 669,-265 714,-232 759,-199 790,-152 806,-92 815,-55 820,22 819,139 740,46 642,0 525,0 379,0 266,53 186,158 106,263 66,390 66,537 66,638 84,732 121,818 158,903 211,969 281,1016 350,1063 432,1086 526,1086 651,1086 755,1035 836,934 L 836,1062 1002,1062 1002,144 C 1002,-21 985,-138 952,-207 918,-276 865,-331 792,-371 719,-411 629,-431 522,-431 395,-431 293,-402 215,-345 137,-288 99,-203 102,-88 Z M 251,550 C 251,411 279,309 334,245 389,181 459,149 542,149 625,149 694,181 750,245 806,308 834,408 834,544 834,674 805,772 748,838 690,904 620,937 539,937 459,937 391,905 335,840 279,775 251,678 251,550 Z"
+ horiz-adv-x="927"
+ unicode="g" />
+ <glyph
+ id="glyph3026"
+ d="M 862,342 L 1048,319 C 1019,210 964,126 885,66 806,6 704,-24 581,-24 426,-24 303,24 212,120 121,215 75,349 75,522 75,701 121,839 213,938 305,1037 424,1086 571,1086 713,1086 829,1038 919,941 1009,844 1054,708 1054,533 1054,522 1054,506 1053,485 L 261,485 C 268,368 301,279 360,217 419,155 493,124 582,124 648,124 704,141 751,176 798,211 835,266 862,342 Z M 271,633 L 864,633 C 856,722 833,789 796,834 739,903 664,938 573,938 490,938 421,910 365,855 308,800 277,726 271,633 Z"
+ horiz-adv-x="980"
+ unicode="e" />
+ <glyph
+ id="glyph3028"
+ d="M 824,0 L 824,134 C 757,29 658,-24 527,-24 442,-24 365,-1 294,46 223,93 168,158 129,242 90,325 70,421 70,530 70,636 88,732 123,819 158,905 211,971 282,1017 353,1063 432,1086 519,1086 583,1086 640,1073 690,1046 740,1019 781,983 812,940 L 812,1466 991,1466 991,0 824,0 Z M 255,530 C 255,394 284,292 341,225 398,158 466,124 544,124 623,124 690,156 745,221 800,285 827,383 827,515 827,660 799,767 743,835 687,903 618,937 536,937 456,937 389,904 336,839 282,774 255,671 255,530 Z"
+ horiz-adv-x="927"
+ unicode="d" />
+ <glyph
+ id="glyph3030"
+ d="M 828,389 L 1005,366 C 986,244 936,149 857,80 777,11 679,-24 563,-24 418,-24 301,24 213,119 124,214 80,350 80,527 80,642 99,742 137,828 175,914 233,979 311,1022 388,1065 473,1086 564,1086 679,1086 774,1057 847,999 920,940 967,857 988,750 L 813,723 C 796,794 767,848 725,884 682,920 631,938 571,938 480,938 407,906 350,841 293,776 265,673 265,532 265,389 292,286 347,221 402,156 473,124 561,124 632,124 691,146 738,189 785,232 815,299 828,389 Z"
+ horiz-adv-x="927"
+ unicode="c" />
+ <glyph
+ id="glyph3032"
+ d="M 301,0 L 134,0 134,1466 314,1466 314,943 C 390,1038 487,1086 605,1086 670,1086 732,1073 791,1047 849,1020 897,983 935,936 972,888 1002,830 1023,763 1044,696 1055,624 1055,547 1055,365 1010,224 920,125 830,26 722,-24 596,-24 471,-24 372,28 301,133 L 301,0 Z M 299,539 C 299,412 316,320 351,263 408,170 484,124 581,124 660,124 728,158 785,227 842,295 871,397 871,532 871,671 844,773 789,839 734,905 667,938 589,938 510,938 442,904 385,836 328,767 299,668 299,539 Z"
+ horiz-adv-x="901"
+ unicode="b" />
+ <glyph
+ id="glyph3034"
+ d="M 828,131 C 761,74 697,34 636,11 574,-12 508,-24 437,-24 320,-24 231,5 168,62 105,119 74,191 74,280 74,332 86,380 110,423 133,466 164,500 203,526 241,552 284,572 332,585 367,594 421,603 492,612 637,629 744,650 813,674 814,699 814,714 814,721 814,794 797,846 763,876 717,917 649,937 558,937 473,937 411,922 371,893 330,863 300,810 281,735 L 105,759 C 121,834 147,895 184,942 221,988 274,1024 343,1049 412,1074 493,1086 584,1086 675,1086 748,1075 805,1054 862,1033 903,1006 930,974 957,941 975,900 986,851 992,820 995,765 995,685 L 995,445 C 995,278 999,172 1007,128 1014,83 1029,41 1052,0 L 864,0 C 845,37 833,81 828,131 Z M 813,533 C 748,506 650,484 519,465 445,454 393,442 362,429 331,416 308,396 291,371 274,345 266,316 266,285 266,237 284,197 321,165 357,133 410,117 480,117 549,117 611,132 665,163 719,193 759,234 784,287 803,328 813,388 813,467 L 813,533 Z"
+ horiz-adv-x="980"
+ unicode="a" />
+ <glyph
+ id="glyph3036"
+ d="M -31,-407 L -31,-277 1162,-277 1162,-407 -31,-407 Z"
+ horiz-adv-x="1192"
+ unicode="_" />
+ <glyph
+ id="glyph3038"
+ d="M 414,0 L 25,1466 224,1466 447,505 C 471,404 492,304 509,205 546,362 568,452 575,476 L 854,1466 1088,1466 1298,724 C 1351,540 1389,367 1412,205 1431,298 1455,404 1485,524 L 1715,1466 1910,1466 1508,0 1321,0 1012,1117 C 986,1210 971,1268 966,1289 951,1222 936,1164 923,1117 L 612,0 414,0 Z"
+ horiz-adv-x="1986"
+ unicode="W" />
+ <glyph
+ id="glyph3040"
+ d="M 531,0 L 531,1293 48,1293 48,1466 1210,1466 1210,1293 725,1293 725,0 531,0 Z"
+ horiz-adv-x="1166"
+ unicode="T" />
+ <glyph
+ id="glyph3042"
+ d="M 161,0 L 161,1466 811,1466 C 942,1466 1041,1453 1109,1427 1177,1400 1231,1354 1272,1287 1313,1220 1333,1147 1333,1066 1333,962 1299,874 1232,803 1165,732 1061,686 920,667 971,642 1010,618 1037,594 1094,542 1147,477 1198,399 L 1453,0 1209,0 1015,305 C 958,393 912,460 875,507 838,554 806,586 777,605 748,624 718,637 688,644 666,649 630,651 580,651 L 355,651 355,0 161,0 Z M 355,819 L 772,819 C 861,819 930,828 980,847 1030,865 1068,894 1094,935 1120,975 1133,1019 1133,1066 1133,1135 1108,1192 1058,1237 1007,1282 928,1304 819,1304 L 355,1304 355,819 Z"
+ horiz-adv-x="1271"
+ unicode="R" />
+ <glyph
+ id="glyph3044"
+ d="M 158,0 L 158,1466 711,1466 C 808,1466 883,1461 934,1452 1006,1440 1066,1417 1115,1384 1164,1350 1203,1303 1233,1242 1262,1181 1277,1115 1277,1042 1277,917 1237,812 1158,726 1079,639 935,596 728,596 L 352,596 352,0 158,0 Z M 352,769 L 731,769 C 856,769 945,792 998,839 1051,886 1077,951 1077,1036 1077,1097 1062,1150 1031,1194 1000,1237 959,1266 908,1280 875,1289 815,1293 727,1293 L 352,1293 352,769 Z"
+ horiz-adv-x="1113"
+ unicode="P" />
+ <glyph
+ id="glyph3046"
+ d="M 99,714 C 99,957 164,1148 295,1286 426,1423 594,1492 801,1492 936,1492 1058,1460 1167,1395 1276,1330 1359,1240 1416,1125 1473,1009 1501,878 1501,731 1501,582 1471,449 1411,332 1351,215 1266,126 1156,66 1046,5 927,-25 800,-25 662,-25 539,8 430,75 321,142 239,233 183,348 127,463 99,585 99,714 Z M 299,711 C 299,534 347,395 442,294 537,192 656,141 799,141 945,141 1065,192 1160,295 1254,398 1301,543 1301,732 1301,851 1281,956 1241,1045 1200,1134 1141,1203 1064,1252 986,1301 899,1325 802,1325 665,1325 547,1278 448,1184 349,1089 299,932 299,711 Z"
+ horiz-adv-x="1404"
+ unicode="O" />
+ <glyph
+ id="glyph3048"
+ d="M 152,0 L 152,1466 444,1466 791,428 C 823,331 846,259 861,211 878,264 904,343 939,446 L 1290,1466 1551,1466 1551,0 1364,0 1364,1227 938,0 763,0 339,1248 339,0 152,0 Z"
+ horiz-adv-x="1377"
+ unicode="M" />
+ <glyph
+ id="glyph3050"
+ d="M 1204,514 L 1398,465 C 1357,306 1284,184 1179,101 1073,17 944,-25 791,-25 633,-25 505,7 406,72 307,136 231,229 180,351 128,473 102,604 102,744 102,897 131,1030 190,1144 248,1257 331,1344 439,1403 546,1462 665,1491 794,1491 941,1491 1064,1454 1164,1379 1264,1304 1334,1199 1373,1064 L 1182,1019 C 1148,1126 1099,1203 1034,1252 969,1301 888,1325 790,1325 677,1325 583,1298 508,1244 432,1190 379,1118 348,1027 317,936 302,842 302,745 302,620 320,512 357,419 393,326 449,256 526,210 603,164 686,141 775,141 884,141 976,172 1051,235 1126,298 1177,391 1204,514 Z"
+ horiz-adv-x="1298"
+ unicode="C" />
+ <glyph
+ id="glyph3052"
+ d="M 1082,862 L 114,862 114,1030 1082,1030 1082,862 Z M 1082,417 L 114,417 114,585 1082,585 1082,417 Z"
+ horiz-adv-x="953"
+ unicode="=" />
+ <glyph
+ id="glyph3054"
+ d="M 253,-431 L 124,-431 C 323,-111 423,209 423,530 423,655 409,780 380,903 357,1003 326,1099 285,1191 259,1251 205,1351 124,1491 L 253,1491 C 378,1324 471,1156 531,987 582,842 608,690 608,531 608,351 574,177 505,9 436,-159 352,-306 253,-431 Z"
+ horiz-adv-x="477"
+ unicode=")" />
+ <glyph
+ id="glyph3056"
+ d="M 479,-431 C 380,-306 296,-159 227,9 158,177 124,351 124,531 124,690 150,842 201,987 261,1156 354,1324 479,1491 L 608,1491 C 527,1352 474,1253 448,1194 407,1102 375,1006 352,906 323,781 309,656 309,530 309,209 409,-111 608,-431 L 479,-431 Z"
+ horiz-adv-x="478"
+ unicode="(" />
+ <glyph
+ id="glyph3058"
+ horiz-adv-x="556"
+ unicode=" " />
+ </font>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.98994949"
+ inkscape:cx="49.748038"
+ inkscape:cy="193.17154"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:window-width="1366"
+ inkscape:window-height="716"
+ inkscape:window-x="1592"
+ inkscape:window-y="33"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(9.1788457,-321.4848)">
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ visibility="visible"
+ id="MasterSlide_1_Default"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <desc
+ id="desc3061">Master slide
+ </desc>
+ <rect
+ style="fill:none;stroke:none"
+ x="0"
+ y="0"
+ width="16000"
+ height="9000"
+ id="rect3063" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_1"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <rect
+ id="rect3067"
+ height="1030"
+ width="1801"
+ y="1171"
+ x="200"
+ style="fill:none;stroke:none" />
+ <g
+ id="g3069"
+ font-weight="400"
+ font-style="normal"
+ font-size="353"
+ style="font-size:353px;font-style:normal;font-weight:400;fill:#000000;stroke:none;font-family:Arial">
+ <text
+ id="text3071"
+ y="1609"
+ x="476">C</text>
+ <text
+ id="text3073"
+ y="1609"
+ x="730">o</text>
+ <text
+ id="text3075"
+ y="1609"
+ x="925">u</text>
+ <text
+ id="text3077"
+ y="1609"
+ x="1119">n</text>
+ <text
+ id="text3079"
+ y="1609"
+ x="1314">t</text>
+ <text
+ id="text3081"
+ y="1609"
+ x="1412">e</text>
+ <text
+ id="text3083"
+ y="1609"
+ x="1606">r</text>
+ <text
+ id="text3085"
+ y="1609"
+ x="1725" />
+ <text
+ id="text3087"
+ y="1998"
+ x="683"
+ style="fill:#000000;stroke:none">v</text>
+ <text
+ id="text3089"
+ y="1998"
+ x="857">a</text>
+ <text
+ id="text3091"
+ y="1998"
+ x="1051">l</text>
+ <text
+ id="text3093"
+ y="1998"
+ x="1128">u</text>
+ <text
+ id="text3095"
+ y="1998"
+ x="1322">e</text>
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3097"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 12486,1900 250,433"
+ id="Drawing_2_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3100"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 12833,1993 -433,250"
+ id="Drawing_3_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3103"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ id="path3105"
+ d="m 2100,4600 0,-3650"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 2100,500 -187,563 375,0 -188,-563 z"
+ id="Drawing_4_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3108"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ id="path3110"
+ d="m 2100,4600 11250,0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 13800,4600 -562,-187 0,375 562,-188 z"
+ id="Drawing_5_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3113"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="M 2600,4600 5100,2100"
+ id="Drawing_6_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3116"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 5100,4600 0,-2500"
+ id="Drawing_7_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3119"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="M 5100,4600 7600,2100"
+ id="Drawing_8_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3122"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 7600,4600 0,-2500"
+ id="Drawing_9_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3125"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="M 7600,4600 10100,2100"
+ id="Drawing_10_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3128"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 10100,4600 0,-2500"
+ id="Drawing_11_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3131"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="M 10100,4600 12600,2100"
+ id="Drawing_12_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3134"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 12590,4556 0,-2500"
+ id="Drawing_13_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3137"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 2100,2100 11400,0"
+ id="Drawing_14_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:30;stroke-linejoin:round;stroke-dasharray:508, 508, 508, 508" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_15"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <rect
+ id="rect3141"
+ height="641"
+ width="1301"
+ y="4967"
+ x="12600"
+ style="fill:none;stroke:none" />
+ <g
+ id="g3143"
+ font-weight="400"
+ font-style="normal"
+ font-size="353"
+ style="font-size:353px;font-style:normal;font-weight:400;fill:#000000;stroke:none;font-family:Arial">
+ <text
+ id="text3145"
+ y="5405"
+ x="12850">T</text>
+ <text
+ id="text3147"
+ y="5405"
+ x="13057">i</text>
+ <text
+ id="text3149"
+ y="5405"
+ x="13134">m</text>
+ <text
+ id="text3151"
+ y="5405"
+ x="13434">e</text>
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3153"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 2100,3630 2000,0"
+ id="Drawing_16_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:100;stroke-linejoin:round;stroke-dasharray:197, 197" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3156"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 4100,4600 3500,0"
+ id="Drawing_17_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:100;stroke-linejoin:round;stroke-dasharray:197, 197" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3159"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,325.4848)">
+ <path
+ d="m 7600,3200 500,0"
+ id="Drawing_18_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:100;stroke-linejoin:round;stroke-dasharray:197, 197" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3162"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,323.4848)">
+ <path
+ d="m 8100,4300 2000,0"
+ id="Drawing_19_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:100;stroke-linejoin:round;stroke-dasharray:197, 197" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3165"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 10100,2100 2500,0"
+ id="Drawing_20_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:100;stroke-linejoin:round;stroke-dasharray:197, 197" />
+ </g>
+ <g
+ id="g4642"
+ transform="translate(2,2)">
+ <g
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)"
+ id="g3168"
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round"
+ inkscape:connector-curvature="0"
+ id="Drawing_21_0"
+ d="m 3386,3367 250,433" />
+ </g>
+ <g
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)"
+ id="g3171"
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round"
+ inkscape:connector-curvature="0"
+ id="Drawing_22_0"
+ d="m 3733,3460 -433,250" />
+ </g>
+ </g>
+ <g
+ id="g4648"
+ transform="translate(-2.9898475,-1.3686547)">
+ <g
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)"
+ id="g3174"
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round"
+ inkscape:connector-curvature="0"
+ id="Drawing_23_0"
+ d="m 5053,4400 250,433" />
+ </g>
+ <g
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)"
+ id="g3177"
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round"
+ inkscape:connector-curvature="0"
+ id="Drawing_24_0"
+ d="m 5400,4493 -433,250" />
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3180"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 12600,4600 500,-500"
+ id="Drawing_25_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3183"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 2600,7100 1000,0"
+ id="Drawing_26_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3186"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 2600,8100 0,-1000"
+ id="Drawing_27_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3189"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 3600,7100 0,1000"
+ id="Drawing_28_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3192"
+ transform="matrix(0.04076838,0,0,0.03543307,-28.252589,321.4848)">
+ <path
+ d="m 3600,8100 3500,0"
+ id="Drawing_29_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:46.61360168;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3195"
+ transform="matrix(0.03246476,0,0,0.03543307,29.765343,321.4848)">
+ <path
+ d="m 7100,7100 5800,0"
+ id="Drawing_30_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:52.23580933;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3198"
+ transform="matrix(0.03543307,0,0,0.03543307,8.8211543,321.4848)">
+ <path
+ d="m 7100,7100 0,1000"
+ id="Drawing_31_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3201"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 12900,7100 0,1000"
+ id="Drawing_32_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3204"
+ transform="matrix(0.02461001,0,0,0.03543307,126.65059,321.4848)">
+ <path
+ d="m 12600,4300 2000,0"
+ id="Drawing_33_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:119.99095917;stroke-linejoin:round;stroke-dasharray:236.38218807, 236.38218807" />
+ </g>
+ <g
+ id="g4636"
+ transform="translate(51.7995,13.637056)">
+ <g
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)"
+ id="g3207"
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round"
+ inkscape:connector-curvature="0"
+ id="Drawing_34_0"
+ d="m 11686,5800 250,433" />
+ </g>
+ <g
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)"
+ id="g3210"
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible">
+ <path
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round"
+ inkscape:connector-curvature="0"
+ id="Drawing_35_0"
+ d="m 12033,5893 -433,250" />
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_36"
+ transform="matrix(0.03543307,0,0,0.03543307,34.539434,332.09141)">
+ <rect
+ id="rect3214"
+ height="641"
+ width="1701"
+ y="5760"
+ x="12300"
+ style="fill:none;stroke:none" />
+ <g
+ id="g3216"
+ font-weight="400"
+ font-style="normal"
+ font-size="353"
+ style="font-size:353px;font-style:normal;font-weight:400;fill:#000000;stroke:none;font-family:Arial">
+ <text
+ id="text3218"
+ y="6198"
+ x="12550">M</text>
+ <text
+ id="text3220"
+ y="6198"
+ x="12842">a</text>
+ <text
+ id="text3222"
+ y="6198"
+ x="13037">t</text>
+ <text
+ id="text3224"
+ y="6198"
+ x="13134">c</text>
+ <text
+ id="text3226"
+ y="6198"
+ x="13312">h</text>
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3228"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 12853,4067 250,433"
+ id="Drawing_37_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3231"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 13200,4160 -433,250"
+ id="Drawing_38_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3234"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 12900,8100 600,0"
+ id="Drawing_39_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3237"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 2100,8100 500,0"
+ id="Drawing_40_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3240"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 2600,4600 0,-2500"
+ id="Drawing_41_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3243"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ d="m 2100,2600 500,-500"
+ id="Drawing_42_0"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:50;stroke-linejoin:round" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_43"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <rect
+ id="rect3247"
+ height="1030"
+ width="1901"
+ y="7171"
+ x="500"
+ style="fill:none;stroke:none" />
+ <g
+ id="g3249"
+ font-weight="400"
+ font-style="normal"
+ font-size="353"
+ style="font-size:353px;font-style:normal;font-weight:400;fill:#000000;stroke:none;font-family:Arial">
+ <text
+ id="text3251"
+ y="7609"
+ x="750">P</text>
+ <text
+ id="text3253"
+ y="7609"
+ x="983">W</text>
+ <text
+ id="text3255"
+ y="7609"
+ x="1334">M</text>
+ <text
+ id="text3257"
+ y="7609"
+ x="1626" />
+ <text
+ id="text3259"
+ y="7998"
+ x="750"
+ style="fill:#000000;stroke:none">o</text>
+ <text
+ id="text3261"
+ y="7998"
+ x="945">u</text>
+ <text
+ id="text3263"
+ y="7998"
+ x="1139">t</text>
+ <text
+ id="text3265"
+ y="7998"
+ x="1237">p</text>
+ <text
+ id="text3267"
+ y="7998"
+ x="1432">u</text>
+ <text
+ id="text3269"
+ y="7998"
+ x="1626">t</text>
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_44"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <rect
+ id="rect3272"
+ height="641"
+ width="4401"
+ y="200"
+ x="6000"
+ style="fill:none;stroke:none" />
+ <g
+ id="g3274"
+ font-weight="400"
+ font-style="normal"
+ font-size="353"
+ style="font-size:353px;font-style:normal;font-weight:400;fill:#000000;stroke:none;font-family:Arial">
+ <text
+ id="text3276"
+ y="638"
+ x="6250">R</text>
+ <text
+ id="text3278"
+ y="638"
+ x="6504">e</text>
+ <text
+ id="text3280"
+ y="638"
+ x="6699">l</text>
+ <text
+ id="text3282"
+ y="638"
+ x="6775">o</text>
+ <text
+ id="text3284"
+ y="638"
+ x="6970">a</text>
+ <text
+ id="text3286"
+ y="638"
+ x="7164">d</text>
+ <text
+ id="text3288"
+ y="638"
+ x="7359" />
+ <text
+ id="text3290"
+ y="638"
+ x="7457">c</text>
+ <text
+ id="text3292"
+ y="638"
+ x="7634">o</text>
+ <text
+ id="text3294"
+ y="638"
+ x="7829">u</text>
+ <text
+ id="text3296"
+ y="638"
+ x="8024">n</text>
+ <text
+ id="text3298"
+ y="638"
+ x="8219">t</text>
+ <text
+ id="text3300"
+ y="638"
+ x="8316">e</text>
+ <text
+ id="text3302"
+ y="638"
+ x="8511">r</text>
+ <text
+ id="text3304"
+ y="638"
+ x="8629" />
+ <text
+ id="text3306"
+ y="638"
+ x="8727">t</text>
+ <text
+ id="text3308"
+ y="638"
+ x="8824">o</text>
+ <text
+ id="text3310"
+ y="638"
+ x="9019" />
+ <text
+ id="text3312"
+ y="638"
+ x="9116">z</text>
+ <text
+ id="text3314"
+ y="638"
+ x="9285">e</text>
+ <text
+ id="text3316"
+ y="638"
+ x="9480">r</text>
+ <text
+ id="text3318"
+ y="638"
+ x="9599">o</text>
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3320"
+ transform="matrix(0.03543307,0,0,0.03543307,-7.1788457,319.4848)">
+ <path
+ id="path3322"
+ d="m 9200,800 2710,962"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 12300,1900 -430,-336 -115,326 545,10 z"
+ id="Drawing_45_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3325"
+ transform="matrix(0.03543307,0,0,0.03543307,-7.1788457,319.4848)">
+ <path
+ id="path3327"
+ d="m 8500,800 1086,931"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 9900,2000 -281,-468 -224,262 505,206 z"
+ id="Drawing_46_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3330"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,323.4848)">
+ <path
+ id="path3332"
+ d="m 7800,700 -132,792"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 7600,1900 255,-482 -340,-57 85,539 z"
+ id="Drawing_47_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3335"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ id="path3337"
+ d="M 7200,700 5452,1782"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 5100,2000 531,-126 -182,-293 -349,419 z"
+ id="Drawing_48_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3340"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <path
+ id="path3342"
+ d="M 6600,700 3294,1772"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 2900,1900 545,4 -106,-328 -439,324 z"
+ id="Drawing_49_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3345"
+ transform="matrix(0.0345472,-0.00787358,0.00787358,0.0345472,-42.384721,387.83566)">
+ <path
+ id="path3347"
+ d="m 7700,5400 170,-256"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000;stroke-width:28.22200012" />
+ <path
+ d="m 8100,4800 -431,335 287,191 144,-526 z"
+ id="Drawing_50_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_51"
+ transform="matrix(0.03543307,0,0,0.03543307,-9.1788457,321.4848)">
+ <rect
+ id="rect3351"
+ height="1030"
+ width="5901"
+ y="5571"
+ x="4100"
+ style="fill:none;stroke:none" />
+ <g
+ id="g3353"
+ font-weight="400"
+ font-style="normal"
+ font-size="353"
+ style="font-size:353px;font-style:normal;font-weight:400;fill:#000000;stroke:none;font-family:Arial">
+ <text
+ id="text3355"
+ y="6009"
+ x="4350">C</text>
+ <text
+ id="text3357"
+ y="6009"
+ x="4604">o</text>
+ <text
+ id="text3359"
+ y="6009"
+ x="4799">m</text>
+ <text
+ id="text3361"
+ y="6009"
+ x="5099">p</text>
+ <text
+ id="text3363"
+ y="6009"
+ x="5294">a</text>
+ <text
+ id="text3365"
+ y="6009"
+ x="5489">r</text>
+ <text
+ id="text3367"
+ y="6009"
+ x="5607">e</text>
+ <text
+ id="text3369"
+ y="6009"
+ x="5802" />
+ <text
+ id="text3371"
+ y="6009"
+ x="5899">v</text>
+ <text
+ id="text3373"
+ y="6009"
+ x="6073">a</text>
+ <text
+ id="text3375"
+ y="6009"
+ x="6268">l</text>
+ <text
+ id="text3377"
+ y="6009"
+ x="6344">u</text>
+ <text
+ id="text3379"
+ y="6009"
+ x="6539">e</text>
+ <text
+ id="text3381"
+ y="6009"
+ x="6733" />
+ <text
+ id="text3383"
+ y="6009"
+ x="6831">h</text>
+ <text
+ id="text3385"
+ y="6009"
+ x="7025">a</text>
+ <text
+ id="text3387"
+ y="6009"
+ x="7220">s</text>
+ <text
+ id="text3389"
+ y="6009"
+ x="7398" />
+ <text
+ id="text3391"
+ y="6009"
+ x="7495">b</text>
+ <text
+ id="text3393"
+ y="6009"
+ x="7690">e</text>
+ <text
+ id="text3395"
+ y="6009"
+ x="7885">e</text>
+ <text
+ id="text3397"
+ y="6009"
+ x="8080">n</text>
+ <text
+ id="text3399"
+ y="6009"
+ x="8274" />
+ <text
+ id="text3401"
+ y="6009"
+ x="8372">c</text>
+ <text
+ id="text3403"
+ y="6009"
+ x="8549">h</text>
+ <text
+ id="text3405"
+ y="6009"
+ x="8744">a</text>
+ <text
+ id="text3407"
+ y="6009"
+ x="8939">n</text>
+ <text
+ id="text3409"
+ y="6009"
+ x="9134">g</text>
+ <text
+ id="text3411"
+ y="6009"
+ x="9328">e</text>
+ <text
+ id="text3413"
+ y="6009"
+ x="9523">d</text>
+ <text
+ id="text3415"
+ y="6009"
+ x="9718" />
+ <text
+ id="text3425"
+ y="6398"
+ x="4968" />
+ <text
+ id="text3471"
+ y="6398"
+ x="8842" />
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3473"
+ transform="matrix(0.03543307,0,0,0.03543307,-7.532909,321.4848)">
+ <path
+ id="path3475"
+ d="M 4800,5500 4393,5093"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 4100,4800 244,488 244,-244 -488,-244 z"
+ id="Drawing_52_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3478"
+ transform="matrix(0.03543307,0,0,0.03543307,-3.1788457,319.4848)">
+ <path
+ id="path3480"
+ d="m 9600,5500 2299,-596"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 12300,4800 -544,-37 86,334 458,-297 z"
+ id="Drawing_53_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="g3483"
+ transform="matrix(0.03543307,0,0,0.03543307,-5.1788457,321.4848)">
+ <path
+ id="path3485"
+ d="m 9085,5400 469,-352"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#000000" />
+ <path
+ d="m 9885,4800 -517,173 207,276 310,-449 z"
+ id="Drawing_54_0"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;stroke:none" />
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_55"
+ transform="matrix(0.03543307,0,0,0.03543307,61.026756,342.698)">
+ <rect
+ id="rect3489"
+ height="641"
+ width="2601"
+ y="1360"
+ x="12600"
+ style="fill:none;stroke:none" />
+ <g
+ id="g3491"
+ font-weight="400"
+ font-style="normal"
+ font-size="353"
+ style="font-size:353px;font-style:normal;font-weight:400;fill:#000000;stroke:none;font-family:Arial">
+ <text
+ id="text3499"
+ y="1798"
+ x="13570" />
+ <text
+ id="text3503"
+ y="1798"
+ x="13870" />
+ <text
+ xml:space="preserve"
+ style="font-size:338.66668701px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial"
+ x="12303.818"
+ y="719.92755"
+ id="text4654"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan4656"
+ x="12303.818"
+ y="719.92755">TOP/Period</tspan><tspan
+ sodipodi:role="line"
+ x="12303.818"
+ y="1143.2609"
+ id="tspan4658">= Max</tspan><tspan
+ sodipodi:role="line"
+ x="12303.818"
+ y="1566.5942"
+ id="tspan3273">(PER)</tspan></text>
+ </g>
+ </g>
+ <g
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible"
+ id="Drawing_56"
+ transform="matrix(0.03543307,0,0,0.03543307,-21.300676,314.9188)">
+ <rect
+ id="rect3512"
+ height="1419"
+ width="2101"
+ y="2782"
+ x="13100"
+ style="fill:none;stroke:none" />
+ <text
+ xml:space="preserve"
+ style="font-size:338.66668701px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial"
+ x="14924.331"
+ y="3697.373"
+ id="text3275"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3277"
+ x="14924.331"
+ y="3697.373">Compare/Match</tspan><tspan
+ sodipodi:role="line"
+ x="14924.331"
+ y="4120.7065"
+ id="tspan3279">value</tspan><tspan
+ sodipodi:role="line"
+ x="14924.331"
+ y="4544.0396"
+ id="tspan3281">(CCx)</tspan></text>
+ </g>
+ <g
+ transform="matrix(0.03340287,-0.01182162,0.01182162,0.03340287,-68.221798,424.53532)"
+ id="g4660"
+ style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round;visibility:visible">
+ <path
+ style="fill:none;stroke:#000000"
+ inkscape:connector-curvature="0"
+ d="m 7700,5400 170,-256"
+ id="path4662" />
+ <path
+ style="fill:#000000;stroke:none"
+ inkscape:connector-curvature="0"
+ id="path4664"
+ d="m 8100,4800 -431,335 287,191 144,-526 z" />
+ </g>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial"
+ x="243.64101"
+ y="545.89258"
+ id="text4666"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan4668"
+ x="243.64101"
+ y="545.89258">(CCx)</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial"
+ x="28.701876"
+ y="407.54227"
+ id="text4670"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan4672"
+ x="28.701876"
+ y="407.54227">(COUNT)</tspan></text>
+ </g>
+</svg>
diff --git a/atmel-samd/asf/sam0/drivers/tcc/tcc.c b/atmel-samd/asf/sam0/drivers/tcc/tcc.c
new file mode 100644
index 000000000..6b5f8fb5c
--- /dev/null
+++ b/atmel-samd/asf/sam0/drivers/tcc/tcc.c
@@ -0,0 +1,1604 @@
+/**
+ * \file
+ *
+ * \brief SAM TCC - Timer Counter for Control Applications Driver
+ *
+ * Copyright (C) 2013-2016 Atmel Corporation. All rights reserved.
+ *
+ * \asf_license_start
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel microcontroller product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * \asf_license_stop
+ *
+ */
+/*
+ * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
+ */
+
+#include "tcc.h"
+
+#if TCC_ASYNC == true
+# include "tcc_callback.h"
+# include <system_interrupt.h>
+
+/** \internal
+ * Converts a given TCC index to its interrupt vector index.
+ */
+# define _TCC_INTERRUPT_VECT_NUM(n, unused) \
+ SYSTEM_INTERRUPT_MODULE_TCC##n,
+#endif
+
+#define _SIZE_MAX(size) ((size==32u) ? 0xFFFFFFFF : ( \
+ (1u << size) - 1))
+
+#define _SIZE_MAX_WITH_DITHER 0x03FFFFFF
+
+/* Extension support mapping bits */
+#define _TCC_DITHERING_B 16u
+#define _TCC_PG_B 8u
+#define _TCC_SWAP_B 4u
+#define _TCC_DTI_B 2u
+#define _TCC_OTMX_B 1u
+
+#if !defined(__DOXYGEN__)
+
+# define _TCC_GCLK_ID(n,unused) TPASTE3(TCC,n,_GCLK_ID),
+# if (SAML21) || (SAML22) || (SAMC20) || (SAMC21) || (SAMR30)
+# define _TCC_APBCMASK(n,unused) TPASTE2(MCLK_APBCMASK_TCC,n),
+# else
+# define _TCC_APBCMASK(n,unused) TPASTE2(PM_APBCMASK_TCC,n),
+# endif
+
+# define _TCC_SIZE(n,unused) TPASTE3(TCC,n,_SIZE),
+# define _TCC_MAX(n,unused) _SIZE_MAX(TPASTE3(TCC,n,_SIZE)),
+# define _TCC_EXT(n,unused) TPASTE3(TCC,n,_EXT),
+# define _TCC_CC_NUM(n,unused) min(TPASTE3(TCC,n,_CC_NUM),TCC_NUM_CHANNELS),
+# define _TCC_OW_NUM(n,unused) min(TPASTE3(TCC,n,_OW_NUM),TCC_NUM_WAVE_OUTPUTS),
+
+# define TCC_GCLK_IDS { MREPEAT(TCC_INST_NUM, _TCC_GCLK_ID, 0) }
+# define TCC_APBCMASKS { MREPEAT(TCC_INST_NUM, _TCC_APBCMASK, 0) }
+
+# define TCC_SIZES { MREPEAT(TCC_INST_NUM, _TCC_SIZE, 0) }
+# define TCC_MAXS { MREPEAT(TCC_INST_NUM, _TCC_MAX, 0) }
+# define TCC_EXTS { MREPEAT(TCC_INST_NUM, _TCC_EXT, 0) }
+# define TCC_CC_NUMS { MREPEAT(TCC_INST_NUM, _TCC_CC_NUM, 0) }
+# define TCC_OW_NUMS { MREPEAT(TCC_INST_NUM, _TCC_OW_NUM, 0) }
+
+#endif
+
+/* List of available TCC modules. */
+const Tcc *const tcc_modules[TCC_INST_NUM] = TCC_INSTS;
+
+/* List of TCC GCLK IDs */
+const uint8_t _tcc_gclk_ids[TCC_INST_NUM] = TCC_GCLK_IDS;
+
+/* List of TCC APBC Masks */
+const uint32_t _tcc_apbcmasks[TCC_INST_NUM] = TCC_APBCMASKS;
+
+/* List of extension support of TCC modules. */
+const uint8_t _tcc_exts[TCC_INST_NUM] = TCC_EXTS;
+
+/* List of sizes support of TCC modules. */
+const uint8_t _tcc_sizes[TCC_INST_NUM] = TCC_SIZES;
+
+/* List of maximumvalues supported of TCC modules. */
+const uint32_t _tcc_maxs[TCC_INST_NUM] = TCC_MAXS;
+
+/* List of available channel number of TCC modules. */
+const uint8_t _tcc_cc_nums[TCC_INST_NUM] = TCC_CC_NUMS;
+
+/* List of available output number of TCC modules. */
+const uint8_t _tcc_ow_nums[TCC_INST_NUM] = TCC_OW_NUMS;
+
+/**
+ * \internal Find the index of the given TCC module instance.
+ *
+ * \param[in] The TCC module instance pointer
+ *
+ * \return Index of the given TCC module instance.
+ */
+uint8_t _tcc_get_inst_index(
+ Tcc *const hw)
+{
+ /* Find index for TCC instance. */
+ for (uint32_t i = 0; i < TCC_INST_NUM; i++) {
+ if (hw == tcc_modules[i]) {
+ return i;
+ }
+ }
+
+ /* Invalid data given. */
+ Assert(false);
+ return 0;
+}
+
+/**
+ * \brief Initializes config with predefined default values.
+ *
+ * This function will initialize a given TCC configuration structure to
+ * a set of known default values. This function should be called on
+ * any new instance of the configuration structures before being
+ * modified by the user application.
+ *
+ * The default configuration is as follows:
+ * \li Don't run in standby
+ * \li When setting top, compare, or pattern by API, do double buffering write
+ * \li The base timer/counter configurations:
+ * - GCLK generator 0 clock source
+ * - No prescaler
+ * - GCLK reload action
+ * - Count upward
+ * - Don't perform one-shot operations
+ * - Counter starts on 0
+ * - Period/top value set to maximum
+ * \li The match/capture configurations:
+ * - All Capture compare channel value set to 0
+ * - No capture enabled (all channels use compare function)
+ * - Normal frequency wave generation
+ * - Waveform generation polarity set to 0
+ * - Don't perform ramp on waveform
+ * \li The waveform extension configurations:
+ * - No recoverable fault is enabled, fault actions are disabled, filter
+ * is set to 0
+ * - No non-recoverable fault state output is enabled and filter is 0
+ * - No inversion of waveform output
+ * \li No channel output enabled
+ * \li No PWM pin output enabled
+ * \li Pin and MUX configuration not set
+ *
+ * \param[out] config Pointer to a TCC module configuration structure to set
+ * \param[in] hw Pointer to the TCC hardware module
+ *
+ */
+void tcc_get_config_defaults(
+ struct tcc_config *const config,
+ Tcc *const hw)
+{
+ /* TCC instance index */
+ uint8_t module_index = _tcc_get_inst_index(hw);
+
+ /* Base counter defaults */
+ config->counter.count = 0;
+
+ config->counter.period = _tcc_maxs[module_index];
+
+ config->counter.clock_source = GCLK_GENERATOR_0;
+ config->counter.clock_prescaler = TCC_CLOCK_PRESCALER_DIV1;
+ config->counter.reload_action = TCC_RELOAD_ACTION_GCLK;
+
+ config->counter.direction = TCC_COUNT_DIRECTION_UP;
+ config->counter.oneshot = false;
+
+#ifdef FEATURE_TCC_GENERATE_DMA_TRIGGER
+ config->counter.dma_trigger_mode = TCC_COUNT_OVERFLOW_DMA_TRIGGER_MODE_CONTINUE;
+#endif
+
+ /* Match/Capture defaults */
+# define _TCC_CHANNEL_MATCH_VALUE_INIT(n, value) \
+ config->compare.match[n] = value;
+ MREPEAT(TCC_NUM_CHANNELS,
+ _TCC_CHANNEL_MATCH_VALUE_INIT, 0)
+# undef _TCC_CHANNEL_MATCH_VALUE_INIT
+
+ /* Wave polarity defaults */
+# define _TCC_CHANNEL_WAVE_POLARITY_INIT(n, value) \
+ config->compare.wave_polarity[n] = value;
+ MREPEAT(TCC_NUM_CHANNELS,
+ _TCC_CHANNEL_WAVE_POLARITY_INIT, TCC_WAVE_POLARITY_0)
+# undef _TCC_CHANNEL_WAVE_POLARITY_INIT
+
+ config->compare.wave_generation = TCC_WAVE_GENERATION_NORMAL_FREQ;
+ config->compare.wave_ramp = TCC_RAMP_RAMP1;
+
+# define _TCC_CHANNEL_FUNCTION_INIT(n, value) \
+ config->compare.channel_function[n] = value;
+ MREPEAT(TCC_NUM_CHANNELS,
+ _TCC_CHANNEL_FUNCTION_INIT, TCC_CHANNEL_FUNCTION_COMPARE)
+# undef _TCC_CHANNEL_FUNCTION_INIT
+
+ /* Recoverable fault defaults */
+# define _TCC_FAULT_FUNCTION_INIT(n, dummy) \
+ config->wave_ext.recoverable_fault[n].filter_value = 0; \
+ config->wave_ext.recoverable_fault[n].blanking_cycles = 0; \
+ config->wave_ext.recoverable_fault[n].restart = false; \
+ config->wave_ext.recoverable_fault[n].keep = false; \
+ config->wave_ext.recoverable_fault[n].qualification = false; \
+ config->wave_ext.recoverable_fault[n].source = TCC_FAULT_SOURCE_DISABLE; \
+ config->wave_ext.recoverable_fault[n].blanking = TCC_FAULT_BLANKING_DISABLE; \
+ config->wave_ext.recoverable_fault[n].halt_action = TCC_FAULT_HALT_ACTION_DISABLE; \
+ config->wave_ext.recoverable_fault[n].capture_action = TCC_FAULT_CAPTURE_DISABLE; \
+ config->wave_ext.recoverable_fault[n].capture_channel = TCC_FAULT_CAPTURE_CHANNEL_0;
+ MREPEAT(TCC_NUM_FAULTS, _TCC_FAULT_FUNCTION_INIT, 0)
+# undef _TCC_FAULT_FUNCTION_INIT
+
+ /* Non-recoverable fault defaults */
+# define _TCC_NRF_FUNCTION_INIT(n, dummy) \
+ config->wave_ext.non_recoverable_fault[n].filter_value = 0; \
+ config->wave_ext.non_recoverable_fault[n].output = TCC_FAULT_STATE_OUTPUT_OFF;
+ MREPEAT(TCC_NUM_WAVE_OUTPUTS, _TCC_NRF_FUNCTION_INIT, 0)
+# undef _TCC_NRF_FUNCTION_INIT
+
+ /* Output inversion defaults */
+# define _TCC_OUT_INVERT_INIT(n, value) \
+ config->wave_ext.invert[n] = value;
+ MREPEAT(TCC_NUM_WAVE_OUTPUTS, _TCC_OUT_INVERT_INIT, false)
+# undef _TCC_OUT_INVERT_INIT
+
+# define _TCC_CHANNEL_OUT_PIN_INIT(n, dummy) \
+ config->pins.enable_wave_out_pin[n] = false;\
+ config->pins.wave_out_pin[TCC_WAVE_OUTPUT_##n] = 0; \
+ config->pins.wave_out_pin_mux[TCC_WAVE_OUTPUT_##n] = 0;
+ MREPEAT(TCC_NUM_WAVE_OUTPUTS, _TCC_CHANNEL_OUT_PIN_INIT, 0)
+# undef _TCC_CHANNEL_OUT_PIN_INIT
+
+ config->double_buffering_enabled = true;
+ config->run_in_standby = false;
+}
+
+
+/**
+ * \brief Build CTRLA register value from configuration.
+ *
+ * \param[in] module_index The software module instance index
+ * \param[in] config Pointer to the TCC configuration options struct
+ * \param[out] value_buffer Pointer to the buffer to fill with built value
+ *
+ * \return Configuration validation status.
+ *
+ * \retval STATUS_OK Configuration values are good and register
+ * value built and save to buffer
+ * \retval STATUS_ERR_INVALID_ARG Invalid parameter found:
+ * assigned dither mode is invalid for module;
+ * used capture channel is invalid for module
+ */
+static inline enum status_code _tcc_build_ctrla(
+ const uint8_t module_index,
+ const struct tcc_config *const config,
+ uint32_t *value_buffer)
+{
+ uint32_t ctrla = 0;
+
+ int i;
+ for (i = 0; i < TCC_NUM_CHANNELS; i ++) {
+ if (config->capture.channel_function[i] ==
+ TCC_CHANNEL_FUNCTION_CAPTURE) {
+
+ if (i > _tcc_cc_nums[module_index]) {
+ /* Channel not supported */
+ return STATUS_ERR_INVALID_ARG;
+ }
+ ctrla |= (TCC_CTRLA_CPTEN0 << i);
+ }
+ }
+
+ if (config->run_in_standby) {
+ ctrla |= TCC_CTRLA_RUNSTDBY;
+ }
+ ctrla |= config->counter.reload_action << TCC_CTRLA_PRESCSYNC_Pos;
+ ctrla |= config->counter.clock_prescaler << TCC_CTRLA_PRESCALER_Pos;
+
+ *value_buffer = ctrla;
+ return STATUS_OK;
+}
+
+/**
+ * \brief Build CTRLB register value from configuration.
+ *
+ * \param[in] module_index The software module instance index
+ * \param[in] config Pointer to the TCC configuration options struct
+ * \param[out] value_buffer Pointer to the buffer to fill with built value
+ */
+static inline void _tcc_build_ctrlb(
+ const uint8_t module_index,
+ const struct tcc_config *const config,
+ uint8_t *value_buffer)
+{
+ uint8_t ctrlb = 0;
+
+ if (config->counter.oneshot) {
+ ctrlb |= TCC_CTRLBSET_ONESHOT;
+ }
+ if (config->counter.direction == TCC_COUNT_DIRECTION_DOWN) {
+ ctrlb |= TCC_CTRLBSET_DIR;
+ }
+
+ *value_buffer = ctrlb;
+}
+
+/**
+ * \brief Build FAULTs register values from configuration.
+ *
+ * \param[in] module_index The software module instance index
+ * \param[in] config Pointer to the TCC configuration options struct
+ * \param[out] value_buffer Pointer to the buffer to fill with built values
+ *
+ * \retval STATUS_OK Configuration values are good and register
+ * value built and save to buffer
+ * \retval STATUS_ERR_INVALID_ARG Invalid parameter found: assigned fault
+ * capture channel is invalid; assigned filter
+ * value is invalid
+ */
+static inline enum status_code _tcc_build_faults(
+ const uint8_t module_index,
+ const struct tcc_config *const config,
+ uint32_t *value_buffer)
+{
+ struct tcc_recoverable_fault_config *cfg;
+ uint8_t cc_num = _tcc_cc_nums[module_index];
+ uint32_t fault;
+ int i;
+ for (i = 0; i < TCC_NUM_FAULTS; i ++) {
+ cfg = (struct tcc_recoverable_fault_config *)
+ &config->wave_ext.recoverable_fault[i];
+ if (cfg->capture_channel >= cc_num) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+ if (cfg->filter_value > 0xF) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+ fault = TCC_FCTRLA_FILTERVAL(cfg->filter_value)
+ | TCC_FCTRLA_BLANKVAL(cfg->blanking_cycles)
+ | (cfg->restart ? TCC_FCTRLA_RESTART : 0)
+ | (cfg->keep ? TCC_FCTRLA_KEEP : 0)
+ | (cfg->qualification ? TCC_FCTRLA_QUAL : 0)
+ | TCC_FCTRLA_SRC(cfg->source)
+ | TCC_FCTRLA_BLANK(cfg->blanking)
+ | TCC_FCTRLA_HALT(cfg->halt_action)
+ | TCC_FCTRLA_CAPTURE(cfg->capture_action)
+ | TCC_FCTRLA_CHSEL(cfg->capture_channel);
+ value_buffer[i] = fault;
+ }
+ return STATUS_OK;
+}
+
+/**
+ * \brief Build DRVCTRL register values from configuration.
+ *
+ * \param[in] module_index The software module instance index
+ * \param[in] config Pointer to the TCC configuration options struct
+ * \param[out] value_buffer Pointer to the buffer to fill with built value
+ *
+ * \retval STATUS_OK Configuration values are good and register
+ * value built and save to buffer
+ * \retval STATUS_ERR_INVALID_ARG Invalid parameter found: assigned output line
+ * is invalid; filter value is invalid
+ */
+static inline enum status_code _tcc_build_drvctrl(
+ const uint8_t module_index,
+ const struct tcc_config *const config,
+ uint32_t *value_buffer)
+{
+ uint32_t i;
+ uint8_t ow_num = _tcc_ow_nums[module_index];
+ uint32_t drvctrl;
+
+ drvctrl = 0;
+
+ for (i = 0; i < TCC_NUM_WAVE_OUTPUTS; i ++) {
+ if (config->wave_ext.invert[i]) {
+ if (i >= ow_num) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+ drvctrl |= (TCC_DRVCTRL_INVEN0 << i);
+ }
+ if (config->wave_ext.non_recoverable_fault[i].output !=
+ TCC_FAULT_STATE_OUTPUT_OFF) {
+ if (i >= ow_num) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+ if (config->wave_ext.non_recoverable_fault[i].output ==
+ TCC_FAULT_STATE_OUTPUT_1) {
+ drvctrl |= (TCC_DRVCTRL_NRE0 | TCC_DRVCTRL_NRV0) << i;
+ } else {
+ drvctrl |= (TCC_DRVCTRL_NRE0) << i;
+ }
+ }
+ }
+ *value_buffer = drvctrl;
+ return STATUS_OK;
+}
+
+/**
+ * \brief Build WAVE & WAVEB register values from configuration.
+ *
+ * \param[in] module_index The software module instance index
+ * \param[in] config Pointer to the TCC configuration options struct
+ * \param[out] value_buffer Pointer to the buffer to fill with built value
+ *
+ * \retval STATUS_OK Configuration values are good and register
+ * value built and save to buffer
+ * \retval STATUS_ERR_INVALID_ARG Invalid parameter found: assigned output line
+ * is invalid; circular and double buffering
+ * conflict; assigned function not supported by
+ * module
+ */
+static inline enum status_code _tcc_build_waves(
+ const uint8_t module_index,
+ const struct tcc_config *const config,
+ uint32_t *value_buffer)
+{
+ int n;
+
+ uint8_t cc_num = _tcc_cc_nums[module_index];
+ struct tcc_match_wave_config const *wav_cfg = &config->compare;
+
+ uint32_t wave;
+
+ wave = TCC_WAVE_RAMP(wav_cfg->wave_ramp) |
+ TCC_WAVE_WAVEGEN(wav_cfg->wave_generation);
+
+ for (n = 0; n < TCC_NUM_CHANNELS; n++) {
+ if (wav_cfg->wave_polarity[n]) {
+ if (n >= cc_num) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+ wave |= (TCC_WAVE_POL0 << n);
+ }
+ }
+
+ value_buffer[0] = wave;
+
+ return STATUS_OK;
+}
+
+/**
+ * \brief Initializes a hardware TCC module instance.
+ *
+ * Enables the clock and initializes the given TCC module, based on the given
+ * configuration values.
+ *
+ * \param[in,out] module_inst Pointer to the software module instance struct
+ * \param[in] hw Pointer to the TCC hardware module
+ * \param[in] config Pointer to the TCC configuration options struct
+ *
+ * \return Status of the initialization procedure.
+ *
+ * \retval STATUS_OK The module was initialized successfully
+ * \retval STATUS_BUSY The hardware module was busy when the
+ * initialization procedure was attempted
+ * \retval STATUS_INVALID_ARG An invalid configuration option or argument
+ * was supplied
+ * \retval STATUS_ERR_DENIED The hardware module was already enabled
+ */
+enum status_code tcc_init(
+ struct tcc_module *const module_inst,
+ Tcc *const hw,
+ const struct tcc_config *const config)
+{
+ int i;
+
+ /* Sanity check arguments */
+ Assert(hw);
+ Assert(module_inst);
+ Assert(config);
+
+ /* TCC instance index */
+ uint8_t module_index = _tcc_get_inst_index(hw);
+
+ /* Enable the user interface clock for TCC */
+ system_apb_clock_set_mask(SYSTEM_CLOCK_APB_APBC,
+ _tcc_apbcmasks[module_index]);
+
+ /* Check if it's enabled. */
+ if (hw->CTRLA.reg & TCC_CTRLA_ENABLE) {
+ return STATUS_ERR_DENIED;
+ }
+ /* Check if it's resetting */
+ if (hw->CTRLA.reg & TCC_CTRLA_SWRST) {
+ return STATUS_ERR_DENIED;
+ }
+
+ enum status_code status;
+
+ /* Check COUNT, PER, CCx */
+ uint32_t count_max = _tcc_maxs[module_index];
+
+ /* Check all counter values */
+ if ((config->counter.count > count_max)
+ || (config->counter.period > count_max)
+ ) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ /* Check all channel values */
+ for (i = 0; i < TCC_NUM_CHANNELS; i ++) {
+ if ((config->compare.match[i] > count_max)
+ ) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+ }
+
+ /* Check all outputs */
+ for (i = 0; i < TCC_NUM_WAVE_OUTPUTS; i ++) {
+ if (!config->pins.enable_wave_out_pin[i]) {
+ continue;
+ }
+ /* Output line is not supported */
+ if (i >= _tcc_ow_nums[module_index]) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+ }
+
+ /* CTRLA settings */
+ uint32_t ctrla = 0;
+ status = _tcc_build_ctrla(module_index, config, &ctrla);
+ if (STATUS_OK != status) {
+ return status;
+ }
+
+ /* CTRLB settings */
+ uint8_t ctrlb;
+ _tcc_build_ctrlb(module_index, config, &ctrlb);
+
+ /* FAULTs settings */
+ uint32_t faults[TCC_NUM_FAULTS];
+
+ status = _tcc_build_faults(module_index, config, faults);
+ if (STATUS_OK != status) {
+ return status;
+ }
+
+ /* DRVCTRL */
+ uint32_t drvctrl = 0;
+
+ status = _tcc_build_drvctrl(module_index, config, &drvctrl);
+ if (STATUS_OK != status) {
+ return status;
+ }
+
+ /* WAVE */
+ uint32_t waves[1];
+
+ status = _tcc_build_waves(module_index, config, waves);
+ if (STATUS_OK != status) {
+ return status;
+ }
+
+ /* Initialize module */
+#if TCC_ASYNC
+ /* Initialize parameters */
+ for (i = 0; i < TCC_CALLBACK_N; i ++) {
+ module_inst->callback[i] = NULL;
+ }
+ module_inst->register_callback_mask = 0;
+ module_inst->enable_callback_mask = 0;
+ _tcc_instances[module_index] = module_inst;
+#endif
+
+ module_inst->hw = hw;
+
+ module_inst->double_buffering_enabled = config->double_buffering_enabled;
+
+ /* Setup clock for module */
+ struct system_gclk_chan_config gclk_chan_config;
+ system_gclk_chan_get_config_defaults(&gclk_chan_config);
+ gclk_chan_config.source_generator = config->counter.clock_source;
+ system_gclk_chan_set_config(_tcc_gclk_ids[module_index], &gclk_chan_config);
+ system_gclk_chan_enable(_tcc_gclk_ids[module_index]);
+
+ /* Initialize pins */
+ struct system_pinmux_config pin_config;
+ for (i = 0; i < _tcc_ow_nums[module_index]; i ++) {
+ if (!config->pins.enable_wave_out_pin[i]) {
+ continue;
+ }
+
+ system_pinmux_get_config_defaults(&pin_config);
+ pin_config.mux_position = config->pins.wave_out_pin_mux[i];
+ pin_config.direction = SYSTEM_PINMUX_PIN_DIR_OUTPUT;
+ system_pinmux_pin_set_config(
+ config->pins.wave_out_pin[i], &pin_config);
+ }
+
+ /* Write to registers */
+
+ hw->CTRLA.reg = ctrla;
+ while (hw->SYNCBUSY.reg & TCC_SYNCBUSY_CTRLB) {
+ /* Wait for sync */
+ }
+
+ hw->CTRLBCLR.reg = 0xFF;
+ while (hw->SYNCBUSY.reg & TCC_SYNCBUSY_CTRLB) {
+ /* Wait for sync */
+ }
+ hw->CTRLBSET.reg = ctrlb;
+
+ hw->FCTRLA.reg = faults[0];
+ hw->FCTRLB.reg = faults[1];
+
+ hw->DRVCTRL.reg = drvctrl;
+
+#if (!SAML21) && (!SAMC20) && (!SAMC21) && (!SAML22) && (!SAMR30)
+ while (hw->SYNCBUSY.reg & (TCC_SYNCBUSY_WAVE | TCC_SYNCBUSY_WAVEB)) {
+ /* Wait for sync */
+ }
+#endif
+ hw->WAVE.reg = waves[0];
+
+ while (hw->SYNCBUSY.reg & TCC_SYNCBUSY_COUNT) {
+ /* Wait for sync */
+ }
+ hw->COUNT.reg = config->counter.count;
+
+#if (!SAML21) && (!SAMC20) && (!SAMC21) && (!SAML22) && (!SAMR30)
+ while (hw->SYNCBUSY.reg & (TCC_SYNCBUSY_PER | TCC_SYNCBUSY_PERB)) {
+ /* Wait for sync */
+ }
+#endif
+ hw->PER.reg = (config->counter.period);
+
+ for (i = 0; i < _tcc_cc_nums[module_index]; i ++) {
+#if (!SAML21) && (!SAMC20) && (!SAMC21) && (!SAML22) && (!SAMR30)
+ while (hw->SYNCBUSY.reg & (
+ (TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CCB0) << i)) {
+ /* Wait for sync */
+ }
+#endif
+ hw->CC[i].reg = (config->compare.match[i]);
+ }
+
+ return STATUS_OK;
+}
+
+
+/**
+ * \brief Enables the TCC module event input or output.
+ *
+ * Enables one or more input or output events to or from the TCC module.
+ * See \ref tcc_events for a list of events this module supports.
+ *
+ * \note Events cannot be altered while the module is enabled.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] events Struct containing flags of events to enable or
+ * configure
+ *
+ * \return Status of the events setup procedure.
+ *
+ * \retval STATUS_OK The module was initialized successfully
+ * \retval STATUS_INVALID_ARG An invalid configuration option or argument
+ * was supplied
+ */
+enum status_code tcc_enable_events(
+ struct tcc_module *const module_inst,
+ struct tcc_events *const events)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+ Assert(events);
+
+ Tcc *const tcc_module = module_inst->hw;
+
+ /* Check if it's enabled or resetting. */
+ if (tcc_module->CTRLA.reg & (TCC_CTRLA_ENABLE | TCC_CTRLA_SWRST)) {
+ return STATUS_ERR_DENIED;
+ }
+
+ uint32_t evctrl = tcc_module->EVCTRL.reg;
+
+ /* Setup event output action */
+ if (events->output_config.modify_generation_selection) {
+ evctrl &= ~ TCC_EVCTRL_CNTSEL_Msk;
+ switch(events->output_config.generation_selection) {
+ case TCC_EVENT_GENERATION_SELECTION_START:
+ evctrl |= TCC_EVCTRL_CNTSEL_START;
+ break;
+ case TCC_EVENT_GENERATION_SELECTION_END:
+ evctrl |= TCC_EVCTRL_CNTSEL_END;
+ break;
+ case TCC_EVENT_GENERATION_SELECTION_BETWEEN:
+ evctrl |= TCC_EVCTRL_CNTSEL_BETWEEN;
+ break;
+ case TCC_EVENT_GENERATION_SELECTION_BOUNDARY:
+ evctrl |= TCC_EVCTRL_CNTSEL_BOUNDARY;
+ break;
+ default:
+ Assert(false);
+ /* Wrong configuration */
+ return STATUS_ERR_INVALID_ARG;
+ }
+ }
+ /* Setup input event0 */
+ if (events->on_input_event_perform_action[0]) {
+ evctrl |= TCC_EVCTRL_TCEI0;
+ }
+ if (events->input_config[0].invert) {
+ evctrl |= TCC_EVCTRL_TCINV0;
+ }
+ if (events->input_config[0].modify_action) {
+ evctrl &= ~ TCC_EVCTRL_EVACT0_Msk;
+ switch(events->input_config[0].action) {
+ case TCC_EVENT0_ACTION_OFF:
+ evctrl |= TCC_EVCTRL_EVACT0_OFF;
+ break;
+ case TCC_EVENT0_ACTION_RETRIGGER:
+ evctrl |= TCC_EVCTRL_EVACT0_RETRIGGER;
+ break;
+ case TCC_EVENT0_ACTION_COUNT_EVENT:
+ evctrl |= TCC_EVCTRL_EVACT0_COUNTEV;
+ break;
+ case TCC_EVENT0_ACTION_START:
+ evctrl |= TCC_EVCTRL_EVACT0_START;
+ break;
+ case TCC_EVENT0_ACTION_INCREMENT:
+ evctrl |= TCC_EVCTRL_EVACT0_INC;
+ break;
+ case TCC_EVENT0_ACTION_COUNT_DURING_ACTIVE:
+ evctrl |= TCC_EVCTRL_EVACT0_COUNT;
+ break;
+ case TCC_EVENT0_ACTION_NON_RECOVERABLE_FAULT:
+ evctrl |= TCC_EVCTRL_EVACT0_FAULT;
+ break;
+ default:
+ Assert(false);
+ /* Wrong configuration */
+ return STATUS_ERR_INVALID_ARG;
+ }
+ }
+ /* Setup input event1 */
+ if (events->on_input_event_perform_action[1]) {
+ evctrl |= TCC_EVCTRL_TCEI1;
+ }
+ if (events->input_config[1].invert) {
+ evctrl |= TCC_EVCTRL_TCINV1;
+ }
+ if (events->input_config[1].modify_action) {
+ evctrl &= ~ TCC_EVCTRL_EVACT1_Msk;
+ switch(events->input_config[1].action) {
+ case TCC_EVENT1_ACTION_OFF:
+ evctrl |= TCC_EVCTRL_EVACT1_OFF;
+ break;
+ case TCC_EVENT1_ACTION_RETRIGGER:
+ evctrl |= TCC_EVCTRL_EVACT1_RETRIGGER;
+ break;
+ case TCC_EVENT1_ACTION_DIR_CONTROL:
+ evctrl |= TCC_EVCTRL_EVACT1_DIR;
+ break;
+ case TCC_EVENT1_ACTION_STOP:
+ evctrl |= TCC_EVCTRL_EVACT1_STOP;
+ break;
+ case TCC_EVENT1_ACTION_DECREMENT:
+ evctrl |= TCC_EVCTRL_EVACT1_DEC;
+ break;
+ case TCC_EVENT1_ACTION_PERIOD_PULSE_WIDTH_CAPTURE:
+ evctrl |= TCC_EVCTRL_EVACT1_PPW |
+ TCC_EVCTRL_MCEI0 | TCC_EVCTRL_MCEI1;
+ break;
+ case TCC_EVENT1_ACTION_PULSE_WIDTH_PERIOD_CAPTURE:
+ evctrl |= TCC_EVCTRL_EVACT1_PWP |
+ TCC_EVCTRL_MCEI0 | TCC_EVCTRL_MCEI1;
+ break;
+ case TCC_EVENT1_ACTION_NON_RECOVERABLE_FAULT:
+ evctrl |= TCC_EVCTRL_EVACT1_FAULT;
+ break;
+ default:
+ Assert(false);
+ /* Wrong configuration */
+ return STATUS_ERR_INVALID_ARG;
+ }
+ }
+ uint32_t ch;
+ for(ch = 0; ch < TCC_NUM_CHANNELS; ch ++) {
+ if (events->generate_event_on_channel[ch]) {
+ evctrl |= (TCC_EVCTRL_MCEO(1) << ch);
+ }
+ if (events->on_event_perform_channel_action[ch]) {
+ evctrl |= (TCC_EVCTRL_MCEI(1) << ch);
+ }
+ }
+ if (events->generate_event_on_counter_overflow) {
+ evctrl |= TCC_EVCTRL_OVFEO;
+ }
+ if (events->generate_event_on_counter_retrigger) {
+ evctrl |= TCC_EVCTRL_TRGEO;
+ }
+ if (events->generate_event_on_counter_event) {
+ evctrl |= TCC_EVCTRL_CNTEO;
+ }
+
+ tcc_module->EVCTRL.reg = evctrl;
+
+ return STATUS_OK;
+}
+
+/**
+ * \brief Disables the event input or output of a TCC instance.
+ *
+ * Disables one or more input or output events for the given TCC module.
+ * See \ref tcc_events for a list of events this module supports.
+ *
+ * \note Events cannot be altered while the module is enabled.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] events Struct containing flags of events to disable
+ */
+void tcc_disable_events(
+ struct tcc_module *const module_inst,
+ struct tcc_events *const events)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+ Assert(events);
+
+ Tcc *const tcc_module = module_inst->hw;
+
+ /* Check if it's enabled or resetting. */
+ if (tcc_module->CTRLA.reg & (TCC_CTRLA_ENABLE | TCC_CTRLA_SWRST)) {
+ return;
+ }
+
+
+ uint32_t evctrl = 0;
+ uint32_t ch;
+ for(ch = 0; ch < TCC_NUM_CHANNELS; ch ++) {
+ if (events->generate_event_on_channel[ch]) {
+ evctrl |= (TCC_EVCTRL_MCEO(1) << ch);
+ }
+ if (events->on_event_perform_channel_action[ch]) {
+ evctrl |= (TCC_EVCTRL_MCEI(1) << ch);
+ }
+ }
+ if (events->generate_event_on_counter_overflow) {
+ evctrl |= TCC_EVCTRL_OVFEO;
+ }
+ if (events->generate_event_on_counter_retrigger) {
+ evctrl |= TCC_EVCTRL_TRGEO;
+ }
+ if (events->generate_event_on_counter_event) {
+ evctrl |= TCC_EVCTRL_CNTEO;
+ }
+ if (events->on_input_event_perform_action[0]) {
+ evctrl |= TCC_EVCTRL_TCEI0;
+ }
+ if (events->on_input_event_perform_action[1]) {
+ evctrl |= TCC_EVCTRL_TCEI1;
+ }
+ if (events->input_config[0].invert) {
+ evctrl |= TCC_EVCTRL_TCINV0;
+ }
+ if (events->input_config[1].invert) {
+ evctrl |= TCC_EVCTRL_TCINV1;
+ }
+
+ tcc_module->EVCTRL.reg &= ~evctrl;
+}
+
+
+
+/**
+ * \brief Sets count value for the given TCC module.
+ *
+ * Sets the timer count value of an initialized TCC module. The
+ * specified TCC module can remain running or stopped.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] count New timer count value to set
+ *
+ * \return Status which indicates whether the new value is set.
+ *
+ * \retval STATUS_OK The timer count was updated successfully
+ * \retval STATUS_ERR_INVALID_ARG An invalid timer counter size was specified
+ */
+enum status_code tcc_set_count_value(
+ const struct tcc_module *const module_inst,
+ const uint32_t count)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance*/
+ Tcc *const tcc_module = module_inst->hw;
+ /* Get a index of the module */
+ uint8_t module_index = _tcc_get_inst_index(tcc_module);
+
+ uint32_t max_count = _tcc_maxs[module_index];
+
+ if (count > max_count) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ while (tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_COUNT) {
+ /* Wait for sync */
+ }
+
+ /* Write to based on the TCC dithering */
+ tcc_module->COUNT.reg = (count);
+
+ return STATUS_OK;
+}
+
+/**
+ * \brief Get count value of the given TCC module.
+ *
+ * Retrieves the current count value of a TCC module. The specified TCC module
+ * can remain running or stopped.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ *
+ * \return Count value of the specified TCC module.
+ */
+uint32_t tcc_get_count_value(
+ const struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance*/
+ Tcc *const tcc_module = module_inst->hw;
+ uint32_t last_cmd;
+
+ /* Wait last command done */
+ do {
+ while (tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_CTRLB) {
+ /* Wait for sync */
+ }
+ last_cmd = tcc_module->CTRLBSET.reg & TCC_CTRLBSET_CMD_Msk;
+ if (TCC_CTRLBSET_CMD_NONE == last_cmd) {
+ /* Issue read command and break */
+ tcc_module->CTRLBSET.bit.CMD = TCC_CTRLBSET_CMD_READSYNC_Val;
+ while (tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_CTRLB) {
+ /* Wait for sync */
+ }
+ break;
+ } else if (TCC_CTRLBSET_CMD_READSYNC == last_cmd) {
+ /* Command have been issued */
+ break;
+ }
+ } while (1);
+
+ while (tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_COUNT) {
+ /* Wait for sync */
+ }
+ return (tcc_module->COUNT.reg);
+}
+
+
+
+/**
+ * \brief Gets the TCC module capture value.
+ *
+ * Retrieves the capture value in the indicated TCC module capture channel.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] channel_index Index of the Compare Capture channel to read
+ *
+ * \return Capture value stored in the specified timer channel.
+ */
+uint32_t tcc_get_capture_value(
+ const struct tcc_module *const module_inst,
+ const enum tcc_match_capture_channel channel_index)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ Assert(channel_index < _tcc_cc_nums[_tcc_get_inst_index(module_inst->hw)]);
+
+ /* Get a pointer to the module's hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+
+ while(tcc_module->SYNCBUSY.reg & (TCC_SYNCBUSY_CC0 << channel_index)) {
+ /* Sync wait */
+ }
+
+ return tcc_module->CC[channel_index].reg;
+}
+
+/**
+ * \internal
+ * \brief Sets a TCC module compare value/buffer.
+ *
+ * Writes a compare value to the given TCC module compare/capture channel or
+ * buffer one.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] channel_index Index of the compare channel to write to
+ * \param[in] compare New compare value/buffer value to set
+ * \param[in] double_buffering_enabled Set to \c true to write to CCBx
+ *
+ * \return Status of the compare update procedure.
+ *
+ * \retval STATUS_OK The compare value was updated successfully
+ * \retval STATUS_ERR_INVALID_ARG An invalid channel index was supplied or
+ * compare value exceed resolution
+ */
+static enum status_code _tcc_set_compare_value(
+ const struct tcc_module *const module_inst,
+ const enum tcc_match_capture_channel channel_index,
+ const uint32_t compare,
+ const bool double_buffering_enabled)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+ /* Get a index of the module */
+ uint8_t module_index = _tcc_get_inst_index(tcc_module);
+
+ /* Check index */
+ if (channel_index >= _tcc_cc_nums[module_index]) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ uint32_t max_count = _tcc_maxs[module_index];
+
+ /* Check compare value */
+ if (compare > max_count) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ if (double_buffering_enabled) {
+#if (SAML21) || (SAMC20) || (SAMC21) || (SAML22) || (SAMR30)
+ tcc_module->CCBUF[channel_index].reg = compare;
+#else
+ while(tcc_module->SYNCBUSY.reg &
+ (TCC_SYNCBUSY_CCB0 << channel_index)) {
+ /* Sync wait */
+ }
+ tcc_module->CCB[channel_index].reg = compare;
+#endif
+ } else {
+ while(tcc_module->SYNCBUSY.reg & (TCC_SYNCBUSY_CC0 << channel_index)) {
+ /* Sync wait */
+ }
+ tcc_module->CC[channel_index].reg = compare;
+ }
+ return STATUS_OK;
+}
+
+
+/**
+ * \brief Sets a TCC module compare value.
+ *
+ * Writes a compare value to the given TCC module compare/capture channel.
+ *
+ * If double buffering is enabled it always write to the buffer
+ * register. The value will then be updated immediately by calling
+ * \ref tcc_force_double_buffer_update(), or be updated when the lock update bit
+ * is cleared and the UPDATE condition happen.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] channel_index Index of the compare channel to write to
+ * \param[in] compare New compare value to set
+ *
+ * \return Status of the compare update procedure.
+ *
+ * \retval STATUS_OK The compare value was updated successfully
+ * \retval STATUS_ERR_INVALID_ARG An invalid channel index was supplied or
+ * compare value exceed resolution
+ */
+enum status_code tcc_set_compare_value(
+ const struct tcc_module *const module_inst,
+ const enum tcc_match_capture_channel channel_index,
+ const uint32_t compare)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+
+ return _tcc_set_compare_value(module_inst, channel_index, compare,
+ module_inst->double_buffering_enabled);
+}
+
+/**
+ * \brief Sets a TCC module compare value and buffer value.
+ *
+ * Writes compare value and buffer to the given TCC module compare/capture
+ * channel. Usually as preparation for double buffer or circulared double buffer
+ * (circular buffer).
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] channel_index Index of the compare channel to write to
+ * \param[in] compare New compare value to set
+ * \param[in] compare_buffer New compare buffer value to set
+ *
+ * \return Status of the compare update procedure.
+ *
+ * \retval STATUS_OK The compare value was updated successfully
+ * \retval STATUS_ERR_INVALID_ARG An invalid channel index was supplied or
+ * compare value exceed resolution
+ */
+enum status_code tcc_set_double_buffer_compare_values(
+ struct tcc_module *const module_inst,
+ const enum tcc_match_capture_channel channel_index,
+ const uint32_t compare, const uint32_t compare_buffer)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+
+ enum status_code status;
+ status = _tcc_set_compare_value(module_inst, channel_index, compare, false);
+ if (status != STATUS_OK) {
+ return status;
+ }
+ return _tcc_set_compare_value(module_inst, channel_index, compare_buffer,
+ true);
+}
+
+
+/**
+ * \internal
+ * \brief Set the timer TOP/PERIOD buffer/value.
+ *
+ * This function writes the given value to the PER/PERB register.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] top_value New value to be loaded into the PER/PERB register
+ * \param[in] double_buffering_enabled Set to \c true to write to PERB
+ *
+ * \return Status of the TOP set procedure.
+ *
+ * \retval STATUS_OK The timer TOP value was updated successfully
+ * \retval STATUS_ERR_INVALID_ARG An invalid channel index was supplied or
+ * top/period value exceed resolution
+ */
+static enum status_code _tcc_set_top_value(
+ const struct tcc_module *const module_inst,
+ const uint32_t top_value,
+ const bool double_buffering_enabled)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+ /* Get a index of the module */
+ uint8_t module_index = _tcc_get_inst_index(tcc_module);
+
+ uint32_t max_count = _tcc_maxs[module_index];
+
+ /* Check compare value */
+ if (top_value > max_count) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ if (double_buffering_enabled) {
+#if (SAML21) || (SAMC20) || (SAMC21) || (SAML22) || (SAMR30)
+ tcc_module->PERBUF.reg = top_value;
+#else
+ while(tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_PERB) {
+ /* Sync wait */
+ }
+ tcc_module->PERB.reg = top_value;
+#endif
+ } else {
+ while(tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_PER) {
+ /* Sync wait */
+ }
+ tcc_module->PER.reg = top_value;
+ }
+ return STATUS_OK;
+}
+
+
+/**
+ * \brief Set the timer TOP/PERIOD value.
+ *
+ * This function writes the given value to the PER/PERB register.
+ *
+ * If double buffering is enabled it always write to the buffer
+ * register (PERB). The value will then be updated immediately by calling
+ * \ref tcc_force_double_buffer_update(), or be updated when the lock update bit
+ * is cleared and the UPDATE condition happen.
+ *
+ * When using MFRQ, the top value is defined by the CC0 register value and the
+ * PER value is ignored, so
+ * \ref tcc_set_compare_value (module,channel_0,value) must be used instead of
+ * this function to change the actual top value in that case.
+ * For all other waveforms operation the top value is defined by PER register
+ * value.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] top_value New value to be loaded into the PER/PERB register
+ *
+ * \return Status of the TOP set procedure.
+ *
+ * \retval STATUS_OK The timer TOP value was updated successfully
+ * \retval STATUS_ERR_INVALID_ARG An invalid channel index was supplied or
+ * top/period value exceed resolution
+ */
+enum status_code tcc_set_top_value(
+ const struct tcc_module *const module_inst,
+ const uint32_t top_value)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+
+ return _tcc_set_top_value(module_inst, top_value,
+ module_inst->double_buffering_enabled);
+}
+
+/**
+ * \brief Set the timer TOP/PERIOD value and buffer value.
+ *
+ * This function writes the given value to the PER and PERB register. Usually as
+ * preparation for double buffer or circulared double buffer (circular buffer).
+ *
+ * When using MFRQ, the top values are defined by the CC0 and CCB0, the PER and
+ * PERB values are ignored, so
+ * \ref tcc_set_double_buffer_compare_values (module,channel_0,value,buffer) must
+ * be used instead of this function to change the actual top values in that
+ * case. For all other waveforms operation the top values are defined by PER and
+ * PERB registers values.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] top_value New value to be loaded into the PER register
+ * \param[in] top_buffer_value New value to be loaded into the PERB register
+ *
+ * \return Status of the TOP set procedure.
+ *
+ * \retval STATUS_OK The timer TOP value was updated successfully
+ * \retval STATUS_ERR_INVALID_ARG An invalid channel index was supplied or
+ * top/period value exceed resolution
+ */
+enum status_code tcc_set_double_buffer_top_values(
+ const struct tcc_module *const module_inst,
+ const uint32_t top_value, const uint32_t top_buffer_value)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+
+ enum status_code status;
+ status = _tcc_set_top_value(module_inst, top_value, false);
+ if (status != STATUS_OK) {
+ return status;
+ }
+ return _tcc_set_top_value(module_inst, top_buffer_value, true);
+}
+
+
+/**
+ * \brief Sets the TCC module waveform output pattern.
+ *
+ * Force waveform output line to generate specific pattern (0, 1, or as is).
+ *
+ * If double buffering is enabled it always write to the buffer
+ * register. The value will then be updated immediately by calling
+ * \ref tcc_force_double_buffer_update(), or be updated when the lock update bit
+ * is cleared and the UPDATE condition happen.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] line_index Output line index
+ * \param[in] pattern Output pattern to use (\ref tcc_output_pattern)
+ *
+ * \return Status of the pattern set procedure.
+ *
+ * \retval STATUS_OK The PATT register is updated successfully
+ * \retval STATUS_ERR_INVALID_ARG An invalid line index was supplied
+ */
+enum status_code tcc_set_pattern(
+ const struct tcc_module *const module_inst,
+ const uint32_t line_index,
+ const enum tcc_output_pattern pattern)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+ /* Get a index of the module */
+ uint8_t module_index = _tcc_get_inst_index(tcc_module);
+ /* Get number of output lines */
+ uint8_t ow_num = _tcc_ow_nums[module_index];
+
+ /* Check if line number is OK */
+ if (line_index >= ow_num) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ uint32_t patt_value;
+
+ while(tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_PATT) {
+ /* Sync wait */
+ }
+ patt_value = tcc_module->PATT.reg;
+ if (TCC_OUTPUT_PATTERN_DISABLE == pattern) {
+ patt_value &= ~(TCC_PATT_PGE0 << line_index);
+ } else if (TCC_OUTPUT_PATTERN_0 == pattern) {
+ patt_value &= ~(TCC_PATT_PGV0 << line_index);
+ patt_value |= (TCC_PATT_PGE0 << line_index);
+ } else {
+ patt_value |= ((TCC_PATT_PGE0 | TCC_PATT_PGV0) << line_index);
+ }
+
+ if (module_inst->double_buffering_enabled) {
+#if (SAML21) || (SAMC20) || (SAMC21) || (SAML22) || (SAMR30)
+ tcc_module->PATTBUF.reg = patt_value;
+#else
+ while(tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_PATTB) {
+ /* Sync wait */
+ }
+ tcc_module->PATTB.reg = patt_value;
+#endif
+ } else {
+ tcc_module->PATT.reg = patt_value;
+ }
+ return STATUS_OK;
+}
+
+/**
+ * \brief Retrieves the current module status.
+ *
+ * Retrieves the status of the module, giving overall state information.
+ *
+ * \param[in] module_inst Pointer to the TCC software instance struct
+ *
+ * \return Bitmask of \c TCC_STATUS_* flags.
+ *
+ * \retval TCC_STATUS_CHANNEL_MATCH_CAPTURE(n) Channel n match/capture has occured
+ * \retval TCC_STATUS_CHANNEL_OUTPUT(n) Channel n match/capture output state
+ * \retval TCC_STATUS_NON_RECOVERABLE_FAULT_OCCUR(x) Non-recoverable fault x has occured
+ * \retval TCC_STATUS_RECOVERABLE_FAULT_OCCUR(n) Recoverable fault n has occured
+ * \retval TCC_STATUS_NON_RECOVERABLE_FAULT_PRESENT(x) Non-recoverable fault x input present
+ * \retval TCC_STATUS_RECOVERABLE_FAULT_PRESENT(n) Recoverable fault n input present
+ * \retval TCC_STATUS_SYNC_READY None of register is syncing
+ * \retval TCC_STATUS_CAPTURE_OVERFLOW Timer capture data has overflowed
+ * \retval TCC_STATUS_COUNTER_EVENT Timer counter event has occurred
+ * \retval TCC_STATUS_COUNT_OVERFLOW Timer count value has overflowed
+ * \retval TCC_STATUS_COUNTER_RETRIGGERED Timer counter has been retriggered
+ * \retval TCC_STATUS_STOP Timer counter has been stopped
+ * \retval TCC_STATUS_RAMP_CYCLE_INDEX Wave ramp index for cycle
+ */
+uint32_t tcc_get_status(
+ struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ uint32_t int_flags = module_inst->hw->INTFLAG.reg;
+ uint32_t status_flags = module_inst->hw->STATUS.reg;
+ uint32_t status = 0;
+ int i;
+
+ /* SYNC */
+ if (module_inst->hw->SYNCBUSY.reg == 0) {
+ status |= TCC_STATUS_SYNC_READY;
+ }
+
+ /* Channels */
+ for (i = 0; i < TCC_NUM_CHANNELS; i++) {
+ if (int_flags & TCC_INTFLAG_MC(i)) {
+ status |= TCC_STATUS_CHANNEL_MATCH_CAPTURE(i);
+ }
+ if (status_flags & TCC_STATUS_CMP(i)) {
+ status |= TCC_STATUS_CHANNEL_OUTPUT(i);
+ }
+ }
+ /* Non-recoverable fault state */
+ if ((int_flags & TCC_INTFLAG_FAULT1) ||
+ (status_flags & TCC_STATUS_FAULT1)) {
+ status |= TCC_STATUS_NON_RECOVERABLE_FAULT_OCCUR(1);
+ }
+ if ((int_flags & TCC_INTFLAG_FAULT0) ||
+ (status_flags & TCC_STATUS_FAULT0)) {
+ status |= TCC_STATUS_NON_RECOVERABLE_FAULT_OCCUR(0);
+ }
+ /* Non-recoverable fault inputs */
+ if (status_flags & TCC_STATUS_FAULT0IN) {
+ status |= TCC_STATUS_NON_RECOVERABLE_FAULT_PRESENT(0);
+ }
+ if (status_flags & TCC_STATUS_FAULT1IN) {
+ status |= TCC_STATUS_NON_RECOVERABLE_FAULT_PRESENT(1);
+ }
+ /* Recoverable fault state */
+ if ((int_flags & TCC_INTFLAG_FAULTB) ||
+ (status_flags & TCC_STATUS_FAULTB)) {
+ status |= TCC_STATUS_RECOVERABLE_FAULT_OCCUR(1);
+ }
+ if ((int_flags & TCC_INTFLAG_FAULTA) ||
+ (status_flags & TCC_STATUS_FAULTA)) {
+ status |= TCC_STATUS_RECOVERABLE_FAULT_OCCUR(0);
+ }
+ /* Recoverable fault inputs */
+ if (status_flags & TCC_STATUS_FAULTAIN) {
+ status |= TCC_STATUS_RECOVERABLE_FAULT_PRESENT(0);
+ }
+ if (status_flags & TCC_STATUS_FAULTBIN) {
+ status |= TCC_STATUS_RECOVERABLE_FAULT_PRESENT(1);
+ }
+
+ /* Check for TCC capture overflow */
+ if (int_flags & TCC_INTFLAG_ERR) {
+ status |= TCC_STATUS_CAPTURE_OVERFLOW;
+ }
+ /* Check for TCC count counter */
+ if (int_flags & TCC_INTFLAG_CNT) {
+ status |= TCC_STATUS_COUNTER_EVENT;
+ }
+ /* Check for TCC count retrigger */
+ if (int_flags & TCC_INTFLAG_TRG) {
+ status |= TCC_STATUS_COUNTER_RETRIGGERED;
+ }
+ /* Check for TCC count overflow */
+ if (int_flags & TCC_INTFLAG_OVF) {
+ status |= TCC_STATUS_COUNT_OVERFLOW;
+ }
+ /* Check for TCC count stop */
+ if (status_flags & TCC_STATUS_STOP) {
+ status |= TCC_STATUS_STOPPED;
+ }
+ /* Check for TCC RAMP index */
+ if (status_flags & TCC_STATUS_IDX) {
+ status |= TCC_STATUS_RAMP_CYCLE_INDEX;
+ }
+ return status;
+}
+
+/**
+ * \brief Clears a module status flag.
+ *
+ * Clears the given status flag of the module.
+ *
+ * \param[in] module_inst Pointer to the TCC software instance struct
+ * \param[in] status_flags Bitmask of \c TCC_STATUS_* flags to clear
+ */
+void tcc_clear_status(
+ struct tcc_module *const module_inst,
+ const uint32_t status_flags)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ uint32_t int_clr = 0;
+ uint32_t status_clr = 0;
+ int i;
+
+ /* Channels */
+ for (i = 0; i < TCC_NUM_CHANNELS; i++) {
+ if (status_flags & TCC_STATUS_CHANNEL_MATCH_CAPTURE(i)) {
+ int_clr |= TCC_INTFLAG_MC(i);
+ }
+ }
+ /* Faults */
+ if (status_flags & TCC_STATUS_NON_RECOVERABLE_FAULT_OCCUR(1)) {
+ int_clr |= TCC_INTFLAG_FAULT1;
+ status_clr |= TCC_STATUS_FAULT1;
+ }
+ if (status_flags & TCC_STATUS_NON_RECOVERABLE_FAULT_OCCUR(0)) {
+ int_clr |= TCC_INTFLAG_FAULT0;
+ status_clr |= TCC_STATUS_FAULT0;
+ }
+ if (status_flags & TCC_STATUS_RECOVERABLE_FAULT_OCCUR(1)) {
+ int_clr |= TCC_INTFLAG_FAULTB;
+ status_clr |= TCC_STATUS_FAULTB;
+ }
+ if (status_flags & TCC_STATUS_RECOVERABLE_FAULT_OCCUR(0)) {
+ int_clr |= TCC_INTFLAG_FAULTA;
+ status_clr |= TCC_STATUS_FAULTA;
+ }
+ /* Check for TCC capture overflow */
+ if (status_flags & TCC_STATUS_CAPTURE_OVERFLOW) {
+ int_clr |= TCC_INTFLAG_ERR;
+ }
+ /* Check for TCC count counter */
+ if (status_flags & TCC_STATUS_COUNTER_EVENT) {
+ int_clr |= TCC_INTFLAG_CNT;
+ }
+ /* Check for TCC count retrigger */
+ if (status_flags & TCC_STATUS_COUNTER_RETRIGGERED) {
+ int_clr = TCC_INTFLAG_TRG;
+ }
+ /* Check for TCC count overflow */
+ if (status_flags & TCC_STATUS_COUNT_OVERFLOW) {
+ int_clr |= TCC_INTFLAG_OVF;
+ }
+ /* Clear status flag */
+ module_inst->hw->STATUS.reg = status_clr;
+ /* Clear interrupt flag */
+ module_inst->hw->INTFLAG.reg = int_clr;
+}
+
+/**
+ * \brief Enable circular option for double buffered compare values.
+ *
+ * Enable circular option for the double buffered channel compare values.
+ * On each UPDATE condition, the contents of CCBx and CCx are switched, meaning
+ * that the contents of CCBx are transferred to CCx and the contents of CCx are
+ * transferred to CCBx.
+ *
+ * \param[in] module_inst Pointer to the TCC software instance struct
+ * \param[in] channel_index Index of the compare channel to set up to
+ *
+ * \retval STATUS_OK The module was initialized successfully
+ * \retval STATUS_INVALID_ARG An invalid channel index is supplied
+ */
+enum status_code tcc_enable_circular_buffer_compare(
+ struct tcc_module *const module_inst,
+ enum tcc_match_capture_channel channel_index)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+ /* Get a index of the module */
+ uint8_t module_index = _tcc_get_inst_index(tcc_module);
+
+ /* Check index */
+ if (channel_index > 3) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+ if (channel_index >= _tcc_cc_nums[module_index]) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ tcc_module->WAVE.reg |= (TCC_WAVE_CICCEN0 << channel_index);
+
+ return STATUS_OK;
+}
+
+/**
+ * \brief Disable circular option for double buffered compare values.
+ *
+ * Stop circularing the double buffered compare values.
+ *
+ * \param[in] module_inst Pointer to the TCC software instance struct
+ * \param[in] channel_index Index of the compare channel to set up to
+ *
+ * \retval STATUS_OK The module was initialized successfully
+ * \retval STATUS_INVALID_ARG An invalid channel index is supplied
+ */
+enum status_code tcc_disable_circular_buffer_compare(
+ struct tcc_module *const module_inst,
+ enum tcc_match_capture_channel channel_index)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+ /* Get a index of the module */
+ uint8_t module_index = _tcc_get_inst_index(tcc_module);
+
+ /* Check index */
+ if (channel_index > 3) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+ if (channel_index >= _tcc_cc_nums[module_index]) {
+ return STATUS_ERR_INVALID_ARG;
+ }
+
+ tcc_module->WAVE.reg &= ~(TCC_WAVE_CICCEN0 << channel_index);
+
+ return STATUS_OK;
+}
diff --git a/atmel-samd/asf/sam0/drivers/tcc/tcc.h b/atmel-samd/asf/sam0/drivers/tcc/tcc.h
new file mode 100644
index 000000000..782c4322b
--- /dev/null
+++ b/atmel-samd/asf/sam0/drivers/tcc/tcc.h
@@ -0,0 +1,2494 @@
+/**
+ * \file
+ *
+ * \brief SAM TCC - Timer Counter for Control Applications Driver
+ *
+ * Copyright (C) 2013-2016 Atmel Corporation. All rights reserved.
+ *
+ * \asf_license_start
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel microcontroller product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * \asf_license_stop
+ *
+ */
+/*
+ * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
+ */
+
+#ifndef TCC_H_INCLUDED
+#define TCC_H_INCLUDED
+
+/**
+ * \defgroup asfdoc_sam0_tcc_group SAM Timer Counter for Control Applications (TCC) Driver
+ *
+ * This driver for Atmel&reg; | SMART ARM&reg;-based microcontrollers provides an interface for the configuration
+ * and management of the TCC module within the device, for waveform
+ * generation and timing operations. It also provides extended options for
+ * control applications.
+ *
+ * The following driver API modes are covered
+ * by this manual:
+ *
+ * - Polled APIs
+ * \if TCC_CALLBACK_MODE
+ * - Callback APIs
+ * \endif
+ *
+ * The following peripheral is used by this module:
+ * - TCC (Timer/Counter for Control Applications)
+ *
+ * The following devices can use this module:
+ * - Atmel | SMART SAM D21
+ * - Atmel | SMART SAM R21
+ * - Atmel | SMART SAM D10/D11
+ * - Atmel | SMART SAM L21/L22
+ * - Atmel | SMART SAM DA1
+ * - Atmel | SMART SAM C20/C21
+ * - Atmel | SMART SAM R30
+ *
+ * The outline of this documentation is as follows:
+ * - \ref asfdoc_sam0_tcc_prerequisites
+ * - \ref asfdoc_sam0_tcc_module_overview
+ * - \ref asfdoc_sam0_tcc_special_considerations
+ * - \ref asfdoc_sam0_tcc_extra_info
+ * - \ref asfdoc_sam0_tcc_examples
+ * - \ref asfdoc_sam0_tcc_api_overview
+ *
+ * \section asfdoc_sam0_tcc_prerequisites Prerequisites
+ *
+ * There are no prerequisites for this module.
+ *
+ * \section asfdoc_sam0_tcc_module_overview Module Overview
+ *
+ * The Timer/Counter for Control Applications (TCC) module provides a set of
+ * timing and counting related functionality, such as the generation of periodic
+ * waveforms, the capturing of a periodic waveform's frequency/duty cycle,
+ * software timekeeping for periodic operations, waveform extension control,
+ * fault detection etc.
+ *
+ * The counter size of the TCC modules can be 16- or 24-bit depending on
+ * the TCC instance.
+ * Refer \ref asfdoc_sam0_tcc_special_considerations_tcc_d21 and
+ * \ref asfdoc_sam0_tcc_special_considerations_tcc_d11 for details on TCC instances.
+ *
+ * The TCC module for the SAM includes the following functions:
+ *
+ * - Generation of PWM signals
+ * - Generation of timestamps for events
+ * - General time counting
+ * - Waveform period capture
+ * - Waveform frequency capture
+ * - Additional control for generated waveform outputs
+ * - Fault protection for waveform generation
+ *
+ * \ref asfdoc_sam0_tcc_block_diagram "The diagram below" shows the overview
+ * of the TCC Module.
+ *
+ * \anchor asfdoc_sam0_tcc_block_diagram
+ * \image html overview.svg "Overview of the TCC Module"
+ *
+ * \subsection asfdoc_sam0_tcc_module_overview_parts Functional Description
+ * The TCC module consists of following sections:
+ * - Base Counter
+ * - Compare/Capture channels, with waveform generation
+ * - Waveform extension control and fault detection
+ * - Interface to the event system, DMAC, and the interrupt system
+ *
+ * The base counter can be configured to either count a prescaled generic
+ * clock or events from the event system.(TCEx, with event action configured
+ * to counting).
+ * The counter value can be used by compare/capture channels which can be
+ * set up either in compare mode or capture mode.
+ *
+ * In capture mode, the counter value is stored when a configurable event
+ * occurs. This mode can be used to generate timestamps used in event capture,
+ * or it can be used for the measurement of a periodic input signal's
+ * frequency/duty cycle.
+ *
+ * In compare mode, the counter value is compared against one or more of the
+ * configured channels' compare values. When the counter value coincides with a
+ * compare value an action can be taken automatically by the module, such as
+ * generating an output event or toggling a pin when used for frequency or PWM
+ * signal generation.
+ *
+ * \note The connection of events between modules requires the use of the
+ * \ref asfdoc_sam0_events_group "SAM Event System Driver (EVENTS)"
+ * to route output event of one module to the the input event of another.
+ * For more information on event routing, refer to the event driver
+ * documentation.
+ *
+ * In compare mode, when output signal is generated, extended waveform controls
+ * are available, to arrange the compare outputs into specific formats.
+ * The Output matrix can change the channel output routing. Pattern generation
+ * unit can overwrite the output signal line to specific state.
+ * The Fault protection feature of the TCC supports recoverable and
+ * non-recoverable faults.
+ *
+ * \subsection asfdoc_sam0_tcc_module_overview_tc Base Timer/Counter
+ *
+ * \subsubsection asfdoc_sam0_tcc_module_overview_tc_size Timer/Counter Size
+ * Each TCC has a counter size of either 16- or 24-bits. The size of the
+ * counter determines the maximum value it can count to before an overflow
+ * occurs.
+ * \ref asfdoc_sam0_tcc_count_size_vs_top "The table below" shows the
+ * maximum values for each of the possible counter sizes.
+ *
+ * \anchor asfdoc_sam0_tcc_count_size_vs_top
+ * <table>
+ * <caption>Timer Counter Sizes and Their Maximum Count Values</caption>
+ * <tr>
+ * <th>Counter size</th>
+ * <th>Max. (hexadecimal)</th>
+ * <th>Max. (decimal)</th>
+ * </tr>
+ * <tr>
+ * <td>16-bit</td>
+ * <td>0xFFFF</td>
+ * <td>65,535</td>
+ * </tr>
+ * <tr>
+ * <td>24-bit</td>
+ * <td>0xFFFFFF</td>
+ * <td>16,777,215</td>
+ * </tr>
+ * </table>
+ *
+ * The period/top value of the counter can be set, to define counting period.
+ * This will allow the counter to overflow when the counter value reaches the
+ * period/top value.
+ *
+ * \subsubsection asfdoc_sam0_tcc_module_overview_tc_clk Timer/Counter Clock and Prescaler
+ * TCC is clocked asynchronously to the system clock by a GCLK
+ * (Generic Clock) channel. The GCLK channel can be connected to any of the GCLK
+ * generators. The GCLK generators are configured to use one of the available
+ * clock sources in the system such as internal oscillator, external crystals,
+ * etc. See the \ref asfdoc_sam0_system_clock_group "Generic Clock driver" for
+ * more information.
+ *
+ * Each TCC module in the SAM has its own individual clock prescaler, which
+ * can be used to divide the input clock frequency used by the counter. This
+ * prescaler only scales the clock used to provide clock pulses for the counter
+ * to count, and does not affect the digital register interface portion of
+ * the module, thus the timer registers will be synchronized to the raw GCLK
+ * frequency input to the module.
+ *
+ * As a result of this, when selecting a GCLK frequency and timer prescaler
+ * value, the user application should consider both the timer resolution
+ * required and the synchronization frequency to avoid lengthy
+ * synchronization times of the module if a very slow GCLK frequency is fed
+ * into the TCC module. It is preferable to use a higher module GCLK frequency
+ * as the input to the timer, and prescale this down as much as possible to
+ * obtain a suitable counter frequency in latency-sensitive applications.
+ *
+ * \subsubsection asfdoc_sam0_tcc_module_overview_tc_ctrl Timer/Counter Control Inputs (Events)
+ *
+ * The TCC can take several actions on the occurrence of an input event.
+ * The event actions are listed
+ * in \ref asfdoc_sam0_tcc_module_event_act "events action settings".
+ *
+ * \anchor asfdoc_sam0_tcc_module_event_act
+ * <table>
+ * <caption>TCC Module Event Actions</caption>
+ * <tr>
+ * <th>Event action</th>
+ * <th>Description</th>
+ * <th>Applied event</th>
+ * </tr>
+ * <tr>
+ * <td>TCC_EVENT_ACTION_OFF</td>
+ * <td>No action on the event input</td>
+ * <td>All</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_EVENT_ACTION_RETRIGGER</td>
+ * <td>Re-trigger Counter on event</td>
+ * <td>All</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_EVENT_ACTION_NON_RECOVERABLE_FAULT</td>
+ * <td>Generate Non-Recoverable Fault on event</td>
+ * <td>All</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_EVENT_ACTION_START</td>
+ * <td>Counter start on event</td>
+ * <td>EV0</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_EVENT_ACTION_DIR_CONTROL</td>
+ * <td>Counter direction control</td>
+ * <td>EV0</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_EVENT_ACTION_DECREMENT</td>
+ * <td>Counter decrement on event</td>
+ * <td>EV0</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_EVENT_ACTION_PERIOD_PULSE_WIDTH_CAPTURE</td>
+ * <td>Capture pulse period and pulse width</td>
+ * <td>EV0</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_EVENT_ACTION_PULSE_WIDTH_PERIOD_CAPTURE</td>
+ * <td>Capture pulse width and pulse period</td>
+ * <td>EV0</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_EVENT_ACTION_STOP</td>
+ * <td>Counter stop on event</td>
+ * <td>EV1</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_EVENT_ACTION_COUNT_EVENT</td>
+ * <td>Counter count on event</td>
+ * <td>EV1</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_EVENT_ACTION_INCREMENT</td>
+ * <td>Counter increment on event</td>
+ * <td>EV1</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_EVENT_ACTION_COUNT_DURING_ACTIVE</td>
+ * <td>Counter count during active state of asynchronous event</td>
+ * <td>EV1</td>
+ * </tr>
+ * </table>
+ *
+ * \subsubsection asfdoc_sam0_tcc_module_overview_tc_reload Timer/Counter Reloading
+ *
+ * The TCC also has a configurable reload action, used when a
+ * re-trigger event occurs. Examples of a re-trigger event could be the counter
+ * reaching the maximum value when counting up, or when an event from the event
+ * system makes the counter to re-trigger. The reload action determines if the
+ * prescaler should be reset, and on which clock. The counter will
+ * always be reloaded with the value it is set to start counting. The user
+ * can choose between three different reload actions, described in
+ * \ref asfdoc_sam0_tcc_module_reload_act "the table below".
+ *
+ * \anchor asfdoc_sam0_tcc_module_reload_act
+ * <table>
+ * <caption>TCC Module Reload Actions</caption>
+ * <tr>
+ * <th>Reload action</th>
+ * <th>Description</th>
+ * </tr>
+ * <tr>
+ * <td>TCC_RELOAD_ACTION_GCLK</td>
+ * <td>Reload TCC counter value on next GCLK cycle. Leave prescaler
+ * as-is.</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_RELOAD_ACTION_PRESC</td>
+ * <td>Reloads TCC counter value on next prescaler clock. Leave prescaler
+ * as-is.</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_RELOAD_ACTION_RESYNC</td>
+ * <td>Reload TCC counter value on next GCLK cycle. Clear prescaler to
+ * zero.</td>
+ * </tr>
+ * </table>
+ *
+ * The reload action to use will depend on the specific application being
+ * implemented. One example is when an external trigger for a reload occurs; if
+ * the TCC uses the prescaler, the counter in the prescaler should not have a
+ * value between zero and the division factor. The counter in the TCC module
+ * and the counter in the prescaler should both start at zero.
+ * If the counter is set to re-trigger when it reaches the maximum value,
+ * this is not the right option to use. In such a case it would be better if
+ * the prescaler is left unaltered when the re-trigger happens, letting the
+ * counter reset on the next GCLK cycle.
+ *
+ * \subsubsection asfdoc_sam0_tcc_module_overview_tc_oneshot One-shot Mode
+ *
+ * The TCC module can be configured in one-shot mode. When configured in this
+ * manner, starting the timer will cause it to count until the next overflow
+ * or underflow condition before automatically halting, waiting to be manually
+ * triggered by the user application software or an event from the event
+ * system.
+ *
+ * \subsection asfdoc_sam0_tcc_module_overview_capt Capture Operations
+ *
+ * In capture operations, any event from the event system or a pin change can
+ * trigger a capture of the counter value. This captured counter value can be
+ * used as timestamps for the events, or it can be used in frequency and pulse
+ * width capture.
+ *
+ * \subsubsection asfdoc_sam0_tcc_module_overview_capt_ev Capture Operations - Event
+ *
+ * Event capture is a simple use of the capture functionality,
+ * designed to create timestamps for specific events. When the input event
+ * appears, the current counter value is copied into the corresponding
+ * compare/capture register, which can then be read by the user application.
+ *
+ * Note that when performing any capture operation, there is a risk that the
+ * counter reaches its top value (MAX) when counting up, or the bottom value
+ * (zero) when counting down, before the capture event occurs. This can distort
+ * the result, making event timestamps to appear shorter than they really are.
+ * In this case, the user application should check for timer overflow when
+ * reading a capture result in order to detect this situation and perform an
+ * appropriate adjustment.
+ *
+ * Before checking for a new capture, \ref TCC_STATUS_COUNT_OVERFLOW
+ * should be checked. The response to an overflow error is left to the user
+ * application, however, it may be necessary to clear both the overflow
+ * flag and the capture flag upon each capture reading.
+ *
+ * \subsubsection asfdoc_sam0_tcc_module_overview_capt_pulse Capture Operations - Pulse Width
+ *
+ * Pulse Width Capture mode makes it possible to measure the pulse width and
+ * period of PWM signals. This mode uses two capture channels of the counter.
+ * There are two modes for pulse width capture;
+ * Pulse Width Period (PWP) and Period Pulse Width (PPW). In PWP mode, capture
+ * channel 0 is used for storing the pulse width and capture channel 1 stores
+ * the observed period. While in PPW mode, the roles of the two capture channels
+ * are reversed.
+ *
+ * As in the above example it is necessary to poll on interrupt flags to see
+ * if a new capture has happened and check that a capture overflow error has
+ * not occurred.
+ *
+ * Refer to \ref asfdoc_sam0_tcc_module_overview_tc_ctrl to set up the input
+ * event to perform pulse width capture.
+ *
+ * \subsection asfdoc_sam0_tcc_module_overview_mc Compare Match Operation
+ *
+ * In compare match operation, Compare/Capture registers are compared
+ * with the counter value. When the timer's count value matches the value of a
+ * compare channel, a user defined action can be taken.
+ *
+ * \subsubsection asfdoc_sam0_tcc_module_overview_mc_timer Basic Timer
+ *
+ * A Basic Timer is a simple application where compare match operation is used
+ * to determine when a specific period has elapsed. In Basic Timer operations,
+ * one or more values in the module's Compare/Capture registers are used to
+ * specify the time (in terms of the number of prescaled GCLK cycles, or
+ * input events) at which
+ * an action should be taken by the microcontroller. This can be an Interrupt
+ * Service Routine (ISR), event generation via the event system, or a software
+ * flag that is polled from the user application.
+ *
+ * \subsubsection asfdoc_sam0_tcc_module_overview_mc_wave Waveform Generation
+ *
+ * Waveform generation enables the TCC module to generate square waves, or, if
+ * combined with an external passive low-pass filter, analog waveforms.
+ *
+ * \subsubsection asfdoc_sam0_tcc_module_overview_mc_wave_pwm Waveform Generation - PWM
+ *
+ * Pulse width modulation is a form of waveform generation and a signalling
+ * technique that can be useful in many applications. When PWM mode is used,
+ * a digital pulse train with a configurable frequency and duty cycle can be
+ * generated by the TCC module and output to a GPIO pin of the device.
+ *
+ * Often PWM is used to communicate a control or information parameter to an
+ * external circuit or component. Differing impedances of the source generator
+ * and sink receiver circuits is less of an issue when using PWM compared to
+ * using an analog voltage value, as noise will not generally affect the
+ * signal's integrity to a meaningful extent.
+ *
+ * \ref asfdoc_sam0_tcc_module_pwm_single_diag "The figure below" illustrates
+ * operations and different states of the counter and its output when using
+ * the timer in Normal PWM mode (Single Slope). As can be seen, the TOP/PERIOD
+ * value is
+ * unchanged and is set to MAX. The compare match value is changed at several
+ * points to illustrate the resulting waveform output changes. The PWM output is
+ * set to normal (i.e. non-inverted) output mode.
+ *
+ * \anchor asfdoc_sam0_tcc_module_pwm_single_diag
+ * \image html pwm_single_ex.svg "Example Of PWM In Single-Slope Mode, and Different Counter Operations"
+ *
+ * Several PWM modes are supported by the TCC module, refer to
+ * datasheet for the details on PWM waveform generation.
+ *
+ * \subsubsection asfdoc_sam0_tcc_module_overview_mc_wave_freq Waveform Generation - Frequency
+ *
+ * Normal Frequency Generation is in many ways identical to PWM generation.
+ * However, only in Frequency Generation, a toggle occurs on the output when a
+ * match on a compare channels occurs.
+ *
+ * When the Match Frequency Generation is used, the timer value is reset on
+ * match condition, resulting in a variable frequency square wave with a
+ * fixed 50% duty cycle.
+ *
+ * \subsection asfdoc_sam0_tcc_module_overview_ext Waveform Extended Controls
+ *
+ * \subsubsection asfdoc_sam0_tcc_module_overview_ext_pat Pattern Generation
+ *
+ * Pattern insertion allows the TCC module to change the actual pin output level
+ * without modifying the compare/match settings.
+ *
+ * \anchor asfdoc_sam0_tcc_module_pattern_gen
+ * <table>
+ * <caption>TCC Module Output Pattern Generation</caption>
+ * <tr>
+ * <th>Pattern</th>
+ * <th>Description</th>
+ * </tr>
+ * <tr>
+ * <td>TCC_OUTPUT_PATTERN_DISABLE</td>
+ * <td>Pattern disabled, generate output as is</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_OUTPUT_PATTERN_0</td>
+ * <td>Generate pattern 0 on output (keep the output LOW)</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_OUTPUT_PATTERN_1</td>
+ * <td>Generate pattern 1 on output (keep the output HIGH)</td>
+ * </tr>
+ * </table>
+ *
+ * \subsubsection asfdoc_sam0_tcc_module_overview_ext_r_fault Recoverable Faults
+ *
+ * The recoverable faults can trigger one or several of following fault actions:
+ * -# *Halt* action: The recoverable faults can halt the TCC timer/counter,
+ * so that the final output wave is kept at a defined state. When the fault
+ * state is removed it is possible to recover the counter and waveform
+ * generation. The halt action is defined as:
+ * \anchor asfdoc_sam0_tcc_module_fault_halt_action
+ * <table>
+ * <caption>TCC Module Recoverable Fault Halt Actions</caption>
+ * <tr>
+ * <th>Action</th>
+ * <th>Description</th>
+ * </tr>
+ * <tr>
+ * <td>TCC_FAULT_HALT_ACTION_DISABLE</td>
+ * <td>Halt action is disabled</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_FAULT_HALT_ACTION_HW_HALT</td>
+ * <td>The timer/counter is halted as long as the corresponding fault is
+ * present</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_FAULT_HALT_ACTION_SW_HALT</td>
+ * <td>The timer/counter is halted until the corresponding fault is removed
+ * and fault state cleared by software</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_FAULT_HALT_ACTION_NON_RECOVERABLE</td>
+ * <td>Force all the TCC output pins to a pre-defined level, as what
+ * Non-Recoverable Fault do</td>
+ * </tr>
+ * </table>
+ * -# *Restart* action: When enabled, the recoverable faults can restart the TCC
+ * timer/counter.
+ * -# *Keep* action: When enabled, the recoverable faults can keep the
+ * corresponding channel output to zero when the fault condition is present.
+ * -# *Capture* action: When the recoverable fault occurs, the capture action can
+ * time stamps the corresponding fault. The following capture mode is
+ * supported:
+ * \anchor asfdoc_sam0_tcc_module_fault_capt_action
+ * <table>
+ * <caption>TCC Module Recoverable Fault Capture Actions</caption>
+ * <tr>
+ * <th>Action</th>
+ * <th>Description</th>
+ * </tr>
+ * <tr>
+ * <td>TCC_FAULT_CAPTURE_DISABLE</td>
+ * <td>Capture action is disabled</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_FAULT_CAPTURE_EACH</td>
+ * <td>Equivalent to standard capture operation, on each fault occurrence
+ * the time stamp is captured</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_FAULT_CAPTURE_MINIMUM</td>
+ * <td>Get the minimum time stamped value in all time stamps</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_FAULT_CAPTURE_MAXIMUM</td>
+ * <td>Get the maximum time stamped value in all time stamps</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_FAULT_CAPTURE_SMALLER</td>
+ * <td>Time stamp the fault input if the value is smaller than last one</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_FAULT_CAPTURE_BIGGER</td>
+ * <td>Time stamp the fault input if the value is bigger than last one</td>
+ * </tr>
+ * <tr>
+ * <td>TCC_FAULT_CAPTURE_CHANGE</td>
+ * <td>Time stamp the fault input if the time stamps changes its increment
+ * direction</td>
+ * </tr>
+ * </table>
+ *
+ * In TCC module, only the first two compare channels (CC0 and CC1) can work
+ * with recoverable fault inputs. The corresponding event inputs (TCCx MC0
+ * and TCCx MC1) are then used as fault inputs respectively.
+ * The faults are called Fault A and Fault B.
+ *
+ * The recoverable fault can be filtered or effected by corresponding channel
+ * output. On fault condition there are many other settings that can be chosen.
+ * Refer to data sheet for more details about the recoverable fault
+ * operations.
+ *
+ * \subsubsection asfdoc_sam0_tcc_module_overview_ext_n_fault Non-Recoverable Faults
+ *
+ * The non-recoverable faults force all the TCC output pins to a pre-defined
+ * level (can be forced to 0 or 1). The input control signal of non-recoverable
+ * fault is from timer/counter event (TCCx EV0 and TCCx EV1).
+ * To enable non-recoverable fault,
+ * corresponding TCEx event action must be set to non-recoverable fault action
+ * (\ref TCC_EVENT_ACTION_NON_RECOVERABLE_FAULT).
+ * Refer to \ref asfdoc_sam0_tcc_module_overview_tc_ctrl to see the available
+ * event input action.
+ *
+ * \subsection asfdoc_sam0_tcc_module_overview_buffering Double and Circular Buffering
+ *
+ * The pattern, period, and the compare channels registers are double buffered.
+ * For these options there are effective registers (PATT, PER, and CCx) and
+ * buffer registers (PATTB, PERB, and CCx). When writing to the buffer
+ * registers, the values are buffered and will be committed to effective
+ * registers on UPDATE condition.
+ *
+ * Usually the buffered value is cleared after it is committed, but there is also
+ * an option to circular the register buffers. The period (PER) and four lowest
+ * compare channels register (CCx, x is 0 ~ 3) support this function. When
+ * circular buffer is used, on UPDATE the previous period or compare values are
+ * copied back into the corresponding period buffer and compare buffers.
+ * This way, the register value and its buffer register value is actually
+ * switched on UPDATE condition, and will be switched back on next UPDATE
+ * condition.
+ *
+ * For input capture, the buffer register (CCBx) and the corresponding capture
+ * channel register (CCx) act like a FIFO. When regular register (CCx) is empty
+ * or read, any content in the buffer register is passed to regular one.
+ *
+ * In TCC module driver, when the double buffering write is enabled, any
+ * write through \ref tcc_set_top_value(), \ref tcc_set_compare_value(), and
+ * \ref tcc_set_pattern() will be done to the corresponding buffer register.
+ * Then the value in the buffer register will be transferred to the regular
+ * register on the next UPDATE condition or by a force UPDATE using
+ * \ref tcc_force_double_buffer_update().
+ *
+ * \subsection asfdoc_sam0_tcc_module_overview_sleep Sleep Mode
+ *
+ * TCC modules can be configured to operate in any sleep mode, with its "run
+ * in standby" function enabled. It can wake up the device using interrupts or
+ * perform internal actions with the help of the Event System.
+ *
+ * \section asfdoc_sam0_tcc_special_considerations Special Considerations
+ *
+ * \subsection asfdoc_sam0_tcc_special_considerations_specific_features Driver Feature Macro Definition
+ * \ref asfdoc_sam0_tcc_feature_table "The table below" shows some specific features
+ * of the TCC Module.
+ *
+ * \anchor asfdoc_sam0_tcc_feature_table
+ * <table>
+ * <caption>TCC Module Specific Features</caption>
+ * <tr>
+ * <th>Driver Feature Macro</th>
+ * <th>Supported devices</th>
+ * </tr>
+ * <tr>
+ * <td>FEATURE_TCC_GENERATE_DMA_TRIGGER</td>
+ * <td>SAM L21/L22/R30</td>
+ * </tr>
+ * </table>
+ *
+ * \note The specific features are only available in the driver when the
+ * selected device supports those features.
+ *
+ * \subsection asfdoc_sam0_tcc_special_considerations_tcc_feature Module Features
+ *
+ * The features of TCC, such as timer/counter size, number of compare capture
+ * channels, and number of outputs, are dependent on the TCC module instance being
+ * used.
+ *
+ * \subsubsection asfdoc_sam0_tcc_special_considerations_tcc_d21 SAM TCC Feature List
+ * For SAM D21/R21/L21/L22/DA1/C21/R30, the TCC features are:
+ * \anchor asfdoc_sam0_tcc_features_d21
+ * <table>
+ * <caption>TCC module features for SAM D21/R21/L21/L22/DA1/C21/R30</caption>
+ * <tr>
+ * <th>TCC#</th>
+ * <th>Match/Capture channels</th>
+ * <th>Wave outputs</th>
+ * <th>Counter size [bits]</th>
+ * <th>Fault</th>
+ * <th>Dithering</th>
+ * <th>Output matrix</th>
+ * <th>Dead-Time insertion</th>
+ * <th>SWAP</th>
+ * <th>Pattern</th>
+ * </tr>
+ * <tr>
+ * <td>0</td>
+ * <td>4</td>
+ * <td>8</td>
+ * <td>24</td>
+ * <td>Y</td>
+ * <td>Y</td>
+ * <td>Y</td>
+ * <td>Y</td>
+ * <td>Y</td>
+ * <td>Y</td>
+ * </tr>
+ * <tr>
+ * <td>1</td>
+ * <td>2</td>
+ * <td>4</td>
+ * <td>24</td>
+ * <td>Y</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td></td>
+ * <td></td>
+ * <td>Y</td>
+ * </tr>
+ * <tr>
+ * <td>2</td>
+ * <td>2</td>
+ * <td>2</td>
+ * <td>16</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td></td>
+ * <td></td>
+ * <td></td>
+ * <td></td>
+ * </tr>
+ * </table>
+ *
+ * \subsubsection asfdoc_sam0_tcc_special_considerations_tcc_d11 SAM D10/D11 TCC Feature List
+ * For SAM D10/D11, the TCC features are:
+ * \anchor asfdoc_sam0_tcc_features_d11
+ * <table>
+ * <caption>TCC Module Features For SAM D10/D11</caption>
+ * <tr>
+ * <th>TCC#</th>
+ * <th>Match/Capture channels</th>
+ * <th>Wave outputs</th>
+ * <th>Counter size [bits]</th>
+ * <th>Fault</th>
+ * <th>Dithering</th>
+ * <th>Output matrix</th>
+ * <th>Dead-Time insertion</th>
+ * <th>SWAP</th>
+ * <th>Pattern</th>
+ * </tr>
+ * <tr>
+ * <td>0</td>
+ * <td>4</td>
+ * <td>8</td>
+ * <td>24</td>
+ * <td>Y</td>
+ * <td>Y</td>
+ * <td>Y</td>
+ * <td>Y</td>
+ * <td>Y</td>
+ * <td>Y</td>
+ * </tr>
+ * </table>
+ *
+ * \subsection asfdoc_sam0_tcc_special_considerations_tcc_pin Channels vs. Pinouts
+ *
+ * As the TCC module may have more waveform output pins than the number of
+ * compare/capture channels, the free pins (with number higher than number of
+ * channels) will reuse the waveform generated by channels subsequently. E.g.,
+ * if the number of channels is four and the number of wave output pins is eight, channel
+ * 0 output will be available on out pin 0 and 4, channel 1 output
+ * on wave out pin 1 and 5, and so on.
+ *
+ * \section asfdoc_sam0_tcc_extra_info Extra Information
+ *
+ * For extra information, see \ref asfdoc_sam0_tcc_extra. This includes:
+ * - \ref asfdoc_sam0_tcc_extra_acronyms
+ * - \ref asfdoc_sam0_tcc_extra_dependencies
+ * - \ref asfdoc_sam0_tcc_extra_errata
+ * - \ref asfdoc_sam0_tcc_extra_history
+ *
+ *
+ * \section asfdoc_sam0_tcc_examples Examples
+ *
+ * For a list of examples related to this driver, see
+ * \ref asfdoc_sam0_tcc_exqsg.
+ *
+ * \section asfdoc_sam0_tcc_api_overview API Overview
+ * @{
+ */
+
+#include <compiler.h>
+#include <clock.h>
+#include <gclk.h>
+#include <pinmux.h>
+
+/** Maximum number of channels supported by the driver
+ * (Channel index from 0 to \c TCC_NUM_CHANNELS - 1).
+ */
+#define TCC_NUM_CHANNELS 4
+
+/** Maximum number of wave outputs lines supported by the driver
+ * (Output line index from 0 to \c TCC_NUM_WAVE_OUTPUTS - 1).
+ */
+#define TCC_NUM_WAVE_OUTPUTS 8
+
+/** Maximum number of (recoverable) faults supported by the driver. */
+#define TCC_NUM_FAULTS 2
+
+#if TCC_ASYNC == true
+# include <system_interrupt.h>
+#endif
+
+/**
+ * \name Driver Feature Definition
+ * Define port features set according to different device family.
+ * @{
+*/
+#if (SAML21) || (SAML22) || (SAMR30) || defined(__DOXYGEN__)
+/** Generate DMA triggers */
+# define FEATURE_TCC_GENERATE_DMA_TRIGGER
+#endif
+/*@}*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Generates a table enum list entry for a given type
+ and index (e.g. "TCC_CALLBACK_MC_CHANNEL_0,"). */
+#define _TCC_ENUM(n, type) TCC_##type##_##n,
+
+/** Generates table enum list entries for all channels of a
+ given type and channel number on TCC module. */
+#define _TCC_CHANNEL_ENUM_LIST(type) \
+ MREPEAT(TCC_NUM_CHANNELS, _TCC_ENUM, type##_CHANNEL)
+/** Generates table enum list entries for all output of a
+ given type and waveform output number on TCC module. */
+#define _TCC_WO_ENUM_LIST(type) \
+ MREPEAT(TCC_NUM_WAVE_OUTPUTS, _TCC_ENUM, type)
+
+
+#if TCC_ASYNC == true
+/** Enum for the possible callback types for the TCC module. */
+enum tcc_callback {
+ /** Callback for TCC overflow */
+ TCC_CALLBACK_OVERFLOW,
+ /** Callback for TCC Retrigger */
+ TCC_CALLBACK_RETRIGGER,
+ /** Callback for TCC counter event */
+ TCC_CALLBACK_COUNTER_EVENT,
+ /** Callback for capture overflow error */
+ TCC_CALLBACK_ERROR,
+ /** Callback for Recoverable Fault A */
+ TCC_CALLBACK_FAULTA,
+ /** Callback for Recoverable Fault B */
+ TCC_CALLBACK_FAULTB,
+ /** Callback for Non-Recoverable Fault 0 */
+ TCC_CALLBACK_FAULT0,
+ /** Callback for Non-Recoverable Fault 1 */
+ TCC_CALLBACK_FAULT1,
+
+# if defined(__DOXYGEN__)
+ /** Channel callback type table for TCC
+ *
+ * Each TCC module may contain several callback types for channels; each
+ * channel will have its own callback type in the table, with the channel
+ * index number substituted for "n" in the channel callback type
+ * (e.g. \c TCC_MATCH_CAPTURE_CHANNEL_0).
+ */
+ TCC_CALLBACK_CHANNEL_n = n,
+# else
+ /** Callbacks for Match/Capture channels, e.g., TCC_CALLBACK_CHANNEL_0 */
+ _TCC_CHANNEL_ENUM_LIST(CALLBACK)
+# endif
+
+# if !defined(__DOXYGEN__)
+ /** Number of available callbacks */
+ TCC_CALLBACK_N
+# endif
+};
+#endif /* #if TCC_ASYNC == true */
+
+/**
+ * \name Module Status Flags
+ *
+ * TCC status flags, returned by \ref tcc_get_status() and cleared by
+ * \ref tcc_clear_status().
+ *
+ * @{
+ */
+
+/** Timer channel \c ch (0 ~ 3) has matched against its compare value,
+ * or has captured a new value.
+ */
+#define TCC_STATUS_CHANNEL_MATCH_CAPTURE(ch) (1UL << (ch))
+/** Timer channel \c ch (0 ~ 3) match/compare output state. */
+#define TCC_STATUS_CHANNEL_OUTPUT(ch) (1UL << ((ch)+8))
+/** A Non-Recoverable Fault \c x (0 ~ 1) has occurred. */
+#define TCC_STATUS_NON_RECOVERABLE_FAULT_OCCUR(x) (1UL << ((x)+16))
+/** A Recoverable Fault \c n (0 ~ 1 representing A ~ B) has occured. */
+#define TCC_STATUS_RECOVERABLE_FAULT_OCCUR(n) (1UL << ((n)+18))
+/** The Non-Recoverable Fault \c x (0 ~ 1) input is present. */
+#define TCC_STATUS_NON_RECOVERABLE_FAULT_PRESENT(x) (1UL << ((x)+20))
+/** A Recoverable Fault \c n (0 ~ 1 representing A ~ B) is present. */
+#define TCC_STATUS_RECOVERABLE_FAULT_PRESENT(n) (1UL << ((n)+22))
+/** Timer registers synchronization has completed, and the synchronized count
+ * value may be read.
+ */
+#define TCC_STATUS_SYNC_READY (1UL << 23)
+/** A new value was captured before the previous value was read, resulting in
+ * lost data.
+ */
+#define TCC_STATUS_CAPTURE_OVERFLOW (1UL << 24)
+/** A counter event occurred. */
+#define TCC_STATUS_COUNTER_EVENT (1UL << 25)
+/** A counter retrigger occurred. */
+#define TCC_STATUS_COUNTER_RETRIGGERED (1UL << 26)
+/** The timer count value has overflowed from its maximum value to its minimum
+ * when counting upward, or from its minimum value to its maximum when
+ * counting downward.
+ */
+#define TCC_STATUS_COUNT_OVERFLOW (1UL << 27)
+/** Ramp period cycle index.
+ * In ramp operation, each two period cycles are marked as cycle A and B,
+ * the index 0 represents cycle A and 1 represents cycle B. */
+#define TCC_STATUS_RAMP_CYCLE_INDEX (1UL << 28)
+/** The counter has been stopped (due to disable, stop command, or one-shot). */
+#define TCC_STATUS_STOPPED (1UL << 29)
+
+/** @} */
+
+/**
+ * \brief Index of the match capture channels
+ *
+ * This enum is used to specify which capture/match channel to do
+ * operations on.
+ */
+enum tcc_match_capture_channel {
+# if defined(__DOXYGEN__)
+ /** Match capture channel index table for TCC
+ *
+ * Each TCC module may contain several match capture channels; each channel
+ * will have its own index in the table, with the index number substituted
+ * for "n" in the index name (e.g. \c TCC_MATCH_CAPTURE_CHANNEL_0).
+ */
+ TCC_MATCH_CAPTURE_CHANNEL_n = n,
+# else
+ /** Indexes of match capture channels, e.g., TCC_MATCH_CAPTURE_CHANNEL_0 */
+ _TCC_CHANNEL_ENUM_LIST(MATCH_CAPTURE)
+# endif
+# if !defined(__DOXYGEN__)
+ /** Number of supported channels */
+ TCC_MATCH_CAPTURE_CHANNEL_N
+# endif
+};
+
+/**
+ * \brief Index of the wave outputs
+ *
+ * This enum is used to specify which wave output to do
+ * operations on.
+ */
+enum tcc_wave_output {
+# if defined(__DOXYGEN__)
+ /** Waveform output index table for TCC
+ *
+ * Each TCC module may contain several wave outputs; each output
+ * will have its own index in the table, with the index number substituted
+ * for "n" in the index name (e.g. \c TCC_WAVE_OUTPUT_0).
+ */
+ TCC_WAVE_OUTPUT_n = n,
+# else
+ /** Indexes of match capture channels, e.g., TCC_WAVEFORM_OUTPUT_0 */
+ _TCC_WO_ENUM_LIST(WAVE_OUTPUT)
+# endif
+# if !defined(__DOXYGEN__)
+ /** Number of supported channels */
+ TCC_WAVE_OUTPUT_N
+# endif
+};
+
+/**
+ * \brief TCC wave generation mode enum
+ *
+ * This enum is used to specify the waveform generation mode.
+ *
+ */
+enum tcc_wave_generation {
+ /** Normal Frequency: Top is the PER register, output toggled on each
+ * compare match */
+ TCC_WAVE_GENERATION_NORMAL_FREQ = 0,
+ /** Match Frequency: Top is CC0 register, output toggles on each update
+ * condition */
+ TCC_WAVE_GENERATION_MATCH_FREQ = 1,
+ /** Single-Slope PWM: Top is the PER register, CCx controls duty cycle
+ * (output active when count is greater than CCx) */
+ TCC_WAVE_GENERATION_SINGLE_SLOPE_PWM = 2,
+
+ /** Double-slope (count up and down), non centre-aligned: Top is the PER
+ * register, CC[x] controls duty cycle while counting up and CC[x+N/2]
+ * controls it while counting down */
+ TCC_WAVE_GENERATION_DOUBLE_SLOPE_CRITICAL = 4,
+ /** Double-slope (count up and down), interrupt/event at Bottom (Top is the
+ * PER register, output active when count is greater than CCx) */
+ TCC_WAVE_GENERATION_DOUBLE_SLOPE_BOTTOM = 5,
+ /** Double-slope (count up and down), interrupt/event at Bottom and Top: (Top is the
+ * PER register, output active when count is lower than CCx) */
+ TCC_WAVE_GENERATION_DOUBLE_SLOPE_BOTH = 6,
+ /** Double-slope (count up and down), interrupt/event at Top (Top is the
+ * PER register, output active when count is greater than CCx) */
+ TCC_WAVE_GENERATION_DOUBLE_SLOPE_TOP = 7,
+};
+
+/**
+ * \brief Polarity of TCC wave generation on channels
+ *
+ * Specifies whether the wave output needs to be inverted or not.
+ */
+enum tcc_wave_polarity {
+ /** Wave output is not inverted */
+ TCC_WAVE_POLARITY_0,
+ /** Wave output is inverted */
+ TCC_WAVE_POLARITY_1
+};
+
+/**
+ * \brief TCC pattern generator for outputs
+ *
+ * Used when disabling output pattern or when selecting a specific pattern.
+ */
+enum tcc_output_pattern {
+ /** SWAP output pattern is not used */
+ TCC_OUTPUT_PATTERN_DISABLE,
+ /** Pattern 0 is applied to SWAP output */
+ TCC_OUTPUT_PATTERN_0,
+ /** Pattern 1 is applied to SWAP output */
+ TCC_OUTPUT_PATTERN_1
+};
+
+/**
+ * \brief Ramp Operations which are supported in single-slope PWM generation
+ *
+ * Ramp operations which are supported in single-slope PWM generation.
+ */
+enum tcc_ramp {
+ /** Default timer/counter PWM operation */
+ TCC_RAMP_RAMP1 = 0,
+
+ /** Uses a single channel (CC0) to control both CC0/CC1 compare outputs.
+ * In cycle A, the channel 0 output is disabled, and
+ * in cycle B, the channel 1 output is disabled. */
+ TCC_RAMP_RAMP2A,
+
+ /** Uses channels CC0 and CC1 to control compare outputs.
+ * In cycle A, the channel 0 output is disabled, and
+ * in cycle B, the channel 1 output is disabled.*/
+ TCC_RAMP_RAMP2
+};
+
+/**
+ * \brief Ramp Index for TCC wave generation
+ *
+ * In ramp operation, each two period cycles are marked as cycle A and B,
+ * the index 0 represents cycle A and 1 represents cycle B.
+ */
+enum tcc_ramp_index {
+ /** Default, cycle index toggles. */
+ TCC_RAMP_INDEX_DEFAULT,
+ /** Force next cycle to be cycle B (set to 1) */
+ TCC_RAMP_INDEX_FORCE_B,
+ /** Force next cycle to be cycle A (clear to 0) */
+ TCC_RAMP_INDEX_FORCE_A,
+ /** Force next cycle keeping the same as current */
+ TCC_RAMP_INDEX_FORCE_KEEP
+};
+
+/**
+ * \brief TCC output inversion
+ *
+ * Used when enabling or disabling output inversion.
+ */
+enum tcc_output_invertion {
+ /** Output inversion not to be enabled */
+ TCC_OUTPUT_INVERTION_DISABLE,
+ /** Invert the output from WO[x] */
+ TCC_OUTPUT_INVERTION_ENABLE
+};
+
+/**
+ * \brief TCC Counter reload action enum
+ *
+ * This enum specify how the counter is reloaded and whether the prescaler
+ * should be restarted.
+ */
+enum tcc_reload_action {
+ /** The counter is reloaded/reset on the next GCLK and starts
+ * counting on the prescaler clock
+ */
+ TCC_RELOAD_ACTION_GCLK,
+ /** The counter is reloaded/reset on the next prescaler clock
+ */
+ TCC_RELOAD_ACTION_PRESC,
+ /** The counter is reloaded/reset on the next GCLK, and the
+ * prescaler is restarted as well
+ */
+ TCC_RELOAD_ACTION_RESYNC
+};
+
+
+/**
+ * \brief TCC clock prescaler values
+ *
+ * This enum is used to choose the clock prescaler
+ * configuration. The prescaler divides the clock frequency of the TCC
+ * module to operate TCC at a slower clock rate.
+ */
+enum tcc_clock_prescaler {
+ /** Divide clock by 1 */
+ TCC_CLOCK_PRESCALER_DIV1,
+ /** Divide clock by 2 */
+ TCC_CLOCK_PRESCALER_DIV2,
+ /** Divide clock by 4 */
+ TCC_CLOCK_PRESCALER_DIV4,
+ /** Divide clock by 8 */
+ TCC_CLOCK_PRESCALER_DIV8,
+ /** Divide clock by 16 */
+ TCC_CLOCK_PRESCALER_DIV16,
+ /** Divide clock by 64 */
+ TCC_CLOCK_PRESCALER_DIV64,
+ /** Divide clock by 256 */
+ TCC_CLOCK_PRESCALER_DIV256,
+ /** Divide clock by 1024 */
+ TCC_CLOCK_PRESCALER_DIV1024
+};
+
+/**
+ * \brief TCC module count direction
+ *
+ * Used when selecting the Timer/Counter count direction.
+ */
+enum tcc_count_direction {
+ /** Timer should count upward */
+ TCC_COUNT_DIRECTION_UP,
+ /** Timer should count downward */
+ TCC_COUNT_DIRECTION_DOWN,
+};
+
+#ifdef FEATURE_TCC_GENERATE_DMA_TRIGGER
+/**
+ * \brief TCC module counter overflow DMA request mode
+ *
+ * Used when selecting the Timer/Counter overflow DMA request mode.
+ */
+enum tcc_count_overflow_dma_trigger_mode {
+ /** TCC generates a DMA request on each cycle when an update condition
+ * is detected
+ */
+ TCC_COUNT_OVERFLOW_DMA_TRIGGER_MODE_CONTINUE,
+ /** When an update condition is detected, the TCC generates a DMA trigger
+ * on the cycle following the DMA One-Shot Command written to the Control
+ * B register
+ */
+ TCC_COUNT_OVERFLOW_DMA_TRIGGER_MODE_ONE_SHOT,
+};
+#endif
+
+/**
+ * \brief Action to perform when the TCC module is triggered by events
+ *
+ * Event action to perform when the module is triggered by events.
+ */
+enum tcc_event_action {
+ /** No event action */
+ TCC_EVENT_ACTION_OFF,
+ /** Stop counting, the counter will maintain its current value, waveforms
+ * are set to a defined Non-Recoverable State output
+ * (\ref tcc_non_recoverable_state_output). */
+ TCC_EVENT_ACTION_STOP,
+ /** Re-trigger counter on event, may generate an event if the re-trigger
+ * event output is enabled.
+ * \note When re-trigger event action is enabled, enabling the counter
+ * will not start until the next incoming event appears. */
+ TCC_EVENT_ACTION_RETRIGGER,
+
+ /** Start counter when previously stopped.
+ * Start counting on the event rising edge. Further events will not
+ * restart the counter;
+ * the counter keeps on counting using prescaled GCLK_TCCx, until it
+ * reaches TOP or Zero
+ * depending on the direction. */
+ TCC_EVENT_ACTION_START,
+ /** Count events; i.e. Increment or decrement depending on count
+ * direction. */
+ TCC_EVENT_ACTION_COUNT_EVENT,
+ /** The event source must be an asynchronous event, input value will
+ * overrides the direction settings (input low: counting up, input high:
+ * counting down). */
+ TCC_EVENT_ACTION_DIR_CONTROL,
+ /** Increment the counter on event, irrespective of count direction */
+ TCC_EVENT_ACTION_INCREMENT,
+ /** Decrement the counter on event, irrespective of count direction */
+ TCC_EVENT_ACTION_DECREMENT,
+ /** Count during active state of asynchronous event. In this case,
+ * depending on the count direction, the count will be incremented
+ * or decremented on each prescaled GCLK_TCCx, as long as the input
+ * event remains active. */
+ TCC_EVENT_ACTION_COUNT_DURING_ACTIVE,
+
+ /** Store period in capture register 0, pulse width in capture
+ * register 1
+ */
+ TCC_EVENT_ACTION_PERIOD_PULSE_WIDTH_CAPTURE,
+ /** Store pulse width in capture register 0, period in capture
+ * register 1
+ */
+ TCC_EVENT_ACTION_PULSE_WIDTH_PERIOD_CAPTURE,
+
+ /** Generate Non-Recoverable Fault on event */
+ TCC_EVENT_ACTION_NON_RECOVERABLE_FAULT,
+};
+
+
+/**
+ * \brief Action to be performed when the TCC module is triggered by event0
+ *
+ * Event action to perform when the module is triggered by event0.
+ */
+enum tcc_event0_action {
+ /** No event action */
+ TCC_EVENT0_ACTION_OFF = TCC_EVENT_ACTION_OFF,
+ /** Re-trigger Counter on event */
+ TCC_EVENT0_ACTION_RETRIGGER = TCC_EVENT_ACTION_RETRIGGER,
+ /** Count events (increment or decrement, depending on count direction)
+ */
+ TCC_EVENT0_ACTION_COUNT_EVENT = TCC_EVENT_ACTION_COUNT_EVENT,
+ /** Start counter on event */
+ TCC_EVENT0_ACTION_START = TCC_EVENT_ACTION_START,
+ /** Increment counter on event */
+ TCC_EVENT0_ACTION_INCREMENT = TCC_EVENT_ACTION_INCREMENT,
+ /** Count during active state of asynchronous event */
+ TCC_EVENT0_ACTION_COUNT_DURING_ACTIVE = TCC_EVENT_ACTION_COUNT_DURING_ACTIVE,
+
+ /** Generate Non-Recoverable Fault on event */
+ TCC_EVENT0_ACTION_NON_RECOVERABLE_FAULT = TCC_EVENT_ACTION_NON_RECOVERABLE_FAULT
+};
+
+/**
+ * \brief Action to perform when the TCC module is triggered by event1
+ *
+ * Event action to perform when the module is triggered by event1.
+ */
+enum tcc_event1_action {
+ /** No event action */
+ TCC_EVENT1_ACTION_OFF = TCC_EVENT_ACTION_OFF,
+ /** Re-trigger Counter on event */
+ TCC_EVENT1_ACTION_RETRIGGER = TCC_EVENT_ACTION_RETRIGGER,
+ /** The event source must be an asynchronous event, and the input value
+ * will override the direction settings.
+ * If TCEINVx is 0 and input event is LOW: counter will count up.
+ * If TCEINVx is 0 and input event is HIGH: counter will count down.
+ */
+ TCC_EVENT1_ACTION_DIR_CONTROL = TCC_EVENT_ACTION_DIR_CONTROL,
+ /** Stop counter on event */
+ TCC_EVENT1_ACTION_STOP = TCC_EVENT_ACTION_STOP,
+ /** Decrement on event */
+ TCC_EVENT1_ACTION_DECREMENT = TCC_EVENT_ACTION_DECREMENT,
+
+ /** Store period in capture register 0, pulse width in capture
+ * register 1
+ */
+ TCC_EVENT1_ACTION_PERIOD_PULSE_WIDTH_CAPTURE = TCC_EVENT_ACTION_PERIOD_PULSE_WIDTH_CAPTURE,
+ /** Store pulse width in capture register 0, period in capture
+ * register 1
+ */
+ TCC_EVENT1_ACTION_PULSE_WIDTH_PERIOD_CAPTURE = TCC_EVENT_ACTION_PULSE_WIDTH_PERIOD_CAPTURE,
+
+ /** Generate Non-Recoverable Fault on event */
+ TCC_EVENT1_ACTION_NON_RECOVERABLE_FAULT = TCC_EVENT_ACTION_NON_RECOVERABLE_FAULT
+};
+
+/**
+ * \brief On which part of the counter cycle the counter event output is generated
+ *
+ * This enum is used to define the point at which the counter event is generated.
+ */
+enum tcc_event_generation_selection {
+ /** Counter Event is generated when a new counter cycle starts */
+ TCC_EVENT_GENERATION_SELECTION_START,
+ /** Counter Event is generated when a counter cycle ends */
+ TCC_EVENT_GENERATION_SELECTION_END,
+ /** Counter Event is generated when a counter cycle ends, except for the
+ * first and last cycles */
+ TCC_EVENT_GENERATION_SELECTION_BETWEEN,
+ /** Counter Event is generated when a new counter cycle starts or ends */
+ TCC_EVENT_GENERATION_SELECTION_BOUNDARY
+};
+
+/**
+ * \brief TCC channel operation modes
+ *
+ * To set a timer channel either in compare or in capture mode.
+ */
+enum tcc_channel_function {
+ /** TCC channel performs compare operation */
+ TCC_CHANNEL_FUNCTION_COMPARE,
+ /** TCC channel performs capture operation */
+ TCC_CHANNEL_FUNCTION_CAPTURE
+};
+
+/**
+ * \brief TCC (recoverable) fault Halt action
+ */
+enum tcc_fault_halt_action {
+ /** Halt action disabled. */
+ TCC_FAULT_HALT_ACTION_DISABLE,
+ /** Hardware halt action, counter is halted until restart */
+ TCC_FAULT_HALT_ACTION_HW_HALT,
+ /** Software halt action, counter is halted until fault bit cleared */
+ TCC_FAULT_HALT_ACTION_SW_HALT,
+ /** Non-Recoverable fault, force output to pre-defined level */
+ TCC_FAULT_HALT_ACTION_NON_RECOVERABLE
+};
+
+/**
+ * \brief TCC (recoverable) fault Capture action
+ */
+enum tcc_fault_capture_action {
+ /** Capture disabled */
+ TCC_FAULT_CAPTURE_DISABLE,
+ /** Capture on Fault, each value is captured */
+ TCC_FAULT_CAPTURE_EACH,
+ /** Capture the minimum detection, but notify on smaller ones */
+ TCC_FAULT_CAPTURE_MINIMUM,
+ /** Capture the maximum detection, but notify on bigger ones */
+ TCC_FAULT_CAPTURE_MAXIMUM,
+ /** Capture if the value is smaller than last, notify event or interrupt
+ * if previous stamp is confirmed to be "local minimum" (not bigger than
+ * current stamp). */
+ TCC_FAULT_CAPTURE_SMALLER,
+ /** Capture if the value is bigger than last, notify event or interrupt
+ * if previous stamp is confirmed to be "local maximum" (not smaller than
+ * current stamp). */
+ TCC_FAULT_CAPTURE_BIGGER,
+ /** Capture if the time stamps changes its increment direction */
+ TCC_FAULT_CAPTURE_CHANGE
+};
+
+/**
+ * \brief Capture Channel triggered by TCC (recoverable) fault
+ */
+enum tcc_fault_capture_channel {
+ /** Recoverable fault triggers channel 0 capture operation */
+ TCC_FAULT_CAPTURE_CHANNEL_0,
+ /** Recoverable fault triggers channel 1 capture operation */
+ TCC_FAULT_CAPTURE_CHANNEL_1,
+ /** Recoverable fault triggers channel 2 capture operation */
+ TCC_FAULT_CAPTURE_CHANNEL_2,
+ /** Recoverable fault triggers channel 3 capture operation */
+ TCC_FAULT_CAPTURE_CHANNEL_3
+};
+
+/**
+ * \brief TCC (recoverable) fault Input Source
+ */
+enum tcc_fault_source {
+ /** Fault input is disabled */
+ TCC_FAULT_SOURCE_DISABLE,
+ /** Match Capture Event x (x=0,1) input */
+ TCC_FAULT_SOURCE_ENABLE,
+ /** Inverted MCEx (x=0,1) event input */
+ TCC_FAULT_SOURCE_INVERT,
+ /** Alternate fault (A or B) state at the end of the previous period */
+ TCC_FAULT_SOURCE_ALTFAULT
+};
+
+/**
+ * \brief TCC (recoverable) fault Input Blanking Start Point
+ */
+enum tcc_fault_blanking {
+ /** No blanking */
+ TCC_FAULT_BLANKING_DISABLE,
+ /** Blanking applied from rising edge of the output waveform */
+ TCC_FAULT_BLANKING_RISING_EDGE,
+ /** Blanking applied from falling edge of the output waveform */
+ TCC_FAULT_BLANKING_FALLING_EDGE,
+ /** Blanking applied from each toggle of the output waveform */
+ TCC_FAULT_BLANKING_BOTH_EDGE
+};
+
+/**
+ * \brief TCC (recoverable) fault Input Qualification Action
+ */
+enum tcc_fault_qualification {
+ /** The input is not disabled on compare condition */
+ TCC_FAULT_QUALIFICATION_DISABLE,
+ /** The input is disabled when match output signal is at inactive level */
+ TCC_FAULT_QUALIFICATION_BY_OUTPUT
+};
+
+/**
+ * \brief TCC (recoverable) fault Output Keep Action
+ */
+enum tcc_fault_keep {
+ /** Disable keeping, wave output released as soon as fault is released */
+ TCC_FAULT_KEEP_DISABLE,
+ /** Keep wave output until end of TCC cycle */
+ TCC_FAULT_KEEP_TILL_END
+};
+
+/**
+ * \brief TCC Non-recoverable State Outupt
+ */
+enum tcc_fault_state_output {
+ /** Non-recoverable fault output is tri-stated */
+ TCC_FAULT_STATE_OUTPUT_OFF,
+ /** Non-recoverable fault force output 0 */
+ TCC_FAULT_STATE_OUTPUT_0,
+ /** Non-recoverable fault force output 1 */
+ TCC_FAULT_STATE_OUTPUT_1
+};
+
+/**
+ * \brief TCC (recoverable) fault Restart Action
+ */
+enum tcc_fault_restart {
+ /** Restart Action disabled */
+ TCC_FAULT_RESTART_DISABLE,
+ /** Restart Action enabled */
+ TCC_FAULT_RESTART_ENABLE
+};
+
+/**
+ * \brief Configuration struct for TCC module recoverable fault
+ */
+struct tcc_recoverable_fault_config {
+ /** Fault filter value applied on MCEx event input line (0x0 ~ 0xF).
+ * Must be 0 when MCEx event is used as synchronous event.
+ * Apply to both recoverable and non-recoverable fault. */
+ uint8_t filter_value;
+ /** Fault blanking value (0 ~ 255), disable input source for several TCC
+ * clocks after the detection of the waveform edge */
+ uint8_t blanking_cycles;
+
+ /** Set to \c true to enable restart action */
+ bool restart;
+ /** Set to \c true to enable keep action (keep until end of TCC cycle) */
+ bool keep;
+
+ /** Set to \c true to enable input qualification
+ * (disable input when output is inactive) */
+ bool qualification;
+
+ /** Specifies if the event input generates recoverable Fault.
+ * The event system channel connected to MCEx event input must be
+ * configured as asynchronous.
+ */
+ enum tcc_fault_source source;
+ /** Fault Blanking Start Point for recoverable Fault */
+ enum tcc_fault_blanking blanking;
+
+ /** Halt action for recoverable Fault */
+ enum tcc_fault_halt_action halt_action;
+ /** Capture action for recoverable Fault */
+ enum tcc_fault_capture_action capture_action;
+ /** Channel triggered by recoverable Fault */
+ enum tcc_fault_capture_channel capture_channel;
+};
+
+/**
+ * \brief Configuration struct for TCC module non-recoverable fault
+ */
+struct tcc_non_recoverable_fault_config {
+ /** Fault filter value applied on TCEx event input line (0x0 ~ 0xF).
+ * Must be 0 when TCEx event is used as synchronous event. */
+ uint8_t filter_value;
+ /** Output */
+ enum tcc_fault_state_output output;
+};
+
+/**
+ * \brief TCC input event enable/disable/configure structure
+ *
+ * For configuring an input event.
+ */
+struct tcc_input_event_config {
+ /** Event action on incoming event */
+ enum tcc_event_action action;
+ /** Modify event action */
+ bool modify_action;
+ /** Invert incoming event input line */
+ bool invert;
+};
+
+/**
+ * \brief TCC output event enable/disable/configure structure
+ *
+ * Structure used for configuring an output event.
+ */
+struct tcc_output_event_config {
+ /** It decides which part of the counter cycle the counter event output
+ * is generated */
+ enum tcc_event_generation_selection generation_selection;
+ /** A switch to allow enable/disable of events, without modifying the
+ * event output configuration
+ */
+ bool modify_generation_selection;
+};
+
+/**
+ * \brief TCC event enable/disable structure
+ *
+ * Event flags for the \ref tcc_enable_events() and \ref tcc_disable_events().
+ */
+struct tcc_events {
+ /** Input events configuration */
+ struct tcc_input_event_config input_config[2];
+ /** Output event configuration */
+ struct tcc_output_event_config output_config;
+
+ /** Perform the configured event action when an incoming event is
+ * signalled */
+ bool on_input_event_perform_action[2];
+
+ /** Perform the configured event action when an incoming channel event is
+ * signalled */
+ bool on_event_perform_channel_action[TCC_NUM_CHANNELS];
+ /** Generate an output event on a channel capture/match.
+ * Specify which channels will generate events */
+ bool generate_event_on_channel[TCC_NUM_CHANNELS];
+
+ /** Generate an output event on counter overflow/underflow */
+ bool generate_event_on_counter_overflow;
+ /** Generate an output event on counter retrigger */
+ bool generate_event_on_counter_retrigger;
+ /** Generate an output event on counter boundary.
+ * See \ref tcc_event_output_action. */
+ bool generate_event_on_counter_event;
+};
+
+/**
+ * \brief Configuration struct for the TCC module base counter
+ *
+ * Structure for configuring a TCC as a counter.
+ */
+struct tcc_counter_config {
+ /** Value to initialize the count register */
+ uint32_t count;
+ /** Period/top and period/top buffer values for counter */
+ uint32_t period;
+
+ /** When \c true, the counter will be stopped on the next hardware or
+ * software re-trigger event or overflow/underflow
+ */
+ bool oneshot;
+
+#ifdef FEATURE_TCC_GENERATE_DMA_TRIGGER
+ /** Counter overflow trigger a DMA request mode */
+ enum tcc_count_overflow_dma_trigger_mode dma_trigger_mode;
+#endif
+
+ /** Specifies the direction for the TCC to count */
+ enum tcc_count_direction direction;
+
+ /** GCLK generator used to clock the peripheral */
+ enum gclk_generator clock_source;
+ /** Specifies the prescaler value for GCLK_TCC */
+ enum tcc_clock_prescaler clock_prescaler;
+ /** Specifies the reload or reset time of the counter and prescaler
+ * resynchronization on a re-trigger event for the TCC
+ */
+ enum tcc_reload_action reload_action;
+};
+
+/**
+ * \brief Configuration struct for the TCC module capture
+ *
+ * Structure used when configuring TCC channels in capture mode.
+ */
+struct tcc_capture_config {
+ /** Channel functions selection (capture/match) */
+ enum tcc_channel_function channel_function[TCC_NUM_CHANNELS];
+};
+
+/**
+ * \brief Configuration struct for the TCC module match/wave generation
+ *
+ * The structure, which helps to configure a TCC channel for compare
+ * operation and wave generation.
+ */
+struct tcc_match_wave_config {
+ /** Channel functions selection (capture/match) */
+ enum tcc_channel_function channel_function[TCC_NUM_CHANNELS];
+
+ /** Specifies polarity for match output waveform generation */
+ enum tcc_wave_polarity wave_polarity[TCC_NUM_CHANNELS];
+ /** Specifies which waveform generation mode to use */
+ enum tcc_wave_generation wave_generation;
+ /** Specifies Ramp mode for waveform generation */
+ enum tcc_ramp wave_ramp;
+
+ /** Value to be used for compare match on each channel */
+ uint32_t match[TCC_NUM_CHANNELS];
+};
+
+/**
+ * \brief Configuration struct for the TCC module waveform extension
+ *
+ * This structure is used to specify the waveform extension features for TCC.
+ */
+struct tcc_wave_extension_config {
+ /** Configuration for recoverable faults */
+ struct tcc_recoverable_fault_config
+ recoverable_fault[TCC_NUM_FAULTS];
+ /** Configuration for non-recoverable faults */
+ struct tcc_non_recoverable_fault_config
+ non_recoverable_fault[TCC_NUM_WAVE_OUTPUTS];
+
+ /** Invert waveform final outputs lines */
+ bool invert[TCC_NUM_WAVE_OUTPUTS];
+};
+
+/**
+ * \brief Configuration struct for the TCC module output pins
+ *
+ * Structure which is used when taking wave output from TCC.
+ */
+struct tcc_pins_config {
+ /** Specifies pin output for each channel */
+ uint32_t wave_out_pin[TCC_NUM_WAVE_OUTPUTS];
+ /** Specifies MUX setting for each output channel pin */
+ uint32_t wave_out_pin_mux[TCC_NUM_WAVE_OUTPUTS];
+ /** When \c true, PWM output pin for the given channel is enabled */
+ bool enable_wave_out_pin[TCC_NUM_WAVE_OUTPUTS];
+};
+
+/**
+ * \brief TCC configuration structure
+ *
+ * Configuration struct for a TCC instance. This structure should be
+ * initialized by the \ref tcc_get_config_defaults function before being
+ * modified by the user application.
+ */
+struct tcc_config {
+ /** Structure for configuring TCC base timer/counter */
+ struct tcc_counter_config counter;
+ /** TCC match/capture configurations */
+ union {
+ /** Helps to configure a TCC channel in capture mode */
+ struct tcc_capture_config capture;
+ /** For configuring a TCC channel in compare mode */
+ struct tcc_match_wave_config compare;
+ /** Serves the same purpose as compare. Used as an alias for
+ * compare,
+ * when a TCC channel is configured for wave generation */
+ struct tcc_match_wave_config wave;
+ };
+
+ /** Structure for configuring TCC waveform extension */
+ struct tcc_wave_extension_config wave_ext;
+
+ /** Structure for configuring TCC output pins */
+ struct tcc_pins_config pins;
+
+ /** Set to \c true to enable double buffering write. When enabled any write
+ * through \ref tcc_set_top_value(), \ref tcc_set_compare_value() and
+ * \ref tcc_set_pattern() will direct to the buffer register as buffered
+ * value, and the buffered value will be committed to effective register
+ * on UPDATE condition, if update is not locked.
+ *
+ * \note The init values in \ref tcc_config for \ref tcc_init are always
+ * filled to effective registers, no matter if double buffering is
+ * enabled or not.
+ */
+ bool double_buffering_enabled;
+
+ /** When \c true the module is enabled during standby */
+ bool run_in_standby;
+};
+
+#if TCC_ASYNC == true
+/* Forward Declaration for the device instance. */
+struct tcc_module;
+
+/** Type definition for the TCC callback function. */
+typedef void (*tcc_callback_t)(struct tcc_module *const module);
+#endif
+
+/**
+ * \brief TCC software device instance structure
+ *
+ * TCC software instance structure, used to retain software state information
+ * of an associated hardware module instance.
+ *
+ * \note The fields of this structure should not be altered by the user
+ * application; they are reserved only for module-internal use.
+ */
+struct tcc_module {
+ /** Hardware module pointer of the associated Timer/Counter peripheral. */
+ Tcc *hw;
+
+# if TCC_ASYNC == true
+ /** Array of callbacks */
+ tcc_callback_t callback[TCC_CALLBACK_N];
+ /** Bit mask for callbacks registered */
+ uint32_t register_callback_mask;
+ /** Bit mask for callbacks enabled */
+ uint32_t enable_callback_mask;
+# endif
+
+ /** Set to \c true to write to buffered registers */
+ bool double_buffering_enabled;
+};
+
+#if !defined(__DOXYGEN__)
+uint8_t _tcc_get_inst_index(
+ Tcc *const hw);
+#endif
+
+/**
+ * \name Driver Initialization and Configuration
+ * @{
+ */
+
+/**
+ * \brief Determines if the hardware module is currently synchronizing to the bus
+ *
+ * Checks to see if the underlying hardware peripheral module is currently
+ * synchronizing across multiple clock domains to the hardware bus. This
+ * function can be used to delay further operations on a module until such time
+ * that it is ready, to prevent blocking delays for synchronization in the
+ * user application.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ *
+ * \return Synchronization status of the underlying hardware module.
+ *
+ * \retval false If the module has completed synchronization
+ * \retval true If the module synchronization is ongoing
+ */
+static inline bool tcc_is_syncing(
+ const struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ return (module_inst->hw->SYNCBUSY.reg > 0);
+}
+
+
+void tcc_get_config_defaults(
+ struct tcc_config *const config,
+ Tcc *const hw);
+
+enum status_code tcc_init(
+ struct tcc_module *const module_inst,
+ Tcc *const hw,
+ const struct tcc_config *const config);
+
+/** @} */
+
+/**
+ * \name Event Management
+ * @{
+ */
+
+enum status_code tcc_enable_events(
+ struct tcc_module *const module_inst,
+ struct tcc_events *const events);
+
+void tcc_disable_events(
+ struct tcc_module *const module_inst,
+ struct tcc_events *const events);
+
+/** @} */
+
+/**
+ * \name Enable/Disable/Reset
+ * @{
+ */
+
+/**
+ * \brief Enable the TCC module
+ *
+ * Enables a TCC module that has been previously initialized. The counter will
+ * start when the counter is enabled.
+ *
+ * \note When the counter is configured to re-trigger on an event, the counter
+ * will not start until the next incoming event appears. Then it
+ * restarts on any following event.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ */
+static inline void tcc_enable(
+ const struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+
+ while (tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_ENABLE) {
+ /* Wait for sync */
+ }
+
+ /* Enable the TCC module */
+ tcc_module->CTRLA.reg |= TCC_CTRLA_ENABLE;
+}
+
+/**
+ * \brief Disables the TCC module
+ *
+ * Disables a TCC module and stops the counter.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ */
+static inline void tcc_disable(
+ const struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+
+ while (tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_ENABLE) {
+ /* Wait for sync */
+ }
+
+ /* Disbale interrupt */
+ tcc_module->INTENCLR.reg = TCC_INTENCLR_MASK;
+ /* Clear interrupt flag */
+ tcc_module->INTFLAG.reg = TCC_INTFLAG_MASK;
+
+ /* Disable the TCC module */
+ tcc_module->CTRLA.reg &= ~TC_CTRLA_ENABLE;
+}
+
+/**
+ * \brief Resets the TCC module
+ *
+ * Resets the TCC module, restoring all hardware module registers to their
+ * default values and disabling the module. The TCC module will not be
+ * accessible while the reset is being performed.
+ *
+ * \note When resetting a 32-bit counter only the master TCC module's instance
+ * structure should be passed to the function.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ *
+ */
+static inline void tcc_reset(
+ const struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+
+ /* Disable this module if it is running */
+ if (tcc_module->CTRLA.reg & TCC_CTRLA_ENABLE) {
+ tcc_disable(module_inst);
+ while (tcc_is_syncing(module_inst)) {
+ /* wait while module is disabling */
+ }
+ }
+
+ /* Reset this TC module */
+ tcc_module->CTRLA.reg |= TCC_CTRLA_SWRST;
+}
+
+/** @} */
+
+
+/**
+ * \name Set/Toggle Count Direction
+ * @{
+ */
+
+/**
+ * \brief Sets the TCC module count direction
+ *
+ * Sets the count direction of an initialized TCC module. The
+ * specified TCC module can remain running or stopped.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] dir New timer count direction to set
+ */
+static inline void tcc_set_count_direction(
+ const struct tcc_module *const module_inst,
+ enum tcc_count_direction dir)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+
+ while (tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_CTRLB) {
+ /* Wait for sync */
+ }
+
+ /* Set count direction */
+ if (TCC_COUNT_DIRECTION_DOWN == dir) {
+ tcc_module->CTRLBSET.reg = TCC_CTRLBSET_DIR;
+ return;
+ }
+ tcc_module->CTRLBCLR.reg = TCC_CTRLBCLR_DIR;
+}
+
+/**
+ * \brief Toggles the TCC module count direction
+ *
+ * Toggles the count direction of an initialized TCC module. The
+ * specified TCC module can remain running or stopped.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ */
+static inline void tcc_toggle_count_direction(
+ const struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+
+ while (tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_CTRLB) {
+ /* Wait for sync */
+ }
+ bool dir_value_1 = tcc_module->CTRLBSET.bit.DIR;
+ if (dir_value_1) {
+ tcc_module->CTRLBCLR.reg = TCC_CTRLBCLR_DIR;
+ } else {
+ tcc_module->CTRLBSET.reg = TCC_CTRLBSET_DIR;
+ }
+}
+
+/** @} */
+
+/**
+ * \name Get/Set Count Value
+ * @{
+ */
+
+uint32_t tcc_get_count_value(
+ const struct tcc_module *const module_inst);
+
+enum status_code tcc_set_count_value(
+ const struct tcc_module *const module_inst,
+ const uint32_t count);
+
+/** @} */
+
+/**
+ * \name Stop/Restart Counter
+ * @{
+ */
+
+/**
+ * \brief Stops the counter
+ *
+ * This function will stop the counter. When the counter is stopped
+ * the value in the count register is set to 0 if the counter was
+ * counting up, or maximum or the top value if the counter was counting
+ * down.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ */
+static inline void tcc_stop_counter(
+ const struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+ uint32_t last_cmd;
+
+ /* Wait until last command is done */
+ do {
+ while (tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_CTRLB) {
+ /* Wait for sync */
+ }
+ last_cmd = tcc_module->CTRLBSET.reg & TCC_CTRLBSET_CMD_Msk;
+ if (last_cmd == TCC_CTRLBSET_CMD_NONE) {
+ break;
+ } else if (last_cmd == TCC_CTRLBSET_CMD_STOP) {
+ /* Command have been issued */
+ return;
+ } else if (last_cmd == TCC_CTRLBSET_CMD_RETRIGGER) {
+ /* Cancel RETRIGGER command and issue STOP */
+ tcc_module->CTRLBCLR.reg = TCC_CTRLBCLR_CMD_Msk;
+ }
+ } while (1);
+
+ /* Write command to execute */
+ tcc_module->CTRLBSET.reg = TCC_CTRLBSET_CMD_STOP;
+}
+
+/**
+ * \brief Starts the counter from beginning
+ *
+ * Restarts an initialized TCC module's counter.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ */
+static inline void tcc_restart_counter(
+ const struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+ uint32_t last_cmd;
+
+ /* Wait until last command is done */
+ do {
+ while (tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_CTRLB) {
+ /* Wait for sync */
+ }
+ last_cmd = tcc_module->CTRLBSET.reg & TCC_CTRLBSET_CMD_Msk;
+ if (last_cmd == TCC_CTRLBSET_CMD_NONE) {
+ break;
+ } else if (last_cmd == TCC_CTRLBSET_CMD_RETRIGGER) {
+ /* Command have been issued */
+ return;
+ } else if (last_cmd == TCC_CTRLBSET_CMD_STOP) {
+ /* Cancel STOP command and issue RETRIGGER */
+ tcc_module->CTRLBCLR.reg = TCC_CTRLBCLR_CMD_Msk;
+ }
+ } while (1);
+
+ /* Write command to execute */
+ tcc_module->CTRLBSET.reg = TCC_CTRLBSET_CMD_RETRIGGER;
+}
+
+/** @} */
+
+#ifdef FEATURE_TCC_GENERATE_DMA_TRIGGER
+/**
+ * \name Generate TCC DMA Triggers Command
+ * @{
+ */
+
+/**
+ * \brief TCC DMA Trigger.
+ *
+ * TCC DMA trigger command.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ */
+static inline void tcc_dma_trigger_command(
+ const struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+
+ while (tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_CTRLB) {
+ /* Wait for sync */
+ }
+
+ /* Make certain that there are no conflicting commands in the register */
+ tcc_module->CTRLBCLR.reg = TCC_CTRLBCLR_CMD_NONE;
+
+ while (tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_CTRLB) {
+ /* Wait for sync */
+ }
+
+#if !(SAML21 || SAML22 || SAMR30)
+ /* Write command to execute */
+ tcc_module->CTRLBSET.reg = TCC_CTRLBSET_CMD_DMATRG;
+#endif
+
+#if (SAML21XXXB) || (SAML22) || (SAMR30)
+ /* Write command to execute */
+ tcc_module->CTRLBSET.reg = TCC_CTRLBSET_CMD_DMAOS;
+#endif
+}
+/** @} */
+#endif
+
+/**
+ * \name Get/Set Compare/Capture Register
+ * @{
+ */
+
+uint32_t tcc_get_capture_value(
+ const struct tcc_module *const module_inst,
+ const enum tcc_match_capture_channel channel_index);
+
+enum status_code tcc_set_compare_value(
+ const struct tcc_module *const module_inst,
+ const enum tcc_match_capture_channel channel_index,
+ const uint32_t compare);
+
+/** @} */
+
+/**
+ * \name Set Top Value
+ * @{
+ */
+
+enum status_code tcc_set_top_value(
+ const struct tcc_module *const module_inst,
+ const uint32_t top_value);
+
+/** @} */
+
+
+/**
+ * \name Set Output Pattern
+ * @{
+ */
+
+enum status_code tcc_set_pattern(
+ const struct tcc_module *const module_inst,
+ const uint32_t line_index,
+ const enum tcc_output_pattern pattern);
+
+/** @} */
+
+
+/**
+ * \name Set Ramp Index
+ * @{
+ */
+
+/**
+ * \brief Sets the TCC module ramp index on next cycle
+ *
+ * In RAMP2 and RAMP2A operation, we can force either cycle A or cycle B at
+ * the output, on the next clock cycle.
+ * When ramp index command is disabled, cycle A and cycle B will appear at
+ * the output, on alternate clock cycles.
+ * See \ref tcc_ramp.
+ *
+ * \param[in] module_inst Pointer to the software module instance struct
+ * \param[in] ramp_index Ramp index (\ref tcc_ramp_index) of the next cycle
+ */
+static inline void tcc_set_ramp_index(
+ const struct tcc_module *const module_inst,
+ const enum tcc_ramp_index ramp_index)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+ uint32_t last_cmd;
+
+ /* Wait until last command is done */
+ do {
+ while (tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_CTRLB) {
+ /* Wait for sync */
+ }
+ if (TCC_RAMP_INDEX_DEFAULT == ramp_index) {
+ /* Cancel pending command */
+ tcc_module->CTRLBCLR.reg = TCC_CTRLBSET_IDXCMD_HOLD;
+ return;
+ }
+ last_cmd = tcc_module->CTRLBSET.reg & TCC_CTRLBSET_IDXCMD_Msk;
+ if (last_cmd == TCC_CTRLBSET_IDXCMD_DISABLE) {
+ break;
+ } else if (last_cmd == TCC_CTRLBSET_IDXCMD(ramp_index)) {
+ /* Command have been issued */
+ return;
+ }
+ } while (1);
+
+ /* Write command to execute */
+ tcc_module->CTRLBSET.reg = TCC_CTRLBSET_IDXCMD(ramp_index);
+}
+
+/** @} */
+
+/**
+ * \name Status Management
+ * @{
+ */
+
+/**
+ * \brief Checks if the timer/counter is running
+ *
+ * \param[in] module_inst Pointer to the TCC software instance struct
+ *
+ * \return Status which indicates whether the module is running.
+ *
+ * \retval true The timer/counter is running
+ * \retval false The timer/counter is stopped
+ */
+static inline bool tcc_is_running(
+ struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ return !module_inst->hw->STATUS.bit.STOP;
+}
+
+uint32_t tcc_get_status(
+ struct tcc_module *const module_inst);
+
+void tcc_clear_status(
+ struct tcc_module *const module_inst,
+ const uint32_t status_flags);
+
+/** @} */
+
+/**
+ * \name Double Buffering Management
+ * @{
+ */
+
+/**
+ * \brief Enable TCC double buffering write
+ *
+ * When double buffering write is enabled, the following function will write
+ * values to buffered registers instead of effective ones (buffered):
+ * - PERB: through \ref tcc_set_top_value()
+ * - CCBx(x is 0~3): through \ref tcc_set_compare_value()
+ * - PATTB: through \ref tcc_set_pattern()
+ *
+ * Then, on UPDATE condition the buffered registers are committed to regular ones
+ * to take effect.
+ *
+ * \param[in] module_inst Pointer to the TCC software instance struct
+ */
+static inline void tcc_enable_double_buffering(
+ struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+
+ module_inst->double_buffering_enabled = true;
+}
+
+/**
+ * \brief Disable TCC double buffering Write
+ *
+ * When double buffering write is disabled, following function will write values
+ * to effective registers (not buffered):
+ * - PER: through \ref tcc_set_top_value()
+ * - CCx(x is 0~3): through \ref tcc_set_compare_value()
+ * - PATT: through \ref tcc_set_pattern()
+ *
+ * \note This function does not lock double buffer update, which means on next
+ * UPDATE condition the last written buffered values will be committed to
+ * take effect. Invoke \ref tcc_lock_double_buffer_update() before this
+ * function to disable double buffering update, if this change is not
+ * expected.
+ *
+ * \param[in] module_inst Pointer to the TCC software instance struct
+ */
+static inline void tcc_disable_double_buffering(
+ struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ module_inst->double_buffering_enabled = false;
+}
+
+/**
+ * \brief Lock the TCC double buffered registers updates
+ *
+ * Locks the double buffered registers so they will not be updated through
+ * their buffered values on UPDATE conditions.
+ *
+ * \param[in] module_inst Pointer to the TCC software instance struct
+ *
+ */
+static inline void tcc_lock_double_buffer_update(
+ struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ while (module_inst->hw->SYNCBUSY.reg & TCC_SYNCBUSY_CTRLB) {
+ /* Wait for sync */
+ }
+ module_inst->hw->CTRLBSET.reg = TCC_CTRLBSET_LUPD;
+}
+
+/**
+ * \brief Unlock the TCC double buffered registers updates
+ *
+ * Unlock the double buffered registers so they will be updated through
+ * their buffered values on UPDATE conditions.
+ *
+ * \param[in] module_inst Pointer to the TCC software instance struct
+ *
+ */
+static inline void tcc_unlock_double_buffer_update(
+ struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ while (module_inst->hw->SYNCBUSY.reg & TCC_SYNCBUSY_CTRLB) {
+ /* Wait for sync */
+ }
+ module_inst->hw->CTRLBCLR.reg = TCC_CTRLBCLR_LUPD;
+}
+
+/**
+ * \brief Force the TCC double buffered registers to update once
+ *
+ * \param[in] module_inst Pointer to the TCC software instance struct
+ *
+ */
+static inline void tcc_force_double_buffer_update(
+ struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ /* Get a pointer to the module's hardware instance */
+ Tcc *const tcc_module = module_inst->hw;
+ uint32_t last_cmd;
+
+ /* Wait until last command is done */
+ do {
+ while (tcc_module->SYNCBUSY.reg & TCC_SYNCBUSY_CTRLB) {
+ /* Wait for sync */
+ }
+ last_cmd = tcc_module->CTRLBSET.reg & TCC_CTRLBSET_CMD_Msk;
+ if (last_cmd == TCC_CTRLBSET_CMD_NONE) {
+ break;
+ } else if (last_cmd == TCC_CTRLBSET_CMD_UPDATE) {
+ /* Command have been issued */
+ return;
+ }
+ } while (1);
+
+ /* Write command to execute */
+ tcc_module->CTRLBSET.reg = TCC_CTRLBSET_CMD_UPDATE;
+}
+
+/**
+ * \brief Enable Circular option for double buffered Top/Period Values
+ *
+ * Enable circular option for the double buffered top/period values.
+ * On each UPDATE condition, the contents of PERB and PER are switched, meaning
+ * that the contents of PERB are transferred to PER and the contents of PER are
+ * transferred to PERB.
+ *
+ * \param[in] module_inst Pointer to the TCC software instance struct
+ */
+static inline void tcc_enable_circular_buffer_top(
+ struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ module_inst->hw->WAVE.reg |= TCC_WAVE_CIPEREN;
+}
+
+/**
+ * \brief Disable Circular option for double buffered Top/Period Values
+ *
+ * Stop circularing the double buffered top/period values.
+ *
+ * \param[in] module_inst Pointer to the TCC software instance struct
+ */
+static inline void tcc_disable_circular_buffer_top(
+ struct tcc_module *const module_inst)
+{
+ /* Sanity check arguments */
+ Assert(module_inst);
+ Assert(module_inst->hw);
+
+ module_inst->hw->WAVE.reg &= ~TCC_WAVE_CIPEREN;
+}
+
+enum status_code tcc_set_double_buffer_top_values(
+ const struct tcc_module *const module_inst,
+ const uint32_t top_value, const uint32_t top_buffer_value);
+
+
+enum status_code tcc_enable_circular_buffer_compare(
+ struct tcc_module *const module_inst,
+ enum tcc_match_capture_channel channel_index);
+enum status_code tcc_disable_circular_buffer_compare(
+ struct tcc_module *const module_inst,
+ enum tcc_match_capture_channel channel_index);
+enum status_code tcc_set_double_buffer_compare_values(
+ struct tcc_module *const module_inst,
+ enum tcc_match_capture_channel channel_index,
+ const uint32_t compare,
+ const uint32_t compare_buffer);
+
+
+/** @} */
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+/**
+ * \page asfdoc_sam0_tcc_extra Extra Information for TCC Driver
+ *
+ * \section asfdoc_sam0_tcc_extra_acronyms Acronyms
+ * The table below presents the acronyms used in this module:
+ *
+ * <table>
+ * <tr>
+ * <th>Acronym</th>
+ * <th>Description</th>
+ * </tr>
+ * <tr>
+ * <td>DMA</td>
+ * <td>Direct Memory Access</td>
+ * </tr>
+ * <tr>
+ * <td>TCC</td>
+ * <td>Timer Counter for Control Applications</td>
+ * </tr>
+ * <tr>
+ * <td>PWM</td>
+ * <td>Pulse Width Modulation</td>
+ * </tr>
+ * <tr>
+ * <td>PWP</td>
+ * <td>Pulse Width Period</td>
+ * </tr>
+ * <tr>
+ * <td>PPW</td>
+ * <td>Period Pulse Width</td>
+ * </tr>
+ * </table>
+ *
+ *
+ * \section asfdoc_sam0_tcc_extra_dependencies Dependencies
+ * This driver has the following dependencies:
+ *
+ * - \ref asfdoc_sam0_system_pinmux_group "System Pin Multiplexer Driver"
+ *
+ *
+ * \section asfdoc_sam0_tcc_extra_errata Errata
+ * There are no errata related to this driver.
+ *
+ *
+ * \section asfdoc_sam0_tcc_extra_history Module History
+ * An overview of the module history is presented in the table below, with
+ * details on the enhancements and fixes made to the module since its first
+ * release. The current version of this corresponds to the newest version in
+ * the table.
+ *
+ * <table>
+ * <tr>
+ * <th>Changelog</th>
+ * </tr>
+ * <tr>
+ * <td>Add double buffering functionality</td>
+ * </tr>
+ * <tr>
+ * <td>Add fault handling functionality</td>
+ * </tr>
+ * <tr>
+ * <td>Initial Release</td>
+ * </tr>
+ * </table>
+ */
+
+/**
+ * \page asfdoc_sam0_tcc_exqsg Examples for TCC Driver
+ *
+ * This is a list of the available Quick Start guides (QSGs) and example
+ * applications for \ref asfdoc_sam0_tcc_group. QSGs are simple examples with
+ * step-by-step instructions to configure and use this driver in a selection of
+ * use cases. Note that QSGs can be compiled as a standalone application or be
+ * added to the user application.
+ *
+ * - \subpage asfdoc_sam0_tcc_basic_use_case
+ * - \subpage asfdoc_sam0_tcc_buffering_use_case
+ * \if TCC_CALLBACK_MODE
+ * - \subpage asfdoc_sam0_tcc_timer_use_case
+ * - \subpage asfdoc_sam0_tcc_callback_use_case
+ * - \subpage asfdoc_sam0_tcc_faultx_use_case
+ * - \subpage asfdoc_sam0_tcc_faultn_use_case
+ * \endif
+ * - \subpage asfdoc_sam0_tcc_dma_use_case
+ *
+ * \page asfdoc_sam0_tcc_document_revision_history Document Revision History
+ *
+ * <table>
+ * <tr>
+ * <th>Doc. Rev.</th>
+ * <th>Date</th>
+ * <th>Comments</th>
+ * </tr>
+ * <tr>
+ * <td>42256C</td>
+ * <td>12/2015</td>
+ * <td>Added support for SAM L21/L22, SAM DA1, and SAM C20/C21</td>
+ * </tr>
+ * <tr>
+ * <td>42256B</td>
+ * <td>12/2014</td>
+ * <td>Added fault handling functionality.
+ * Added double buffering functionality with use case.
+ * Added timer use case.
+ * Added SAM R21/D10/D11 support.</td>
+ * </tr>
+ * <tr>
+ * <td>42256A</td>
+ * <td>01/2014</td>
+ * <td>Initial release</td>
+ * </tr>
+ * </table>
+ */
+
+#endif /* TCC_H_INCLUDED */
diff --git a/atmel-samd/asf/sam0/drivers/tcc/tcc_callback.c b/atmel-samd/asf/sam0/drivers/tcc/tcc_callback.c
new file mode 100644
index 000000000..aa1d5e3e9
--- /dev/null
+++ b/atmel-samd/asf/sam0/drivers/tcc/tcc_callback.c
@@ -0,0 +1,245 @@
+/**
+ * \file
+ *
+ * \brief SAM TCC - Timer Counter for Control Applications Callback Driver
+ *
+ * Copyright (C) 2013-2016 Atmel Corporation. All rights reserved.
+ *
+ * \asf_license_start
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel microcontroller product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * \asf_license_stop
+ *
+ */
+/*
+ * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
+ */
+
+#include "tcc_callback.h"
+
+void *_tcc_instances[TCC_INST_NUM];
+
+void _tcc_interrupt_handler(uint8_t module_index);
+
+const uint32_t _tcc_intflag[TCC_CALLBACK_N] = {
+ TCC_INTFLAG_OVF,
+ TCC_INTFLAG_TRG,
+ TCC_INTFLAG_CNT,
+ TCC_INTFLAG_ERR,
+ TCC_INTFLAG_FAULTA,
+ TCC_INTFLAG_FAULTB,
+ TCC_INTFLAG_FAULT0,
+ TCC_INTFLAG_FAULT1,
+#define _TCC_INTFLAG_MC(n,dummy) TCC_INTFLAG_MC##n,
+ /* TCC_INTFLAG_MC0 ~ ... */
+ MREPEAT(TCC_NUM_CHANNELS, _TCC_INTFLAG_MC, 0)
+#undef _TCC_INTFLAG_MC
+};
+
+# define _TCC_INTERRUPT_VECT_NUM(n, unused) \
+ SYSTEM_INTERRUPT_MODULE_TCC##n,
+/**
+ * \internal Get the interrupt vector for the given device instance
+ *
+ * \param[in] The TCC module instance number
+ *
+ * \return Interrupt vector for of the given TCC module instance.
+ */
+static enum system_interrupt_vector _tcc_interrupt_get_interrupt_vector(
+ uint32_t inst_num)
+{
+ static uint8_t tcc_interrupt_vectors[TCC_INST_NUM] = {
+ MREPEAT(TCC_INST_NUM, _TCC_INTERRUPT_VECT_NUM, 0)
+ };
+
+ return (enum system_interrupt_vector)tcc_interrupt_vectors[inst_num];
+}
+
+/**
+ * \brief Registers a callback
+ *
+ * Registers a callback function which is implemented by the user.
+ *
+ * \note The callback must be enabled by \ref tcc_enable_callback,
+ * in order for the interrupt handler to call it when the conditions for the
+ * callback type is met.
+ *
+ * \param[in] module Pointer to TCC software instance struct
+ * \param[in] callback_func Pointer to callback function
+ * \param[in] callback_type Callback type given by an enum
+ */
+enum status_code tcc_register_callback(
+ struct tcc_module *const module,
+ tcc_callback_t callback_func,
+ const enum tcc_callback callback_type)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(callback_func);
+
+ /* Register callback function */
+ module->callback[callback_type] = callback_func;
+
+ /* Set the bit corresponding to the callback_type */
+ module->register_callback_mask |= _tcc_intflag[callback_type];
+
+ return STATUS_OK;
+}
+
+/**
+ * \brief Unregisters a callback
+ *
+ * Unregisters a callback function implemented by the user. The callback should
+ * be disabled before it is unregistered.
+ *
+ * \param[in] module Pointer to TCC software instance struct
+ * \param[in] callback_type Callback type given by an enum
+ */
+enum status_code tcc_unregister_callback(
+ struct tcc_module *const module,
+ const enum tcc_callback callback_type)
+{
+ /* Sanity check arguments */
+ Assert(module);
+
+ /* Unregister callback function */
+ module->callback[callback_type] = NULL;
+
+ /* Clear the bit corresponding to the callback_type */
+ module->register_callback_mask &= ~_tcc_intflag[callback_type];
+
+ return STATUS_OK;
+}
+
+/**
+ * \brief Enables callback
+ *
+ * Enables the callback function registered by the \ref
+ * tcc_register_callback. The callback function will be called from the
+ * interrupt handler when the conditions for the callback type are
+ * met. This function will also enable the appropriate interrupts.
+ *
+ * \param[in] module Pointer to TCC software instance struct
+ * \param[in] callback_type Callback type given by an enum
+ */
+void tcc_enable_callback(
+ struct tcc_module *const module,
+ const enum tcc_callback callback_type)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ /* Enable interrupts for this TCC module */
+ system_interrupt_enable(_tcc_interrupt_get_interrupt_vector(
+ _tcc_get_inst_index(module->hw)));
+
+ /* Enable channel or other callbacks */
+ module->enable_callback_mask |= _tcc_intflag[callback_type];
+ module->hw->INTENSET.reg = _tcc_intflag[callback_type];
+}
+
+/**
+ * \brief Disables callback
+ *
+ * Disables the callback function registered by the \ref
+ * tcc_register_callback, and the callback will not be called from the
+ * interrupt routine. The function will also disable the appropriate
+ * interrupts.
+ *
+ * \param[in] module Pointer to TCC software instance struct
+ * \param[in] callback_type Callback type given by an enum
+ */
+void tcc_disable_callback(
+ struct tcc_module *const module,
+ const enum tcc_callback callback_type)
+{
+ /* Sanity check arguments */
+ Assert(module);
+ Assert(module->hw);
+
+ /* Disable interrupts for this TCC module */
+ system_interrupt_disable(_tcc_interrupt_get_interrupt_vector(
+ _tcc_get_inst_index(module->hw)));
+
+ /* Disable channel or other callbacks */
+ module->enable_callback_mask &= ~_tcc_intflag[callback_type];
+ module->hw->INTENCLR.reg = _tcc_intflag[callback_type];
+}
+
+
+/**
+ * \internal ISR handler for TCC
+ *
+ * Auto-generate a set of interrupt handlers for each TCC in the device.
+ */
+#define _TCC_INTERRUPT_HANDLER(n, m) \
+ void TCC##n##_Handler(void) \
+ { \
+ _tcc_interrupt_handler(n); \
+ }
+
+MREPEAT(TCC_INST_NUM, _TCC_INTERRUPT_HANDLER, 0)
+
+/**
+ * \internal Interrupt handler for the TCC module
+ *
+ * Handles interrupts as they occur, it will run the callback functions
+ * that are registered and enabled.
+ *
+ * \param[in] module_index ID of the TCC instance calling the interrupt
+ * handler
+ */
+void _tcc_interrupt_handler(
+ uint8_t module_index)
+{
+ int i;
+
+ uint32_t interrupt_and_callback_status_mask;
+
+ struct tcc_module *module =
+ (struct tcc_module *)_tcc_instances[module_index];
+
+ interrupt_and_callback_status_mask = (module->hw->INTFLAG.reg &
+ module->register_callback_mask &
+ module->enable_callback_mask);
+
+ /* Check if callback interrupt has occured */
+ for (i = 0; i < TCC_CALLBACK_N; i ++) {
+ if (interrupt_and_callback_status_mask & _tcc_intflag[i]) {
+ /* Invoke the registered and enabled callback function */
+ (module->callback[i])(module);
+ /* Clear interrupt flag */
+ module->hw->INTFLAG.reg = _tcc_intflag[i];
+ }
+ }
+}
diff --git a/atmel-samd/asf/sam0/drivers/tcc/tcc_callback.h b/atmel-samd/asf/sam0/drivers/tcc/tcc_callback.h
new file mode 100644
index 000000000..37b0bbb72
--- /dev/null
+++ b/atmel-samd/asf/sam0/drivers/tcc/tcc_callback.h
@@ -0,0 +1,93 @@
+/**
+ * \file
+ *
+ * \brief SAM TCC - Timer Counter for Control Applications Callback Driver
+ *
+ * Copyright (C) 2013-2015 Atmel Corporation. All rights reserved.
+ *
+ * \asf_license_start
+ *
+ * \page License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The name of Atmel may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 4. This software may only be redistributed and used in connection with an
+ * Atmel microcontroller product.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * \asf_license_stop
+ *
+ */
+/*
+ * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
+ */
+
+
+#ifndef TCC_CALLBACK_H_INCLUDED
+#define TCC_CALLBACK_H_INCLUDED
+
+#include "tcc.h"
+#include <system_interrupt.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(__DOXYGEN__)
+extern void *_tcc_instances[TCC_INST_NUM];
+#endif
+
+
+/**
+ * \name Callback Management
+ * {@
+ */
+
+enum status_code tcc_register_callback(
+ struct tcc_module *const module,
+ tcc_callback_t callback_func,
+ const enum tcc_callback callback_type);
+
+enum status_code tcc_unregister_callback(
+ struct tcc_module *const module,
+ const enum tcc_callback callback_type);
+
+void tcc_enable_callback(
+ struct tcc_module *const module,
+ const enum tcc_callback callback_type);
+
+void tcc_disable_callback(
+ struct tcc_module *const module,
+ const enum tcc_callback callback_type);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TCC_CALLBACK_H_INCLUDED */
diff --git a/atmel-samd/boards/arduino_zero/pins.c b/atmel-samd/boards/arduino_zero/pins.c
index fb9794fa4..8f866a232 100644
--- a/atmel-samd/boards/arduino_zero/pins.c
+++ b/atmel-samd/boards/arduino_zero/pins.c
@@ -1,25 +1,54 @@
#include "pins.h"
#include "asf/sam0/drivers/system/system.h"
-PIN(PA02, true, ADC_POSITIVE_INPUT_PIN0);
-PIN(PB08, true, ADC_POSITIVE_INPUT_PIN8);
-PIN(PB09, true, ADC_POSITIVE_INPUT_PIN9);
-PIN(PA04, true, ADC_POSITIVE_INPUT_PIN4);
-PIN(PA05, true, ADC_POSITIVE_INPUT_PIN5);
-PIN(PB02, true, ADC_POSITIVE_INPUT_PIN10);
-PIN(PA11, true, ADC_POSITIVE_INPUT_PIN19);
-PIN(PA10, true, ADC_POSITIVE_INPUT_PIN18);
-PIN(PA14, false, NO_ADC_INPUT);
-PIN(PA09, true, ADC_POSITIVE_INPUT_PIN17);
-PIN(PA08, true, ADC_POSITIVE_INPUT_PIN16);
-PIN(PA15, false, NO_ADC_INPUT);
-PIN(PA20, false, NO_ADC_INPUT);
-PIN(PA06, true, ADC_POSITIVE_INPUT_PIN6);
-PIN(PA07, true, ADC_POSITIVE_INPUT_PIN7);
-PIN(PA18, false, NO_ADC_INPUT);
-PIN(PA16, false, NO_ADC_INPUT);
-PIN(PA19, false, NO_ADC_INPUT);
-PIN(PA17, false, NO_ADC_INPUT);
+PIN_NO_TIMERS_(PA02, true, ADC_POSITIVE_INPUT_PIN0);
+PIN_ONE_TIMER_(PB08, true, ADC_POSITIVE_INPUT_PIN8,
+ TC4, 0, 0, 0, PIN_PB08E_TC4_WO0, MUX_PB08E_TC4_WO0);
+PIN_ONE_TIMER_(PB09, true, ADC_POSITIVE_INPUT_PIN9,
+ TC4, 0, 1, 1, PIN_PB09E_TC4_WO1, MUX_PB09E_TC4_WO1);
+PIN_ONE_TIMER_(PA04, true, ADC_POSITIVE_INPUT_PIN4,
+ 0, TCC0, 0, 0, PIN_PA04E_TCC0_WO0, MUX_PA04E_TCC0_WO0);
+PIN_ONE_TIMER_(PA05, true, ADC_POSITIVE_INPUT_PIN5,
+ 0, TCC0, 1, 1, PIN_PA05E_TCC0_WO1, MUX_PA05E_TCC0_WO1);
+PIN_NO_TIMERS_(PB02, true, ADC_POSITIVE_INPUT_PIN10);
+PIN_TWO_TIMERS(PA11, true, ADC_POSITIVE_INPUT_PIN19,
+ 0, TCC1, 1, 1, PIN_PA11E_TCC1_WO1, MUX_PA11E_TCC1_WO1,
+ 0, TCC0, 3, 3, PIN_PA11F_TCC0_WO3, MUX_PA11F_TCC0_WO3);
+PIN_TWO_TIMERS(PA10, true, ADC_POSITIVE_INPUT_PIN18,
+ 0, TCC1, 0, 0, PIN_PA10E_TCC1_WO0, MUX_PA10E_TCC1_WO0,
+ 0, TCC0, 2, 2, PIN_PA10F_TCC0_WO2, MUX_PA10F_TCC0_WO2);
+PIN_TWO_TIMERS(PA14, false, NO_ADC_INPUT,
+ TC3, 0, 0, 0, PIN_PA14E_TC3_WO0, MUX_PA14E_TC3_WO0,
+ 0, TCC0, 0, 4, PIN_PA14F_TCC0_WO4, MUX_PA14F_TCC0_WO4);
+PIN_TWO_TIMERS(PA09, true, ADC_POSITIVE_INPUT_PIN17,
+ 0, TCC0, 1, 1, PIN_PA09E_TCC0_WO1, MUX_PA09E_TCC0_WO1,
+ 0, TCC1, 3, 3, PIN_PA09F_TCC1_WO3, MUX_PA09F_TCC1_WO3);
+PIN_TWO_TIMERS(PA08, true, ADC_POSITIVE_INPUT_PIN16,
+ 0, TCC0, 0, 0, PIN_PA08E_TCC0_WO0, MUX_PA08E_TCC0_WO0,
+ 0, TCC1, 2, 2, PIN_PA08F_TCC1_WO2, MUX_PA08F_TCC1_WO2);
+PIN_TWO_TIMERS(PA15, false, NO_ADC_INPUT,
+ TC3, 0, 1, 1, PIN_PA15E_TC3_WO1, MUX_PA15E_TC3_WO1,
+ 0, TCC0, 1, 5, PIN_PA15F_TCC0_WO5, MUX_PA15F_TCC0_WO5);
+PIN_ONE_TIMER_(PA20, false, NO_ADC_INPUT,
+ 0, TCC0, 2, 6, PIN_PA20F_TCC0_WO6, MUX_PA20F_TCC0_WO6);
+PIN_ONE_TIMER_(PA21, false, NO_ADC_INPUT,
+ 0, TCC0, 3, 7, PIN_PA21F_TCC0_WO7, MUX_PA21F_TCC0_WO7);
+PIN_ONE_TIMER_(PA06, true, ADC_POSITIVE_INPUT_PIN6,
+ 0, TCC1, 0, 0, PIN_PA06E_TCC1_WO0, MUX_PA06E_TCC1_WO0);
+PIN_ONE_TIMER_(PA07, true, ADC_POSITIVE_INPUT_PIN7,
+ 0, TCC1, 1, 1, PIN_PA07E_TCC1_WO1, MUX_PA07E_TCC1_WO1);
+PIN_TWO_TIMERS(PA18, false, NO_ADC_INPUT,
+ TC3, 0, 0, 0, PIN_PA18E_TC3_WO0, MUX_PA18E_TC3_WO0,
+ 0, TCC0, 2, 2, PIN_PA18F_TCC0_WO2, MUX_PA18F_TCC0_WO2);
+PIN_TWO_TIMERS(PA16, false, NO_ADC_INPUT,
+ 0, TCC2, 0, 0, PIN_PA16E_TCC2_WO0, MUX_PA16E_TCC2_WO0,
+ 0, TCC0, 2, 6, PIN_PA16F_TCC0_WO6, MUX_PA16F_TCC0_WO6);
+PIN_TWO_TIMERS(PA19, false, NO_ADC_INPUT,
+ TC3, 0, 1, 1, PIN_PA19E_TC3_WO1, MUX_PA19E_TC3_WO1,
+ 0, TCC0, 3, 3, PIN_PA19F_TCC0_WO3, MUX_PA19F_TCC0_WO3);
+PIN_TWO_TIMERS(PA17, false, NO_ADC_INPUT,
+ 0, TCC2, 1, 1, PIN_PA17E_TCC2_WO1, MUX_PA17E_TCC2_WO1,
+ 0, TCC0, 3, 7, PIN_PA17F_TCC0_WO7, MUX_PA17F_TCC0_WO7);
STATIC const mp_map_elem_t pin_cpu_pins_locals_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_PA02), (mp_obj_t)&pin_PA02 },
@@ -35,6 +64,7 @@ STATIC const mp_map_elem_t pin_cpu_pins_locals_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_PA08), (mp_obj_t)&pin_PA08 },
{ MP_OBJ_NEW_QSTR(MP_QSTR_PA15), (mp_obj_t)&pin_PA15 },
{ MP_OBJ_NEW_QSTR(MP_QSTR_PA20), (mp_obj_t)&pin_PA20 },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_PA21), (mp_obj_t)&pin_PA21 },
{ MP_OBJ_NEW_QSTR(MP_QSTR_PA06), (mp_obj_t)&pin_PA06 },
{ MP_OBJ_NEW_QSTR(MP_QSTR_PA07), (mp_obj_t)&pin_PA07 },
{ MP_OBJ_NEW_QSTR(MP_QSTR_PA18), (mp_obj_t)&pin_PA18 },
@@ -58,6 +88,7 @@ STATIC const mp_map_elem_t pin_board_pins_locals_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_D4), (mp_obj_t)&pin_PA08 },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D5), (mp_obj_t)&pin_PA15 },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D6), (mp_obj_t)&pin_PA20 },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D7), (mp_obj_t)&pin_PA21 },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D8), (mp_obj_t)&pin_PA06 },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D9), (mp_obj_t)&pin_PA07 },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D10), (mp_obj_t)&pin_PA18 },
diff --git a/atmel-samd/boards/feather_m0_ble/pins.c b/atmel-samd/boards/feather_m0_ble/pins.c
index 991116031..b60d7562f 100644
--- a/atmel-samd/boards/feather_m0_ble/pins.c
+++ b/atmel-samd/boards/feather_m0_ble/pins.c
@@ -1,26 +1,56 @@
#include "pins.h"
#include "asf/sam0/drivers/system/system.h"
-PIN(PA02, true, ADC_POSITIVE_INPUT_PIN0);
-PIN(PB08, true, ADC_POSITIVE_INPUT_PIN8);
-PIN(PB09, true, ADC_POSITIVE_INPUT_PIN9);
-PIN(PA04, true, ADC_POSITIVE_INPUT_PIN4);
-PIN(PA05, true, ADC_POSITIVE_INPUT_PIN5);
-PIN(PB02, true, ADC_POSITIVE_INPUT_PIN10);
-PIN(PB11, false, NO_ADC_INPUT);
-PIN(PB10, false, NO_ADC_INPUT);
-PIN(PA12, false, NO_ADC_INPUT);
-PIN(PA11, true, ADC_POSITIVE_INPUT_PIN19);
-PIN(PA10, true, ADC_POSITIVE_INPUT_PIN18);
-PIN(PA22, false, NO_ADC_INPUT);
-PIN(PA23, false, NO_ADC_INPUT);
-PIN(PA15, false, NO_ADC_INPUT);
-PIN(PA20, false, NO_ADC_INPUT);
-PIN(PA07, true, ADC_POSITIVE_INPUT_PIN7);
-PIN(PA18, false, NO_ADC_INPUT);
-PIN(PA16, false, NO_ADC_INPUT);
-PIN(PA19, false, NO_ADC_INPUT);
-PIN(PA17, false, NO_ADC_INPUT);
+PIN_NO_TIMERS_(PA02, true, ADC_POSITIVE_INPUT_PIN0);
+PIN_ONE_TIMER_(PB08, true, ADC_POSITIVE_INPUT_PIN8,
+ TC4, 0, 0, 0, PIN_PB08E_TC4_WO0, MUX_PB08E_TC4_WO0);
+PIN_ONE_TIMER_(PB09, true, ADC_POSITIVE_INPUT_PIN9,
+ TC4, 0, 1, 1, PIN_PB09E_TC4_WO1, MUX_PB09E_TC4_WO1);
+PIN_ONE_TIMER_(PA04, true, ADC_POSITIVE_INPUT_PIN4,
+ 0, TCC0, 0, 0, PIN_PA04E_TCC0_WO0, MUX_PA04E_TCC0_WO0);
+PIN_ONE_TIMER_(PA05, true, ADC_POSITIVE_INPUT_PIN5,
+ 0, TCC0, 1, 1, PIN_PA05E_TCC0_WO1, MUX_PA05E_TCC0_WO1);
+PIN_NO_TIMERS_(PB02, true, ADC_POSITIVE_INPUT_PIN10);
+PIN_TWO_TIMERS(PB11, false, NO_ADC_INPUT,
+ TC5, 0, 1, 1, PIN_PB11E_TC5_WO1, MUX_PB11E_TC5_WO1,
+ 0, TCC0, 1, 5, PIN_PB11F_TCC0_WO5, MUX_PB11F_TCC0_WO5);
+PIN_TWO_TIMERS(PB10, false, NO_ADC_INPUT,
+ TC5, 0, 0, 0, PIN_PB10E_TC5_WO0, MUX_PB10E_TC5_WO0,
+ 0, TCC0, 0, 4, PIN_PB10F_TCC0_WO4, MUX_PB10F_TCC0_WO4);
+PIN_TWO_TIMERS(PA12, false, NO_ADC_INPUT,
+ 0, TCC2, 0, 0, PIN_PA12E_TCC2_WO0, MUX_PA12E_TCC2_WO0,
+ 0, TCC0, 2, 6, PIN_PA12F_TCC0_WO6, MUX_PA12F_TCC0_WO6);
+PIN_TWO_TIMERS(PA11, true, ADC_POSITIVE_INPUT_PIN19,
+ 0, TCC1, 1, 1, PIN_PA11E_TCC1_WO1, MUX_PA11E_TCC1_WO1,
+ 0, TCC0, 3, 3, PIN_PA11F_TCC0_WO3, MUX_PA11F_TCC0_WO3);
+PIN_TWO_TIMERS(PA10, true, ADC_POSITIVE_INPUT_PIN18,
+ 0, TCC1, 0, 0, PIN_PA10E_TCC1_WO0, MUX_PA10E_TCC1_WO0,
+ 0, TCC0, 2, 2, PIN_PA10F_TCC0_WO2, MUX_PA10F_TCC0_WO2);
+PIN_TWO_TIMERS(PA22, false, NO_ADC_INPUT,
+ TC4, 0, 0, 0, PIN_PA22E_TC4_WO0, MUX_PA22E_TC4_WO0,
+ 0, TCC0, 0, 4, PIN_PA22F_TCC0_WO4, MUX_PA22F_TCC0_WO4);
+PIN_TWO_TIMERS(PA23, false, NO_ADC_INPUT,
+ TC4, 0, 1, 1, PIN_PA23E_TC4_WO1, MUX_PA23E_TC4_WO1,
+ 0, TCC0, 1, 5, PIN_PA23F_TCC0_WO5, MUX_PA23F_TCC0_WO5);
+PIN_TWO_TIMERS(PA15, false, NO_ADC_INPUT,
+ TC3, 0, 1, 1, PIN_PA15E_TC3_WO1, MUX_PA15E_TC3_WO1,
+ 0, TCC0, 1, 5, PIN_PA15F_TCC0_WO5, MUX_PA15F_TCC0_WO5);
+PIN_ONE_TIMER_(PA20, false, NO_ADC_INPUT,
+ 0, TCC0, 2, 6, PIN_PA20F_TCC0_WO6, MUX_PA20F_TCC0_WO6);
+PIN_ONE_TIMER_(PA07, true, ADC_POSITIVE_INPUT_PIN7,
+ 0, TCC1, 1, 1, PIN_PA07E_TCC1_WO1, MUX_PA07E_TCC1_WO1);
+PIN_TWO_TIMERS(PA18, false, NO_ADC_INPUT,
+ TC3, 0, 0, 0, PIN_PA18E_TC3_WO0, MUX_PA18E_TC3_WO0,
+ 0, TCC0, 2, 2, PIN_PA18F_TCC0_WO2, MUX_PA18F_TCC0_WO2);
+PIN_TWO_TIMERS(PA16, false, NO_ADC_INPUT,
+ 0, TCC2, 0, 0, PIN_PA16E_TCC2_WO0, MUX_PA16E_TCC2_WO0,
+ 0, TCC0, 2, 6, PIN_PA16F_TCC0_WO6, MUX_PA16F_TCC0_WO6);
+PIN_TWO_TIMERS(PA19, false, NO_ADC_INPUT,
+ TC3, 0, 1, 1, PIN_PA19E_TC3_WO1, MUX_PA19E_TC3_WO1,
+ 0, TCC0, 3, 3, PIN_PA19F_TCC0_WO3, MUX_PA19F_TCC0_WO3);
+PIN_TWO_TIMERS(PA17, false, NO_ADC_INPUT,
+ 0, TCC2, 1, 1, PIN_PA17E_TCC2_WO1, MUX_PA17E_TCC2_WO1,
+ 0, TCC0, 3, 7, PIN_PA17F_TCC0_WO7, MUX_PA17F_TCC0_WO7);
STATIC const mp_map_elem_t pin_cpu_pins_locals_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_PA02), (mp_obj_t)&pin_PA02 },
diff --git a/atmel-samd/modmachine.c b/atmel-samd/modmachine.c
index 4abe1c742..d59cf84cf 100644
--- a/atmel-samd/modmachine.c
+++ b/atmel-samd/modmachine.c
@@ -34,6 +34,7 @@
#include "modmachine_adc.h"
#include "modmachine_dac.h"
#include "modmachine_pin.h"
+#include "modmachine_pwm.h"
#if MICROPY_PY_MACHINE
@@ -42,6 +43,7 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_ADC), MP_ROM_PTR(&adc_type) },
{ MP_ROM_QSTR(MP_QSTR_DAC), MP_ROM_PTR(&dac_type) },
{ MP_ROM_QSTR(MP_QSTR_Pin), MP_ROM_PTR(&pin_type) },
+ { MP_ROM_QSTR(MP_QSTR_PWM), MP_ROM_PTR(&pwm_type) },
};
STATIC MP_DEFINE_CONST_DICT(machine_module_globals, machine_module_globals_table);
diff --git a/atmel-samd/modmachine_pin.h b/atmel-samd/modmachine_pin.h
index 4a02f41db..8ecafe798 100644
--- a/atmel-samd/modmachine_pin.h
+++ b/atmel-samd/modmachine_pin.h
@@ -35,15 +35,45 @@
#include "asf/sam0/drivers/adc/adc_sam_d_r/adc_feature.h"
// This macro is used to simplify pin definition in boards/<board>/pins.c
-#define PIN(p_name, p_has_adc, p_adc_input) \
+#define PIN_TWO_TIMERS(p_name, p_has_adc, p_adc_input, p_primary_tc, p_primary_tcc, \
+ p_primary_channel, p_primary_wave_output, p_primary_pin, p_primary_mux, \
+ p_secondary_tc, p_secondary_tcc, p_secondary_channel, p_secondary_wave_output, \
+ p_secondary_pin, p_secondary_mux) \
const pin_obj_t pin_## p_name = { \
{ &pin_type }, \
.name = MP_QSTR_ ## p_name, \
.pin = (PIN_## p_name), \
.has_adc = p_has_adc, \
.adc_input = p_adc_input, \
+ .primary_timer = { \
+ .tc = p_primary_tc, \
+ .tcc = p_primary_tcc, \
+ .channel = p_primary_channel, \
+ .wave_output = p_primary_wave_output, \
+ .pin = p_primary_pin, \
+ .mux = p_primary_mux \
+ }, \
+ .secondary_timer = { \
+ .tc = p_secondary_tc, \
+ .tcc = p_secondary_tcc, \
+ .channel = p_secondary_channel, \
+ .wave_output = p_secondary_wave_output, \
+ .pin = p_secondary_pin, \
+ .mux = p_secondary_mux \
+ } \
}
+#define PIN_NO_TIMERS_(p_name, p_has_adc, p_adc_input) \
+ PIN_TWO_TIMERS(p_name, p_has_adc, p_adc_input, \
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
+
+#define PIN_ONE_TIMER_(p_name, p_has_adc, p_adc_input, p_primary_tcc, \
+ p_primary_tc, p_primary_channel, p_primary_wave_output, \
+ p_primary_pin, p_primary_mux) \
+ PIN_TWO_TIMERS(p_name, p_has_adc, p_adc_input, p_primary_tcc, p_primary_tc, \
+ p_primary_channel, p_primary_wave_output, p_primary_pin, p_primary_mux, \
+ 0, 0, 0, 0, 0, 0)
+
#define NO_ADC_INPUT (0)
#include "mpconfigport.h"
@@ -51,11 +81,22 @@ const pin_obj_t pin_## p_name = { \
#include "py/obj.h"
typedef struct {
+ Tc *const tc;
+ Tcc *const tcc;
+ uint8_t channel;
+ uint8_t wave_output;
+ uint32_t pin;
+ uint32_t mux;
+} pin_timer_t;
+
+typedef struct {
mp_obj_base_t base;
qstr name;
uint32_t pin;
bool has_adc;
enum adc_positive_input adc_input;
+ pin_timer_t primary_timer;
+ pin_timer_t secondary_timer;
} pin_obj_t;
extern const mp_obj_type_t pin_type;
diff --git a/atmel-samd/modmachine_pwm.c b/atmel-samd/modmachine_pwm.c
new file mode 100644
index 000000000..214210f50
--- /dev/null
+++ b/atmel-samd/modmachine_pwm.c
@@ -0,0 +1,192 @@
+/*
+ * This file is part of the Micro Python project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2016 Damien P. George
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include <stdio.h>
+#include <stdint.h>
+
+#include "py/runtime.h"
+#include "modmachine_pin.h"
+#include "modmachine_pwm.h"
+
+#include "asf/sam0/drivers/tc/tc.h"
+#include "asf/sam0/drivers/tcc/tcc.h"
+
+typedef struct _pwm_obj_t {
+ mp_obj_base_t base;
+ const pin_obj_t *pin;
+ bool using_primary_timer;
+ struct tc_module tc_instance;
+ struct tcc_module tcc_instance;
+} pwm_obj_t;
+
+/******************************************************************************/
+// MicroPython bindings for PWM
+
+STATIC void pwm_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
+ pwm_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ mp_printf(print, "PWM(%s", self->pin->name);
+ mp_printf(print, ", freq=%u, duty=%u", 0, 0);
+ mp_printf(print, ")");
+}
+/// \classmethod \constructor(pin)
+/// Create a PWM object associated with the given pin. This allows you to write PWM
+/// signals out on the given pin. Frequency is currently fixed at ~735Hz like Arduino.
+STATIC mp_obj_t pwm_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
+ mp_arg_check_num(n_args, n_kw, 1, MP_OBJ_FUN_ARGS_MAX, true);
+ mp_obj_t pin_obj = args[0];
+ const pin_obj_t *pin = pin_find(pin_obj);
+
+ // create PWM object from the given pin
+ pwm_obj_t *self = m_new_obj(pwm_obj_t);
+ self->base.type = &pwm_type;
+ self->pin = pin;
+ self->using_primary_timer = true;
+
+ mp_map_t kw_args;
+ mp_map_init_fixed_table(&kw_args, n_kw, args + n_args);
+ enum { ARG_duty };
+ static const mp_arg_t allowed_args[] = {
+ { MP_QSTR_duty, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} },
+ };
+ mp_arg_val_t parsed_args[MP_ARRAY_SIZE(allowed_args)];
+ mp_arg_parse_all(n_args - 1, args + 1, &kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, parsed_args);
+
+ if (pin->primary_timer.tc == 0 && pin->primary_timer.tcc == 0 &&
+ pin->secondary_timer.tc == 0 && pin->secondary_timer.tcc == 0) {
+ nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError,
+ "PWM not supported on pin %q", self->pin->name));
+ }
+
+ if (parsed_args[ARG_duty].u_int < 0 || parsed_args[ARG_duty].u_int > 255) {
+ nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError,
+ "PWM duty must be between 0 and 255 (8 bit resolution), not %d",
+ parsed_args[ARG_duty].u_int));
+ }
+ uint8_t duty = parsed_args[ARG_duty].u_int;
+
+ // TODO(tannewt): Support output on multiple timer channels at once.
+ const pin_timer_t* t = &pin->primary_timer;
+ if (t->tcc != 0) {
+ struct tcc_config config_tcc;
+ tcc_get_config_defaults(&config_tcc, t->tcc);
+
+ config_tcc.counter.clock_prescaler = TCC_CLOCK_PRESCALER_DIV256;
+ config_tcc.counter.period = 0xFF;
+ config_tcc.compare.wave_generation = TCC_WAVE_GENERATION_SINGLE_SLOPE_PWM;
+ config_tcc.compare.match[t->channel] = duty;
+
+ config_tcc.pins.enable_wave_out_pin[t->wave_output] = true;
+ config_tcc.pins.wave_out_pin[t->wave_output] = t->pin;
+ config_tcc.pins.wave_out_pin_mux[t->wave_output] = t->mux;
+
+ tcc_init(&self->tcc_instance, t->tcc, &config_tcc);
+
+ tcc_enable(&self->tcc_instance);
+ } else {
+ struct tc_config config_tc;
+ tc_get_config_defaults(&config_tc);
+
+ config_tc.counter_size = TC_COUNTER_SIZE_8BIT;
+ config_tc.wave_generation = TC_WAVE_GENERATION_NORMAL_PWM;
+ config_tc.clock_prescaler = TC_CLOCK_PRESCALER_DIV256;
+ config_tc.counter_8_bit.period = 0xff;
+ config_tc.counter_8_bit.compare_capture_channel[t->channel] = duty;
+
+ config_tc.pwm_channel[t->wave_output].enabled = true;
+ config_tc.pwm_channel[t->wave_output].pin_out = t->pin;
+ config_tc.pwm_channel[t->wave_output].pin_mux = t->mux;
+
+ tc_init(&self->tc_instance, t->tc, &config_tc);
+
+ tc_enable(&self->tc_instance);
+ }
+
+ return MP_OBJ_FROM_PTR(self);
+}
+
+STATIC mp_obj_t pwm_del(mp_obj_t self_in) {
+ pwm_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ const pin_timer_t* t = &self->pin->primary_timer;
+ if (!self->using_primary_timer) {
+ t = &self->pin->secondary_timer;
+ }
+ if (t->tcc != 0) {
+ tcc_disable(&self->tcc_instance);
+ } else {
+ tc_disable(&self->tc_instance);
+ }
+ return mp_const_none;
+}
+STATIC MP_DEFINE_CONST_FUN_OBJ_1(pwm_del_obj, pwm_del);
+
+// 8 bit resolution
+STATIC mp_obj_t pwm_duty(size_t n_args, const mp_obj_t *args) {
+ pwm_obj_t *self = MP_OBJ_TO_PTR(args[0]);
+
+ const pin_timer_t* t = &self->pin->primary_timer;
+ if (!self->using_primary_timer) {
+ t = &self->pin->secondary_timer;
+ }
+
+ if (n_args == 1) {
+ uint8_t duty;
+ if (t->tcc != 0) {
+ duty = tcc_get_capture_value(&self->tcc_instance, t->channel);
+ } else {
+ duty = tc_get_capture_value(&self->tc_instance, t->channel);
+ }
+ return MP_OBJ_NEW_SMALL_INT(duty);
+ } else {
+ mp_int_t duty = mp_obj_get_int(args[1]);
+ if (duty < 0 || duty > 255) {
+ nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError,
+ "PWM duty must be between 0 and 255 (8 bit resolution), not %d",
+ duty));
+ }
+ if (t->tcc != 0) {
+ tcc_set_compare_value(&self->tcc_instance, t->channel, duty);
+ } else {
+ tc_set_compare_value(&self->tc_instance, t->channel, duty);
+ }
+ return mp_const_none;
+ }
+}
+STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(pwm_duty_obj, 1, 2, pwm_duty);
+
+STATIC const mp_rom_map_elem_t pwm_locals_dict_table[] = {
+ { MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&pwm_del_obj) },
+ { MP_ROM_QSTR(MP_QSTR_duty), MP_ROM_PTR(&pwm_duty_obj) },
+};
+
+STATIC MP_DEFINE_CONST_DICT(pwm_locals_dict, pwm_locals_dict_table);
+
+const mp_obj_type_t pwm_type = {
+ { &mp_type_type },
+ .name = MP_QSTR_PWM,
+ .print = pwm_print,
+ .make_new = pwm_make_new,
+ .locals_dict = (mp_obj_dict_t*)&pwm_locals_dict,
+};
diff --git a/atmel-samd/modmachine_pwm.h b/atmel-samd/modmachine_pwm.h
new file mode 100644
index 000000000..1989b6e52
--- /dev/null
+++ b/atmel-samd/modmachine_pwm.h
@@ -0,0 +1,27 @@
+/*
+ * This file is part of the Micro Python project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2013, 2014 Damien P. George
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+extern const mp_obj_type_t pwm_type;