summaryrefslogtreecommitdiff
path: root/firmware/src/os/trigger.c
blob: b8cedf3d917d9b35c14cc30f943dd0a4ac690d23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <lib_AT91SAM7.h>
#include <os/trigger.h>
#include "../openpcd.h"

void trigger_init(void)
{
	AT91F_PIO_CfgOutput(AT91C_BASE_PIOA, OPENPCD_PIO_TRIGGER);
}

void trigger_pulse(void)
{
	volatile int i;
	AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPCD_PIO_TRIGGER);
	for (i=0; i < 0xff; i++)
		{ }
	AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPCD_PIO_TRIGGER);
}
personal git repositories of Harald Welte. Your mileage may vary