1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654
|
<HTML>
<HEAD>
<TITLE>AVR libc function reference</TITLE>
<style type="text/css">
<!--
.hell { background-color: #CCCCCC}
.dunkel { background-color: #AAAAAA}
table { background-color: #666666}
a:hover { color: #0000FF; text-decoration: underline}
a { color: #000099; text-decoration: none}
-->
</style>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<center>
<H1>AVR libc function reference</H1> 2002/01/28
</CENTER>
<HR>
<P>
This file gives an overview of the C library functions implemented in the avr-libc
standard library for the Atmel AVR microcontroller family.
</P>
<P>
As of the writing of this reference, the current version of avr-libc was
20020115.
</P>
<P>
avr-libc is maintained by Marek Michalkiewicz <marekm@linux.org.pl>.
</P>
<P>
This document is written by Enno Luebbers <luebbers@users.sourceforge.net>. I do
not take any responsibility about what happens if you use the information in
this reference. You are on your own. :) Formally that means:
</P>
<P>
<B>This document is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY DISCLAIMED. This
includes but is not limited to warranties of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.</B>
</P>
<P>
Documentation for most of the functions that are not hardware specific to the
AVR architecture (like I/O ports or interrupt handlers) can be found in the
Linux manpages.
</P>
<P>Thanks go to Jörg Wunsch for pointing me to several errors in previous
versions of this reference and for including it in the FreeBSD Port of the avr-libc.
Also thanks to Jochen Pernsteiner for his explanation of strlwr() and to Peter
N Lewis for his help on SIGNAL() and INTERRUPT(). And of course thanks to
Marek Michalkiewicz for including this document in his avr-libc distribution.</P>
<HR>
<H2>Function list by Header files</H2>
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD WIDTH="30%" class="hell"><A HREF="#ctype.h">ctype.h</A></TD>
<TD class="hell">Character type test functions</TD>
</TR>
<TR>
<TD class="dunkel"><A HREF="#eeprom.h">eeprom.h</A></TD>
<TD class="dunkel">EEPROM access functions</TD>
</TR>
<TR>
<TD class="hell"><A HREF="#errno.h">errno.h</A></TD>
<TD class="hell">Error handling</TD>
</TR>
<TR>
<TD class="dunkel"><A HREF="#ina90.h">ina90.h</A></TD>
<TD class="dunkel">Compatibility header for IAR C</TD>
</TR>
<TR>
<TD class="hell"><A HREF="#interrupt.h">interrupt.h</A></TD>
<TD class="hell">Interrupt handling routines</TD>
</TR>
<TR>
<TD class="dunkel"><A HREF="#inttypes.h">inttypes.h</A></TD>
<TD class="dunkel">Defines for different int data types</TD>
</TR>
<TR>
<TD class="hell"><A HREF="#io-avr.h">io-avr.h</A></TD>
<TD class="hell">Includes the correct ioXXX.h header</TD>
</TR>
<TR>
<TD class="dunkel"><A HREF="#io.h">io.h</A></TD>
<TD class="dunkel">Includes other I/O-Headers</TD>
</TR>
<TR>
<TD class="hell"><A HREF="#ioXXX.h">ioXXX.h</A></TD>
<TD class="hell">I/O-Defines for various AVR microcontrollers</TD>
</TR>
<TR>
<TD class="dunkel"><A HREF="#iomacros.h">iomacros.h</A></TD>
<TD class="dunkel">Several macros for I/O access</TD>
</TR>
<TR>
<TD class="hell"><A HREF="#math.h">math.h</A></TD>
<TD class="hell">Various mathematical functions</TD>
</TR>
<TR>
<TD class="dunkel"><A HREF="#pgmspace.h">pgmspace.h</A></TD>
<TD class="dunkel">Compatibility header for IAR C</TD>
</TR>
<TR>
<TD class="hell"><A HREF="#progmem.h">progmem.h</A></TD>
<TD class="hell">Alias for pgmspace.h</TD>
</TR>
<TR>
<TD class="dunkel"><A HREF="#setjmp.h">setjmp.h</A></TD>
<TD class="dunkel">Provides functions for long jumps</TD>
</TR>
<TR>
<TD class="hell"><A HREF="#sig-avr.h">sig-avr.h</A></TD>
<TD class="hell">AVR interrupt and signal handling</TD>
</TR>
<TR>
<TD class="dunkel"><A HREF="#signal.h">signal.h</A></TD>
<TD class="dunkel">Alias for sig-avr.h. Should no longer be used.</TD>
</TR>
<TR>
<TD class="hell"><A HREF="#stdlib.h">stdlib.h</A></TD>
<TD class="hell">Miscellaneous routines</TD>
</TR>
<TR>
<TD class="dunkel"><A HREF="#string-avr.h">string-avr.h</A></TD>
<TD class="dunkel">String manipulation functions</TD>
</TR>
<TR>
<TD class="hell"><A HREF="#string.h">string.h</A></TD>
<TD class="hell">More string manipulation routines</TD>
</TR>
<TR>
<TD class="dunkel"><A HREF="#timer.h">timer.h</A></TD>
<TD class="dunkel">Timer control functions</TD>
</TR>
<TR>
<TD class="hell"><A HREF="#twi.h">twi.h</A></TD>
<TD class="hell">ATmega163 specific defines</TD>
</TR>
<TR>
<TD class="dunkel"><A HREF="#wdt.h">wdt.h</A></TD>
<TD class="dunkel">Watchdog Timer control functions</TD>
</TR>
</TABLE>
<HR>
<H2>Alphabetical function list</H2>
<p>
<tt>
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD class="hell">void</TD>
<TD class="hell"><A HREF="#abort">abort();</A></TD>
</TR>
<TR>
<TD class="dunkel">double</TD>
<TD class="dunkel"><A HREF="#acos">acos( double x );</A></TD>
</TR>
<TR>
<TD class="hell">double</TD>
<TD class="hell"><A HREF="#asin">asin( double x );</A></TD>
</TR>
<TR>
<TD class="dunkel">double</TD>
<TD class="dunkel"><A HREF="#atan">atan( double x );</A></TD>
</TR>
<TR>
<TD class="hell">long</TD>
<TD class="hell"><A HREF="#atoi">atoi( char *p );</A></TD>
</TR>
<TR>
<TD class="dunkel">long</TD>
<TD class="dunkel"><A HREF="#atol">atol( char *p );</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#bit_is_clear">bit_is_clear( port, bit );</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#bit_is_set">bit_is_set( port, bit );</A></TD>
</TR>
<TR>
<TD class="hell">void</TD>
<TD class="hell"><A HREF="#bsearch">bsearch(const void *key, const void *base,
size_t nmemb,</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#BV">BV( x );</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#cbi">cbi( port, bit );</A></TD>
</TR>
<TR>
<TD class="dunkel">double</TD>
<TD class="dunkel"><A HREF="#ceil">ceil( doublce x );</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#cli">cli();</A></TD>
</TR>
<TR>
<TD class="dunkel">double</TD>
<TD class="dunkel"><A HREF="#cos">cos( double x );</A></TD>
</TR>
<TR>
<TD class="hell">double</TD>
<TD class="hell"><A HREF="#cosh">cosh( double x );</A></TD>
</TR>
<TR>
<TD class="dunkel">div_t</TD>
<TD class="dunkel"><A HREF="#div">div( int x, int y );</A></TD>
</TR>
<TR>
<TD class="hell">int</TD>
<TD class="hell"><A HREF="#eeprom_is_ready">eeprom_is_ready()</A></TD>
</TR>
<TR>
<TD class="dunkel">unsigned char</TD>
<TD class="dunkel"><A HREF="#eeprom_rb">eeprom_rb(unsigned int addr);</A></TD>
</TR>
<TR>
<TD class="hell">void</TD>
<TD class="hell"><A HREF="#eeprom_read_block">eeprom_read_block(void *buf,
unsigned int addr, size_t n);</A></TD>
</TR>
<TR>
<TD class="dunkel">unsigned int</TD>
<TD class="dunkel"><A HREF="#eeprom_rw">eeprom_rw(unsigned int addr);</A></TD>
</TR>
<TR>
<TD class="hell">void</TD>
<TD class="hell"><A HREF="#eeprom_wb">eeprom_wb(unsigned int addr, unsigned
char val);</A></TD>
</TR>
<TR>
<TD class="dunkel">void</TD>
<TD class="dunkel"><A HREF="#enable_external_int">enable_external_int( unsigned
char ints );</A></TD>
</TR>
<TR>
<TD class="hell">int</TD>
<TD class="hell"><A HREF="#errno">errno();</A></TD>
</TR>
<TR>
<TD class="dunkel">double</TD>
<TD class="dunkel"><A HREF="#exp">exp( double x );</A></TD>
</TR>
<TR>
<TD class="hell">double</TD>
<TD class="hell"><A HREF="#fabs">fabs( double x );</A></TD>
</TR>
<TR>
<TD class="dunkel">double</TD>
<TD class="dunkel"><A HREF="#floor">floor( double x );</A></TD>
</TR>
<TR>
<TD class="hell">double</TD>
<TD class="hell"><A HREF="#fmod">fmod( double x, double y );</A></TD>
</TR>
<TR>
<TD class="dunkel">void</TD>
<TD class="dunkel"><A HREF="#free">free( void *ptr );</A></TD>
</TR>
<TR>
<TD class="hell">double</TD>
<TD class="hell"><A HREF="#frexp">frexp( double x, int *exp );</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#inp">inp( port );</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#INTERRUPT">INTERRUPT( signame );</A></TD>
</TR>
<TR>
<TD class="dunkel">double</TD>
<TD class="dunkel"><A HREF="#inverse">inverse( double x );</A></TD>
</TR>
<TR>
<TD class="hell">int</TD>
<TD class="hell"><A HREF="#isalnum">isalnum(int __c);</A></TD>
</TR>
<TR>
<TD class="dunkel">int</TD>
<TD class="dunkel"><A HREF="#isalpha">isalpha(int __c);</A></TD>
</TR>
<TR>
<TD class="hell">int</TD>
<TD class="hell"><A HREF="#isascii">isascii(int __c);</A></TD>
</TR>
<TR>
<TD class="dunkel">int</TD>
<TD class="dunkel"><A HREF="#isblank">isblank(int __c);</A></TD>
</TR>
<TR>
<TD class="hell">int</TD>
<TD class="hell"><A HREF="#iscntrl">iscntrl(int __c);</A></TD>
</TR>
<TR>
<TD class="dunkel">int</TD>
<TD class="dunkel"><A HREF="#isdigit">isdigit(int __c);</A></TD>
</TR>
<TR>
<TD class="hell">int</TD>
<TD class="hell"><A HREF="#isgraph">isgraph(int __c);</A></TD>
</TR>
<TR>
<TD class="dunkel">int</TD>
<TD class="dunkel"><A HREF="#islower">islower(int __c);</A></TD>
</TR>
<TR>
<TD class="hell">int</TD>
<TD class="hell"><A HREF="#isprint">isprint(int __c);</A></TD>
</TR>
<TR>
<TD class="dunkel">int</TD>
<TD class="dunkel"><A HREF="#ispunct">ispunct(int __c);</A></TD>
</TR>
<TR>
<TD class="hell">int</TD>
<TD class="hell"><A HREF="#isspace">isspace(int __c);</A></TD>
</TR>
<TR>
<TD class="dunkel">int</TD>
<TD class="dunkel"><A HREF="#isupper">isupper(int __c);</A></TD>
</TR>
<TR>
<TD class="hell">int</TD>
<TD class="hell"><A HREF="#isxdigit">isxdigit(int __c);</A></TD>
</TR>
<TR>
<TD class="dunkel">char</TD>
<TD class="dunkel"><A HREF="#itoa">itoa( int value, char *string, int radix
) {</A></TD>
</TR>
<TR>
<TD class="hell">long</TD>
<TD class="hell"><A HREF="#labs">labs( long x );</A></TD>
</TR>
<TR>
<TD class="dunkel">double</TD>
<TD class="dunkel"><A HREF="#ldexp">ldexp( double x, int exp );</A></TD>
</TR>
<TR>
<TD class="hell">ldiv_t</TD>
<TD class="hell"><A HREF="#ldiv">ldiv( lomg x, long y );</A></TD>
</TR>
<TR>
<TD class="dunkel">double</TD>
<TD class="dunkel"><A HREF="#log">log( double x );</A></TD>
</TR>
<TR>
<TD class="hell">double</TD>
<TD class="hell"><A HREF="#log10">log10( double x );</A></TD>
</TR>
<TR>
<TD class="dunkel">void</TD>
<TD class="dunkel"><A HREF="#longjmp">longjmp( jmp_buf env, int val );</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#loop_until_bit_is_clear">loop_until_bit_is_clear(
port, bit );</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#loop_until_bit_is_set">loop_until_bit_ist_set(
port, bit );</A></TD>
</TR>
<TR>
<TD class="hell">char *</TD>
<TD class="hell"><A HREF="#ltoa">ltoa( long val, char *s, int radix );</A></TD>
</TR>
<TR>
<TD class="dunkel">void</TD>
<TD class="dunkel"><A HREF="#malloc">malloc( size_t size );</A></TD>
</TR>
<TR>
<TD class="hell">void</TD>
<TD class="hell"><A HREF="#memchr">memchr( void *s, char c, size_t n );</A></TD>
</TR>
<TR>
<TD class="dunkel">int</TD>
<TD class="dunkel"><A HREF="#memcmp">memcmp( const void *s1, const void *s2,
size_t n );</A></TD>
</TR>
<TR>
<TD class="hell">void</TD>
<TD class="hell"><A HREF="#memcpy">memcpy( void *to, void *from, size_t n
);</A></TD>
</TR>
<TR>
<TD class="dunkel">void</TD>
<TD class="dunkel"><A HREF="#memmove">memmove( void *to, void *from, size_t
n );</A></TD>
</TR>
<TR>
<TD class="hell">void</TD>
<TD class="hell"><A HREF="#memset">memset( void *s, int c, size_t n );</A></TD>
</TR>
<TR>
<TD class="dunkel">double</TD>
<TD class="dunkel"><A HREF="#modf">modf( double x, double *iptr );</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#outp">outp( value, port );</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#parity_even_bit">parity_even_bit( val );</A></TD>
</TR>
<TR>
<TD class="hell">double</TD>
<TD class="hell"><A HREF="#pow">pow( double x, double y );</A></TD>
</TR>
<TR>
<TD class="dunkel">void</TD>
<TD class="dunkel"><A HREF="#qsort">qsort(void *base, size_t nmemb, size_t
size, __compar_fn_t compar);</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#sbi">sbi( port, bit );</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#sei">sei();</A></TD>
</TR>
<TR>
<TD class="hell">int</TD>
<TD class="hell"><A HREF="#setjmp">setjmp( jmp_buf env );</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#SIG_ADC">SIG_ADC(</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#SIG_COMPARATOR">SIG_COMPARATOR(</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#SIG_EEPROM">SIG_EEPROM(</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#SIG_INPUT_CAPTURE1">SIG_INPUT_CAPTURE1(</A></TD>
</TR>
<TR>
<TD class="dunkel"> </TD>
<TD class="dunkel"><A HREF="#SIG_INTERRUPT">SIG_INTERRUPT0 through SIG_INTERRUPT7</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#SIG_OUTPUT_COMPARE0">SIG_OUTPUT_COMPARE0</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#SIG_OUTPUT_COMPARE1A">SIG_OUTPUT_COMPARE1A</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#SIG_OUTPUT_COMPARE1B">SIG_OUTPUT_COMPARE1B</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#SIG_OUTPUT_COMPARE2">SIG_OUTPUT_COMPARE2</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#SIG_OVERFLOW0">SIG_OVERFLOW0</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#SIG_OVERFLOW1">SIG_OVERFLOW1</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#SIG_OVERFLOW2">SIG_OVERFLOW2</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#SIG_SPI">SIG_SPI</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#SIG_UART1_DATA">SIG_UART1_DATA</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#SIG_UART1_RECV">SIG_UART1_RECV</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#SIG_UART1_TRANS">SIG_UART1_TRANS</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#SIG_UART_DATA">SIG_UART_DATA</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#SIG_UART_RECV">SIG_UART_RECV</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#SIG_UART_TRANS">SIG_UART_TRANS</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#SIGNAL">SIGNAL( signame );</A></TD>
</TR>
<TR>
<TD class="dunkel">double</TD>
<TD class="dunkel"><A HREF="#sin">sin( double x );</A></TD>
</TR>
<TR>
<TD class="hell">double</TD>
<TD class="hell"><A HREF="#sinh">sinh( double x );</A></TD>
</TR>
<TR>
<TD class="dunkel">double</TD>
<TD class="dunkel"><A HREF="#sqrt">sqrt( double x );</A></TD>
</TR>
<TR>
<TD class="hell">double</TD>
<TD class="hell"><A HREF="#square">square( double x );</A></TD>
</TR>
<TR>
<TD class="dunkel">extern int</TD>
<TD class="dunkel"><A HREF="#strcasecmp">strcasecmp(const char *s1, const
char *s2);</A></TD>
</TR>
<TR>
<TD class="hell">char</TD>
<TD class="hell"><A HREF="#strcat">strcat( char *dest, char *src );</A></TD>
</TR>
<TR>
<TD class="dunkel">char</TD>
<TD class="dunkel"><A HREF="#strchr">strchr( const char *s, int c );</A></TD>
</TR>
<TR>
<TD class="hell">int</TD>
<TD class="hell"><A HREF="#strcmp">strcmp( const char *s1, const char* s2
);</A></TD>
</TR>
<TR>
<TD class="dunkel">char</TD>
<TD class="dunkel"><A HREF="#strcpy">strcpy( char *dest, char *src );</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#strdupa">strdupa( s );</A></TD>
</TR>
<TR>
<TD class="dunkel">size_t</TD>
<TD class="dunkel"><A HREF="#strlen">strlen( char *s );</A></TD>
</TR>
<TR>
<TD class="hell">extern char</TD>
<TD class="hell"><A HREF="#strlwr">strlwr(char *);</A></TD>
</TR>
<TR>
<TD class="dunkel">extern int</TD>
<TD class="dunkel"><A HREF="#strncasecmp">strncasecmp(const char *, const
char *, size_t);</A></TD>
</TR>
<TR>
<TD class="hell">char</TD>
<TD class="hell"><A HREF="#strncat">strncat( char *dest, char *src, size_t
n );</A></TD>
</TR>
<TR>
<TD class="dunkel">int</TD>
<TD class="dunkel"><A HREF="#strncmp">strncmp( const char *s1, const char*
s2, size_t n );</A></TD>
</TR>
<TR>
<TD class="hell">char</TD>
<TD class="hell"><A HREF="#strncpy">strncpy( char *dest, char *src, size_t
n );</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#strndupa">strndupa( s, n );</A></TD>
</TR>
<TR>
<TD class="hell">size_t</TD>
<TD class="hell"><A HREF="#strnlen">strnlen( const char *s, size_t maxlen
);</A></TD>
</TR>
<TR>
<TD class="dunkel">char</TD>
<TD class="dunkel"><A HREF="#strrchr">strrchr( const char *s, int c );</A></TD>
</TR>
<TR>
<TD class="hell">extern char</TD>
<TD class="hell"><A HREF="#strrev">strrev( char *s1 );</A></TD>
</TR>
<TR>
<TD class="dunkel">extern char</TD>
<TD class="dunkel"><A HREF="#strstr">strstr( const char *haystack, const char
*needle );</A></TD>
</TR>
<!-- Duplicate
<TR>
<TD class="hell">double</TD>
<TD class="hell"><A HREF="#strtod">strtod( char *, char ** );</A></TD>
</TR>
-->
<TR>
<TD class="hell">double</TD>
<TD class="hell"><A HREF="#strtod">strtod( const char *s, char **endptr
);</A></TD>
</TR>
<TR>
<TD class="dunkel">long</TD>
<TD class="dunkel"><A HREF="#strtol">strtol( const char *nptr, char **endptr,
int base );</A></TD>
</TR>
<TR>
<TD class="hell">unsigned long</TD>
<TD class="hell"><A HREF="#strtoul">strtoul( const char *nptr, char **endptr,
int base );</A></TD>
</TR>
<TR>
<TD class="dunkel">extern char</TD>
<TD class="dunkel"><A HREF="#strupr">strupr( char * );</A></TD>
</TR>
<TR>
<TD class="hell">double</TD>
<TD class="hell"><A HREF="#tan">tan( double x );</A></TD>
</TR>
<TR>
<TD class="dunkel">double</TD>
<TD class="dunkel"><A HREF="#tanh">tanh( double x );</A></TD>
</TR>
<TR>
<TD class="hell">void</TD>
<TD class="hell"><A HREF="#timer0_source">timer0_source( unsigned int src
);</A></TD>
</TR>
<TR>
<TD class="dunkel">void</TD>
<TD class="dunkel"><A HREF="#timer0_start">timer0_start();</A></TD>
</TR>
<TR>
<TD class="hell">void</TD>
<TD class="hell"><A HREF="#timer0_stop">timer0_stop();</A></TD>
</TR>
<TR>
<TD class="dunkel">void</TD>
<TD class="dunkel"><A HREF="#timer_enable_int">timer_enable_int( unsigned char
ints );</A></TD>
</TR>
<TR>
<TD class="hell">int</TD>
<TD class="hell"><A HREF="#toascii">toascii( int __c );</A></TD>
</TR>
<TR>
<TD class="dunkel">int</TD>
<TD class="dunkel"><A HREF="#tolower">tolower( int __c );</A></TD>
</TR>
<TR>
<TD class="hell">int</TD>
<TD class="hell"><A HREF="#toupper">toupper( int __c );</A></TD>
</TR>
<TR>
<TD class="dunkel">char *</TD>
<TD class="dunkel"><A HREF="#ultoa">ultoa( unsigned long val, char *s, int radix );</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#wdt_disable">wdt_disable();</A></TD>
</TR>
<TR>
<TD class="dunkel"></TD>
<TD class="dunkel"><A HREF="#wdt_enable">wdt_enable( timeout );</A></TD>
</TR>
<TR>
<TD class="hell"></TD>
<TD class="hell"><A HREF="#wdt_reset">wdt_reset();</A></TD>
</TR>
</TABLE>
</tt>
<p></p>
<HR>
<A NAME="ctype.h"><H3>CTYPE.H</H3></A>
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD WIDTH="30%" class="hell"><A NAME="isalnum"></A>int isalnum(int __c);</TD>
<TD class="hell">Returns 1 if c is alphanumeric, otherwise 0.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="isalpha"></A>int isalpha(int __c);</TD>
<TD class="dunkel">Returns 1 if c is alphabetic, otherwise 0.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="isascii"></A>int isascii(int __c);</TD>
<TD class="hell">Returns 1 if c is contained in the 7bit ASCII, otherwise
0.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="iscntrl"></A>int iscntrl(int __c);</TD>
<TD class="dunkel">Returns 1 if c is a control character, otherwise 0.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="isdigit"></A>int isdigit(int __c);</TD>
<TD class="hell">Returns 1 if c is a digit, otherwise 0.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="isgraph"></A>int isgraph(int __c);</TD>
<TD class="dunkel">Returns 1 if c is printable (excluding space), otherwise
0.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="islower"></A>int islower(int __c);</TD>
<TD class="hell">Returns 1 if c is a lower case alphabetic character, otherwise
0.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="isprint"></A>int isprint(int __c);</TD>
<TD class="dunkel">Returns 1 if c is printable (including space), otherwise
0.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="ispunct"></A>int ispunct(int __c);</TD>
<TD class="hell">Returns 1 if c is a puntuation character, otherwise 0.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="isspace"></A>int isspace(int __c);</TD>
<TD class="dunkel">Returns 1 if c is one of space, '\n', '\f', '\r', '\t',
'\v', otherwise 0.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="isupper"></A>int isupper(int __c);</TD>
<TD class="hell">Returns 1 if c is an upper case alphabetic character, otherwise
0.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="isxdigit"></A>int isxdigit(int __c);</TD>
<TD class="dunkel">Returns 1 if c is a hexadecimal digit (0-9 or A-F), otherwise
0.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="isblank"></A>int isblank(int __c);</TD>
<TD class="hell">Returns 1 if c is a blank character, otherwise
0.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="toascii"></A>int toascii(int __c);</TD>
<TD class="dunkel">Converts c to a 7bit ASCII character.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="tolower"></A>int tolower(int __c);</TD>
<TD class="hell">Converts c to lower case.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="toupper"></A>int toupper(int __c);</TD>
<TD class="dunkel">Converts c to upper case.</TD>
</TR>
</TABLE>
<HR>
<A NAME="eeprom.h"><H3>EEPROM.H</H3></A>
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD WIDTH="30%" class="hell"><A NAME="eeprom_is_ready"></A>int eeprom_is_ready()
/* Macro */</TD>
<TD class="hell">Returns != 0 if the EEPROM is ready (bit EEWE in register
EECR is 0).</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="eeprom_rb"></A>unsigned char eeprom_rb(unsigned
int addr);</TD>
<TD class="dunkel">Read one byte from EEPROM address 'addr'.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="eeprom_rw"></A>unsigned int eeprom_rw(unsigned int
addr);</TD>
<TD class="hell">Read one 16-bit word (little endian) from EEPROM address
'addr'.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="eeprom_wb"></A>void eeprom_wb(unsigned int addr,
unsigned char val);</TD>
<TD class="dunkel">Write a byte 'val' to EEPROM address 'addr'.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="eeprom_read_block"></A>void eeprom_read_block(void
*buf, unsigned int addr, size_t n);</TD>
<TD class="hell">Read a block of 'size' bytes from EEPROM address 'addr' to
'buf'.</TD>
</TR>
<TR>
<TD class="dunkel">_EEPUT(addr, val) eeprom_wb(addr, val)<BR>
_EEGET(var, addr) (var) = eeprom_rb(addr)</TD>
<TD class="dunkel">Compatibility macros for IAR C compatibility.</TD>
</TR>
</TABLE>
<HR>
<A NAME="errno.h"><H3>ERRNO.H</H3></A>
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD WIDTH="30%" class="hell"><A NAME="errno"></A>int errno;</TD>
<TD class="hell">Holds the system-wide error code.</TD>
</TR>
</TABLE>
<HR>
<A NAME="ina90.h"><H3>INA90.H</H3></A>
<P>
This header file contains some compatibility functions and macros to make
porting applications from the IAR C compiler to avr-gcc easier. Since you wouldn't
use it for writing new applications, there's no need for documentation here (lazy
me).
</P>
<HR>
<A NAME="interrupt.h"><H3>INTERRUPT.H</H3></A>
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD WIDTH="30%" class="hell"><A NAME="sei"></A>sei();</TD>
<TD class="hell">Enable Interrupts. Macro.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="cli"></A>cli();</TD>
<TD class="dunkel">Disable Interrupts. Macro.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="enable_external_int"></A>void enable_external_int(
unsigned char ints );</TD>
<TD class="hell">Write 'ints' to the EIMSK or GIMSK register, depending on
whether EIMSK or GIMSK is defined.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="timer_enable_int"></A>void timer_enable_int( unsigned
char ints );</TD>
<TD class="dunkel">Write 'ints' to the TIMSK register, if TIMSK is defined.</TD>
</TR>
</TABLE>
<HR>
<A NAME="inttypes.h"><H3>INTTYPES.H</H3></A>
<P>
Defines the following types:
</P>
<TT>typedef signed char int8_t;<BR>
typedef unsigned char uint8_t;<BR>
<BR>
typedef int int16_t;<BR>
typedef unsigned int uint16_t;<BR>
<BR>
typedef long int32_t;<BR>
typedef unsigned long uint32_t;<BR>
<BR>
typedef long long int64_t;<BR>
typedef unsigned long long uint64_t;<BR>
<BR>
typedef int16_t intptr_t;<BR>
typedef uint16_t uintptr_t;<BR>
</TT>
<P>
Be careful with the <TT>-mint8</TT> option, though.
</P>
<HR>
<A NAME="io-avr.h"><H3>IO-AVR.H</H3></A>
<P>
Automagically includes the <A HREF="#ioXXX.h">ioXXX.h</A> header file for the
target AVR microcontroller.
</P>
<HR>
<A NAME="io.h"><H3>IO.H</H3></A>
<P>
Just includes both <A HREF="#io-avr.h">io-avr.h</A> and <A HREF="#iomacros.h">iomacros.h</A>.
</P>
<HR>
<A NAME="ioXXX.h"><H3>IOXXX.H</H3></A>
<P>
I/O-register definitions for the XXX MCU. Refer to the specific datasheet for a
description of the registers and their functions.
</P>
<HR>
<A NAME="iomacros.h"><H3>IOMACROS.H</H3></A>
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD WIDTH="30%" class="hell"><A NAME="BV"></A>BV( x );</TD>
<TD class="hell">Returns the value of bit x (BitValue). Essentially an (1
<< x). Macro.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="inp"></A>inp( port );</TD>
<TD class="dunkel">Read byte from port 'port'. Macro. Automagically distinguishes
between constant and non-constant memory I/O addresses and calls the macros
__inb or __mmio, respectively.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="outp"></A>outp( value, port );</TD>
<TD class="hell">Write 'value' to 'port'. Macro. Similar black magic as inp(
port ).</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="cbi"></A>cbi( port, bit );</TD>
<TD class="dunkel">Clear bit 'bit' in port 'port'. Macro. Slowly the black
magic here is getting the better of me.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="sbi"></A>sbi( port, bit );</TD>
<TD class="hell">Set bit 'bit' in port 'port'. Macro. Don't ask.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="bit_is_set"></A>bit_is_set( port, bit );</TD>
<TD class="dunkel">Returns something != 0, if bit 'bit' in 'port' is set,
otherwise 0. Macro.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="bit_is_clear"></A>bit_is_clear( port, bit );</TD>
<TD class="hell">Returns something != 0, if bit 'bit' in 'port' is clear,
otherwise 0. Macro.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="loop_until_bit_is_set"></A>loop_until_bit_ist_set(
port, bit );</TD>
<TD class="dunkel">Loops until bit 'bit' in port 'port' is set. Macro.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="loop_until_bit_is_clear"></A>loop_until_bit_is_clear(
port, bit );</TD>
<TD class="hell">Loops until bit 'bit' in port 'port' is clear. Macro.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="parity_even_bit"></A>parity_even_bit( val );</TD>
<TD class="dunkel">Returns 0 if the byte 'val' has an even number of ones,
1 otherwise. Macro.</TD>
</TD>
</TR>
</TABLE>
<HR>
<A NAME="math.h"><H3>MATH.H</H3></A>
<P>
Constants:
</P>
<TT>M_PI = 3.141592653589793238462643</TT><BR>
Pi.<BR>
<TT>M_SQRT2 = 1.4142135623730950488016887</TT><BR>
The square root of two.<BR>
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD WIDTH="30%" class="hell"><A NAME="cos"></A>double cos( double x );</TD>
<TD class="hell">Returns the cosine of x.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="fabs"></A>double fabs( double x );</TD>
<TD class="dunkel">Returns the absolute value of x.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="fmod"></A>double fmod( double x, double y );</TD>
<TD class="hell">Returns the floating point remainder of x/y.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="modf"></A>double modf( double x, double *iptr
);</TD>
<TD class="dunkel">Returns the fractional part of x and stores the integral
part in *iptr.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="sin"></A>double sin( double x );</TD>
<TD class="hell">Returns the sine of x.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="sqrt"></A>double sqrt( double x );</TD>
<TD class="dunkel">Returns the square root of x.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="tan"></A>double tan( double x );</TD>
<TD class="hell">Returns the tangens of x.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="floor"></A>double floor( double x );</TD>
<TD class="dunkel">Returns the biggest integer smaller than x.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="ceil"></A>double ceil( doublce x );</TD>
<TD class="hell">Returns the smallest integer bigger than x.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="frexp"></A>double frexp( double x, int *exp );</TD>
<TD class="dunkel">Splits x into a normalized fraction, which is returned,
and an exponent, which is stored in *exp.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="ldexp"></A>double ldexp( double x, int exp );</TD>
<TD class="hell">Returns the result of x*2^exp.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="exp"></A>double exp( double x );</TD>
<TD class="dunkel">Returns e^x;</TD>
</TR>
<TR>
<TD class="hell"><A NAME="cosh"></A>double cosh( double x );</TD>
<TD class="hell">Returns the hyperbolic cosine of x.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="sinh"></A>double sinh( double x );</TD>
<TD class="dunkel">Returns the hyperbolic sine of x.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="tanh"></A>double tanh( double x );</TD>
<TD class="hell">Returns the hyperbolc tangens of x.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="acos"></A>double acos( double x );</TD>
<TD class="dunkel">Returns the arc cosine of x.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="asin"></A>double asin( double x );</TD>
<TD class="hell">Returns the arc sine of x.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="atan"></A>double atan( double x );</TD>
<TD class="dunkel">Returns the arc tangens of x. Output between -PI/2 and
PI/2 (inclusive).</TD>
</TR>
<TR>
<TD class="hell"><A NAME="atan2"></A>double atan2( double x, double y );</TD>
<TD class="hell">Returns the arc tangens of x/y. Also takes the signs of both
arguments into account when determinig the quadrant. Output between -PI
and PI (inclusive).</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="log"></A>double log( double x );</TD>
<TD class="dunkel">Returns the natural logarithm of x.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="log10"></A>double log10( double x );</TD>
<TD class="hell">Returns the logarithm of x to the base 10.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="pow"></A>double pow( double x, double y );</TD>
<TD class="dunkel">Returns x^y.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="strtod"></A>double strtod( const char *s, char **endptr
);</TD>
<TD class="hell">Converts an ASCII string to a double.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="square"></A>double square( double x );</TD>
<TD class="dunkel">Returns x^2;</TD>
</TR>
<TR>
<TD class="hell"><A NAME="inverse"></A>double inverse( double x );</TD>
<TD class="hell">Returns 1/x;</TD>
</TR>
</TABLE>
<HR>
<A NAME="pgmspace.h"><H3>PGMSPACE.H</H3></A>
<P>
Another compatibility header file for the IAR C compiler. Contains (or is
suposed to contain) things like memcpy_P, strcat_P, printf_P etc.
</P>
<P>
Since it's a compatibility header file, I chose not to document it. Yet.
</P>
<HR>
<A NAME="progmem.h"><H3>PROGMEM.H</H3></A>
<P>
Includes <A HREF="#pgmspace.h">pgmspace.h</A>.
</P>
<HR>
<A NAME="setjmp.h"><H3>SETJMP.H</H3></A>
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD WIDTH="30%" class="hell"><A NAME="setjmp"></A>int setjmp( jmp_buf env
);</TD>
<TD class="hell">Declares a longjmp-Target to be jumped at with longjmp (see
below.).</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="longjmp"></A>void longjmp( jmp_buf env, int val
);</TD>
<TD class="dunkel">Executes a long jump to the position previously defined
with <tt>setjmp( 'env' )</tt>, which will return 'val'.</TD>
</TR>
</TABLE>
<HR>
<A NAME="sig-avr.h"><H3>SIG-AVR.H</H3></A>
<P>
Defines symbols for the interrupt vectors that are stored at the begining of the
flash memory. Defined are:
<P>
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD WIDTH="30%" class="hell"><A NAME="SIG_INTERRUPT"></A>SIG_INTERRUPT0 through
SIG_INTERRUPT7</TD>
<TD class="hell">Handler function name for the external interrupts 0 through
7. Interrupts > 1 are only available on certain ATmega AVRs.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="SIG_OUTPUT_COMPARE2"></A>SIG_OUTPUT_COMPARE2</TD>
<TD class="dunkel">Handler function name for the Compare2 interrupt (Analog
Comparator).</TD>
</TR>
<TR>
<TD class="hell"><A NAME="SIG_OVERFLOW2"></A>SIG_OVERFLOW2</TD>
<TD class="hell">Handler function name for the Overflow2 interrupt.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="SIG_INPUT_CAPTURE1"></A>SIG_INPUT_CAPTURE1</TD>
<TD class="dunkel">Handler function name for the Capture1 interrupt.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="SIG_OUTPUT_COMPARE1A"></A>SIG_OUTPUT_COMPARE1A</TD>
<TD class="hell">Handler function name for the Compare1(A) interrupt.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="SIG_OUTPUT_COMPARE1B"></A>SIG_OUTPUT_COMPARE1B</TD>
<TD class="dunkel">Handler function name for the Compare1(B) interrupt.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="SIG_OVERFLOW1"></A>SIG_OVERFLOW1</TD>
<TD class="hell">Handler function name for the Overflow1 interrupt.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="SIG_OUTPUT_COMPARE0"></A>SIG_OUTPUT_COMPARE0</TD>
<TD class="dunkel">Handler function name for the Compare0 interrupt.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="SIG_OVERFLOW0"></A>SIG_OVERFLOW0</TD>
<TD class="hell">Handler function name for the Overflow0 interrupt.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="SIG_SPI"></A>SIG_SPI</TD>
<TD class="dunkel">Handler function name for the SPI interrupt.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="SIG_UART_RECV"></A>SIG_UART_RECV</TD>
<TD class="hell">Handler function name for the UART(0) Receive Complete interrupt.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="SIG_UART1_RECV"></A>SIG_UART1_RECV</TD>
<TD class="dunkel">Handler function name for the UART1 Receive Complete interrupt.
UART1 is only available on the ATmega161.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="SIG_UART_DATA"></A>SIG_UART_DATA</TD>
<TD class="hell">Handler function name for the UART(0) Data Register Empty
interrupt.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="SIG_UART1_DATA"></A>SIG_UART1_DATA</TD>
<TD class="dunkel">Handler function name for the UART1 Data Register Empty
interrupt. UART1 is only available on the ATmega161.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="SIG_UART_TRANS"></A>SIG_UART_TRANS</TD>
<TD class="hell">Handler function name for the UART(0) Transmit Complete interrupt.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="SIG_UART1_TRANS"></A>SIG_UART1_TRANS</TD>
<TD class="dunkel">Handler function name for the UART1 Transmit Complete interrupt.
UART1 is only available on the ATmega161.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="SIG_ADC"></A>SIG_ADC</TD>
<TD class="hell">Handler function name for the ADC Comversion Complete interrupt.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="SIG_EEPROM"></A>SIG_EEPROM</TD>
<TD class="dunkel">Handler function name for the EEPROM Ready interrupt.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="SIG_COMPARATOR"></A>SIG_COMPARATOR</TD>
<TD class="hell">Handler function name for the Analog Comparator interrupt.</TD>
</TR>
</TABLE>
<P>
Furthermore, the following functions/macros are defined:
</P>
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD WIDTH="30%" class="hell"><A NAME="SIGNAL"></A>SIGNAL( signame );</TD>
<TD class="hell">Used for defining an Signal handler for the signal 'signame'.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="INTERRUPT"></A>INTERRUPT( signame );</TD>
<TD class="dunkel">Used for defining an Interrupt handler for the signal 'signame'.</TD>
<TR>
</TABLE>
<p>In a handler defined
with SIGNAL(), additional interrupts are implicitly forbidden, whereas in an INTERRUPT()
handler, the first (implicit) instruction is "sei", so that additional interrupts can occur.</p>
<p>Thanks to Jörg Wunsch for correcting me there.</p>
<HR>
<A NAME="signal.h"><H3>SIGNAL.H</H3></A>
<P>
Includes <A HREF="#sig-avr.h">sig-avr.h</A>. You should use sig-avr.h directly,
because signal.h might disappear shortly because it conflicts with the "real"
ANSI C signal.h.
</P>
<HR>
<A NAME="stdlib.h"><H3>STDLIB.H</H3></A>
<P>
Defines the following types:
</P>
<TT>typedef struct {<BR>
int quot;<BR>
int rem;<BR>
} div_t;<BR>
<BR>
typedef struct {<BR>
long quot;<BR>
long rem;<BR>
} ldiv_t;<BR>
<BR>
typedef int (*__compar_fn_t)(const void *, const void *);</TT><BR>
Used for comparison functions, eg. qsort().
<P>
Additionally, the following functions/macros are declared:
</P>
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD WIDTH="30%" class="hell"><A NAME="abort"></A>void abort();</TD>
<TD class="hell">Effectively aborts the execution by putting the MCU into
an endless loop.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="labs"></A>long labs( long x );</TD>
<TD class="dunkel">Returns the absolute value of x.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="bsearch"></A>void *bsearch(const void *key, const
void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *));</TD>
<TD class="hell">Performs a binary search on a sorted array.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="div"></A>div_t div( int x, int y );</TD>
<TD class="dunkel">Divides x by y and returns the result (quotient and remainder)
in a div_t struct (see above).</TD>
</TR>
<TR>
<TD class="hell"><A NAME="ldiv"></A>ldiv_t ldiv( lomg x, long y );</TD>
<TD class="hell">Divides x by y and returns the result (quotient and remainder)
in a ldiv_t struct (see above).</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="qsort"></A>void qsort(void *base, size_t nmemb,
size_t size, __compar_fn_t compar);</TD>
<TD class="dunkel">Sorts an array at 'base' with 'nmemb' elements of size
'size', using the comparison function 'compar'.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="strtol"></A>long strtol(const char *nptr, char **endptr,
int base);</TD>
<TD class="hell">Converts the string at 'nptr' to a long integer according
to the base 'base'.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="strtoul"></A>unsigned long strtoul(const char
*nptr, char **endptr, int base);</TD>
<TD class="dunkel">Converts the string at 'nptr' to an unsigned long integer
according to the base 'base'.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="atol"></A>long atol( char *p );</TD>
<TD class="hell">Converts the string 'p' to a long integer.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="atoi"></A>long atoi( char *p );</TD>
<TD class="dunkel">Converts the string 'p' to an integer.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="malloc"></A>void *malloc( size_t size );</TD>
<TD class="hell">Allocates 'size' bytes of memory and returns a pointer to
it. Implemented, but not tested.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="free"></A>void free( void *ptr );</TD>
<TD class="dunkel">Releases the memory at 'ptr', which was previously allocated
with malloc(). Implemented, but not tested.</TD>
</TR>
<TR>
<TD class="hell">double strtod( char *, char ** );</TD>
<TD class="hell">See <A HREF="#strtod">math.h</A>.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="itoa"></A>char *itoa( int value, char *string,
int radix );</TD>
<TD class="dunkel">Converts an integer into a string. This is not ANSI C,
but nonetheless (or maybe just because of this) very useful.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="ltoa"></A>char *ltoa( long value, char *string,
int radix );</TD>
<TD class="hell">Converts a long into a string. Quite the same as itoa.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="ultoa"></A>char *ultoa( unsigned long value, char *string,
int radix );</TD>
<TD class="dunkel">Converts an unsigned long into a string. See above.</TD>
</TR>
</TABLE>
<P>
The following functions are not yet implemented:
</P>
<P>
<TT>atexit(), atof(), calloc(), rand(), realloc(), srand();</TT>
</P>
<HR>
<A NAME="string-avr.h"><H3>STRING-AVR.H</H3></A>
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD WIDTH="30%" class="hell"><A NAME="memcpy"></A>void *memcpy( void *to,
void *from, size_t n );</TD>
<TD class="hell">Copy 'n' bytes from 'from' to 'to'.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="memmove"></A>void *memmove( void *to, void *from,
size_t n );</TD>
<TD class="dunkel">Copy 'n' bytes of 'from' to 'to', guaranteeing correct
behavior for overlapping strings.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="memset"></A>void *memset( void *s, int c, size_t
n );</TD>
<TD class="hell">Set 'n' bytes of 's' to 'c'.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="memcmp"></A>int memcmp( const void *s1, const
void *s2, size_t n );</TD>
<TD class="dunkel">Compare 'n' bytes of 's1' an 's2'.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="memchr"></A>void *memchr( void *s, char c, size_t
n );</TD>
<TD class="hell">Returns a pointer to the first occurence of 'c' in the first
'n' bytes of 's'.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="strlen"></A>size_t strlen( char *s );</TD>
<TD class="dunkel">Returns the length of 's'.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="strcpy"></A>char *strcpy( char *dest, char *src
);</TD>
<TD class="hell">Copies 'src' intro 'dest'.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="strncpy"></A>char *strncpy( char *dest, char *src,
size_t n );</TD>
<TD class="dunkel">Copy no more than n bytes from 'src' to 'dest'.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="strcat"></A>char *strcat( char *dest, char *src
);</TD>
<TD class="hell">Append 'src' onto 'dest'.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="strncat"></A>char *strncat( char *dest, char *src,
size_t n );</TD>
<TD class="dunkel">Append no more than 'n' bytes from 'src' onto 'dest'.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="strcmp"></A>int strcmp( const char *s1, const char*
s2 );</TD>
<TD class="hell">Compare 's1' and 's2'.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="strncmp"></A>int strncmp( const char *s1, const
char* s2, size_t n );</TD>
<TD class="dunkel">Compare 'n' characters from 's1' and 's2'.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="strdupa"></A>strdupa( s );</TD>
<TD class="hell">Duplicate 's', returning an identical allocated string. Macro.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="strndupa"></A>strndupa( s, n );</TD>
<TD class="dunkel">Return an allocated copy of at most 'n' bytes of 's'.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="strchr"></A>char *strchr( const char *s, int c );</TD>
<TD class="hell">Return a pointer to the first occurence of 'c' in 's'.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="strrchr"></A>char *strrchr( const char *s, int
c );</TD>
<TD class="dunkel">Return a pointer to the last occurence of 'c' in 's'.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="strnlen"></A>size_t strnlen( const char *s, size_t
maxlen );</TD>
<TD class="hell">Returns the length of 's', but at most 'maxlen'.</TD>
</TR>
</TABLE>
<HR>
<A NAME="string.h"><H3>STRING.H</H3></A>
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD WIDTH="30%" class="hell"><A NAME="memccpy"></A>extern void *memccpy(void
*dest, const void *src, int c, size_t n);</TD>
<TD class="hell">Copy at most 'n bytes from 'src' to 'dest' until character
'c' is found.</TD>
</TR>
<TR>
<TD class="dunkel">extern void *memchr(const void *, int, size_t);</TD>
<TD class="dunkel"><A HREF="#memchr">See string-avr.h</A>.</TD>
</TR>
<TR>
<TD class="hell">extern int memcmp(const void *, const void *, size_t);</TD>
<TD class="hell"><A HREF="#memcmp">See string-avr.h</A>.</TD>
</TR>
<TR>
<TD class="dunkel">extern void *memcpy(void *, const void *, size_t);</TD>
<TD class="dunkel"><A HREF="#memcpy">See string-avr.h</A>.</TD>
</TR>
<TR>
<TD class="hell">extern void *memmove(void *dest, const void *src, size_t
n);</TD>
<TD class="hell"><A HREF="#memmove">See string-avr.h</A>.</TD>
</TR>
<TR>
<TD class="dunkel">extern void *memset(void *, int, size_t);</TD>
<TD class="dunkel"><A HREF="#memset">See string-avr.h</A>.</TD>
</TR>
<TR>
<TD class="hell">extern char *strcat(char *, const char *);</TD>
<TD class="hell"><A HREF="#strcat">See string-avr.h</A>.</TD>
</TR>
<TR>
<TD class="dunkel">extern char *strchr(const char *, int);</TD>
<TD class="dunkel"><A HREF="#strchr">See string-avr.h</A>.</TD>
</TR>
<TR>
<TD class="hell">extern int strcmp(const char *, const char *);</TD>
<TD class="hell"><A HREF="#strcmp">See string-avr.h</A>.</TD>
</TR>
<TR>
<TD class="dunkel">extern char *strcpy(char *, const char *);</TD>
<TD class="dunkel"><A HREF="#strcpy">See string-avr.h</A>.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="strcasecmp"></A>extern int strcasecmp(const char
*s1, const char *s2);</TD>
<TD class="hell">Compare 's1' and 's2', ignoring case.</TD>
</TR>
<TR>
<TD class="dunkel">extern size_t strlen(const char *);</TD>
<TD class="dunkel"><A HREF="#strlen">See string-avr.h</A>.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="strlwr"></A>extern char *strlwr(char *s);</TD>
<TD class="hell">Converts all upper case characters in 's' to lower case.</TD>
</TR>
<TR>
<TD class="dunkel">extern char *strncat(char *, const char *, size_t);</TD>
<TD class="dunkel"><A HREF="#strncat">See string-avr.h</A>.</TD>
</TR>
<TR>
<TD class="hell">extern int strncmp(const char *, const char *, size_t);</TD>
<TD class="hell"><A HREF="#strncmp">See string-avr.h</A>.</TD>
</TR>
<TR>
<TD class="dunkel">extern char *strncpy(char *, const char *, size_t);</TD>
<TD class="dunkel"><A HREF="#strncpy">See string-avr.h</A>.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="strncasecmp"></A>extern int strncasecmp(const char
*, const char *, size_t);</TD>
<TD class="hell">Compare 'n' bytes of 's1' and 's2', ignoring case.</TD>
</TR>
<TR>
<TD class="dunkel">extern size_t strnlen(const char *, size_t);</TD>
<TD class="dunkel"><A HREF="#strnlen">See string-avr.h</A>.</TD>
</TR>
<TR>
<TD class="hell">extern char *strrchr(const char *, int);</TD>
<TD class="hell"><A HREF="#strrchr">See string-avr.h</A>.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="strrev"></A>extern char *strrev(char *s1);</TD>
<TD class="dunkel">Probably reverses 's1'.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="strstr"></A>extern char *strstr(const char *haystack,
const char *needle);</TD>
<TD class="hell">Locate 'needle' in 'haystack', and return a pointer to it.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="strupr"></A>extern char *strupr(char *s);</TD>
<TD class="dunkel">Converts all lower case characters in 's' to upper case.</TD>
</TR>
</TABLE>
<HR>
<A NAME="timer.h"><H3>TIMER.H</H3></A>
<P>
Defines an enumeration for the Timer Control Register:
</P>
<TT>enum {<BR>
STOP = 0,<BR>
CK = 1,<BR>
CK8 = 2,<BR>
CK64 = 3,<BR>
CK256 = 4,<BR>
CK1024 = 5,<BR>
T0_FALLING_EDGE = 6,<BR>
T0_RISING_EDGE = 7<BR>
};<BR>
</TT>
<P>
And there are the following functions:
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD WIDTH="30%" class="hell"><A NAME="timer0_source"></A>void timer0_source(
unsigned int src );</TD>
<TD class="hell">Writes 'src' into the TCCR0 register.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="timer0_stop"></A>void timer0_stop();</TD>
<TD class="dunkel">Stops Timer 0 by clearing the TCNT0 register.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="timer0_start"></A>coid timer0_start();</TD>
<TD class="hell">Starts Timer 0 by writing a 1 into the TCNT0 register.</TD>
</TR>
</TABLE>
<HR>
<A NAME="twi.h"><H3>TWI.H</H3></A>
<P>
Defines several constants for the ATmega163.
</P>
<HR>
<A NAME="wdt.h"><H3>WDT.H</H3></A>
<TABLE WIDTH="80%" ALIGN="CENTER" BORDER="0">
<TR>
<TD WIDTH="30%" class="hell"><A NAME="wdt_reset"></A>wdt_reset();</TD>
<TD class="hell">Resets the Watchdog Timer.</TD>
</TR>
<TR>
<TD class="dunkel"><A NAME="wdt_enable"></A>wdt_enable( timeout );</TD>
<TD class="dunkel">Enables the Watchdog Timer with timeout 'timeout'. For
the actual timeout value, refer to the Atmel AVR datasheets.</TD>
</TR>
<TR>
<TD class="hell"><A NAME="wdt_disable"></A>wdt_disable();</TD>
<TD class="hell">Disables the Watchdog Timer.</TD>
</TR>
</TABLE>
</BODY>
</HTML>
|