WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
I2C.h
1 /*----------------------------------------------------------------------------*/
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
13 extern "C" {
14 #endif
15 
16 void HAL_InitializeI2C(int32_t port, int32_t* status);
17 int32_t HAL_TransactionI2C(int32_t port, int32_t deviceAddress,
18  uint8_t* dataToSend, int32_t sendSize,
19  uint8_t* dataReceived, int32_t receiveSize);
20 int32_t HAL_WriteI2C(int32_t port, int32_t deviceAddress, uint8_t* dataToSend,
21  int32_t sendSize);
22 int32_t HAL_ReadI2C(int32_t port, int32_t deviceAddress, uint8_t* buffer,
23  int32_t count);
24 void HAL_CloseI2C(int32_t port);
25 #ifdef __cplusplus
26 }
27 #endif