WPILibC++  2020.3.2
SPIAccelerometerData.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_ResetSPIAccelerometerData(int32_t index);
18 int32_t HALSIM_RegisterSPIAccelerometerActiveCallback(
19  int32_t index, HAL_NotifyCallback callback, void* param,
20  HAL_Bool initialNotify);
21 void HALSIM_CancelSPIAccelerometerActiveCallback(int32_t index, int32_t uid);
22 HAL_Bool HALSIM_GetSPIAccelerometerActive(int32_t index);
23 void HALSIM_SetSPIAccelerometerActive(int32_t index, HAL_Bool active);
24 
25 int32_t HALSIM_RegisterSPIAccelerometerRangeCallback(
26  int32_t index, HAL_NotifyCallback callback, void* param,
27  HAL_Bool initialNotify);
28 void HALSIM_CancelSPIAccelerometerRangeCallback(int32_t index, int32_t uid);
29 int32_t HALSIM_GetSPIAccelerometerRange(int32_t index);
30 void HALSIM_SetSPIAccelerometerRange(int32_t index, int32_t range);
31 
32 int32_t HALSIM_RegisterSPIAccelerometerXCallback(int32_t index,
33  HAL_NotifyCallback callback,
34  void* param,
35  HAL_Bool initialNotify);
36 void HALSIM_CancelSPIAccelerometerXCallback(int32_t index, int32_t uid);
37 double HALSIM_GetSPIAccelerometerX(int32_t index);
38 void HALSIM_SetSPIAccelerometerX(int32_t index, double x);
39 
40 int32_t HALSIM_RegisterSPIAccelerometerYCallback(int32_t index,
41  HAL_NotifyCallback callback,
42  void* param,
43  HAL_Bool initialNotify);
44 void HALSIM_CancelSPIAccelerometerYCallback(int32_t index, int32_t uid);
45 double HALSIM_GetSPIAccelerometerY(int32_t index);
46 void HALSIM_SetSPIAccelerometerY(int32_t index, double y);
47 
48 int32_t HALSIM_RegisterSPIAccelerometerZCallback(int32_t index,
49  HAL_NotifyCallback callback,
50  void* param,
51  HAL_Bool initialNotify);
52 void HALSIM_CancelSPIAccelerometerZCallback(int32_t index, int32_t uid);
53 double HALSIM_GetSPIAccelerometerZ(int32_t index);
54 void HALSIM_SetSPIAccelerometerZ(int32_t index, double z);
55 
56 void HALSIM_RegisterSPIAccelerometerAllCallbcaks(int32_t index,
57  HAL_NotifyCallback callback,
58  void* param,
59  HAL_Bool initialNotify);
60 
61 #ifdef __cplusplus
62 } // extern "C"
63 #endif