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
@@ -45,6 +45,7 @@ namespace Drivers::Platform::RpiFirmware {
|
||||
static constexpr uint32_t TAG_RESPONSE = 0x80000000;
|
||||
|
||||
static constexpr uint32_t TAG_GET_BOARD_MAC = 0x00010003;
|
||||
static constexpr uint32_t TAG_SET_CLOCK_STATE = 0x00038001;
|
||||
static constexpr uint32_t TAG_GET_CLOCK_RATE = 0x00030002;
|
||||
static constexpr uint32_t TAG_GET_GPIO_STATE = 0x00030041;
|
||||
static constexpr uint32_t TAG_SET_GPIO_STATE = 0x00038041;
|
||||
@@ -233,6 +234,14 @@ namespace Drivers::Platform::RpiFirmware {
|
||||
return hz != 0;
|
||||
}
|
||||
|
||||
// State bit 0 = on; the answer echoes the clock ID and its new state
|
||||
// (bit 1 set: no such clock).
|
||||
bool SetClockState(uint32_t clockId, bool on) {
|
||||
uint32_t v[2] = { clockId, on ? 1u : 0u };
|
||||
if (PropertyCall(TAG_SET_CLOCK_STATE, v, 2) < 8 || v[0] != clockId) return false;
|
||||
return (v[1] & 2) == 0 && ((v[1] & 1) != 0) == on;
|
||||
}
|
||||
|
||||
// The GPIO tags answer in place of the GPIO number with a status word,
|
||||
// 0 for success (as Linux's raspberrypi-exp-gpio driver checks).
|
||||
bool SetGpioState(uint32_t gpio, bool high) {
|
||||
|
||||
Reference in new issue
Block a user