-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusbstk5515.c
executable file
·59 lines (52 loc) · 2.25 KB
/
usbstk5515.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* Copyright 2010 by Spectrum Digital Incorporated.
* All rights reserved. Property of Spectrum Digital Incorporated.
*/
/*
* Board Setup
*
*/
#ifdef __cplusplus
extern "C" {
#endif
#include "usbstk5515.h"
/* ------------------------------------------------------------------------ *
* *
* USBSTK5515_wait( delay ) *
* *
* Wait in a software loop for 'x' delay *
* *
* ------------------------------------------------------------------------ */
void USBSTK5515_wait( Uint32 delay )
{
volatile Uint32 i;
for ( i = 0 ; i < delay ; i++ ){ };
}
/* ------------------------------------------------------------------------ *
* *
* _waitusec( usec ) *
* *
* Wait in a software loop for 'x' microseconds *
* *
* ------------------------------------------------------------------------ */
void USBSTK5515_waitusec( Uint32 usec )
{
USBSTK5515_wait( (Uint32)usec * 8 );
}
/* ------------------------------------------------------------------------ *
* *
* USBSTK5515_init( ) *
* *
* Setup board board functions *
* *
* ------------------------------------------------------------------------ */
Int16 USBSTK5515_init( )
{
/* Enable clocks to all peripherals */
SYS_PCGCR1 = 0x0000;
SYS_PCGCR2 = 0x0000;
return 0;
}
#ifdef __cplusplus
} // extern "C" {
#endif