This are general defs and base class interfaces. ( DACInterface, I2CInterface) to be used with I2C devices

Dependents:   MCP23009tst AT30TSE752TST MCP4728setaddrProg mbedSerialInterface_talkback2 ... more

The DevInterfaces class is used for a more general support of a number of I2C devices.

For the moment this is MCP4728 Quad DAC.

The idea is to write a libs for the I2C devices (and perhaps later SPI , ... devices) not restricted to a certain hardware platform.

So there is the I2CInterface. This is a ( not pure) virtual class. A pointer to this class is used for the I2C device lib (like the MCP4728 class https://developer.mbed.org/users/wbeaumont/code/MCP4728/ ) to communicate with the I2C interface. The I2C interface is kept simple as possible. So it has to be applied for "tested environments". I2C Bus timeouts etc. are hard to debug with such a simple interface. This kind of interface is also not suitable for optimal performance. The user has to take care of issues of blocking devices, parallel processes etc. This can be dealt with in the implementation of the I2CInterface class

The aim of this project is to generate code for these devices on different platforms without doing the painstaking work of looking up all the register details.

There is an implementation of the I2CInterface for the MBED , tested with the FRDM-KL05Z platform. https://developer.mbed.org/users/wbeaumont/code/I2Cinterfaces/

A very simple application on a MBED can be found in https://developer.mbed.org/users/wbeaumont/code/MCP4728test/

Committer:
wbeaumont
Date:
Fri Jan 13 13:52:58 2017 +0000
Revision:
4:8cbf46e5e3e5
Parent:
3:78a9de2e7ce8
Child:
5:b5c9eb2330dc
added version in dev_interface_def.h  , added new types, added method to retrieve dev_interface_def  via get version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wbeaumont 0:da1fb7dd363f 1 #ifndef device_interface_def_H
wbeaumont 0:da1fb7dd363f 2 #define device_interface_def_H
wbeaumont 0:da1fb7dd363f 3
wbeaumont 0:da1fb7dd363f 4
wbeaumont 4:8cbf46e5e3e5 5 #define DEV_INTERFACE_DEF_VER "0.2"
wbeaumont 4:8cbf46e5e3e5 6
wbeaumont 4:8cbf46e5e3e5 7 /* version history
wbeaumont 4:8cbf46e5e3e5 8 v 0.1
wbeaumont 4:8cbf46e5e3e5 9 v 0.2 20170111 added int16_t and uint16_t added DEV_INTERFACE_DEF_VER
wbeaumont 4:8cbf46e5e3e5 10 */
wbeaumont 4:8cbf46e5e3e5 11
wbeaumont 0:da1fb7dd363f 12 typedef unsigned int u32;
wbeaumont 0:da1fb7dd363f 13 typedef unsigned short int u16;
wbeaumont 3:78a9de2e7ce8 14 typedef unsigned short int uint16_t;
wbeaumont 3:78a9de2e7ce8 15 typedef short int int16_t;
wbeaumont 0:da1fb7dd363f 16 typedef unsigned char u8;
wbeaumont 3:78a9de2e7ce8 17 typedef unsigned char uint8_t;
wbeaumont 0:da1fb7dd363f 18 #endif