WPILibC++ 2025.0.0-alpha-1-14-g3b6f38d
SPIData.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include "hal/Types.h"
9
10typedef void (*HAL_SpiReadAutoReceiveBufferCallback)(const char* name,
11 void* param,
12 uint32_t* buffer,
13 int32_t numToRead,
14 int32_t* outputCount);
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20void HALSIM_ResetSPIData(int32_t index);
21
23 HAL_NotifyCallback callback,
24 void* param,
25 HAL_Bool initialNotify);
26void HALSIM_CancelSPIInitializedCallback(int32_t index, int32_t uid);
28void HALSIM_SetSPIInitialized(int32_t index, HAL_Bool initialized);
29
30int32_t HALSIM_RegisterSPIReadCallback(int32_t index,
31 HAL_BufferCallback callback,
32 void* param);
33void HALSIM_CancelSPIReadCallback(int32_t index, int32_t uid);
34
35int32_t HALSIM_RegisterSPIWriteCallback(int32_t index,
37 void* param);
38void HALSIM_CancelSPIWriteCallback(int32_t index, int32_t uid);
39
41 int32_t index, HAL_SpiReadAutoReceiveBufferCallback callback, void* param);
42void HALSIM_CancelSPIReadAutoReceivedDataCallback(int32_t index, int32_t uid);
43
44#ifdef __cplusplus
45} // extern "C"
46#endif
void(* HAL_BufferCallback)(const char *name, void *param, unsigned char *buffer, unsigned int count)
Definition: NotifyListener.h:12
void(* HAL_NotifyCallback)(const char *name, void *param, const struct HAL_Value *value)
Definition: NotifyListener.h:9
void(* HAL_ConstBufferCallback)(const char *name, void *param, const unsigned char *buffer, unsigned int count)
Definition: NotifyListener.h:15
void HALSIM_CancelSPIWriteCallback(int32_t index, int32_t uid)
int32_t HALSIM_RegisterSPIInitializedCallback(int32_t index, HAL_NotifyCallback callback, void *param, HAL_Bool initialNotify)
void HALSIM_SetSPIInitialized(int32_t index, HAL_Bool initialized)
HAL_Bool HALSIM_GetSPIInitialized(int32_t index)
void HALSIM_CancelSPIInitializedCallback(int32_t index, int32_t uid)
void HALSIM_CancelSPIReadCallback(int32_t index, int32_t uid)
int32_t HALSIM_RegisterSPIReadCallback(int32_t index, HAL_BufferCallback callback, void *param)
void(* HAL_SpiReadAutoReceiveBufferCallback)(const char *name, void *param, uint32_t *buffer, int32_t numToRead, int32_t *outputCount)
Definition: SPIData.h:10
void HALSIM_CancelSPIReadAutoReceivedDataCallback(int32_t index, int32_t uid)
int32_t HALSIM_RegisterSPIReadAutoReceivedDataCallback(int32_t index, HAL_SpiReadAutoReceiveBufferCallback callback, void *param)
void HALSIM_ResetSPIData(int32_t index)
int32_t HALSIM_RegisterSPIWriteCallback(int32_t index, HAL_ConstBufferCallback callback, void *param)
int32_t HAL_Bool
Definition: Types.h:73
constexpr const char * name(const T &)