WPILibC++  2020.3.2
I2CData.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2017-2019 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 #include "NotifyListener.h"
11 #include "hal/Types.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 void HALSIM_ResetI2CData(int32_t index);
18 
19 int32_t HALSIM_RegisterI2CInitializedCallback(int32_t index,
20  HAL_NotifyCallback callback,
21  void* param,
22  HAL_Bool initialNotify);
23 void HALSIM_CancelI2CInitializedCallback(int32_t index, int32_t uid);
24 HAL_Bool HALSIM_GetI2CInitialized(int32_t index);
25 void HALSIM_SetI2CInitialized(int32_t index, HAL_Bool initialized);
26 
27 int32_t HALSIM_RegisterI2CReadCallback(int32_t index,
28  HAL_BufferCallback callback,
29  void* param);
30 void HALSIM_CancelI2CReadCallback(int32_t index, int32_t uid);
31 
32 int32_t HALSIM_RegisterI2CWriteCallback(int32_t index,
33  HAL_ConstBufferCallback callback,
34  void* param);
35 void HALSIM_CancelI2CWriteCallback(int32_t index, int32_t uid);
36 
37 #ifdef __cplusplus
38 } // extern "C"
39 #endif