Fix MacOS build

This commit is contained in:
Alexey Starikovskiy 2023-08-30 17:37:01 +03:00
parent c32e4f094e
commit a82cbe36a2
1 changed files with 6 additions and 0 deletions

View File

@ -207,6 +207,12 @@ bool Gowin::send_command(uint8_t cmd)
return true;
}
#ifdef __APPLE__
#include <libkern/OSByteOrder.h>
#define le32toh(x) OSSwapLittleToHostInt32(x)
#define htole32(x) OSSwapHostToLittleInt32(x)
#endif
uint32_t Gowin::readReg32(uint8_t cmd)
{
uint32_t reg = 0, tmp = 0xff;