mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-08-06 18:37:34 +00:00
Updated gitignore and added spatz utilities
This commit is contained in:
42
src/debug/spatz.cpp
Normal file
42
src/debug/spatz.cpp
Normal file
@@ -0,0 +1,42 @@
|
||||
#include <sta/debug/spatz.hpp>
|
||||
|
||||
#ifdef STA_SPATZ_ENABLED
|
||||
|
||||
namespace sta
|
||||
{
|
||||
namespace spatz
|
||||
{
|
||||
sta::Mutex * mutex_;
|
||||
|
||||
void init(sta::Mutex * mutex)
|
||||
{
|
||||
mutex_ = mutex;
|
||||
}
|
||||
|
||||
void request(uint8_t id, uint8_t * buffer, size_t length)
|
||||
{
|
||||
sta::lock_guard lock(*mutex_);
|
||||
|
||||
Debug->println(id);
|
||||
Debug->read(buffer, length);
|
||||
}
|
||||
|
||||
void request(uint8_t id, float * buffer, size_t length)
|
||||
{
|
||||
sta::lock_guard lock(*mutex_);
|
||||
|
||||
Debug->println(id);
|
||||
Debug->read(buffer, length);
|
||||
}
|
||||
|
||||
void request(uint8_t id, double * buffer, size_t length)
|
||||
{
|
||||
sta::lock_guard lock(*mutex_);
|
||||
|
||||
Debug->println(id);
|
||||
Debug->read(buffer, length);
|
||||
}
|
||||
} // namespace spatz
|
||||
} // namespace sta
|
||||
|
||||
#endif // STA_SPATZ_ENABLED
|
Reference in New Issue
Block a user