feat: add Broadcom FullMAC Wi-Fi driver
This commit is contained in:
1 parent
8b4a938164
commit
51a2b3a932
34 files changed
+4719
-95
No files matched your search
@@ -14,6 +14,7 @@ namespace kcp {
|
||||
std::atomic_flag f{ATOMIC_FLAG_INIT};
|
||||
public:
|
||||
void Acquire() { while (f.test_and_set(std::memory_order_acquire)) {} }
|
||||
bool TryAcquire() { return !f.test_and_set(std::memory_order_acquire); }
|
||||
void Release() { f.clear(std::memory_order_release); }
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
#include <cstdlib>
|
||||
namespace Memory {
|
||||
struct HostHeap {
|
||||
void* Request(size_t n) { return malloc(n); }
|
||||
void Free(void* p) { free(p); }
|
||||
};
|
||||
inline HostHeap g_hostHeap;
|
||||
inline HostHeap* g_heap = &g_hostHeap;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include <cstdio>
|
||||
#include <cstdint>
|
||||
#include <CppLib/Stream.hpp>
|
||||
namespace Kt {
|
||||
enum KernelLogLevel { INFO, OK, WARNING, ERROR };
|
||||
class KernelLogStream {
|
||||
@@ -10,5 +11,6 @@ namespace Kt {
|
||||
KernelLogStream& operator<<(const char* s) { fprintf(stderr, "%s", s); return *this; }
|
||||
KernelLogStream& operator<<(uint64_t v) { fprintf(stderr, "%llu", (unsigned long long)v); return *this; }
|
||||
KernelLogStream& operator<<(int v) { fprintf(stderr, "%d", v); return *this; }
|
||||
KernelLogStream& operator<<(base::Manip) { return *this; }
|
||||
};
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
namespace Timekeeping { uint64_t GetMilliseconds(); }
|
||||
namespace Timekeeping {
|
||||
uint64_t GetMilliseconds();
|
||||
void BusyWaitMs(uint64_t ms);
|
||||
void BusyWaitUs(uint64_t us);
|
||||
}
|
||||
Reference in new issue
Block a user