pihwm
A lightweight C library for Raspberry Pi hardware modules.
 All Data Structures Files Functions Groups Pages
pi_i2c.h File Reference

I2C library headers. More...

Go to the source code of this file.

Functions

int i2c_init ()
 Initialises the i2c-dev interface for the I2C peripheral exposed on the P1 header (which is dependent on the board revision)
 
int i2c_init_name (char *devname)
 Initialises the i2c-dev interface for the sysfs entry specified by the devname parameter.
 
int i2c_select_device (unsigned int fd, unsigned int addr)
 Selects a specific I2C slave device.
 
int i2c_write (unsigned int fd, unsigned int addr, unsigned char *data, unsigned int len)
 Initiates an I2C write operation.
 
int i2c_read (unsigned int fd, unsigned int addr, unsigned char *data, unsigned int len)
 Initiates an I2C read operation.
 

Detailed Description

I2C library headers.

Author
Omer Kilic omerk.nosp@m.ilic.nosp@m.@gmai.nosp@m.l.co.nosp@m.m - Erlang Solutions
Jeremy Bennett jerem.nosp@m.y.be.nosp@m.nnett.nosp@m.@emb.nosp@m.ecosm.nosp@m..com - Embecosm Limited

LICENSE

Copyright (C) 2013 Omer Kilic omerk.nosp@m.ilic.nosp@m.@gmai.nosp@m.l.co.nosp@m.m - Erlang Solutions Copyright (C) 2013 Jeremy Bennett jerem.nosp@m.y.be.nosp@m.nnett.nosp@m.@emb.nosp@m.ecosm.nosp@m..com - Embecosm Limited

This file is part of pihwm http://omerk.github.io/pihwm

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file pi_i2c.h.