1
0
forked from M-Labs/artiq
artiq/soc/runtime/gpio.c
2014-09-05 12:03:22 +08:00

15 lines
243 B
C

#include <generated/csr.h>
#include "gpio.h"
void gpio_set(int channel, int value)
{
static int csr_value;
if(value)
csr_value |= 1 << channel;
else
csr_value &= ~(1 << channel);
leds_out_write(csr_value);
}