1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * This include file contains definitions related to the GP32 BSP. |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * Copyright (c) Canon Research France SA.] |
---|
9 | * Emmanuel Raguet, mailto:raguet@crf.canon.fr |
---|
10 | * |
---|
11 | * The license and distribution terms for this file may be |
---|
12 | * found in the file LICENSE in this distribution or at |
---|
13 | * http://www.rtems.com/license/LICENSE. |
---|
14 | */ |
---|
15 | |
---|
16 | #ifndef _BSP_H |
---|
17 | #define _BSP_H |
---|
18 | |
---|
19 | #ifdef __cplusplus |
---|
20 | extern "C" { |
---|
21 | #endif |
---|
22 | |
---|
23 | #include <bspopts.h> |
---|
24 | |
---|
25 | #include <rtems.h> |
---|
26 | #include <rtems/iosupp.h> |
---|
27 | #include <rtems/console.h> |
---|
28 | #include <rtems/clockdrv.h> |
---|
29 | #include <s3c24xx.h> |
---|
30 | |
---|
31 | #define BSP_FEATURE_IRQ_EXTENSION |
---|
32 | |
---|
33 | #define gp32_initButtons() {rPBCON=0x0;} |
---|
34 | #define gp32_getButtons() \ |
---|
35 | ( (((~rPEDAT >> 6) & 0x3 )<<8) | (((~rPBDAT >> 8) & 0xFF)<<0) ) |
---|
36 | |
---|
37 | /*functions to get the differents s3c2400 clks*/ |
---|
38 | uint32_t get_FCLK(void); |
---|
39 | uint32_t get_HCLK(void); |
---|
40 | uint32_t get_PCLK(void); |
---|
41 | uint32_t get_UCLK(void); |
---|
42 | |
---|
43 | |
---|
44 | void gp32_setPalette( unsigned char pos, uint16_t color); |
---|
45 | |
---|
46 | /* What is the input clock freq in hertz? */ |
---|
47 | #define BSP_OSC_FREQ 12000000 /* 12 MHz oscillator */ |
---|
48 | #define M_MDIV 81 /* FCLK=133Mhz */ |
---|
49 | #define M_PDIV 2 |
---|
50 | #define M_SDIV 1 |
---|
51 | #define M_CLKDIVN 2 /* HCLK=FCLK/2, PCLK=FCLK/2 */ |
---|
52 | |
---|
53 | #define REFEN 0x1 /* enable refresh */ |
---|
54 | #define TREFMD 0x0 /* CBR(CAS before RAS)/auto refresh */ |
---|
55 | #define Trp 0x0 /* 2 clk */ |
---|
56 | #define Trc 0x3 /* 7 clk */ |
---|
57 | #define Tchr 0x2 /* 3 clk */ |
---|
58 | |
---|
59 | |
---|
60 | /* |
---|
61 | * This BSP provides its own IDLE task to override the RTEMS one. |
---|
62 | * So we prototype it and define the constant confdefs.h expects |
---|
63 | * to configure a BSP specific one. |
---|
64 | */ |
---|
65 | Thread bsp_idle_task(uint32_t); |
---|
66 | |
---|
67 | #define BSP_IDLE_TASK_BODY bsp_idle_task |
---|
68 | |
---|
69 | #ifdef __cplusplus |
---|
70 | } |
---|
71 | #endif |
---|
72 | |
---|
73 | #endif /* _BSP_H */ |
---|
74 | |
---|