WPILibC++  2020.3.2
AddressableLEDData.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 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/AddressableLEDTypes.h"
12 #include "hal/Types.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 void HALSIM_ResetAddressableLEDData(int32_t index);
19 
20 int32_t HALSIM_RegisterAddressableLEDInitializedCallback(
21  int32_t index, HAL_NotifyCallback callback, void* param,
22  HAL_Bool initialNotify);
23 void HALSIM_CancelAddressableLEDInitializedCallback(int32_t index, int32_t uid);
24 HAL_Bool HALSIM_GetAddressableLEDInitialized(int32_t index);
25 void HALSIM_SetAddressableLEDInitialized(int32_t index, HAL_Bool initialized);
26 
27 int32_t HALSIM_RegisterAddressableLEDOutputPortCallback(
28  int32_t index, HAL_NotifyCallback callback, void* param,
29  HAL_Bool initialNotify);
30 void HALSIM_CancelAddressableLEDOutputPortCallback(int32_t index, int32_t uid);
31 int32_t HALSIM_GetAddressableLEDOutputPort(int32_t index);
32 void HALSIM_SetAddressableLEDOutputPort(int32_t index, int32_t outputPort);
33 
34 int32_t HALSIM_RegisterAddressableLEDLengthCallback(int32_t index,
35  HAL_NotifyCallback callback,
36  void* param,
37  HAL_Bool initialNotify);
38 void HALSIM_CancelAddressableLEDLengthCallback(int32_t index, int32_t uid);
39 int32_t HALSIM_GetAddressableLEDLength(int32_t index);
40 void HALSIM_SetAddressableLEDLength(int32_t index, int32_t length);
41 
42 int32_t HALSIM_RegisterAddressableLEDRunningCallback(
43  int32_t index, HAL_NotifyCallback callback, void* param,
44  HAL_Bool initialNotify);
45 void HALSIM_CancelAddressableLEDRunningCallback(int32_t index, int32_t uid);
46 HAL_Bool HALSIM_GetAddressableLEDRunning(int32_t index);
47 void HALSIM_SetAddressableLEDRunning(int32_t index, HAL_Bool running);
48 
49 int32_t HALSIM_RegisterAddressableLEDDataCallback(
50  int32_t index, HAL_ConstBufferCallback callback, void* param);
51 void HALSIM_CancelAddressableLEDDataCallback(int32_t index, int32_t uid);
52 int32_t HALSIM_GetAddressableLEDData(int32_t index,
53  struct HAL_AddressableLEDData* data);
54 void HALSIM_SetAddressableLEDData(int32_t index,
55  const struct HAL_AddressableLEDData* data,
56  int32_t length);
57 
58 void HALSIM_RegisterAddressableLEDAllCallbacks(int32_t index,
59  HAL_NotifyCallback callback,
60  void* param,
61  HAL_Bool initialNotify);
62 
63 #ifdef __cplusplus
64 } // extern "C"
65 #endif
HAL_AddressableLEDData
Definition: AddressableLEDTypes.h:14