aboutsummaryrefslogtreecommitdiffstats
path: root/include/debugging.h
blob: 35ad8ef918cec1de4916a8313ab8be549ba5bc3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef DEBUGGING_ROUTINES_H_
#define DEBUGGING_ROUTINES_H_

static inline void ledson(void)
{
	/* Get the virtual address of the chipcommon. */
	volatile unsigned int *b = (volatile void *)(0x18000000 | 0xa0000000);
	/* Set all GPIO-OUTEN bits. */
	*(b + (0x68 / 4)) = 0xFFFFFFFF;
	/* Pull all GPIO-OUT bits low. That turns on all LEDs. */
	*(b + (0x64 / 4)) = 0;
	while (1);
}

#endif /* DEBUGGING_ROUTINES_H_ */
bues.ch cgit interface