SELKIELogger  1.0.0
I2CConnection.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Swansea University
3  *
4  * This file is part of the SELKIELogger suite of tools.
5  *
6  * SELKIELogger is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the Free
8  * Software Foundation, either version 3 of the License, or (at your option)
9  * any later version.
10  *
11  * SELKIELogger is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14  * more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this SELKIELogger product.
18  * If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef SELKIELoggerI2C_Connection
22 #define SELKIELoggerI2C_Connection
23 
24 #include <stdint.h>
25 
37 typedef float (*i2c_dev_read_fn)(const int, const int, const void *);
38 
40 int i2c_openConnection(const char *bus);
41 
43 void i2c_closeConnection(int handle);
44 
46 int16_t i2c_swapbytes(const int16_t in);
48 #endif
int i2c_openConnection(const char *bus)
Set up a connection to the specified bus.
Definition: I2CConnection.c:34
float(* i2c_dev_read_fn)(const int, const int, const void *)
Device specific callback functions.
Definition: I2CConnection.h:37
void i2c_closeConnection(int handle)
Close existing connection.
Definition: I2CConnection.c:46
int16_t i2c_swapbytes(const int16_t in)
Swap word byte order.
Definition: I2CConnection.c:58