Added lock to dumper lib

This commit is contained in:
Alex 2022-11-03 03:22:48 +02:00
parent 0ccee08913
commit 534606dca5
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -2,6 +2,9 @@
#include <printf.h>
#include <uart.hpp>
#include <lock.hpp>
NewLock(DumperLock);
using namespace UniversalAsynchronousReceiverTransmitter;
@ -23,6 +26,7 @@ void WriteRaw(const char *format, ...)
void DumpData(const char *Description, void *Address, unsigned long Length)
{
SmartLock(DumperLock);
WriteRaw("-------------------------------------------------------------------------\n");
unsigned char *AddressChar = (unsigned char *)Address;
unsigned char Buffer[17];