blob: 3543f37b97697ec737794b6f7ece6f0e6ae0b294 [file] [log] [blame]
Brian Silvermanf7f267a2017-02-04 16:16:08 -08001/*----------------------------------------------------------------------------*/
2/* Copyright (c) FIRST 2016-2017. All Rights Reserved. */
3/* Open Source Software - may be modified and shared by FRC teams. The code */
4/* must be accompanied by the FIRST BSD license file in the root directory of */
5/* the project. */
6/*----------------------------------------------------------------------------*/
7
8#pragma once
9
10#include <stdint.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16void HAL_InitializeI2C(int32_t port, int32_t* status);
17int32_t HAL_TransactionI2C(int32_t port, int32_t deviceAddress,
18 uint8_t* dataToSend, int32_t sendSize,
19 uint8_t* dataReceived, int32_t receiveSize);
20int32_t HAL_WriteI2C(int32_t port, int32_t deviceAddress, uint8_t* dataToSend,
21 int32_t sendSize);
22int32_t HAL_ReadI2C(int32_t port, int32_t deviceAddress, uint8_t* buffer,
23 int32_t count);
24void HAL_CloseI2C(int32_t port);
25#ifdef __cplusplus
26}
27#endif