mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
Adds a const buffer listener (#742)
Replaces need for const_cast in SPI and I2C functions
This commit is contained in:
committed by
Peter Johnson
parent
a20474bfc7
commit
cd1dbb1e3a
@@ -32,7 +32,7 @@ class SPIData {
|
||||
int32_t RegisterReadCallback(HAL_BufferCallback callback, void* param);
|
||||
void CancelReadCallback(int32_t uid);
|
||||
|
||||
int32_t RegisterWriteCallback(HAL_BufferCallback callback, void* param);
|
||||
int32_t RegisterWriteCallback(HAL_ConstBufferCallback callback, void* param);
|
||||
void CancelWriteCallback(int32_t uid);
|
||||
|
||||
int32_t RegisterResetAccumulatorCallback(HAL_NotifyCallback callback,
|
||||
@@ -61,7 +61,7 @@ class SPIData {
|
||||
std::atomic<int64_t> m_accumulatorValue{false};
|
||||
std::shared_ptr<NotifyListenerVector> m_initializedCallbacks = nullptr;
|
||||
std::shared_ptr<BufferListenerVector> m_readCallbacks = nullptr;
|
||||
std::shared_ptr<BufferListenerVector> m_writeCallbacks = nullptr;
|
||||
std::shared_ptr<ConstBufferListenerVector> m_writeCallbacks = nullptr;
|
||||
std::shared_ptr<NotifyListenerVector> m_resetAccumulatorCallback = nullptr;
|
||||
std::shared_ptr<NotifyListenerVector> m_setAccumulatorCallback = nullptr;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user