SPI and I2C simulator (#662)

* Creating SPI and I2C simulation abilities

* Update the callback helpers to support different function callback
types
* Create callback type that uses a buffer
* Created I2C/SPI data classes that manage the callbacks and don't do
much of anything else

* Ran format, cleaned up some issues
This commit is contained in:
PJ Reiniger
2017-10-19 02:01:58 -04:00
committed by Peter Johnson
parent be77f9cb26
commit 3c842d8234
13 changed files with 784 additions and 94 deletions

View File

@@ -20,3 +20,13 @@ std::shared_ptr<hal::NotifyListenerVector> CancelCallback(
void InvokeCallback(std::shared_ptr<hal::NotifyListenerVector> currentVector,
const char* name, const HAL_Value* value);
std::shared_ptr<hal::BufferListenerVector> RegisterCallback(
std::shared_ptr<hal::BufferListenerVector> currentVector, const char* name,
HAL_BufferCallback callback, void* param, int32_t* newUid);
std::shared_ptr<hal::BufferListenerVector> CancelCallback(
std::shared_ptr<hal::BufferListenerVector> currentVector, int32_t uid);
void InvokeCallback(std::shared_ptr<hal::BufferListenerVector> currentVector,
const char* name, uint8_t* buffer, int32_t count);