#include "gpio.h" namespace { [[maybe_unused]] void sleep(int ms) { for (int i = 0; i < ms; i++) { // sleep for 1 ms for (int j = 0; j < 22000; j++) { asm(""); } } } } // namespace extern "C" int main() { uint8_t cnt = 0; for (int i = 0; i < 256; i++) { gpio0->data = cnt; cnt++; sleep(125); } auto* airc = reinterpret_cast(0xe000ed0c); uint32_t a = *airc; *airc = a | 0x04; while (1) {} }