15 lines
254 B
C
15 lines
254 B
C
|
#include <bcm.h>
|
||
|
#include <mem.h>
|
||
|
#include <stdbool.h>
|
||
|
|
||
|
void gilbraltar_led(bool s) {
|
||
|
uint32_t reg = read32(ARM_GPIO2_DATA0);
|
||
|
|
||
|
if (s)
|
||
|
reg |= 0x200; // set bit 9 to 1
|
||
|
else
|
||
|
reg &= ~0x200; // set bit 9 to 0
|
||
|
|
||
|
write32(ARM_GPIO2_DATA0, reg);
|
||
|
}
|