-
Notifications
You must be signed in to change notification settings - Fork 138
/
a4.c
72 lines (58 loc) · 1.1 KB
/
a4.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
60
61
62
63
64
65
66
67
68
69
70
71
72
#include "aes.h"
#include "arm/arm.h"
#include "clock.h"
#include "dma.h"
#include "event.h"
#include "framebuffer.h"
#include "gpio.h"
#include "interrupt.h"
#include "i2c.h"
#include "lcd.h"
#include "miu.h"
#include "mmu.h"
#include "openiboot.h"
#include "pmu.h"
#include "power.h"
#include "spi.h"
#include "tasks.h"
#include "timer.h"
#include "uart.h"
#include "wdt.h"
#include "audiocodec.h"
void platform_init()
{
arm_setup();
mmu_setup();
tasks_setup();
// Basic prerequisites for everything else
miu_setup();
power_setup();
clock_setup();
// Need interrupts for everything afterwards
interrupt_setup();
gpio_setup();
// For scheduling/sleeping niceties
timer_setup();
event_setup();
// Other devices
uart_setup();
i2c_setup();
dma_setup();
spi_setup();
LeaveCriticalSection();
aes_setup();
if(!displaypipe_init()) {
framebuffer_setup();
framebuffer_setdisplaytext(TRUE);
lcd_set_backlight_level(1500);
}
pmu_setup_gpio(0, 1, 1);
pmu_setup_ldo(10, 1800, 0, 1);
}
void platform_shutdown()
{
//dma_shutdown();
//wdt_disable();
arm_disable_caches();
mmu_disable();
}