├── CHANGELOG
├── COPYING
├── Makefile
├── README.md
├── docs
├── index.txt
└── libmcp23s17-doc.conf
├── example.c
├── interrupt_example.c
└── src
├── mcp23s17.c
└── mcp23s17.h
/CHANGELOG:
--------------------------------------------------------------------------------
1 | Change Log
2 | ==========
3 |
4 | v0.3.3
5 | ------
6 | - Added the "install" target to Makefile.
7 | - Small fixups and additions to README.md
8 |
9 | v0.3.2
10 | ------
11 | - Fixed issue #8 - added memset to clear transfer struct.
12 | - Fixed issue #9 - correctly tested epoll.
13 |
14 | v0.3.1
15 | ------
16 | - Fixed issue #5 - bug with interrupts.
17 |
18 | v0.3.0
19 | ------
20 | - Added support for interrupts.
21 |
22 | v0.2.0
23 | ------
24 | - Improved documentation.
25 |
26 | v0.1.0
27 | ------
28 | - Initial release.
29 |
--------------------------------------------------------------------------------
/COPYING:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | PROJECT=mcp23s17
2 | SOURCES=src/mcp23s17.c
3 | LIBRARY=static
4 | INCPATHS=
5 | LIBPATHS=
6 | LDFLAGS=
7 | CFLAGS=-c -Wall
8 | CC=gcc
9 |
10 | # ------------ MAGIC BEGINS HERE -------------
11 |
12 | # Automatic generation of some important lists
13 | OBJECTS=$(SOURCES:.c=.o)
14 | INCFLAGS=$(foreach TMP,$(INCPATHS),-I$(TMP))
15 | LIBFLAGS=$(foreach TMP,$(LIBPATHS),-L$(TMP))
16 |
17 | # Set up the output file names for the different output types
18 | ifeq "$(LIBRARY)" "shared"
19 | BINARY=lib$(PROJECT).so
20 | LDFLAGS += -shared
21 | else ifeq "$(LIBRARY)" "static"
22 | BINARY=lib$(PROJECT).a
23 | else
24 | BINARY=$(PROJECT)
25 | endif
26 |
27 | all: $(SOURCES) $(BINARY)
28 |
29 | $(BINARY): $(OBJECTS)
30 | # Link the object files, or archive into a static library
31 | ifeq "$(LIBRARY)" "static"
32 | ar rcs $(BINARY) $(OBJECTS)
33 | else
34 | $(CC) $(LIBFLAGS) $(OBJECTS) $(LDFLAGS) -o $@
35 | endif
36 |
37 | .c.o:
38 | $(CC) $(INCFLAGS) $(CFLAGS) -fPIC $< -o $@
39 |
40 | distclean: clean
41 | rm -f $(BINARY)
42 |
43 | example: example.c
44 | gcc -o example example.c -Isrc/ -L. -lmcp23s17
45 |
46 | interrupt_example: interrupt_example.c
47 | gcc -o interrupt_example interrupt_example.c -Isrc/ -L. -lmcp23s17
48 |
49 | clean:
50 | rm -f $(OBJECTS)
51 |
52 | install: $(BINARY)
53 | install src/mcp23s17.h /usr/local/include
54 | install $(BINARY) /usr/local/lib
55 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | libmcp23s17
2 | ===========
3 |
4 | A simple library for accessing the [MCP23S17](http://www.microchip.com/MCP23S17)
5 | port expander through SPI.
6 |
7 | Building
8 | --------
9 |
10 | To build the library, use:
11 |
12 | $ make
13 |
14 | Install the library to `/usr/local` using:
15 |
16 | $ make install
17 |
18 | To test the library, compile and execute the example program:
19 |
20 | $ make example
21 | $ ./example
22 |
23 | Another example program, using interrupts, is available. Build with:
24 |
25 | $ make interrupt_example
26 | $ ./interrupt_example
27 |
28 | Usage
29 | -----
30 |
31 | See `example.c` and `interrupt_example.c` for ideas on how to use.
32 |
33 | Compile your software with the following flag:
34 |
35 | -lmcp23s17
36 |
37 | You can specify the path of the library manually, using:
38 |
39 | -I/path/to/headers -L/path/to/libmcp23s17 -lmcp23s17
40 |
41 | Documentation
42 | -------------
43 |
44 | An online version of the documentation is available at http://piface.github.io/libmcp23s17.
45 |
46 | Build it with (assuming that you are in the directory of the cloned repository):
47 |
48 | $ cd docs/
49 | $ doxygen libmcp23s17-doc.conf
50 |
51 | To view as HTML, point your browser to `docs/html/index.html`.
52 |
53 | To view as PDF:
54 |
55 | $ cd latex/
56 | $ make
57 |
58 | The pdf is called `refman.pdf`.
59 |
--------------------------------------------------------------------------------
/docs/index.txt:
--------------------------------------------------------------------------------
1 | /**
2 | @mainpage
3 |
4 | [mcp23s17.h](mcp23s17_8h.html)
5 |
6 | @section links Links
7 |
8 | - [piface.org.uk](http://www.piface.org.uk)
9 | - [piface product source code](http://piface.github.io)
10 | - [Source code on GitHub](https://github.com/piface/libmcp23s17)
11 |
12 | @section use Using the library
13 |
14 | Download:
15 |
16 | $ git clone https://github.com/piface/libmcp23s17.git
17 |
18 | Build the library:
19 |
20 | $ cd libmcp23s17/
21 | $ make
22 |
23 | This creates the library `libmcp23s17.a`. Build the example (using PiFace Digital):
24 |
25 | $ make example
26 |
27 | Include the library in your project with:
28 |
29 | $ gcc -o example example.c -Isrc/ -L. -lmcp23s17
30 |
31 | `-I` directories to search for header files.
32 | `-L` directories to search for libraries.
33 | `-l` libraries to link.
34 |
35 | @section todo Todo
36 |
37 | Feel free to contribute!
38 |
39 | - Debian install
40 |
41 | */
--------------------------------------------------------------------------------
/docs/libmcp23s17-doc.conf:
--------------------------------------------------------------------------------
1 | # Doxyfile 1.8.1.2
2 |
3 | # This file describes the settings to be used by the documentation system
4 | # doxygen (www.doxygen.org) for a project
5 | #
6 | # All text after a hash (#) is considered a comment and will be ignored
7 | # The format is:
8 | # TAG = value [value, ...]
9 | # For lists items can also be appended using:
10 | # TAG += value [value, ...]
11 | # Values that contain spaces should be placed between quotes (" ")
12 |
13 | #---------------------------------------------------------------------------
14 | # Project related configuration options
15 | #---------------------------------------------------------------------------
16 |
17 | # This tag specifies the encoding used for all characters in the config file
18 | # that follow. The default is UTF-8 which is also the encoding used for all
19 | # text before the first occurrence of this tag. Doxygen uses libiconv (or the
20 | # iconv built into libc) for the transcoding. See
21 | # http://www.gnu.org/software/libiconv for the list of possible encodings.
22 |
23 | DOXYFILE_ENCODING = UTF-8
24 |
25 | # The PROJECT_NAME tag is a single word (or sequence of words) that should
26 | # identify the project. Note that if you do not use Doxywizard you need
27 | # to put quotes around the project name if it contains spaces.
28 |
29 | PROJECT_NAME = libmcp23s17
30 |
31 | # The PROJECT_NUMBER tag can be used to enter a project or revision number.
32 | # This could be handy for archiving the generated documentation or
33 | # if some version control system is used.
34 |
35 | PROJECT_NUMBER = 0.3.3
36 |
37 | # Using the PROJECT_BRIEF tag one can provide an optional one line description
38 | # for a project that appears at the top of each page and should give viewer
39 | # a quick idea about the purpose of the project. Keep the description short.
40 |
41 | PROJECT_BRIEF = "A simple static C library for the MCP23S17 port expander."
42 |
43 | # With the PROJECT_LOGO tag one can specify an logo or icon that is
44 | # included in the documentation. The maximum height of the logo should not
45 | # exceed 55 pixels and the maximum width should not exceed 200 pixels.
46 | # Doxygen will copy the logo to the output directory.
47 |
48 | PROJECT_LOGO =
49 |
50 | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
51 | # base path where the generated documentation will be put.
52 | # If a relative path is entered, it will be relative to the location
53 | # where doxygen was started. If left blank the current directory will be used.
54 |
55 | OUTPUT_DIRECTORY =
56 |
57 | # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
58 | # 4096 sub-directories (in 2 levels) under the output directory of each output
59 | # format and will distribute the generated files over these directories.
60 | # Enabling this option can be useful when feeding doxygen a huge amount of
61 | # source files, where putting all generated files in the same directory would
62 | # otherwise cause performance problems for the file system.
63 |
64 | CREATE_SUBDIRS = NO
65 |
66 | # The OUTPUT_LANGUAGE tag is used to specify the language in which all
67 | # documentation generated by doxygen is written. Doxygen will use this
68 | # information to generate all constant output in the proper language.
69 | # The default language is English, other supported languages are:
70 | # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
71 | # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
72 | # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
73 | # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
74 | # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
75 | # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
76 |
77 | OUTPUT_LANGUAGE = English
78 |
79 | # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
80 | # include brief member descriptions after the members that are listed in
81 | # the file and class documentation (similar to JavaDoc).
82 | # Set to NO to disable this.
83 |
84 | BRIEF_MEMBER_DESC = YES
85 |
86 | # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
87 | # the brief description of a member or function before the detailed description.
88 | # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
89 | # brief descriptions will be completely suppressed.
90 |
91 | REPEAT_BRIEF = YES
92 |
93 | # This tag implements a quasi-intelligent brief description abbreviator
94 | # that is used to form the text in various listings. Each string
95 | # in this list, if found as the leading text of the brief description, will be
96 | # stripped from the text and the result after processing the whole list, is
97 | # used as the annotated text. Otherwise, the brief description is used as-is.
98 | # If left blank, the following values are used ("$name" is automatically
99 | # replaced with the name of the entity): "The $name class" "The $name widget"
100 | # "The $name file" "is" "provides" "specifies" "contains"
101 | # "represents" "a" "an" "the"
102 |
103 | ABBREVIATE_BRIEF =
104 |
105 | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
106 | # Doxygen will generate a detailed section even if there is only a brief
107 | # description.
108 |
109 | ALWAYS_DETAILED_SEC = NO
110 |
111 | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
112 | # inherited members of a class in the documentation of that class as if those
113 | # members were ordinary class members. Constructors, destructors and assignment
114 | # operators of the base classes will not be shown.
115 |
116 | INLINE_INHERITED_MEMB = NO
117 |
118 | # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
119 | # path before files name in the file list and in the header files. If set
120 | # to NO the shortest path that makes the file name unique will be used.
121 |
122 | FULL_PATH_NAMES = YES
123 |
124 | # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
125 | # can be used to strip a user-defined part of the path. Stripping is
126 | # only done if one of the specified strings matches the left-hand part of
127 | # the path. The tag can be used to show relative paths in the file list.
128 | # If left blank the directory from which doxygen is run is used as the
129 | # path to strip.
130 |
131 | STRIP_FROM_PATH =
132 |
133 | # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
134 | # the path mentioned in the documentation of a class, which tells
135 | # the reader which header file to include in order to use a class.
136 | # If left blank only the name of the header file containing the class
137 | # definition is used. Otherwise one should specify the include paths that
138 | # are normally passed to the compiler using the -I flag.
139 |
140 | STRIP_FROM_INC_PATH =
141 |
142 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
143 | # (but less readable) file names. This can be useful if your file system
144 | # doesn't support long names like on DOS, Mac, or CD-ROM.
145 |
146 | SHORT_NAMES = NO
147 |
148 | # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
149 | # will interpret the first line (until the first dot) of a JavaDoc-style
150 | # comment as the brief description. If set to NO, the JavaDoc
151 | # comments will behave just like regular Qt-style comments
152 | # (thus requiring an explicit @brief command for a brief description.)
153 |
154 | JAVADOC_AUTOBRIEF = NO
155 |
156 | # If the QT_AUTOBRIEF tag is set to YES then Doxygen will
157 | # interpret the first line (until the first dot) of a Qt-style
158 | # comment as the brief description. If set to NO, the comments
159 | # will behave just like regular Qt-style comments (thus requiring
160 | # an explicit \brief command for a brief description.)
161 |
162 | QT_AUTOBRIEF = NO
163 |
164 | # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
165 | # treat a multi-line C++ special comment block (i.e. a block of //! or ///
166 | # comments) as a brief description. This used to be the default behaviour.
167 | # The new default is to treat a multi-line C++ comment block as a detailed
168 | # description. Set this tag to YES if you prefer the old behaviour instead.
169 |
170 | MULTILINE_CPP_IS_BRIEF = NO
171 |
172 | # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
173 | # member inherits the documentation from any documented member that it
174 | # re-implements.
175 |
176 | INHERIT_DOCS = YES
177 |
178 | # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
179 | # a new page for each member. If set to NO, the documentation of a member will
180 | # be part of the file/class/namespace that contains it.
181 |
182 | SEPARATE_MEMBER_PAGES = NO
183 |
184 | # The TAB_SIZE tag can be used to set the number of spaces in a tab.
185 | # Doxygen uses this value to replace tabs by spaces in code fragments.
186 |
187 | TAB_SIZE = 4
188 |
189 | # This tag can be used to specify a number of aliases that acts
190 | # as commands in the documentation. An alias has the form "name=value".
191 | # For example adding "sideeffect=\par Side Effects:\n" will allow you to
192 | # put the command \sideeffect (or @sideeffect) in the documentation, which
193 | # will result in a user-defined paragraph with heading "Side Effects:".
194 | # You can put \n's in the value part of an alias to insert newlines.
195 |
196 | ALIASES =
197 |
198 | # This tag can be used to specify a number of word-keyword mappings (TCL only).
199 | # A mapping has the form "name=value". For example adding
200 | # "class=itcl::class" will allow you to use the command class in the
201 | # itcl::class meaning.
202 |
203 | TCL_SUBST =
204 |
205 | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
206 | # sources only. Doxygen will then generate output that is more tailored for C.
207 | # For instance, some of the names that are used will be different. The list
208 | # of all members will be omitted, etc.
209 |
210 | OPTIMIZE_OUTPUT_FOR_C = YES
211 |
212 | # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
213 | # sources only. Doxygen will then generate output that is more tailored for
214 | # Java. For instance, namespaces will be presented as packages, qualified
215 | # scopes will look different, etc.
216 |
217 | OPTIMIZE_OUTPUT_JAVA = NO
218 |
219 | # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
220 | # sources only. Doxygen will then generate output that is more tailored for
221 | # Fortran.
222 |
223 | OPTIMIZE_FOR_FORTRAN = NO
224 |
225 | # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
226 | # sources. Doxygen will then generate output that is tailored for
227 | # VHDL.
228 |
229 | OPTIMIZE_OUTPUT_VHDL = NO
230 |
231 | # Doxygen selects the parser to use depending on the extension of the files it
232 | # parses. With this tag you can assign which parser to use for a given extension.
233 | # Doxygen has a built-in mapping, but you can override or extend it using this
234 | # tag. The format is ext=language, where ext is a file extension, and language
235 | # is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
236 | # C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
237 | # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
238 | # (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
239 | # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
240 |
241 | EXTENSION_MAPPING =
242 |
243 | # If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
244 | # comments according to the Markdown format, which allows for more readable
245 | # documentation. See http://daringfireball.net/projects/markdown/ for details.
246 | # The output of markdown processing is further processed by doxygen, so you
247 | # can mix doxygen, HTML, and XML commands with Markdown formatting.
248 | # Disable only in case of backward compatibilities issues.
249 |
250 | MARKDOWN_SUPPORT = YES
251 |
252 | # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
253 | # to include (a tag file for) the STL sources as input, then you should
254 | # set this tag to YES in order to let doxygen match functions declarations and
255 | # definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
256 | # func(std::string) {}). This also makes the inheritance and collaboration
257 | # diagrams that involve STL classes more complete and accurate.
258 |
259 | BUILTIN_STL_SUPPORT = NO
260 |
261 | # If you use Microsoft's C++/CLI language, you should set this option to YES to
262 | # enable parsing support.
263 |
264 | CPP_CLI_SUPPORT = NO
265 |
266 | # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
267 | # Doxygen will parse them like normal C++ but will assume all classes use public
268 | # instead of private inheritance when no explicit protection keyword is present.
269 |
270 | SIP_SUPPORT = NO
271 |
272 | # For Microsoft's IDL there are propget and propput attributes to indicate getter
273 | # and setter methods for a property. Setting this option to YES (the default)
274 | # will make doxygen replace the get and set methods by a property in the
275 | # documentation. This will only work if the methods are indeed getting or
276 | # setting a simple type. If this is not the case, or you want to show the
277 | # methods anyway, you should set this option to NO.
278 |
279 | IDL_PROPERTY_SUPPORT = YES
280 |
281 | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
282 | # tag is set to YES, then doxygen will reuse the documentation of the first
283 | # member in the group (if any) for the other members of the group. By default
284 | # all members of a group must be documented explicitly.
285 |
286 | DISTRIBUTE_GROUP_DOC = NO
287 |
288 | # Set the SUBGROUPING tag to YES (the default) to allow class member groups of
289 | # the same type (for instance a group of public functions) to be put as a
290 | # subgroup of that type (e.g. under the Public Functions section). Set it to
291 | # NO to prevent subgrouping. Alternatively, this can be done per class using
292 | # the \nosubgrouping command.
293 |
294 | SUBGROUPING = YES
295 |
296 | # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
297 | # unions are shown inside the group in which they are included (e.g. using
298 | # @ingroup) instead of on a separate page (for HTML and Man pages) or
299 | # section (for LaTeX and RTF).
300 |
301 | INLINE_GROUPED_CLASSES = NO
302 |
303 | # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
304 | # unions with only public data fields will be shown inline in the documentation
305 | # of the scope in which they are defined (i.e. file, namespace, or group
306 | # documentation), provided this scope is documented. If set to NO (the default),
307 | # structs, classes, and unions are shown on a separate page (for HTML and Man
308 | # pages) or section (for LaTeX and RTF).
309 |
310 | INLINE_SIMPLE_STRUCTS = NO
311 |
312 | # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
313 | # is documented as struct, union, or enum with the name of the typedef. So
314 | # typedef struct TypeS {} TypeT, will appear in the documentation as a struct
315 | # with name TypeT. When disabled the typedef will appear as a member of a file,
316 | # namespace, or class. And the struct will be named TypeS. This can typically
317 | # be useful for C code in case the coding convention dictates that all compound
318 | # types are typedef'ed and only the typedef is referenced, never the tag name.
319 |
320 | TYPEDEF_HIDES_STRUCT = NO
321 |
322 | # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
323 | # determine which symbols to keep in memory and which to flush to disk.
324 | # When the cache is full, less often used symbols will be written to disk.
325 | # For small to medium size projects (<1000 input files) the default value is
326 | # probably good enough. For larger projects a too small cache size can cause
327 | # doxygen to be busy swapping symbols to and from disk most of the time
328 | # causing a significant performance penalty.
329 | # If the system has enough physical memory increasing the cache will improve the
330 | # performance by keeping more symbols in memory. Note that the value works on
331 | # a logarithmic scale so increasing the size by one will roughly double the
332 | # memory usage. The cache size is given by this formula:
333 | # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
334 | # corresponding to a cache size of 2^16 = 65536 symbols.
335 |
336 | SYMBOL_CACHE_SIZE = 0
337 |
338 | # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
339 | # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
340 | # their name and scope. Since this can be an expensive process and often the
341 | # same symbol appear multiple times in the code, doxygen keeps a cache of
342 | # pre-resolved symbols. If the cache is too small doxygen will become slower.
343 | # If the cache is too large, memory is wasted. The cache size is given by this
344 | # formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
345 | # corresponding to a cache size of 2^16 = 65536 symbols.
346 |
347 | LOOKUP_CACHE_SIZE = 0
348 |
349 | #---------------------------------------------------------------------------
350 | # Build related configuration options
351 | #---------------------------------------------------------------------------
352 |
353 | # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
354 | # documentation are documented, even if no documentation was available.
355 | # Private class members and static file members will be hidden unless
356 | # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
357 |
358 | EXTRACT_ALL = NO
359 |
360 | # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
361 | # will be included in the documentation.
362 |
363 | EXTRACT_PRIVATE = NO
364 |
365 | # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
366 | # scope will be included in the documentation.
367 |
368 | EXTRACT_PACKAGE = NO
369 |
370 | # If the EXTRACT_STATIC tag is set to YES all static members of a file
371 | # will be included in the documentation.
372 |
373 | EXTRACT_STATIC = NO
374 |
375 | # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
376 | # defined locally in source files will be included in the documentation.
377 | # If set to NO only classes defined in header files are included.
378 |
379 | EXTRACT_LOCAL_CLASSES = YES
380 |
381 | # This flag is only useful for Objective-C code. When set to YES local
382 | # methods, which are defined in the implementation section but not in
383 | # the interface are included in the documentation.
384 | # If set to NO (the default) only methods in the interface are included.
385 |
386 | EXTRACT_LOCAL_METHODS = NO
387 |
388 | # If this flag is set to YES, the members of anonymous namespaces will be
389 | # extracted and appear in the documentation as a namespace called
390 | # 'anonymous_namespace{file}', where file will be replaced with the base
391 | # name of the file that contains the anonymous namespace. By default
392 | # anonymous namespaces are hidden.
393 |
394 | EXTRACT_ANON_NSPACES = NO
395 |
396 | # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
397 | # undocumented members of documented classes, files or namespaces.
398 | # If set to NO (the default) these members will be included in the
399 | # various overviews, but no documentation section is generated.
400 | # This option has no effect if EXTRACT_ALL is enabled.
401 |
402 | HIDE_UNDOC_MEMBERS = NO
403 |
404 | # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
405 | # undocumented classes that are normally visible in the class hierarchy.
406 | # If set to NO (the default) these classes will be included in the various
407 | # overviews. This option has no effect if EXTRACT_ALL is enabled.
408 |
409 | HIDE_UNDOC_CLASSES = NO
410 |
411 | # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
412 | # friend (class|struct|union) declarations.
413 | # If set to NO (the default) these declarations will be included in the
414 | # documentation.
415 |
416 | HIDE_FRIEND_COMPOUNDS = NO
417 |
418 | # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
419 | # documentation blocks found inside the body of a function.
420 | # If set to NO (the default) these blocks will be appended to the
421 | # function's detailed documentation block.
422 |
423 | HIDE_IN_BODY_DOCS = NO
424 |
425 | # The INTERNAL_DOCS tag determines if documentation
426 | # that is typed after a \internal command is included. If the tag is set
427 | # to NO (the default) then the documentation will be excluded.
428 | # Set it to YES to include the internal documentation.
429 |
430 | INTERNAL_DOCS = NO
431 |
432 | # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
433 | # file names in lower-case letters. If set to YES upper-case letters are also
434 | # allowed. This is useful if you have classes or files whose names only differ
435 | # in case and if your file system supports case sensitive file names. Windows
436 | # and Mac users are advised to set this option to NO.
437 |
438 | CASE_SENSE_NAMES = YES
439 |
440 | # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
441 | # will show members with their full class and namespace scopes in the
442 | # documentation. If set to YES the scope will be hidden.
443 |
444 | HIDE_SCOPE_NAMES = YES
445 |
446 | # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
447 | # will put a list of the files that are included by a file in the documentation
448 | # of that file.
449 |
450 | SHOW_INCLUDE_FILES = YES
451 |
452 | # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
453 | # will list include files with double quotes in the documentation
454 | # rather than with sharp brackets.
455 |
456 | FORCE_LOCAL_INCLUDES = NO
457 |
458 | # If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
459 | # is inserted in the documentation for inline members.
460 |
461 | INLINE_INFO = YES
462 |
463 | # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
464 | # will sort the (detailed) documentation of file and class members
465 | # alphabetically by member name. If set to NO the members will appear in
466 | # declaration order.
467 |
468 | SORT_MEMBER_DOCS = YES
469 |
470 | # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
471 | # brief documentation of file, namespace and class members alphabetically
472 | # by member name. If set to NO (the default) the members will appear in
473 | # declaration order.
474 |
475 | SORT_BRIEF_DOCS = NO
476 |
477 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
478 | # will sort the (brief and detailed) documentation of class members so that
479 | # constructors and destructors are listed first. If set to NO (the default)
480 | # the constructors will appear in the respective orders defined by
481 | # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
482 | # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
483 | # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
484 |
485 | SORT_MEMBERS_CTORS_1ST = NO
486 |
487 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
488 | # hierarchy of group names into alphabetical order. If set to NO (the default)
489 | # the group names will appear in their defined order.
490 |
491 | SORT_GROUP_NAMES = NO
492 |
493 | # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
494 | # sorted by fully-qualified names, including namespaces. If set to
495 | # NO (the default), the class list will be sorted only by class name,
496 | # not including the namespace part.
497 | # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
498 | # Note: This option applies only to the class list, not to the
499 | # alphabetical list.
500 |
501 | SORT_BY_SCOPE_NAME = NO
502 |
503 | # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
504 | # do proper type resolution of all parameters of a function it will reject a
505 | # match between the prototype and the implementation of a member function even
506 | # if there is only one candidate or it is obvious which candidate to choose
507 | # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
508 | # will still accept a match between prototype and implementation in such cases.
509 |
510 | STRICT_PROTO_MATCHING = NO
511 |
512 | # The GENERATE_TODOLIST tag can be used to enable (YES) or
513 | # disable (NO) the todo list. This list is created by putting \todo
514 | # commands in the documentation.
515 |
516 | GENERATE_TODOLIST = YES
517 |
518 | # The GENERATE_TESTLIST tag can be used to enable (YES) or
519 | # disable (NO) the test list. This list is created by putting \test
520 | # commands in the documentation.
521 |
522 | GENERATE_TESTLIST = YES
523 |
524 | # The GENERATE_BUGLIST tag can be used to enable (YES) or
525 | # disable (NO) the bug list. This list is created by putting \bug
526 | # commands in the documentation.
527 |
528 | GENERATE_BUGLIST = YES
529 |
530 | # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
531 | # disable (NO) the deprecated list. This list is created by putting
532 | # \deprecated commands in the documentation.
533 |
534 | GENERATE_DEPRECATEDLIST= YES
535 |
536 | # The ENABLED_SECTIONS tag can be used to enable conditional
537 | # documentation sections, marked by \if sectionname ... \endif.
538 |
539 | ENABLED_SECTIONS =
540 |
541 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines
542 | # the initial value of a variable or macro consists of for it to appear in
543 | # the documentation. If the initializer consists of more lines than specified
544 | # here it will be hidden. Use a value of 0 to hide initializers completely.
545 | # The appearance of the initializer of individual variables and macros in the
546 | # documentation can be controlled using \showinitializer or \hideinitializer
547 | # command in the documentation regardless of this setting.
548 |
549 | MAX_INITIALIZER_LINES = 30
550 |
551 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated
552 | # at the bottom of the documentation of classes and structs. If set to YES the
553 | # list will mention the files that were used to generate the documentation.
554 |
555 | SHOW_USED_FILES = YES
556 |
557 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page.
558 | # This will remove the Files entry from the Quick Index and from the
559 | # Folder Tree View (if specified). The default is YES.
560 |
561 | SHOW_FILES = YES
562 |
563 | # Set the SHOW_NAMESPACES tag to NO to disable the generation of the
564 | # Namespaces page. This will remove the Namespaces entry from the Quick Index
565 | # and from the Folder Tree View (if specified). The default is YES.
566 |
567 | SHOW_NAMESPACES = YES
568 |
569 | # The FILE_VERSION_FILTER tag can be used to specify a program or script that
570 | # doxygen should invoke to get the current version for each file (typically from
571 | # the version control system). Doxygen will invoke the program by executing (via
572 | # popen()) the command , where is the value of
573 | # the FILE_VERSION_FILTER tag, and is the name of an input file
574 | # provided by doxygen. Whatever the program writes to standard output
575 | # is used as the file version. See the manual for examples.
576 |
577 | FILE_VERSION_FILTER =
578 |
579 | # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
580 | # by doxygen. The layout file controls the global structure of the generated
581 | # output files in an output format independent way. To create the layout file
582 | # that represents doxygen's defaults, run doxygen with the -l option.
583 | # You can optionally specify a file name after the option, if omitted
584 | # DoxygenLayout.xml will be used as the name of the layout file.
585 |
586 | LAYOUT_FILE =
587 |
588 | # The CITE_BIB_FILES tag can be used to specify one or more bib files
589 | # containing the references data. This must be a list of .bib files. The
590 | # .bib extension is automatically appended if omitted. Using this command
591 | # requires the bibtex tool to be installed. See also
592 | # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
593 | # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
594 | # feature you need bibtex and perl available in the search path.
595 |
596 | CITE_BIB_FILES =
597 |
598 | #---------------------------------------------------------------------------
599 | # configuration options related to warning and progress messages
600 | #---------------------------------------------------------------------------
601 |
602 | # The QUIET tag can be used to turn on/off the messages that are generated
603 | # by doxygen. Possible values are YES and NO. If left blank NO is used.
604 |
605 | QUIET = NO
606 |
607 | # The WARNINGS tag can be used to turn on/off the warning messages that are
608 | # generated by doxygen. Possible values are YES and NO. If left blank
609 | # NO is used.
610 |
611 | WARNINGS = YES
612 |
613 | # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
614 | # for undocumented members. If EXTRACT_ALL is set to YES then this flag will
615 | # automatically be disabled.
616 |
617 | WARN_IF_UNDOCUMENTED = YES
618 |
619 | # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
620 | # potential errors in the documentation, such as not documenting some
621 | # parameters in a documented function, or documenting parameters that
622 | # don't exist or using markup commands wrongly.
623 |
624 | WARN_IF_DOC_ERROR = YES
625 |
626 | # The WARN_NO_PARAMDOC option can be enabled to get warnings for
627 | # functions that are documented, but have no documentation for their parameters
628 | # or return value. If set to NO (the default) doxygen will only warn about
629 | # wrong or incomplete parameter documentation, but not about the absence of
630 | # documentation.
631 |
632 | WARN_NO_PARAMDOC = NO
633 |
634 | # The WARN_FORMAT tag determines the format of the warning messages that
635 | # doxygen can produce. The string should contain the $file, $line, and $text
636 | # tags, which will be replaced by the file and line number from which the
637 | # warning originated and the warning text. Optionally the format may contain
638 | # $version, which will be replaced by the version of the file (if it could
639 | # be obtained via FILE_VERSION_FILTER)
640 |
641 | WARN_FORMAT = "$file:$line: $text"
642 |
643 | # The WARN_LOGFILE tag can be used to specify a file to which warning
644 | # and error messages should be written. If left blank the output is written
645 | # to stderr.
646 |
647 | WARN_LOGFILE =
648 |
649 | #---------------------------------------------------------------------------
650 | # configuration options related to the input files
651 | #---------------------------------------------------------------------------
652 |
653 | # The INPUT tag can be used to specify the files and/or directories that contain
654 | # documented source files. You may enter file names like "myfile.cpp" or
655 | # directories like "/usr/src/myproject". Separate the files or directories
656 | # with spaces.
657 |
658 | INPUT = index.txt \
659 | ../src/
660 |
661 | # This tag can be used to specify the character encoding of the source files
662 | # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
663 | # also the default input encoding. Doxygen uses libiconv (or the iconv built
664 | # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
665 | # the list of possible encodings.
666 |
667 | INPUT_ENCODING = UTF-8
668 |
669 | # If the value of the INPUT tag contains directories, you can use the
670 | # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
671 | # and *.h) to filter out the source-files in the directories. If left
672 | # blank the following patterns are tested:
673 | # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
674 | # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
675 | # *.f90 *.f *.for *.vhd *.vhdl
676 |
677 | FILE_PATTERNS =
678 |
679 | # The RECURSIVE tag can be used to turn specify whether or not subdirectories
680 | # should be searched for input files as well. Possible values are YES and NO.
681 | # If left blank NO is used.
682 |
683 | RECURSIVE = NO
684 |
685 | # The EXCLUDE tag can be used to specify files and/or directories that should be
686 | # excluded from the INPUT source files. This way you can easily exclude a
687 | # subdirectory from a directory tree whose root is specified with the INPUT tag.
688 | # Note that relative paths are relative to the directory from which doxygen is
689 | # run.
690 |
691 | EXCLUDE =
692 |
693 | # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
694 | # directories that are symbolic links (a Unix file system feature) are excluded
695 | # from the input.
696 |
697 | EXCLUDE_SYMLINKS = NO
698 |
699 | # If the value of the INPUT tag contains directories, you can use the
700 | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
701 | # certain files from those directories. Note that the wildcards are matched
702 | # against the file with absolute path, so to exclude all test directories
703 | # for example use the pattern */test/*
704 |
705 | EXCLUDE_PATTERNS =
706 |
707 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
708 | # (namespaces, classes, functions, etc.) that should be excluded from the
709 | # output. The symbol name can be a fully qualified name, a word, or if the
710 | # wildcard * is used, a substring. Examples: ANamespace, AClass,
711 | # AClass::ANamespace, ANamespace::*Test
712 |
713 | EXCLUDE_SYMBOLS =
714 |
715 | # The EXAMPLE_PATH tag can be used to specify one or more files or
716 | # directories that contain example code fragments that are included (see
717 | # the \include command).
718 |
719 | EXAMPLE_PATH =
720 |
721 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the
722 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
723 | # and *.h) to filter out the source-files in the directories. If left
724 | # blank all files are included.
725 |
726 | EXAMPLE_PATTERNS =
727 |
728 | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
729 | # searched for input files to be used with the \include or \dontinclude
730 | # commands irrespective of the value of the RECURSIVE tag.
731 | # Possible values are YES and NO. If left blank NO is used.
732 |
733 | EXAMPLE_RECURSIVE = NO
734 |
735 | # The IMAGE_PATH tag can be used to specify one or more files or
736 | # directories that contain image that are included in the documentation (see
737 | # the \image command).
738 |
739 | IMAGE_PATH =
740 |
741 | # The INPUT_FILTER tag can be used to specify a program that doxygen should
742 | # invoke to filter for each input file. Doxygen will invoke the filter program
743 | # by executing (via popen()) the command , where
744 | # is the value of the INPUT_FILTER tag, and is the name of an
745 | # input file. Doxygen will then use the output that the filter program writes
746 | # to standard output. If FILTER_PATTERNS is specified, this tag will be
747 | # ignored.
748 |
749 | INPUT_FILTER =
750 |
751 | # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
752 | # basis. Doxygen will compare the file name with each pattern and apply the
753 | # filter if there is a match. The filters are a list of the form:
754 | # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
755 | # info on how filters are used. If FILTER_PATTERNS is empty or if
756 | # non of the patterns match the file name, INPUT_FILTER is applied.
757 |
758 | FILTER_PATTERNS =
759 |
760 | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
761 | # INPUT_FILTER) will be used to filter the input files when producing source
762 | # files to browse (i.e. when SOURCE_BROWSER is set to YES).
763 |
764 | FILTER_SOURCE_FILES = NO
765 |
766 | # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
767 | # pattern. A pattern will override the setting for FILTER_PATTERN (if any)
768 | # and it is also possible to disable source filtering for a specific pattern
769 | # using *.ext= (so without naming a filter). This option only has effect when
770 | # FILTER_SOURCE_FILES is enabled.
771 |
772 | FILTER_SOURCE_PATTERNS =
773 |
774 | #---------------------------------------------------------------------------
775 | # configuration options related to source browsing
776 | #---------------------------------------------------------------------------
777 |
778 | # If the SOURCE_BROWSER tag is set to YES then a list of source files will
779 | # be generated. Documented entities will be cross-referenced with these sources.
780 | # Note: To get rid of all source code in the generated output, make sure also
781 | # VERBATIM_HEADERS is set to NO.
782 |
783 | SOURCE_BROWSER = NO
784 |
785 | # Setting the INLINE_SOURCES tag to YES will include the body
786 | # of functions and classes directly in the documentation.
787 |
788 | INLINE_SOURCES = NO
789 |
790 | # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
791 | # doxygen to hide any special comment blocks from generated source code
792 | # fragments. Normal C, C++ and Fortran comments will always remain visible.
793 |
794 | STRIP_CODE_COMMENTS = YES
795 |
796 | # If the REFERENCED_BY_RELATION tag is set to YES
797 | # then for each documented function all documented
798 | # functions referencing it will be listed.
799 |
800 | REFERENCED_BY_RELATION = NO
801 |
802 | # If the REFERENCES_RELATION tag is set to YES
803 | # then for each documented function all documented entities
804 | # called/used by that function will be listed.
805 |
806 | REFERENCES_RELATION = NO
807 |
808 | # If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
809 | # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
810 | # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
811 | # link to the source code. Otherwise they will link to the documentation.
812 |
813 | REFERENCES_LINK_SOURCE = YES
814 |
815 | # If the USE_HTAGS tag is set to YES then the references to source code
816 | # will point to the HTML generated by the htags(1) tool instead of doxygen
817 | # built-in source browser. The htags tool is part of GNU's global source
818 | # tagging system (see http://www.gnu.org/software/global/global.html). You
819 | # will need version 4.8.6 or higher.
820 |
821 | USE_HTAGS = NO
822 |
823 | # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
824 | # will generate a verbatim copy of the header file for each class for
825 | # which an include is specified. Set to NO to disable this.
826 |
827 | VERBATIM_HEADERS = YES
828 |
829 | #---------------------------------------------------------------------------
830 | # configuration options related to the alphabetical class index
831 | #---------------------------------------------------------------------------
832 |
833 | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
834 | # of all compounds will be generated. Enable this if the project
835 | # contains a lot of classes, structs, unions or interfaces.
836 |
837 | ALPHABETICAL_INDEX = YES
838 |
839 | # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
840 | # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
841 | # in which this list will be split (can be a number in the range [1..20])
842 |
843 | COLS_IN_ALPHA_INDEX = 5
844 |
845 | # In case all classes in a project start with a common prefix, all
846 | # classes will be put under the same header in the alphabetical index.
847 | # The IGNORE_PREFIX tag can be used to specify one or more prefixes that
848 | # should be ignored while generating the index headers.
849 |
850 | IGNORE_PREFIX =
851 |
852 | #---------------------------------------------------------------------------
853 | # configuration options related to the HTML output
854 | #---------------------------------------------------------------------------
855 |
856 | # If the GENERATE_HTML tag is set to YES (the default) Doxygen will
857 | # generate HTML output.
858 |
859 | GENERATE_HTML = YES
860 |
861 | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
862 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be
863 | # put in front of it. If left blank `html' will be used as the default path.
864 |
865 | HTML_OUTPUT = html
866 |
867 | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for
868 | # each generated HTML page (for example: .htm,.php,.asp). If it is left blank
869 | # doxygen will generate files with .html extension.
870 |
871 | HTML_FILE_EXTENSION = .html
872 |
873 | # The HTML_HEADER tag can be used to specify a personal HTML header for
874 | # each generated HTML page. If it is left blank doxygen will generate a
875 | # standard header. Note that when using a custom header you are responsible
876 | # for the proper inclusion of any scripts and style sheets that doxygen
877 | # needs, which is dependent on the configuration options used.
878 | # It is advised to generate a default header using "doxygen -w html
879 | # header.html footer.html stylesheet.css YourConfigFile" and then modify
880 | # that header. Note that the header is subject to change so you typically
881 | # have to redo this when upgrading to a newer version of doxygen or when
882 | # changing the value of configuration settings such as GENERATE_TREEVIEW!
883 |
884 | HTML_HEADER =
885 |
886 | # The HTML_FOOTER tag can be used to specify a personal HTML footer for
887 | # each generated HTML page. If it is left blank doxygen will generate a
888 | # standard footer.
889 |
890 | HTML_FOOTER =
891 |
892 | # The HTML_STYLESHEET tag can be used to specify a user-defined cascading
893 | # style sheet that is used by each HTML page. It can be used to
894 | # fine-tune the look of the HTML output. If the tag is left blank doxygen
895 | # will generate a default style sheet. Note that doxygen will try to copy
896 | # the style sheet file to the HTML output directory, so don't put your own
897 | # style sheet in the HTML output directory as well, or it will be erased!
898 |
899 | HTML_STYLESHEET =
900 |
901 | # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
902 | # other source files which should be copied to the HTML output directory. Note
903 | # that these files will be copied to the base HTML output directory. Use the
904 | # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
905 | # files. In the HTML_STYLESHEET file, use the file name only. Also note that
906 | # the files will be copied as-is; there are no commands or markers available.
907 |
908 | HTML_EXTRA_FILES =
909 |
910 | # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
911 | # Doxygen will adjust the colors in the style sheet and background images
912 | # according to this color. Hue is specified as an angle on a colorwheel,
913 | # see http://en.wikipedia.org/wiki/Hue for more information.
914 | # For instance the value 0 represents red, 60 is yellow, 120 is green,
915 | # 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
916 | # The allowed range is 0 to 359.
917 |
918 | HTML_COLORSTYLE_HUE = 220
919 |
920 | # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
921 | # the colors in the HTML output. For a value of 0 the output will use
922 | # grayscales only. A value of 255 will produce the most vivid colors.
923 |
924 | HTML_COLORSTYLE_SAT = 100
925 |
926 | # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
927 | # the luminance component of the colors in the HTML output. Values below
928 | # 100 gradually make the output lighter, whereas values above 100 make
929 | # the output darker. The value divided by 100 is the actual gamma applied,
930 | # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
931 | # and 100 does not change the gamma.
932 |
933 | HTML_COLORSTYLE_GAMMA = 80
934 |
935 | # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
936 | # page will contain the date and time when the page was generated. Setting
937 | # this to NO can help when comparing the output of multiple runs.
938 |
939 | HTML_TIMESTAMP = YES
940 |
941 | # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
942 | # documentation will contain sections that can be hidden and shown after the
943 | # page has loaded.
944 |
945 | HTML_DYNAMIC_SECTIONS = NO
946 |
947 | # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of
948 | # entries shown in the various tree structured indices initially; the user
949 | # can expand and collapse entries dynamically later on. Doxygen will expand
950 | # the tree to such a level that at most the specified number of entries are
951 | # visible (unless a fully collapsed tree already exceeds this amount).
952 | # So setting the number of entries 1 will produce a full collapsed tree by
953 | # default. 0 is a special value representing an infinite number of entries
954 | # and will result in a full expanded tree by default.
955 |
956 | HTML_INDEX_NUM_ENTRIES = 100
957 |
958 | # If the GENERATE_DOCSET tag is set to YES, additional index files
959 | # will be generated that can be used as input for Apple's Xcode 3
960 | # integrated development environment, introduced with OSX 10.5 (Leopard).
961 | # To create a documentation set, doxygen will generate a Makefile in the
962 | # HTML output directory. Running make will produce the docset in that
963 | # directory and running "make install" will install the docset in
964 | # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
965 | # it at startup.
966 | # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
967 | # for more information.
968 |
969 | GENERATE_DOCSET = NO
970 |
971 | # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
972 | # feed. A documentation feed provides an umbrella under which multiple
973 | # documentation sets from a single provider (such as a company or product suite)
974 | # can be grouped.
975 |
976 | DOCSET_FEEDNAME = "Doxygen generated docs"
977 |
978 | # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
979 | # should uniquely identify the documentation set bundle. This should be a
980 | # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
981 | # will append .docset to the name.
982 |
983 | DOCSET_BUNDLE_ID = org.doxygen.Project
984 |
985 | # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
986 | # the documentation publisher. This should be a reverse domain-name style
987 | # string, e.g. com.mycompany.MyDocSet.documentation.
988 |
989 | DOCSET_PUBLISHER_ID = org.doxygen.Publisher
990 |
991 | # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
992 |
993 | DOCSET_PUBLISHER_NAME = Publisher
994 |
995 | # If the GENERATE_HTMLHELP tag is set to YES, additional index files
996 | # will be generated that can be used as input for tools like the
997 | # Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
998 | # of the generated HTML documentation.
999 |
1000 | GENERATE_HTMLHELP = NO
1001 |
1002 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
1003 | # be used to specify the file name of the resulting .chm file. You
1004 | # can add a path in front of the file if the result should not be
1005 | # written to the html output directory.
1006 |
1007 | CHM_FILE =
1008 |
1009 | # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
1010 | # be used to specify the location (absolute path including file name) of
1011 | # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
1012 | # the HTML help compiler on the generated index.hhp.
1013 |
1014 | HHC_LOCATION =
1015 |
1016 | # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
1017 | # controls if a separate .chi index file is generated (YES) or that
1018 | # it should be included in the master .chm file (NO).
1019 |
1020 | GENERATE_CHI = NO
1021 |
1022 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
1023 | # is used to encode HtmlHelp index (hhk), content (hhc) and project file
1024 | # content.
1025 |
1026 | CHM_INDEX_ENCODING =
1027 |
1028 | # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
1029 | # controls whether a binary table of contents is generated (YES) or a
1030 | # normal table of contents (NO) in the .chm file.
1031 |
1032 | BINARY_TOC = NO
1033 |
1034 | # The TOC_EXPAND flag can be set to YES to add extra items for group members
1035 | # to the contents of the HTML help documentation and to the tree view.
1036 |
1037 | TOC_EXPAND = NO
1038 |
1039 | # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
1040 | # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
1041 | # that can be used as input for Qt's qhelpgenerator to generate a
1042 | # Qt Compressed Help (.qch) of the generated HTML documentation.
1043 |
1044 | GENERATE_QHP = NO
1045 |
1046 | # If the QHG_LOCATION tag is specified, the QCH_FILE tag can
1047 | # be used to specify the file name of the resulting .qch file.
1048 | # The path specified is relative to the HTML output folder.
1049 |
1050 | QCH_FILE =
1051 |
1052 | # The QHP_NAMESPACE tag specifies the namespace to use when generating
1053 | # Qt Help Project output. For more information please see
1054 | # http://doc.trolltech.com/qthelpproject.html#namespace
1055 |
1056 | QHP_NAMESPACE = org.doxygen.Project
1057 |
1058 | # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
1059 | # Qt Help Project output. For more information please see
1060 | # http://doc.trolltech.com/qthelpproject.html#virtual-folders
1061 |
1062 | QHP_VIRTUAL_FOLDER = doc
1063 |
1064 | # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
1065 | # add. For more information please see
1066 | # http://doc.trolltech.com/qthelpproject.html#custom-filters
1067 |
1068 | QHP_CUST_FILTER_NAME =
1069 |
1070 | # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
1071 | # custom filter to add. For more information please see
1072 | #
1073 | # Qt Help Project / Custom Filters.
1074 |
1075 | QHP_CUST_FILTER_ATTRS =
1076 |
1077 | # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
1078 | # project's
1079 | # filter section matches.
1080 | #
1081 | # Qt Help Project / Filter Attributes.
1082 |
1083 | QHP_SECT_FILTER_ATTRS =
1084 |
1085 | # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
1086 | # be used to specify the location of Qt's qhelpgenerator.
1087 | # If non-empty doxygen will try to run qhelpgenerator on the generated
1088 | # .qhp file.
1089 |
1090 | QHG_LOCATION =
1091 |
1092 | # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
1093 | # will be generated, which together with the HTML files, form an Eclipse help
1094 | # plugin. To install this plugin and make it available under the help contents
1095 | # menu in Eclipse, the contents of the directory containing the HTML and XML
1096 | # files needs to be copied into the plugins directory of eclipse. The name of
1097 | # the directory within the plugins directory should be the same as
1098 | # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
1099 | # the help appears.
1100 |
1101 | GENERATE_ECLIPSEHELP = NO
1102 |
1103 | # A unique identifier for the eclipse help plugin. When installing the plugin
1104 | # the directory name containing the HTML and XML files should also have
1105 | # this name.
1106 |
1107 | ECLIPSE_DOC_ID = org.doxygen.Project
1108 |
1109 | # The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
1110 | # at top of each HTML page. The value NO (the default) enables the index and
1111 | # the value YES disables it. Since the tabs have the same information as the
1112 | # navigation tree you can set this option to NO if you already set
1113 | # GENERATE_TREEVIEW to YES.
1114 |
1115 | DISABLE_INDEX = NO
1116 |
1117 | # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
1118 | # structure should be generated to display hierarchical information.
1119 | # If the tag value is set to YES, a side panel will be generated
1120 | # containing a tree-like index structure (just like the one that
1121 | # is generated for HTML Help). For this to work a browser that supports
1122 | # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
1123 | # Windows users are probably better off using the HTML help feature.
1124 | # Since the tree basically has the same information as the tab index you
1125 | # could consider to set DISABLE_INDEX to NO when enabling this option.
1126 |
1127 | GENERATE_TREEVIEW = NO
1128 |
1129 | # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
1130 | # (range [0,1..20]) that doxygen will group on one line in the generated HTML
1131 | # documentation. Note that a value of 0 will completely suppress the enum
1132 | # values from appearing in the overview section.
1133 |
1134 | ENUM_VALUES_PER_LINE = 4
1135 |
1136 | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
1137 | # used to set the initial width (in pixels) of the frame in which the tree
1138 | # is shown.
1139 |
1140 | TREEVIEW_WIDTH = 250
1141 |
1142 | # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
1143 | # links to external symbols imported via tag files in a separate window.
1144 |
1145 | EXT_LINKS_IN_WINDOW = NO
1146 |
1147 | # Use this tag to change the font size of Latex formulas included
1148 | # as images in the HTML documentation. The default is 10. Note that
1149 | # when you change the font size after a successful doxygen run you need
1150 | # to manually remove any form_*.png images from the HTML output directory
1151 | # to force them to be regenerated.
1152 |
1153 | FORMULA_FONTSIZE = 10
1154 |
1155 | # Use the FORMULA_TRANPARENT tag to determine whether or not the images
1156 | # generated for formulas are transparent PNGs. Transparent PNGs are
1157 | # not supported properly for IE 6.0, but are supported on all modern browsers.
1158 | # Note that when changing this option you need to delete any form_*.png files
1159 | # in the HTML output before the changes have effect.
1160 |
1161 | FORMULA_TRANSPARENT = YES
1162 |
1163 | # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
1164 | # (see http://www.mathjax.org) which uses client side Javascript for the
1165 | # rendering instead of using prerendered bitmaps. Use this if you do not
1166 | # have LaTeX installed or if you want to formulas look prettier in the HTML
1167 | # output. When enabled you may also need to install MathJax separately and
1168 | # configure the path to it using the MATHJAX_RELPATH option.
1169 |
1170 | USE_MATHJAX = NO
1171 |
1172 | # When MathJax is enabled you need to specify the location relative to the
1173 | # HTML output directory using the MATHJAX_RELPATH option. The destination
1174 | # directory should contain the MathJax.js script. For instance, if the mathjax
1175 | # directory is located at the same level as the HTML output directory, then
1176 | # MATHJAX_RELPATH should be ../mathjax. The default value points to
1177 | # the MathJax Content Delivery Network so you can quickly see the result without
1178 | # installing MathJax. However, it is strongly recommended to install a local
1179 | # copy of MathJax from http://www.mathjax.org before deployment.
1180 |
1181 | MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
1182 |
1183 | # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
1184 | # names that should be enabled during MathJax rendering.
1185 |
1186 | MATHJAX_EXTENSIONS =
1187 |
1188 | # When the SEARCHENGINE tag is enabled doxygen will generate a search box
1189 | # for the HTML output. The underlying search engine uses javascript
1190 | # and DHTML and should work on any modern browser. Note that when using
1191 | # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
1192 | # (GENERATE_DOCSET) there is already a search function so this one should
1193 | # typically be disabled. For large projects the javascript based search engine
1194 | # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
1195 |
1196 | SEARCHENGINE = YES
1197 |
1198 | # When the SERVER_BASED_SEARCH tag is enabled the search engine will be
1199 | # implemented using a PHP enabled web server instead of at the web client
1200 | # using Javascript. Doxygen will generate the search PHP script and index
1201 | # file to put on the web server. The advantage of the server
1202 | # based approach is that it scales better to large projects and allows
1203 | # full text search. The disadvantages are that it is more difficult to setup
1204 | # and does not have live searching capabilities.
1205 |
1206 | SERVER_BASED_SEARCH = NO
1207 |
1208 | #---------------------------------------------------------------------------
1209 | # configuration options related to the LaTeX output
1210 | #---------------------------------------------------------------------------
1211 |
1212 | # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
1213 | # generate Latex output.
1214 |
1215 | GENERATE_LATEX = YES
1216 |
1217 | # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
1218 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1219 | # put in front of it. If left blank `latex' will be used as the default path.
1220 |
1221 | LATEX_OUTPUT = latex
1222 |
1223 | # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
1224 | # invoked. If left blank `latex' will be used as the default command name.
1225 | # Note that when enabling USE_PDFLATEX this option is only used for
1226 | # generating bitmaps for formulas in the HTML output, but not in the
1227 | # Makefile that is written to the output directory.
1228 |
1229 | LATEX_CMD_NAME = latex
1230 |
1231 | # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
1232 | # generate index for LaTeX. If left blank `makeindex' will be used as the
1233 | # default command name.
1234 |
1235 | MAKEINDEX_CMD_NAME = makeindex
1236 |
1237 | # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
1238 | # LaTeX documents. This may be useful for small projects and may help to
1239 | # save some trees in general.
1240 |
1241 | COMPACT_LATEX = NO
1242 |
1243 | # The PAPER_TYPE tag can be used to set the paper type that is used
1244 | # by the printer. Possible values are: a4, letter, legal and
1245 | # executive. If left blank a4wide will be used.
1246 |
1247 | PAPER_TYPE = a4
1248 |
1249 | # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
1250 | # packages that should be included in the LaTeX output.
1251 |
1252 | EXTRA_PACKAGES =
1253 |
1254 | # The LATEX_HEADER tag can be used to specify a personal LaTeX header for
1255 | # the generated latex document. The header should contain everything until
1256 | # the first chapter. If it is left blank doxygen will generate a
1257 | # standard header. Notice: only use this tag if you know what you are doing!
1258 |
1259 | LATEX_HEADER =
1260 |
1261 | # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
1262 | # the generated latex document. The footer should contain everything after
1263 | # the last chapter. If it is left blank doxygen will generate a
1264 | # standard footer. Notice: only use this tag if you know what you are doing!
1265 |
1266 | LATEX_FOOTER =
1267 |
1268 | # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
1269 | # is prepared for conversion to pdf (using ps2pdf). The pdf file will
1270 | # contain links (just like the HTML output) instead of page references
1271 | # This makes the output suitable for online browsing using a pdf viewer.
1272 |
1273 | PDF_HYPERLINKS = YES
1274 |
1275 | # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
1276 | # plain latex in the generated Makefile. Set this option to YES to get a
1277 | # higher quality PDF documentation.
1278 |
1279 | USE_PDFLATEX = YES
1280 |
1281 | # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
1282 | # command to the generated LaTeX files. This will instruct LaTeX to keep
1283 | # running if errors occur, instead of asking the user for help.
1284 | # This option is also used when generating formulas in HTML.
1285 |
1286 | LATEX_BATCHMODE = NO
1287 |
1288 | # If LATEX_HIDE_INDICES is set to YES then doxygen will not
1289 | # include the index chapters (such as File Index, Compound Index, etc.)
1290 | # in the output.
1291 |
1292 | LATEX_HIDE_INDICES = NO
1293 |
1294 | # If LATEX_SOURCE_CODE is set to YES then doxygen will include
1295 | # source code with syntax highlighting in the LaTeX output.
1296 | # Note that which sources are shown also depends on other settings
1297 | # such as SOURCE_BROWSER.
1298 |
1299 | LATEX_SOURCE_CODE = NO
1300 |
1301 | # The LATEX_BIB_STYLE tag can be used to specify the style to use for the
1302 | # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
1303 | # http://en.wikipedia.org/wiki/BibTeX for more info.
1304 |
1305 | LATEX_BIB_STYLE = plain
1306 |
1307 | #---------------------------------------------------------------------------
1308 | # configuration options related to the RTF output
1309 | #---------------------------------------------------------------------------
1310 |
1311 | # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
1312 | # The RTF output is optimized for Word 97 and may not look very pretty with
1313 | # other RTF readers or editors.
1314 |
1315 | GENERATE_RTF = NO
1316 |
1317 | # The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
1318 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1319 | # put in front of it. If left blank `rtf' will be used as the default path.
1320 |
1321 | RTF_OUTPUT = rtf
1322 |
1323 | # If the COMPACT_RTF tag is set to YES Doxygen generates more compact
1324 | # RTF documents. This may be useful for small projects and may help to
1325 | # save some trees in general.
1326 |
1327 | COMPACT_RTF = NO
1328 |
1329 | # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
1330 | # will contain hyperlink fields. The RTF file will
1331 | # contain links (just like the HTML output) instead of page references.
1332 | # This makes the output suitable for online browsing using WORD or other
1333 | # programs which support those fields.
1334 | # Note: wordpad (write) and others do not support links.
1335 |
1336 | RTF_HYPERLINKS = NO
1337 |
1338 | # Load style sheet definitions from file. Syntax is similar to doxygen's
1339 | # config file, i.e. a series of assignments. You only have to provide
1340 | # replacements, missing definitions are set to their default value.
1341 |
1342 | RTF_STYLESHEET_FILE =
1343 |
1344 | # Set optional variables used in the generation of an rtf document.
1345 | # Syntax is similar to doxygen's config file.
1346 |
1347 | RTF_EXTENSIONS_FILE =
1348 |
1349 | #---------------------------------------------------------------------------
1350 | # configuration options related to the man page output
1351 | #---------------------------------------------------------------------------
1352 |
1353 | # If the GENERATE_MAN tag is set to YES (the default) Doxygen will
1354 | # generate man pages
1355 |
1356 | GENERATE_MAN = YES
1357 |
1358 | # The MAN_OUTPUT tag is used to specify where the man pages will be put.
1359 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1360 | # put in front of it. If left blank `man' will be used as the default path.
1361 |
1362 | MAN_OUTPUT = man
1363 |
1364 | # The MAN_EXTENSION tag determines the extension that is added to
1365 | # the generated man pages (default is the subroutine's section .3)
1366 |
1367 | MAN_EXTENSION = .3
1368 |
1369 | # If the MAN_LINKS tag is set to YES and Doxygen generates man output,
1370 | # then it will generate one additional man file for each entity
1371 | # documented in the real man page(s). These additional files
1372 | # only source the real man page, but without them the man command
1373 | # would be unable to find the correct page. The default is NO.
1374 |
1375 | MAN_LINKS = NO
1376 |
1377 | #---------------------------------------------------------------------------
1378 | # configuration options related to the XML output
1379 | #---------------------------------------------------------------------------
1380 |
1381 | # If the GENERATE_XML tag is set to YES Doxygen will
1382 | # generate an XML file that captures the structure of
1383 | # the code including all documentation.
1384 |
1385 | GENERATE_XML = NO
1386 |
1387 | # The XML_OUTPUT tag is used to specify where the XML pages will be put.
1388 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1389 | # put in front of it. If left blank `xml' will be used as the default path.
1390 |
1391 | XML_OUTPUT = xml
1392 |
1393 | # The XML_SCHEMA tag can be used to specify an XML schema,
1394 | # which can be used by a validating XML parser to check the
1395 | # syntax of the XML files.
1396 |
1397 | XML_SCHEMA =
1398 |
1399 | # The XML_DTD tag can be used to specify an XML DTD,
1400 | # which can be used by a validating XML parser to check the
1401 | # syntax of the XML files.
1402 |
1403 | XML_DTD =
1404 |
1405 | # If the XML_PROGRAMLISTING tag is set to YES Doxygen will
1406 | # dump the program listings (including syntax highlighting
1407 | # and cross-referencing information) to the XML output. Note that
1408 | # enabling this will significantly increase the size of the XML output.
1409 |
1410 | XML_PROGRAMLISTING = YES
1411 |
1412 | #---------------------------------------------------------------------------
1413 | # configuration options for the AutoGen Definitions output
1414 | #---------------------------------------------------------------------------
1415 |
1416 | # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
1417 | # generate an AutoGen Definitions (see autogen.sf.net) file
1418 | # that captures the structure of the code including all
1419 | # documentation. Note that this feature is still experimental
1420 | # and incomplete at the moment.
1421 |
1422 | GENERATE_AUTOGEN_DEF = NO
1423 |
1424 | #---------------------------------------------------------------------------
1425 | # configuration options related to the Perl module output
1426 | #---------------------------------------------------------------------------
1427 |
1428 | # If the GENERATE_PERLMOD tag is set to YES Doxygen will
1429 | # generate a Perl module file that captures the structure of
1430 | # the code including all documentation. Note that this
1431 | # feature is still experimental and incomplete at the
1432 | # moment.
1433 |
1434 | GENERATE_PERLMOD = NO
1435 |
1436 | # If the PERLMOD_LATEX tag is set to YES Doxygen will generate
1437 | # the necessary Makefile rules, Perl scripts and LaTeX code to be able
1438 | # to generate PDF and DVI output from the Perl module output.
1439 |
1440 | PERLMOD_LATEX = NO
1441 |
1442 | # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
1443 | # nicely formatted so it can be parsed by a human reader. This is useful
1444 | # if you want to understand what is going on. On the other hand, if this
1445 | # tag is set to NO the size of the Perl module output will be much smaller
1446 | # and Perl will parse it just the same.
1447 |
1448 | PERLMOD_PRETTY = YES
1449 |
1450 | # The names of the make variables in the generated doxyrules.make file
1451 | # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
1452 | # This is useful so different doxyrules.make files included by the same
1453 | # Makefile don't overwrite each other's variables.
1454 |
1455 | PERLMOD_MAKEVAR_PREFIX =
1456 |
1457 | #---------------------------------------------------------------------------
1458 | # Configuration options related to the preprocessor
1459 | #---------------------------------------------------------------------------
1460 |
1461 | # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
1462 | # evaluate all C-preprocessor directives found in the sources and include
1463 | # files.
1464 |
1465 | ENABLE_PREPROCESSING = YES
1466 |
1467 | # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
1468 | # names in the source code. If set to NO (the default) only conditional
1469 | # compilation will be performed. Macro expansion can be done in a controlled
1470 | # way by setting EXPAND_ONLY_PREDEF to YES.
1471 |
1472 | MACRO_EXPANSION = NO
1473 |
1474 | # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
1475 | # then the macro expansion is limited to the macros specified with the
1476 | # PREDEFINED and EXPAND_AS_DEFINED tags.
1477 |
1478 | EXPAND_ONLY_PREDEF = NO
1479 |
1480 | # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
1481 | # pointed to by INCLUDE_PATH will be searched when a #include is found.
1482 |
1483 | SEARCH_INCLUDES = YES
1484 |
1485 | # The INCLUDE_PATH tag can be used to specify one or more directories that
1486 | # contain include files that are not input files but should be processed by
1487 | # the preprocessor.
1488 |
1489 | INCLUDE_PATH =
1490 |
1491 | # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
1492 | # patterns (like *.h and *.hpp) to filter out the header-files in the
1493 | # directories. If left blank, the patterns specified with FILE_PATTERNS will
1494 | # be used.
1495 |
1496 | INCLUDE_FILE_PATTERNS =
1497 |
1498 | # The PREDEFINED tag can be used to specify one or more macro names that
1499 | # are defined before the preprocessor is started (similar to the -D option of
1500 | # gcc). The argument of the tag is a list of macros of the form: name
1501 | # or name=definition (no spaces). If the definition and the = are
1502 | # omitted =1 is assumed. To prevent a macro definition from being
1503 | # undefined via #undef or recursively expanded use the := operator
1504 | # instead of the = operator.
1505 |
1506 | PREDEFINED =
1507 |
1508 | # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
1509 | # this tag can be used to specify a list of macro names that should be expanded.
1510 | # The macro definition that is found in the sources will be used.
1511 | # Use the PREDEFINED tag if you want to use a different macro definition that
1512 | # overrules the definition found in the source code.
1513 |
1514 | EXPAND_AS_DEFINED =
1515 |
1516 | # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
1517 | # doxygen's preprocessor will remove all references to function-like macros
1518 | # that are alone on a line, have an all uppercase name, and do not end with a
1519 | # semicolon, because these will confuse the parser if not removed.
1520 |
1521 | SKIP_FUNCTION_MACROS = YES
1522 |
1523 | #---------------------------------------------------------------------------
1524 | # Configuration::additions related to external references
1525 | #---------------------------------------------------------------------------
1526 |
1527 | # The TAGFILES option can be used to specify one or more tagfiles. For each
1528 | # tag file the location of the external documentation should be added. The
1529 | # format of a tag file without this location is as follows:
1530 | # TAGFILES = file1 file2 ...
1531 | # Adding location for the tag files is done as follows:
1532 | # TAGFILES = file1=loc1 "file2 = loc2" ...
1533 | # where "loc1" and "loc2" can be relative or absolute paths
1534 | # or URLs. Note that each tag file must have a unique name (where the name does
1535 | # NOT include the path). If a tag file is not located in the directory in which
1536 | # doxygen is run, you must also specify the path to the tagfile here.
1537 |
1538 | TAGFILES =
1539 |
1540 | # When a file name is specified after GENERATE_TAGFILE, doxygen will create
1541 | # a tag file that is based on the input files it reads.
1542 |
1543 | GENERATE_TAGFILE =
1544 |
1545 | # If the ALLEXTERNALS tag is set to YES all external classes will be listed
1546 | # in the class index. If set to NO only the inherited external classes
1547 | # will be listed.
1548 |
1549 | ALLEXTERNALS = NO
1550 |
1551 | # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
1552 | # in the modules index. If set to NO, only the current project's groups will
1553 | # be listed.
1554 |
1555 | EXTERNAL_GROUPS = YES
1556 |
1557 | # The PERL_PATH should be the absolute path and name of the perl script
1558 | # interpreter (i.e. the result of `which perl').
1559 |
1560 | PERL_PATH = /usr/bin/perl
1561 |
1562 | #---------------------------------------------------------------------------
1563 | # Configuration options related to the dot tool
1564 | #---------------------------------------------------------------------------
1565 |
1566 | # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
1567 | # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
1568 | # or super classes. Setting the tag to NO turns the diagrams off. Note that
1569 | # this option also works with HAVE_DOT disabled, but it is recommended to
1570 | # install and use dot, since it yields more powerful graphs.
1571 |
1572 | CLASS_DIAGRAMS = YES
1573 |
1574 | # You can define message sequence charts within doxygen comments using the \msc
1575 | # command. Doxygen will then run the mscgen tool (see
1576 | # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
1577 | # documentation. The MSCGEN_PATH tag allows you to specify the directory where
1578 | # the mscgen tool resides. If left empty the tool is assumed to be found in the
1579 | # default search path.
1580 |
1581 | MSCGEN_PATH =
1582 |
1583 | # If set to YES, the inheritance and collaboration graphs will hide
1584 | # inheritance and usage relations if the target is undocumented
1585 | # or is not a class.
1586 |
1587 | HIDE_UNDOC_RELATIONS = YES
1588 |
1589 | # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
1590 | # available from the path. This tool is part of Graphviz, a graph visualization
1591 | # toolkit from AT&T and Lucent Bell Labs. The other options in this section
1592 | # have no effect if this option is set to NO (the default)
1593 |
1594 | HAVE_DOT = NO
1595 |
1596 | # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
1597 | # allowed to run in parallel. When set to 0 (the default) doxygen will
1598 | # base this on the number of processors available in the system. You can set it
1599 | # explicitly to a value larger than 0 to get control over the balance
1600 | # between CPU load and processing speed.
1601 |
1602 | DOT_NUM_THREADS = 0
1603 |
1604 | # By default doxygen will use the Helvetica font for all dot files that
1605 | # doxygen generates. When you want a differently looking font you can specify
1606 | # the font name using DOT_FONTNAME. You need to make sure dot is able to find
1607 | # the font, which can be done by putting it in a standard location or by setting
1608 | # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
1609 | # directory containing the font.
1610 |
1611 | DOT_FONTNAME = Helvetica
1612 |
1613 | # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
1614 | # The default size is 10pt.
1615 |
1616 | DOT_FONTSIZE = 10
1617 |
1618 | # By default doxygen will tell dot to use the Helvetica font.
1619 | # If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
1620 | # set the path where dot can find it.
1621 |
1622 | DOT_FONTPATH =
1623 |
1624 | # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
1625 | # will generate a graph for each documented class showing the direct and
1626 | # indirect inheritance relations. Setting this tag to YES will force the
1627 | # CLASS_DIAGRAMS tag to NO.
1628 |
1629 | CLASS_GRAPH = YES
1630 |
1631 | # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
1632 | # will generate a graph for each documented class showing the direct and
1633 | # indirect implementation dependencies (inheritance, containment, and
1634 | # class references variables) of the class with other documented classes.
1635 |
1636 | COLLABORATION_GRAPH = YES
1637 |
1638 | # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
1639 | # will generate a graph for groups, showing the direct groups dependencies
1640 |
1641 | GROUP_GRAPHS = YES
1642 |
1643 | # If the UML_LOOK tag is set to YES doxygen will generate inheritance and
1644 | # collaboration diagrams in a style similar to the OMG's Unified Modeling
1645 | # Language.
1646 |
1647 | UML_LOOK = NO
1648 |
1649 | # If the UML_LOOK tag is enabled, the fields and methods are shown inside
1650 | # the class node. If there are many fields or methods and many nodes the
1651 | # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
1652 | # threshold limits the number of items for each type to make the size more
1653 | # managable. Set this to 0 for no limit. Note that the threshold may be
1654 | # exceeded by 50% before the limit is enforced.
1655 |
1656 | UML_LIMIT_NUM_FIELDS = 10
1657 |
1658 | # If set to YES, the inheritance and collaboration graphs will show the
1659 | # relations between templates and their instances.
1660 |
1661 | TEMPLATE_RELATIONS = NO
1662 |
1663 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
1664 | # tags are set to YES then doxygen will generate a graph for each documented
1665 | # file showing the direct and indirect include dependencies of the file with
1666 | # other documented files.
1667 |
1668 | INCLUDE_GRAPH = YES
1669 |
1670 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
1671 | # HAVE_DOT tags are set to YES then doxygen will generate a graph for each
1672 | # documented header file showing the documented files that directly or
1673 | # indirectly include this file.
1674 |
1675 | INCLUDED_BY_GRAPH = YES
1676 |
1677 | # If the CALL_GRAPH and HAVE_DOT options are set to YES then
1678 | # doxygen will generate a call dependency graph for every global function
1679 | # or class method. Note that enabling this option will significantly increase
1680 | # the time of a run. So in most cases it will be better to enable call graphs
1681 | # for selected functions only using the \callgraph command.
1682 |
1683 | CALL_GRAPH = NO
1684 |
1685 | # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
1686 | # doxygen will generate a caller dependency graph for every global function
1687 | # or class method. Note that enabling this option will significantly increase
1688 | # the time of a run. So in most cases it will be better to enable caller
1689 | # graphs for selected functions only using the \callergraph command.
1690 |
1691 | CALLER_GRAPH = NO
1692 |
1693 | # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
1694 | # will generate a graphical hierarchy of all classes instead of a textual one.
1695 |
1696 | GRAPHICAL_HIERARCHY = YES
1697 |
1698 | # If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES
1699 | # then doxygen will show the dependencies a directory has on other directories
1700 | # in a graphical way. The dependency relations are determined by the #include
1701 | # relations between the files in the directories.
1702 |
1703 | DIRECTORY_GRAPH = YES
1704 |
1705 | # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
1706 | # generated by dot. Possible values are svg, png, jpg, or gif.
1707 | # If left blank png will be used. If you choose svg you need to set
1708 | # HTML_FILE_EXTENSION to xhtml in order to make the SVG files
1709 | # visible in IE 9+ (other browsers do not have this requirement).
1710 |
1711 | DOT_IMAGE_FORMAT = png
1712 |
1713 | # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
1714 | # enable generation of interactive SVG images that allow zooming and panning.
1715 | # Note that this requires a modern browser other than Internet Explorer.
1716 | # Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
1717 | # need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
1718 | # visible. Older versions of IE do not have SVG support.
1719 |
1720 | INTERACTIVE_SVG = NO
1721 |
1722 | # The tag DOT_PATH can be used to specify the path where the dot tool can be
1723 | # found. If left blank, it is assumed the dot tool can be found in the path.
1724 |
1725 | DOT_PATH =
1726 |
1727 | # The DOTFILE_DIRS tag can be used to specify one or more directories that
1728 | # contain dot files that are included in the documentation (see the
1729 | # \dotfile command).
1730 |
1731 | DOTFILE_DIRS =
1732 |
1733 | # The MSCFILE_DIRS tag can be used to specify one or more directories that
1734 | # contain msc files that are included in the documentation (see the
1735 | # \mscfile command).
1736 |
1737 | MSCFILE_DIRS =
1738 |
1739 | # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
1740 | # nodes that will be shown in the graph. If the number of nodes in a graph
1741 | # becomes larger than this value, doxygen will truncate the graph, which is
1742 | # visualized by representing a node as a red box. Note that doxygen if the
1743 | # number of direct children of the root node in a graph is already larger than
1744 | # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
1745 | # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
1746 |
1747 | DOT_GRAPH_MAX_NODES = 50
1748 |
1749 | # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
1750 | # graphs generated by dot. A depth value of 3 means that only nodes reachable
1751 | # from the root by following a path via at most 3 edges will be shown. Nodes
1752 | # that lay further from the root node will be omitted. Note that setting this
1753 | # option to 1 or 2 may greatly reduce the computation time needed for large
1754 | # code bases. Also note that the size of a graph can be further restricted by
1755 | # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
1756 |
1757 | MAX_DOT_GRAPH_DEPTH = 0
1758 |
1759 | # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
1760 | # background. This is disabled by default, because dot on Windows does not
1761 | # seem to support this out of the box. Warning: Depending on the platform used,
1762 | # enabling this option may lead to badly anti-aliased labels on the edges of
1763 | # a graph (i.e. they become hard to read).
1764 |
1765 | DOT_TRANSPARENT = NO
1766 |
1767 | # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
1768 | # files in one run (i.e. multiple -o and -T options on the command line). This
1769 | # makes dot run faster, but since only newer versions of dot (>1.8.10)
1770 | # support this, this feature is disabled by default.
1771 |
1772 | DOT_MULTI_TARGETS = YES
1773 |
1774 | # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
1775 | # generate a legend page explaining the meaning of the various boxes and
1776 | # arrows in the dot generated graphs.
1777 |
1778 | GENERATE_LEGEND = YES
1779 |
1780 | # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
1781 | # remove the intermediate dot files that are used to generate
1782 | # the various graphs.
1783 |
1784 | DOT_CLEANUP = YES
1785 |
--------------------------------------------------------------------------------
/example.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include "mcp23s17.h"
4 |
5 |
6 | int main(void)
7 | {
8 | const int bus = 0;
9 | const int chip_select = 0;
10 | const int hw_addr = 0;
11 |
12 | int mcp23s17_fd = mcp23s17_open(bus, chip_select);
13 |
14 | // config register
15 | const uint8_t ioconfig = BANK_OFF | \
16 | INT_MIRROR_OFF | \
17 | SEQOP_OFF | \
18 | DISSLW_OFF | \
19 | HAEN_ON | \
20 | ODR_OFF | \
21 | INTPOL_LOW;
22 | mcp23s17_write_reg(ioconfig, IOCON, hw_addr, mcp23s17_fd);
23 |
24 | // I/O direction
25 | mcp23s17_write_reg(0x00, IODIRA, hw_addr, mcp23s17_fd);
26 | mcp23s17_write_reg(0xff, IODIRB, hw_addr, mcp23s17_fd);
27 |
28 | // GPIOB pull ups
29 | mcp23s17_write_reg(0xff, GPPUB, hw_addr, mcp23s17_fd);
30 |
31 | // Write 0xaa to GPIO Port A
32 | mcp23s17_write_reg(0x00, GPIOA, hw_addr, mcp23s17_fd);
33 | sleep(1);
34 | mcp23s17_write_reg(0xaa, GPIOA, hw_addr, mcp23s17_fd);
35 | sleep(1);
36 | mcp23s17_write_reg(0x55, GPIOA, hw_addr, mcp23s17_fd);
37 | sleep(1);
38 | mcp23s17_write_reg(0x00, GPIOA, hw_addr, mcp23s17_fd);
39 |
40 | // print the input state
41 | uint8_t input = mcp23s17_read_reg(GPIOB, hw_addr, mcp23s17_fd);
42 | printf("Inputs: 0x%x\n", input);
43 |
44 | close(mcp23s17_fd);
45 | }
46 |
--------------------------------------------------------------------------------
/interrupt_example.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include "mcp23s17.h"
4 |
5 |
6 | int main(void)
7 | {
8 | const int bus = 0;
9 | const int chip_select = 0;
10 | const int hw_addr = 0;
11 |
12 | int mcp23s17_fd = mcp23s17_open(bus, chip_select);
13 |
14 | // config register
15 | const uint8_t ioconfig = BANK_OFF | \
16 | INT_MIRROR_OFF | \
17 | SEQOP_OFF | \
18 | DISSLW_OFF | \
19 | HAEN_ON | \
20 | ODR_OFF | \
21 | INTPOL_LOW;
22 | mcp23s17_write_reg(ioconfig, IOCON, hw_addr, mcp23s17_fd);
23 |
24 | // I/O direction
25 | mcp23s17_write_reg(0x00, IODIRA, hw_addr, mcp23s17_fd);
26 | mcp23s17_write_reg(0xff, IODIRB, hw_addr, mcp23s17_fd);
27 |
28 | // GPIOB pull ups
29 | mcp23s17_write_reg(0xff, GPPUB, hw_addr, mcp23s17_fd);
30 |
31 | // Write 0xaa to GPIO Port A
32 | mcp23s17_write_reg(0xaa, GPIOA, hw_addr, mcp23s17_fd);
33 |
34 | printf("Waiting for interrupt...\n");
35 | if (mcp23s17_wait_for_interrupt(10)) {
36 | // print the input state
37 | uint8_t input = mcp23s17_read_reg(GPIOB, hw_addr, mcp23s17_fd);
38 | printf("Inputs: 0x%x\n", input);
39 | } else {
40 | printf("Too long waiting for inputs!\n");
41 | }
42 |
43 | close(mcp23s17_fd);
44 | }
45 |
--------------------------------------------------------------------------------
/src/mcp23s17.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include "mcp23s17.h"
12 |
13 |
14 | static const uint8_t spi_mode = 0;
15 | static const uint8_t spi_bpw = 8; // bits per word
16 | static const uint32_t spi_speed = 10000000; // 10MHz
17 | static const uint16_t spi_delay = 0;
18 | static const char * spidev[2][2] = {
19 | {"/dev/spidev0.0", "/dev/spidev0.1"},
20 | {"/dev/spidev1.0", "/dev/spidev1.1"},
21 | };
22 |
23 | // epoll related vars
24 | // static int epoll_is_initialised = 0;
25 | static int gpio_pin_fd = -1;
26 | static int epoll_fd = -1;
27 | static struct epoll_event epoll_ctl_events;
28 | static struct epoll_event mcp23s17_epoll_events;
29 |
30 |
31 | // prototypes
32 | static uint8_t get_spi_control_byte(uint8_t rw_cmd, uint8_t hw_addr);
33 | static int init_epoll(void);
34 |
35 |
36 | int mcp23s17_open(int bus, int chip_select)
37 | {
38 | int fd;
39 | // open
40 | if ((fd = open(spidev[bus][chip_select], O_RDWR)) < 0) {
41 | fprintf(stderr,
42 | "mcp23s17_open: ERROR Could not open SPI device (%s).\n",
43 | spidev[bus][chip_select]);
44 | return -1;
45 | }
46 |
47 | // initialise
48 | if (ioctl(fd, SPI_IOC_WR_MODE, &spi_mode) < 0) {
49 | fprintf(stderr, "mcp23s17_open: ERROR Could not set SPI mode.\n");
50 | close(fd);
51 | return -1;
52 | }
53 | if (ioctl(fd, SPI_IOC_WR_BITS_PER_WORD, &spi_bpw) < 0) {
54 | fprintf(stderr,
55 | "mcp23s17_open: ERROR Could not set SPI bits per word.\n");
56 | close(fd);
57 | return -1;
58 | }
59 | if (ioctl(fd, SPI_IOC_WR_MAX_SPEED_HZ, &spi_speed) < 0) {
60 | fprintf(stderr, "mcp23s17_open: ERROR Could not set SPI speed.\n");
61 | close(fd);
62 | return -1;
63 | }
64 |
65 | return fd;
66 | }
67 |
68 | uint8_t mcp23s17_read_reg(uint8_t reg, uint8_t hw_addr, int fd)
69 | {
70 | uint8_t control_byte = get_spi_control_byte(READ_CMD, hw_addr);
71 | uint8_t tx_buf[3] = {control_byte, reg, 0};
72 | uint8_t rx_buf[sizeof tx_buf];
73 |
74 | struct spi_ioc_transfer spi;
75 | memset (&spi, 0, sizeof(spi));
76 | spi.tx_buf = (unsigned long) tx_buf;
77 | spi.rx_buf = (unsigned long) rx_buf;
78 | spi.len = sizeof tx_buf;
79 | spi.delay_usecs = spi_delay;
80 | spi.speed_hz = spi_speed;
81 | spi.bits_per_word = spi_bpw;
82 |
83 | // do the SPI transaction
84 | if ((ioctl(fd, SPI_IOC_MESSAGE(1), &spi) < 0)) {
85 | fprintf(stderr,
86 | "mcp23s17_read_reg: There was a error during the SPI "
87 | "transaction.\n");
88 | return -1;
89 | }
90 |
91 | // return the data
92 | return rx_buf[2];
93 | }
94 |
95 | void mcp23s17_write_reg(uint8_t data, uint8_t reg, uint8_t hw_addr, int fd)
96 | {
97 | uint8_t control_byte = get_spi_control_byte(WRITE_CMD, hw_addr);
98 | uint8_t tx_buf[3] = {control_byte, reg, data};
99 | uint8_t rx_buf[sizeof tx_buf];
100 |
101 | struct spi_ioc_transfer spi;
102 | memset (&spi, 0, sizeof(spi));
103 | spi.tx_buf = (unsigned long) tx_buf;
104 | spi.rx_buf = (unsigned long) rx_buf;
105 | spi.len = sizeof tx_buf;
106 | spi.delay_usecs = spi_delay;
107 | spi.speed_hz = spi_speed;
108 | spi.bits_per_word = spi_bpw;
109 |
110 | // do the SPI transaction
111 | if ((ioctl(fd, SPI_IOC_MESSAGE(1), &spi) < 0)) {
112 | fprintf(stderr,
113 | "mcp23s17_write_reg: There was a error during the SPI "
114 | "transaction.\n");
115 | }
116 | }
117 |
118 | uint8_t mcp23s17_read_bit(uint8_t bit_num,
119 | uint8_t reg,
120 | uint8_t hw_addr,
121 | int fd)
122 | {
123 | return (mcp23s17_read_reg(reg, hw_addr, fd) >> bit_num) & 1;
124 | }
125 |
126 | void mcp23s17_write_bit(uint8_t data,
127 | uint8_t bit_num,
128 | uint8_t reg,
129 | uint8_t hw_addr,
130 | int fd)
131 | {
132 | uint8_t reg_data = mcp23s17_read_reg(reg, hw_addr, fd);
133 | if (data) {
134 | reg_data |= 1 << bit_num; // set
135 | } else {
136 | reg_data &= 0xff ^ (1 << bit_num); // clear
137 | }
138 | return mcp23s17_write_reg(reg_data, reg, hw_addr, fd);
139 | }
140 |
141 |
142 |
143 |
144 | int mcp23s17_enable_interrupts()
145 | {
146 | int fd, len;
147 | char str_gpio[3];
148 | char str_filenm[33];
149 |
150 | if ((fd = open("/sys/class/gpio/export", O_WRONLY)) < 0)
151 | return -1;
152 |
153 | len = snprintf(str_gpio, sizeof(str_gpio), "%d", GPIO_INTERRUPT_PIN);
154 | write(fd, str_gpio, len);
155 | close(fd);
156 |
157 | snprintf(str_filenm, sizeof(str_filenm), "/sys/class/gpio/gpio%d/direction", GPIO_INTERRUPT_PIN);
158 | if ((fd = open(str_filenm, O_WRONLY)) < 0)
159 | return -1;
160 |
161 | write(fd, "in", 3);
162 | close(fd);
163 |
164 | snprintf(str_filenm, sizeof(str_filenm), "/sys/class/gpio/gpio%d/edge", GPIO_INTERRUPT_PIN);
165 | if ((fd = open(str_filenm, O_WRONLY)) < 0)
166 | return -1;
167 |
168 | write(fd, "falling", 8);
169 | close(fd);
170 |
171 | return 0;
172 | }
173 |
174 | int mcp23s17_disable_interrupts()
175 | {
176 | int fd, len;
177 | char str_gpio[3];
178 |
179 | if ((fd = open("/sys/class/gpio/unexport", O_WRONLY)) < 0)
180 | return -1;
181 |
182 | len = snprintf(str_gpio, sizeof(str_gpio), "%d", GPIO_INTERRUPT_PIN);
183 | write(fd, str_gpio, len);
184 | close(fd);
185 |
186 | return 0;
187 | }
188 |
189 | int mcp23s17_wait_for_interrupt(int timeout)
190 | {
191 | int num_fds = -1;
192 |
193 | if (epoll_fd <= 0) {
194 | if (init_epoll() != 0) {
195 | return -1;
196 | }
197 | }
198 |
199 | // Wait for user event
200 | num_fds = epoll_wait(epoll_fd, &mcp23s17_epoll_events, 1, timeout);
201 |
202 | return num_fds;
203 | }
204 |
205 | static int init_epoll(void)
206 | {
207 | // calculate the GPIO pin's path
208 | char gpio_pin_filename[33];
209 | snprintf(gpio_pin_filename,
210 | sizeof(gpio_pin_filename),
211 | "/sys/class/gpio/gpio%d/value",
212 | GPIO_INTERRUPT_PIN);
213 |
214 | // if we haven't already, create the epoll and the GPIO pin fd's
215 | if(epoll_fd <= 0) {
216 | epoll_fd = epoll_create(1);
217 | if (epoll_fd <= 0) {
218 | fprintf(stderr,
219 | "mcp23s17_wait_for_interrupt: There was a error during "
220 | "the epoll_create.\n"
221 | "Error is %s (errno=%d)\n",
222 | strerror(errno),
223 | errno);
224 | return -1;
225 | }
226 | gpio_pin_fd = open(gpio_pin_filename, O_RDONLY | O_NONBLOCK);
227 | }
228 |
229 | if(gpio_pin_fd <= 0) {
230 | // we haven't successfully opened the GPIO pin fd
231 | fprintf(stderr,
232 | "mcp23s17_wait_for_interrupt: Can't open fd <%s> <%d>.\n"
233 | "Error is %s (errno=%d)\n",
234 | gpio_pin_filename,
235 | gpio_pin_fd,
236 | strerror(errno),
237 | errno);
238 | return -1;
239 | } else {
240 | epoll_ctl_events.events = EPOLLIN | EPOLLET;
241 | epoll_ctl_events.data.fd = gpio_pin_fd;
242 |
243 | if(epoll_ctl(epoll_fd, EPOLL_CTL_ADD, gpio_pin_fd, &epoll_ctl_events) != 0) {
244 | fprintf(stderr,
245 | "mcp23s17_wait_for_interrupt: There was a error "
246 | "during the epoll_ctl EPOLL_CTL_ADD.\n");
247 | fprintf(stderr,
248 | "Error is %s (errno=%d)\n",
249 | strerror(errno),
250 | errno);
251 | }
252 | // Ignore GPIO Initial Event
253 | epoll_wait(epoll_fd, &mcp23s17_epoll_events, 1, 10);
254 | return 0;
255 | }
256 | }
257 |
258 |
259 | /**
260 | * Returns an SPI control byte.
261 | *
262 | * The MCP23S17 is a slave SPI device. The slave address contains four
263 | * fixed bits (0b0100) and three user-defined hardware address bits
264 | * (if enabled via IOCON.HAEN; pins A2, A1 and A0) with the
265 | * read/write command bit filling out the rest of the control byte::
266 | *
267 | * +--------------------+
268 | * |0|1|0|0|A2|A1|A0|R/W|
269 | * +--------------------+
270 | * |fixed |hw_addr |R/W|
271 | * +--------------------+
272 | * |7|6|5|4|3 |2 |1 | 0 |
273 | * +--------------------+
274 | *
275 | */
276 | static uint8_t get_spi_control_byte(uint8_t rw_cmd, uint8_t hw_addr)
277 | {
278 | hw_addr = (hw_addr << 1) & 0xE;
279 | rw_cmd &= 1; // just 1 bit long
280 | return 0x40 | hw_addr | rw_cmd;
281 | }
282 |
283 |
--------------------------------------------------------------------------------
/src/mcp23s17.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file mcp23s17.h
3 | * @brief A simple static library for controlling an MCP23S17 port
4 | * expander over SPI.
5 | *
6 | * Datasheet: http://ww1.microchip.com/downloads/en/devicedoc/21952b.pdf
7 | *
8 | * Copyright (C) 2013 Thomas Preston
9 | *
10 | * This program is free software: you can redistribute it and/or modify
11 | * it under the terms of the GNU General Public License as published by
12 | * the Free Software Foundation, either version 3 of the License, or
13 | * (at your option) any later version.
14 | *
15 | * This program is distributed in the hope that it will be useful,
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | * GNU General Public License for more details.
19 | *
20 | * You should have received a copy of the GNU General Public License
21 | * along with this program. If not, see .
22 | */
23 | #ifndef _MCP23S17_H
24 | #define _MCP23S17_H
25 |
26 | #include
27 |
28 | #ifdef __cplusplus
29 | extern "C" {
30 | #endif
31 |
32 |
33 | #define WRITE_CMD 0
34 | #define READ_CMD 1
35 |
36 | // Register addresses
37 | #define IODIRA 0x00 // I/O direction A
38 | #define IODIRB 0x01 // I/O direction B
39 | #define IPOLA 0x02 // I/O polarity A
40 | #define IPOLB 0x03 // I/O polarity B
41 | #define GPINTENA 0x04 // interupt enable A
42 | #define GPINTENB 0x05 // interupt enable B
43 | #define DEFVALA 0x06 // register default value A (interupts)
44 | #define DEFVALB 0x07 // register default value B (interupts)
45 | #define INTCONA 0x08 // interupt control A
46 | #define INTCONB 0x09 // interupt control B
47 | #define IOCON 0x0A // I/O config (also 0x0B)
48 | #define GPPUA 0x0C // port A pullups
49 | #define GPPUB 0x0D // port B pullups
50 | #define INTFA 0x0E // interupt flag A (where the interupt came from)
51 | #define INTFB 0x0F // interupt flag B
52 | #define INTCAPA 0x10 // interupt capture A (value at interupt is saved here)
53 | #define INTCAPB 0x11 // interupt capture B
54 | #define GPIOA 0x12 // port A
55 | #define GPIOB 0x13 // port B
56 | #define OLATA 0x14 // output latch A
57 | #define OLATB 0x15 // output latch B
58 |
59 | // I/O config
60 | #define BANK_OFF 0x00 // addressing mode
61 | #define BANK_ON 0x80
62 | #define INT_MIRROR_ON 0x40 // interupt mirror (INTa|INTb)
63 | #define INT_MIRROR_OFF 0x00
64 | #define SEQOP_OFF 0x20 // incrementing address pointer
65 | #define SEQOP_ON 0x00
66 | #define DISSLW_ON 0x10 // slew rate
67 | #define DISSLW_OFF 0x00
68 | #define HAEN_ON 0x08 // hardware addressing
69 | #define HAEN_OFF 0x00
70 | #define ODR_ON 0x04 // open drain for interupts
71 | #define ODR_OFF 0x00
72 | #define INTPOL_HIGH 0x02 // interupt polarity
73 | #define INTPOL_LOW 0x00
74 |
75 | #define GPIO_INTERRUPT_PIN 25
76 |
77 | /**
78 | * Returns a file descriptor for the SPI device through which the
79 | * MCP23S17 port expander can be accessed.
80 | *
81 | * @param bus The SPI bus.
82 | * @param chip_select The SPI chip select.
83 | */
84 | int mcp23s17_open(int bus, int chip_select);
85 |
86 | /**
87 | * Returns the 8 bit value from the register specified. Must also specify
88 | * which hardware address and file descriptor to use.
89 | *
90 | * @param reg The register to read from (example: IODIRA, GPIOA).
91 | * @param hw_addr The hardware address of the MCP23S17.
92 | * @param fd The file descriptor returned from "()".
93 | */
94 | uint8_t mcp23s17_read_reg(uint8_t reg, uint8_t hw_addr, int fd);
95 |
96 | /**
97 | * Writes an 8 bit value to the register specified. Must also specify
98 | * which hardware address and file descriptor to use.
99 | *
100 | * @param data The data byte to be written.
101 | * @param reg The register to write to (example: IODIRA, GPIOA).
102 | * @param hw_addr The hardware address of the MCP23S17.
103 | * @param fd The file descriptor returned from "()".
104 | */
105 | void mcp23s17_write_reg(uint8_t data, uint8_t reg, uint8_t hw_addr, int fd);
106 |
107 | /**
108 | * Reads a single bit from the register specified. Must also specify
109 | * which hardware address and file descriptor to use.
110 | *
111 | * @param bit_num The bit number to read.
112 | * @param reg The register to read from (example: IODIRA, GPIOA).
113 | * @param hw_addr The hardware address of the MCP23S17.
114 | * @param fd The file descriptor returned from "()".
115 | */
116 | uint8_t mcp23s17_read_bit(uint8_t bit_num,
117 | uint8_t reg,
118 | uint8_t hw_addr,
119 | int fd);
120 |
121 | /**
122 | * Writes a single bit to the register specified. Must also specify
123 | * which hardware address and file descriptor to use.
124 | *
125 | * @param data The data to write.
126 | * @param bit_num The bit number to write to.
127 | * @param reg The register to write to (example: IODIRA, GPIOA).
128 | * @param hw_addr The hardware address of the MCP23S17.
129 | * @param fd The file descriptor returned from "()".
130 | */
131 | void mcp23s17_write_bit(uint8_t data,
132 | uint8_t bit_num,
133 | uint8_t reg,
134 | uint8_t hw_addr,
135 | int fd);
136 |
137 |
138 | /**
139 | * Enables interrupts and exports to the GPIO connection from
140 | * the mcp23s17.
141 | *
142 | * @return int 0 on success
143 | */
144 | int mcp23s17_enable_interrupts();
145 |
146 |
147 | /**
148 | * Disables interrupts and exports to the GPIO connection from
149 | * the mcp23s17.
150 | *
151 | * @return int 0 on success
152 | */
153 | int mcp23s17_disable_interrupts();
154 |
155 |
156 | /**
157 | * Waits for an interrupt from the mcp23s17 or until timeout is
158 | * reached.
159 | * @note This method does NOT reset the interrupt - which is
160 | * done automatically for you by reading the input state
161 | * register. Calling this method twice in a row without
162 | * reading the input register will cause it to always wait
163 | * for your timeout value, regardless of button presses.
164 | * To avoid this, read the input register after every call
165 | * to this method.
166 | *
167 | * @param timeout Maximum ms to wait for input, -1 for forever
168 | * @return the number of file descriptors ready for the
169 | * requested I/O, zero if no file descriptor became
170 | * ready during the requested timeout milliseconds, or
171 | * -1 on error.
172 | */
173 | int mcp23s17_wait_for_interrupt(int timeout);
174 |
175 |
176 | #ifdef __cplusplus
177 | }
178 | #endif
179 |
180 | #endif
181 |
--------------------------------------------------------------------------------