AminetAminet
Search:
84782 packages online
About
Recent
Browse
Search
Upload
Setup
Services

docs/hard/i2clib40_src.lha

Mirror:Random
Showing: ppc-morphos icongeneric icon
No screenshot available
Short:Source code for i2c.library v40
Author: wnoeker at t-online.de (Wilhelm Noeker)
Uploader:wnoeker t-online de (Wilhelm Noeker)
Type:docs/hard
Architecture:generic
Date:2002-12-01
Download:docs/hard/i2clib40_src.lha - View contents
Readme:docs/hard/i2clib40_src.readme
Downloads:884

This shared library will allow easy access to integrated circuits with the
I²C-bus interface. Note that this archive contains *only* the source code.
If you haven't already done so, please also take a look at the
documentation from the original distribution, in hard/hack/i2clib40.lha



How to build the libraries
--------------------------

These sources are intended for use with A68k and BLink (both available from
Aminet) and the system assembler includes (exec/types.i and such) from the
NDK.

If you've got all that, you will probably still need to edit line 3 in the
"make" script so that it points to the real location of your include files.
After that you can build a particular library, let's say i2c.library.disk
for example, by typing

> make disk

and then call the "install" script to use it:

> install disk

Other useful commands are "make all", which builds all versions of the
library, and "make clean", which will delete all library binaries again.
Note that for the implementation of "all", the scripts assume that for each
library called "i2c.library.type", an include file called "type.i" exists
in the source directory.

If you are going to use an assembler other than A68k, please be aware that
there are no include statements for the "type.i" files in the source code.
Their use is controlled from the "make" script, using A68k's -h option.



Making modifications
--------------------

Multitasking access to global objects in the library is protected by a
semaphore, this applies to I/O operations on the I2C bus in particular.
Please be careful if you need to touch the semaphore code. Make a mistake
and the library clients will hang or trash each other's data.

Other than that, the workings of the library are rather straightforward and
reasonably well documented, so good luck.



Known bugs
----------

In the parallel and serial port versions of the library, some
intializations are performed at the wrong time: Open() calls InitI2C(),
which then executes the INITPORT macro, and in these versions of the
library, that forces both I2C lines to HI. This means that a new client
opening the library may corrupt another client's ongoing transmission.

I think that a clean and simple solution would be to postpone this
initialization until the bus is actually needed, like it is done in the
disk version of the library, for example, with the ALLOCPERCALL macro. I
never bothered to fix this, however, because the practical impact of the
bug seems to be rather low, and because I had other things to do.


Contents of docs/hard/i2clib40_src.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  807    1685  47.9% -lh5- 6157 Sep 26  1999 i2clib_src/bcu.i
[generic]                  526    1241  42.4% -lh5- f4ad Sep  1  1999 i2clib_src/card.i
[generic]                  954    2178  43.8% -lh5- 2842 Aug 22  1999 i2clib_src/disk.i
[generic]                 6310   22098  28.6% -lh5- 5c4b Feb 12  2000 i2clib_src/i2c.generic.s
[generic]                12867   45461  28.3% -lh5- 453a Dec 31  1999 i2clib_src/i2c.library.bcu.s
[generic]                 3988   11859  33.6% -lh5- fe01 Sep  1  1999 i2clib_src/i2c.library.card.s
[generic]                 5269   15800  33.3% -lh5- 21bb Sep  1  1999 i2clib_src/i2c.library.disk.s
[generic]                 4676   14014  33.4% -lh5- 3e33 Feb 12  2000 i2clib_src/i2c.library.s
[generic]                 1298    2693  48.2% -lh5- 0609 Nov 28  2002 i2clib_src/i2clib40_src.readme
[generic]                  106     137  77.4% -lh5- ccff Sep  1  1999 i2clib_src/install
[generic]                  285     761  37.5% -lh5- f4eb Sep  1  1999 i2clib_src/make
[generic]                  601    1407  42.7% -lh5- 2d26 Sep  1  1999 i2clib_src/par.i
[generic]                  644    1513  42.6% -lh5- d764 Sep  1  1999 i2clib_src/par2.i
[generic]                  662    1502  44.1% -lh5- 6b90 Sep  1  1999 i2clib_src/par3.i
[generic]                  566    1375  41.2% -lh5- 32e8 Sep  1  1999 i2clib_src/ser.i
[generic]                  580    1404  41.3% -lh5- b879 Sep  1  1999 i2clib_src/ser2.i
[generic]                  573    1392  41.2% -lh5- 7e8e Sep  1  1999 i2clib_src/ser3.i
[generic]                  574    1390  41.3% -lh5- 1862 Sep  1  1999 i2clib_src/ser4.i
[generic]                  274     628  43.6% -lh5- 223d Nov 28  2002 i2clib_src.info
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        19 files   41560  128538  32.3%            Dec  1  2002
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>