1. void Delay(unsigned int Time)
    2. {
    3. while(Time --);
    4. }
    5. #if 0
    6. int main()
    7. {
    8. *(unsigned int *)0x11000c40 = 0x10000000;
    9. while(1)
    10. {
    11. *(unsigned int *)0x11000c44 = 0x00000080;
    12. Delay(1000000);
    13. *(unsigned int *)0x11000c44 = 0x00000000;
    14. Delay(1000000);
    15. }
    16. return 0;
    17. }
    18. #endif
    19. #if 0
    20. #define GPX2CON (*(unsigned int *)0x11000c40)
    21. #define GPX2DAT (*(unsigned int *)0x11000c44)
    22. int main()
    23. {
    24. GPX2CON = 0x10000000;
    25. while(1)
    26. {
    27. GPX2DAT = 0x00000080;
    28. Delay(1000000);
    29. GPX2DAT = 0x00000000;
    30. Delay(1000000);
    31. }
    32. return 0;
    33. }
    34. #endif
    35. #if 0
    36. typedef struct
    37. {
    38. unsigned int CON;
    39. unsigned int DAT;
    40. unsigned int PUD;
    41. unsigned int DRV;
    42. }gpx2;
    43. #define GPX2 (*(gpx2 *)0x11000c40)
    44. int main()
    45. {
    46. GPX2.CON = 0x10000000;
    47. while(1)
    48. {
    49. GPX2.DAT = 0x00000080;
    50. Delay(1000000);
    51. GPX2.DAT = 0x00000000;
    52. Delay(1000000);
    53. }
    54. return 0;
    55. }
    56. #endif
    57. #include "exynos_4412.h"
    58. int main()
    59. {
    60. GPX2.CON = GPX2.CON & (~(0xF << 28)) | (0x1 << 28);
    61. GPX1.CON = GPX1.CON & (~0xF) | (0x1);
    62. GPF3.CON = GPF3.CON & (~(0xF << 16)) | (0x1 << 16);
    63. GPF3.CON = GPF3.CON & (~(0xF << 20)) | (0x1 << 20);
    64. while(1)
    65. {
    66. GPX2.DAT = GPX2.DAT | (1 << 7);
    67. Delay(100000);
    68. GPX2.DAT = GPX2.DAT & (~(1 << 7));
    69. Delay(100000);
    70. GPX1.DAT = GPX1.DAT | 1;
    71. Delay(100000);
    72. GPX1.DAT = GPX1.DAT & (~1);
    73. Delay(100000);
    74. GPF3.DAT = GPF3.DAT | (1 << 4);
    75. Delay(100000);
    76. GPF3.DAT = GPF3.DAT & (~(1 << 4));
    77. Delay(100000);
    78. GPF3.DAT = GPF3.DAT | (1 << 5);
    79. Delay(100000);
    80. GPF3.DAT = GPF3.DAT & (~(1 << 5));
    81. Delay(100000);
    82. }
    83. return 0;
    84. }