WPILibC++  2018.4.1-20180816013227-1153-g1462a5b
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
I2CData.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2017-2018 FIRST. 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 #ifndef __FRC_ROBORIO__
11 
12 #include "NotifyListener.h"
13 #include "hal/HAL.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 void HALSIM_ResetI2CData(int32_t index);
20 
21 int32_t HALSIM_RegisterI2CInitializedCallback(int32_t index,
22  HAL_NotifyCallback callback,
23  void* param,
24  HAL_Bool initialNotify);
25 void HALSIM_CancelI2CInitializedCallback(int32_t index, int32_t uid);
26 HAL_Bool HALSIM_GetI2CInitialized(int32_t index);
27 void HALSIM_SetI2CInitialized(int32_t index, HAL_Bool initialized);
28 
29 int32_t HALSIM_RegisterI2CReadCallback(int32_t index,
30  HAL_BufferCallback callback,
31  void* param);
32 void HALSIM_CancelI2CReadCallback(int32_t index, int32_t uid);
33 
34 int32_t HALSIM_RegisterI2CWriteCallback(int32_t index,
35  HAL_ConstBufferCallback callback,
36  void* param);
37 void HALSIM_CancelI2CWriteCallback(int32_t index, int32_t uid);
38 
39 #ifdef __cplusplus
40 } // extern "C"
41 #endif
42 
43 #endif