Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to v0.3.3: support for installing the library, README.md fixups and additions #10

Merged
merged 3 commits into from
Jul 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Change Log
==========

v0.3.3
------
- Added the "install" target to Makefile.
- Small fixups and additions to README.md

v0.3.2
------
- Fixed issue #8 - added memset to clear transfer struct.
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,8 @@ interrupt_example: interrupt_example.c
gcc -o interrupt_example interrupt_example.c -Isrc/ -L. -lmcp23s17

clean:
rm -f $(OBJECTS)
rm -f $(OBJECTS)

install: $(BINARY)
install src/mcp23s17.h /usr/local/include
install $(BINARY) /usr/local/lib
48 changes: 41 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,54 @@
libmcp23s17
===========
A simple library for accessing the MCP23S17 port expander through SPI. See
`example.c` for ideas on how to use.

A simple library for accessing the [MCP23S17](http://www.microchip.com/MCP23S17)
port expander through SPI.

Building
--------

To build the library, use:

$ make

Install the library to `/usr/local` using:

$ make install

To test the library, compile and execute the example program:

$ make example
$ ./example

Another example program, using interrupts, is available. Build with:

$ make interrupt_example
$ ./interrupt_example

Usage
-----

See `example.c` and `interrupt_example.c` for ideas on how to use.

Compile your software with the following flag:

-lmcp23s17

You can specify the path of the library manually, using:

-I/path/to/headers -L/path/to/libmcp23s17 -lmcp23s17

Documentation
-------------

[http://piface.github.io/libmcp23s17](http://piface.github.io/libmcp23s17)
An online version of the documentation is available at http://piface.github.io/libmcp23s17.

Build the docs with:
Build it with (assuming that you are in the directory of the cloned repository):

$ git clone https://github.com/piface/libmcp23s17.git
$ cd libmcp23s17/docs/
$ cd docs/
$ doxygen libmcp23s17-doc.conf

To view as HTML, point your browser to `libmcp23s17/docs/html/index.html`.
To view as HTML, point your browser to `docs/html/index.html`.

To view as PDF:

Expand Down
2 changes: 1 addition & 1 deletion docs/libmcp23s17-doc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ PROJECT_NAME = libmcp23s17
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = 0.3.0
PROJECT_NUMBER = 0.3.3

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
Expand Down