mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-05 01:36:39 +08:00
15 lines
219 B
C
15 lines
219 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);
|
|
}
|