The following functions are only used on the Raspberry Pi (imported from bcm_host.c)
| 121 | // The following functions are only used on the Raspberry Pi |
| 122 | // (imported from bcm_host.c) |
| 123 | uint32_t SBC_Version::GetDeviceTreeRanges(const char *filename, uint32_t offset) |
| 124 | { |
| 125 | uint32_t address = ~0; |
| 126 | if (FILE *fp = fopen(filename, "rb"); fp) { |
| 127 | fseek(fp, offset, SEEK_SET); |
| 128 | if (array<uint8_t, 4> buf; fread(buf.data(), 1, buf.size(), fp) == buf.size()) { |
| 129 | address = (int)buf[0] << 24 | (int)buf[1] << 16 | (int)buf[2] << 8 | (int)buf[3] << 0; |
| 130 | } |
| 131 | fclose(fp); |
| 132 | } |
| 133 | return address; |
| 134 | } |
| 135 | |
| 136 | #if defined __linux__ |
| 137 | uint32_t SBC_Version::GetPeripheralAddress(void) |
nothing calls this directly
no outgoing calls
no test coverage detected