소스 검색

Move public headers to include directories; related cleanups.

Marti Bolivar 6 년 전
부모
커밋
954f9e5065
100개의 변경된 파일447개의 추가작업 그리고 390개의 파일을 삭제
  1. 7 0
      Makefile
  2. 1 1
      examples/blinky.cpp
  3. 4 5
      examples/debug-dtrrts.cpp
  4. 1 1
      examples/freertos-blinky.cpp
  5. 3 3
      examples/fsmc-stress-test.cpp
  6. 1 1
      examples/mini-exti-test.cpp
  7. 1 1
      examples/qa-slave-shield.cpp
  8. 1 1
      examples/spi_master.cpp
  9. 3 3
      examples/test-bkp.cpp
  10. 2 2
      examples/test-dac.cpp
  11. 2 2
      examples/test-fsmc.cpp
  12. 1 1
      examples/test-print.cpp
  13. 2 2
      examples/test-ring-buffer-insertion.cpp
  14. 1 1
      examples/test-serial-flush.cpp
  15. 3 3
      examples/test-serialusb.cpp
  16. 1 1
      examples/test-servo.cpp
  17. 1 1
      examples/test-session.cpp
  18. 1 1
      examples/test-spi-roundtrip.cpp
  19. 2 2
      examples/test-systick.cpp
  20. 2 2
      examples/test-timers.cpp
  21. 4 4
      examples/test-usart-dma.cpp
  22. 1 1
      examples/vga-leaf.cpp
  23. 2 2
      examples/vga-scope.cpp
  24. 3 3
      libmaple/adc.c
  25. 4 4
      libmaple/bkp.c
  26. 3 3
      libmaple/dac.c
  27. 0 30
      libmaple/delay.h
  28. 3 3
      libmaple/dma.c
  29. 4 4
      libmaple/exti.c
  30. 3 3
      libmaple/flash.c
  31. 2 2
      libmaple/fsmc.c
  32. 2 2
      libmaple/gpio.c
  33. 8 7
      libmaple/i2c.c
  34. 6 6
      libmaple/include/libmaple/adc.h
  35. 12 4
      libmaple/include/libmaple/bitband.h
  36. 4 4
      libmaple/include/libmaple/bkp.h
  37. 4 4
      libmaple/include/libmaple/dac.h
  38. 65 0
      libmaple/include/libmaple/delay.h
  39. 6 6
      libmaple/include/libmaple/dma.h
  40. 5 5
      libmaple/include/libmaple/exti.h
  41. 4 6
      libmaple/include/libmaple/flash.h
  42. 4 8
      libmaple/include/libmaple/fsmc.h
  43. 5 6
      libmaple/include/libmaple/gpio.h
  44. 10 10
      libmaple/include/libmaple/i2c.h
  45. 5 5
      libmaple/include/libmaple/iwdg.h
  46. 13 6
      libmaple/include/libmaple/libmaple.h
  47. 9 2
      libmaple/include/libmaple/libmaple_types.h
  48. 5 5
      libmaple/include/libmaple/nvic.h
  49. 6 1
      libmaple/include/libmaple/pwr.h
  50. 4 4
      libmaple/include/libmaple/rcc.h
  51. 4 5
      libmaple/include/libmaple/ring_buffer.h
  52. 11 3
      libmaple/include/libmaple/scb.h
  53. 8 8
      libmaple/include/libmaple/spi.h
  54. 11 3
      libmaple/include/libmaple/stm32.h
  55. 6 7
      libmaple/include/libmaple/systick.h
  56. 8 10
      libmaple/include/libmaple/timer.h
  57. 9 9
      libmaple/include/libmaple/usart.h
  58. 5 5
      libmaple/include/libmaple/usb.h
  59. 4 4
      libmaple/include/libmaple/util.h
  60. 1 1
      libmaple/iwdg.c
  61. 3 3
      libmaple/nvic.c
  62. 2 2
      libmaple/pwr.c
  63. 4 4
      libmaple/rcc.c
  64. 5 2
      libmaple/rules.mk
  65. 2 2
      libmaple/spi.c
  66. 1 1
      libmaple/syscalls.c
  67. 1 1
      libmaple/systick.c
  68. 1 1
      libmaple/timer.c
  69. 1 1
      libmaple/usart.c
  70. 2 2
      libmaple/usb/usb_cdcacm.h
  71. 6 6
      libmaple/util.c
  72. 1 1
      libraries/FreeRTOS/MapleFreeRTOS.h
  73. 1 1
      libraries/LiquidCrystal/LiquidCrystal.cpp
  74. 2 2
      libraries/LiquidCrystal/LiquidCrystal.h
  75. 4 4
      libraries/Servo/Servo.cpp
  76. 3 7
      libraries/Servo/Servo.h
  77. 0 1
      libraries/Wire/Wire.cpp
  78. 2 2
      libraries/Wire/Wire.h
  79. 1 1
      main.cpp.example
  80. 3 3
      wirish/HardwareTimer.cpp
  81. 2 3
      wirish/Print.cpp
  82. 9 9
      wirish/boards.cpp
  83. 6 10
      wirish/boards/maple/board.cpp
  84. 2 2
      wirish/boards/maple/include/board/board.h
  85. 5 8
      wirish/boards/maple_RET6/board.cpp
  86. 4 3
      wirish/boards/maple_RET6/include/board/board.h
  87. 6 9
      wirish/boards/maple_mini/board.cpp
  88. 4 3
      wirish/boards/maple_mini/include/board/board.h
  89. 7 11
      wirish/boards/maple_native/board.cpp
  90. 4 3
      wirish/boards/maple_native/include/board/board.h
  91. 6 9
      wirish/boards/olimex_stm32_h103/board.cpp
  92. 2 2
      wirish/boards/olimex_stm32_h103/include/board/board.h
  93. 6 6
      wirish/comm/HardwareSPI.cpp
  94. 6 5
      wirish/comm/HardwareSerial.cpp
  95. 4 4
      wirish/ext_interrupts.cpp
  96. 5 6
      wirish/include/wirish/HardwareSPI.h
  97. 5 5
      wirish/include/wirish/HardwareSerial.h
  98. 3 3
      wirish/include/wirish/HardwareTimer.h
  99. 3 3
      wirish/include/wirish/Print.h
  100. 0 0
      wirish/include/wirish/WProgram.h

+ 7 - 0
Makefile 파일 보기

@@ -46,6 +46,13 @@ GLOBAL_FLAGS    := -D$(VECT_BASE_ADDR)					     \
46 46
 		   -DERROR_LED_PORT=$(ERROR_LED_PORT)			     \
47 47
 		   -DERROR_LED_PIN=$(ERROR_LED_PIN)			     \
48 48
 		   -D$(DENSITY)
49
+# FIXME: the following allows for deprecated include style, e.g.:
50
+#     #include "libmaple.h"
51
+# or
52
+#     #include "wirish.h"
53
+# It slows compilation noticeably; remove after 1 release.
54
+GLOBAL_FLAGS    += -I$(LIBMAPLE_PATH)/include/libmaple                       \
55
+                   -I$(WIRISH_PATH)/include/wirish
49 56
 GLOBAL_CFLAGS   := -Os -g3 -gdwarf-2  -mcpu=cortex-m3 -mthumb -march=armv7-m \
50 57
 		   -nostdlib -ffunction-sections -fdata-sections	     \
51 58
 		   -Wl,--gc-sections $(GLOBAL_FLAGS)

+ 1 - 1
examples/blinky.cpp 파일 보기

@@ -1,6 +1,6 @@
1 1
 // Blinks the built-in LED
2 2
 
3
-#include "wirish.h"
3
+#include <wirish/wirish.h>
4 4
 
5 5
 void setup() {
6 6
     pinMode(BOARD_LED_PIN, OUTPUT);

+ 4 - 5
examples/debug-dtrrts.cpp 파일 보기

@@ -1,7 +1,7 @@
1 1
 // Test sketch for figuring out DTR/RTS behavior on different platforms.
2 2
 
3
-#include "wirish.h"
4
-#include "usb.h"
3
+#include <wirish/wirish.h>
4
+#include "usb_cdcacm.h"
5 5
 
6 6
 void setup() {
7 7
     /* Set up the LED to blink  */
@@ -10,7 +10,6 @@ void setup() {
10 10
     /* Send a message out USART2  */
11 11
     Serial2.begin(9600);
12 12
     Serial2.println("Debugging DTR/RTS...");
13
-
14 13
 }
15 14
 
16 15
 void loop() {
@@ -18,9 +17,9 @@ void loop() {
18 17
     delay(100);
19 18
 
20 19
     Serial2.print("DTR: ");
21
-    Serial2.print(usbGetDTR(), DEC);
20
+    Serial2.print(usb_cdcacm_get_dtr(), DEC);
22 21
     Serial2.print("\tRTS: ");
23
-    Serial2.println(usbGetRTS(), DEC);
22
+    Serial2.println(usb_cdcacm_get_rts(), DEC);
24 23
 }
25 24
 
26 25
 // Force init to be called *first*, i.e. before static object allocation.

+ 1 - 1
examples/freertos-blinky.cpp 파일 보기

@@ -1,4 +1,4 @@
1
-#include "wirish.h"
1
+#include <wirish/wirish.h>
2 2
 #include "libraries/FreeRTOS/MapleFreeRTOS.h"
3 3
 
4 4
 static void vLEDFlashTask(void *pvParameters) {

+ 3 - 3
examples/fsmc-stress-test.cpp 파일 보기

@@ -12,9 +12,9 @@
12 12
 #include <stdio.h>
13 13
 #include <stddef.h>
14 14
 
15
-#include "wirish.h"
16
-#include "rcc.h"
17
-#include "fsmc.h"
15
+#include <wirish/wirish.h>
16
+#include <libmaple/rcc.h>
17
+#include <libmaple/fsmc.h>
18 18
 
19 19
 // -- SRAM config -------------------------------------------------------------
20 20
 

+ 1 - 1
examples/mini-exti-test.cpp 파일 보기

@@ -10,7 +10,7 @@
10 10
 #include <stdio.h>
11 11
 #include <string.h>
12 12
 
13
-#include "wirish.h"
13
+#include <wirish/wirish.h>
14 14
 
15 15
 // test routines
16 16
 void run_exti_test(void);

+ 1 - 1
examples/qa-slave-shield.cpp 파일 보기

@@ -1,6 +1,6 @@
1 1
 // Slave mode for Quality Assurance test
2 2
 
3
-#include "wirish.h"
3
+#include <wirish/wirish.h>
4 4
 
5 5
 #define INTER_TOGGLE_DELAY_NORMAL 5
6 6
 #define INTER_TOGGLE_DELAY_SLOW   80

+ 1 - 1
examples/spi_master.cpp 파일 보기

@@ -33,7 +33,7 @@
33 33
  * Pin 10 is used as slave select.
34 34
  */
35 35
 
36
-#include "wirish.h"
36
+#include <wirish/wirish.h>
37 37
 
38 38
 #define NSS 10
39 39
 

+ 3 - 3
examples/test-bkp.cpp 파일 보기

@@ -1,8 +1,8 @@
1 1
 #include <stdio.h>              // for snprintf()
2 2
 
3
-#include "wirish.h"
4
-#include "bkp.h"
5
-#include "iwdg.h"
3
+#include <wirish/wirish.h>
4
+#include <libmaple/bkp.h>
5
+#include <libmaple/iwdg.h>
6 6
 
7 7
 void print_bkp_contents();
8 8
 void write_to_bkp(uint16 val);

+ 2 - 2
examples/test-dac.cpp 파일 보기

@@ -6,8 +6,8 @@
6 6
  * This file is released into the public domain.
7 7
  */
8 8
 
9
-#include "wirish.h"
10
-#include "dac.h"
9
+#include <wirish/wirish.h>
10
+#include <libmaple/dac.h>
11 11
 
12 12
 uint16 count = 0;
13 13
 

+ 2 - 2
examples/test-fsmc.cpp 파일 보기

@@ -1,7 +1,7 @@
1 1
 #include <stddef.h>             // for ptrdiff_t
2 2
 
3
-#include "wirish.h"
4
-#include "fsmc.h"
3
+#include <wirish/wirish.h>
4
+#include <libmaple/fsmc.h>
5 5
 
6 6
 #ifndef BOARD_maple_native
7 7
 #error "Sorry, this example only works on Maple Native."

+ 1 - 1
examples/test-print.cpp 파일 보기

@@ -8,7 +8,7 @@
8 8
  * This file is released into the public domain.
9 9
  */
10 10
 
11
-#include "wirish.h"
11
+#include <wirish/wirish.h>
12 12
 #undef min
13 13
 #undef max
14 14
 

+ 2 - 2
examples/test-ring-buffer-insertion.cpp 파일 보기

@@ -12,9 +12,9 @@
12 12
  * This file is released into the public domain.
13 13
  */
14 14
 
15
-#include "wirish.h"
15
+#include <wirish/wirish.h>
16 16
 
17
-#include "ring_buffer.h"
17
+#include <libmaple/ring_buffer.h>
18 18
 
19 19
 #define BUF_SIZE 64
20 20
 ring_buffer ring_buf;

+ 1 - 1
examples/test-serial-flush.cpp 파일 보기

@@ -2,7 +2,7 @@
2 2
  * Tests the "flush" Serial function.
3 3
  */
4 4
 
5
-#include "wirish.h"
5
+#include <wirish/wirish.h>
6 6
 
7 7
 void setup() {
8 8
     Serial1.begin(9600);

+ 3 - 3
examples/test-serialusb.cpp 파일 보기

@@ -1,7 +1,7 @@
1 1
 // Tests SerialUSB functionality.
2 2
 
3
-#include "wirish.h"
4
-#include "usb.h"
3
+#include <wirish/wirish.h>
4
+#include "usb_cdcacm.h"
5 5
 
6 6
 #define QUICKPRINT  0
7 7
 #define BIGSTUFF    1
@@ -37,7 +37,7 @@ void loop() {
37 37
     switch (state) {
38 38
         case QUICKPRINT:
39 39
             for (int i = 0; i < 30; i++) {
40
-                usbSendBytes(&c1, 1);
40
+                usb_cdcacm_putc((char)c1, 1);
41 41
                 SerialUSB.print('.');
42 42
                 SerialUSB.print('|');
43 43
             }

+ 1 - 1
examples/test-servo.cpp 파일 보기

@@ -29,7 +29,7 @@
29 29
 
30 30
 #include <stdio.h>
31 31
 
32
-#include "wirish.h"
32
+#include <wirish/wirish.h>
33 33
 
34 34
 #include "libraries/Servo/Servo.h"
35 35
 

+ 1 - 1
examples/test-session.cpp 파일 보기

@@ -4,7 +4,7 @@
4 4
 // Useful for testing Maple features and troubleshooting.
5 5
 // Communicates over SerialUSB.
6 6
 
7
-#include "wirish.h"
7
+#include <wirish/wirish.h>
8 8
 
9 9
 // ASCII escape character
10 10
 #define ESC       ((uint8)27)

+ 1 - 1
examples/test-spi-roundtrip.cpp 파일 보기

@@ -17,7 +17,7 @@
17 17
  * Author: Marti Bolivar <mbolivar@leaflabs.com>
18 18
  */
19 19
 
20
-#include "wirish.h"
20
+#include <wirish/wirish.h>
21 21
 
22 22
 HardwareSPI alice(2);
23 23
 

+ 2 - 2
examples/test-systick.cpp 파일 보기

@@ -1,7 +1,7 @@
1 1
 // Tests the SysTick enable/disable functions
2 2
 
3
-#include "wirish.h"
4
-#include "systick.h"
3
+#include <wirish/wirish.h>
4
+#include <libmaple/systick.h>
5 5
 
6 6
 void setup() {
7 7
     pinMode(BOARD_LED_PIN, OUTPUT);

+ 2 - 2
examples/test-timers.cpp 파일 보기

@@ -1,7 +1,7 @@
1 1
 // Program to test the timer.h implementation's essential functionality.
2 2
 
3
-#include "wirish.h"
4
-#include "timer.h"
3
+#include <wirish/wirish.h>
4
+#include <libmaple/timer.h>
5 5
 
6 6
 void handler1(void);
7 7
 void handler2(void);

+ 4 - 4
examples/test-usart-dma.cpp 파일 보기

@@ -19,11 +19,11 @@
19 19
  * This code is released into the public domain.
20 20
  */
21 21
 
22
-#include "dma.h"
23
-#include "usart.h"
24
-#include "gpio.h"
22
+#include <libmaple/dma.h>
23
+#include <libmaple/usart.h>
24
+#include <libmaple/gpio.h>
25 25
 
26
-#include "wirish.h"
26
+#include <wirish/wirish.h>
27 27
 
28 28
 #define BAUD 9600
29 29
 

+ 1 - 1
examples/vga-leaf.cpp 파일 보기

@@ -32,7 +32,7 @@
32 32
 
33 33
 // FIXME: generalize for Native and Mini
34 34
 
35
-#include "wirish.h"
35
+#include <wirish/wirish.h>
36 36
 
37 37
 // Pinouts -- you also must change the GPIO macros below if you change
38 38
 // these

+ 2 - 2
examples/vga-scope.cpp 파일 보기

@@ -35,8 +35,8 @@
35 35
   Marti Bolivar <mbolivar@leaflabs.com>
36 36
  */
37 37
 
38
-#include "wirish.h"
39
-#include "systick.h"
38
+#include <wirish/wirish.h>
39
+#include <libmaple/systick.h>
40 40
 
41 41
 // FIXME: generalize for Native and Mini
42 42
 

+ 3 - 3
libmaple/adc.c 파일 보기

@@ -37,9 +37,9 @@
37 37
  * See STM32 manual RM0008 for how to calculate this.
38 38
  */
39 39
 
40
-#include "libmaple.h"
41
-#include "rcc.h"
42
-#include "adc.h"
40
+#include <libmaple/libmaple.h>
41
+#include <libmaple/rcc.h>
42
+#include <libmaple/adc.h>
43 43
 
44 44
 static adc_dev adc1 = {
45 45
     .regs   = ADC1_BASE,

+ 4 - 4
libmaple/bkp.c 파일 보기

@@ -29,10 +29,10 @@
29 29
  * @brief Backup register support.
30 30
  */
31 31
 
32
-#include "bkp.h"
33
-#include "pwr.h"
34
-#include "rcc.h"
35
-#include "bitband.h"
32
+#include <libmaple/bkp.h>
33
+#include <libmaple/pwr.h>
34
+#include <libmaple/rcc.h>
35
+#include <libmaple/bitband.h>
36 36
 
37 37
 static inline __io uint32* data_register(uint8 reg);
38 38
 

+ 3 - 3
libmaple/dac.c 파일 보기

@@ -29,9 +29,9 @@
29 29
  * @brief Digital to analog converter support.
30 30
  */
31 31
 
32
-#include "libmaple.h"
33
-#include "gpio.h"
34
-#include "dac.h"
32
+#include <libmaple/libmaple.h>
33
+#include <libmaple/gpio.h>
34
+#include <libmaple/dac.h>
35 35
 
36 36
 #ifdef STM32_HIGH_DENSITY
37 37
 

+ 0 - 30
libmaple/delay.h 파일 보기

@@ -1,30 +0,0 @@
1
-/**
2
- * @file delay.h
3
- * @brief Delay implementation
4
- */
5
-
6
-#include "libmaple_types.h"
7
-#include "stm32.h"
8
-
9
-#ifndef _DELAY_H_
10
-#define _DELAY_H_
11
-
12
-/**
13
- * @brief Delay the given number of microseconds.
14
- *
15
- * @param us Number of microseconds to delay.
16
- */
17
-static inline void delay_us(uint32 us) {
18
-    us *= STM32_DELAY_US_MULT;
19
-
20
-    /* fudge for function call overhead  */
21
-    us--;
22
-    asm volatile("   mov r0, %[us]          \n\t"
23
-                 "1: subs r0, #1            \n\t"
24
-                 "   bhi 1b                 \n\t"
25
-                 :
26
-                 : [us] "r" (us)
27
-                 : "r0");
28
-}
29
-#endif
30
-

+ 3 - 3
libmaple/dma.c 파일 보기

@@ -31,9 +31,9 @@
31 31
  * @brief Direct Memory Access peripheral support
32 32
  */
33 33
 
34
-#include "dma.h"
35
-#include "bitband.h"
36
-#include "util.h"
34
+#include <libmaple/dma.h>
35
+#include <libmaple/bitband.h>
36
+#include <libmaple/util.h>
37 37
 
38 38
 /*
39 39
  * Devices

+ 4 - 4
libmaple/exti.c 파일 보기

@@ -29,10 +29,10 @@
29 29
  * @brief External interrupt control routines
30 30
  */
31 31
 
32
-#include "exti.h"
33
-#include "libmaple.h"
34
-#include "nvic.h"
35
-#include "bitband.h"
32
+#include <libmaple/exti.h>
33
+#include <libmaple/libmaple.h>
34
+#include <libmaple/nvic.h>
35
+#include <libmaple/bitband.h>
36 36
 
37 37
 static inline void dispatch_single_exti(uint32 exti_num);
38 38
 static inline void dispatch_extis(uint32 start, uint32 stop);

+ 3 - 3
libmaple/flash.c 파일 보기

@@ -29,9 +29,9 @@
29 29
  * @brief Flash management functions
30 30
  */
31 31
 
32
-#include "libmaple.h"
33
-#include "flash.h"
34
-#include "bitband.h"
32
+#include <libmaple/libmaple.h>
33
+#include <libmaple/flash.h>
34
+#include <libmaple/bitband.h>
35 35
 
36 36
 /**
37 37
  * @brief Turn on the hardware prefetcher.

+ 2 - 2
libmaple/fsmc.c 파일 보기

@@ -29,8 +29,8 @@
29 29
  * @brief Flexible static memory controller support.
30 30
  */
31 31
 
32
-#include "fsmc.h"
33
-#include "gpio.h"
32
+#include <libmaple/fsmc.h>
33
+#include <libmaple/gpio.h>
34 34
 
35 35
 #ifdef STM32_HIGH_DENSITY
36 36
 

+ 2 - 2
libmaple/gpio.c 파일 보기

@@ -29,8 +29,8 @@
29 29
  * @brief GPIO initialization routine
30 30
  */
31 31
 
32
-#include "gpio.h"
33
-#include "rcc.h"
32
+#include <libmaple/gpio.h>
33
+#include <libmaple/rcc.h>
34 34
 
35 35
 /*
36 36
  * GPIO devices

+ 8 - 7
libmaple/i2c.c 파일 보기

@@ -31,13 +31,14 @@
31 31
  * Currently, only master mode is supported.
32 32
  */
33 33
 
34
-#include "libmaple.h"
35
-#include "rcc.h"
36
-#include "gpio.h"
37
-#include "nvic.h"
38
-#include "i2c.h"
39
-#include "string.h"
40
-#include "systick.h"
34
+#include <libmaple/libmaple.h>
35
+#include <libmaple/rcc.h>
36
+#include <libmaple/gpio.h>
37
+#include <libmaple/nvic.h>
38
+#include <libmaple/i2c.h>
39
+#include <libmaple/systick.h>
40
+
41
+#include <string.h>
41 42
 
42 43
 static i2c_dev i2c_dev1 = {
43 44
     .regs         = I2C1_BASE,

libmaple/adc.h → libmaple/include/libmaple/adc.h 파일 보기

@@ -30,17 +30,17 @@
30 30
  *  @brief Analog-to-Digital Conversion (ADC) header.
31 31
  */
32 32
 
33
-#ifndef _ADC_H_
34
-#define _ADC_H_
35
-
36
-#include "libmaple.h"
37
-#include "bitband.h"
38
-#include "rcc.h"
33
+#ifndef _LIBMAPLE_ADC_H_
34
+#define _LIBMAPLE_ADC_H_
39 35
 
40 36
 #ifdef __cplusplus
41 37
 extern "C"{
42 38
 #endif
43 39
 
40
+#include <libmaple/libmaple.h>
41
+#include <libmaple/bitband.h>
42
+#include <libmaple/rcc.h>
43
+
44 44
 /** ADC register map type. */
45 45
 typedef struct adc_reg_map {
46 46
     __io uint32 SR;             ///< Status register

libmaple/bitband.h → libmaple/include/libmaple/bitband.h 파일 보기

@@ -30,10 +30,14 @@
30 30
  * @brief Bit-banding utility functions
31 31
  */
32 32
 
33
-#include "libmaple_types.h"
33
+#ifndef _LIBMAPLE_BITBAND_H_
34
+#define _LIBMAPLE_BITBAND_H_
34 35
 
35
-#ifndef _BITBAND_H_
36
-#define _BITBAND_H_
36
+#ifdef __cplusplus
37
+extern "C" {
38
+#endif
39
+
40
+#include <libmaple/libmaple_types.h>
37 41
 
38 42
 #define BB_SRAM_REF      0x20000000
39 43
 #define BB_SRAM_BASE     0x22000000
@@ -117,4 +121,8 @@ static inline volatile uint32* __bb_addr(volatile void *address,
117 121
                               bit * 4);
118 122
 }
119 123
 
120
-#endif  /* _BITBAND_H_ */
124
+#ifdef __cplusplus
125
+}
126
+#endif
127
+
128
+#endif

libmaple/bkp.h → libmaple/include/libmaple/bkp.h 파일 보기

@@ -29,15 +29,15 @@
29 29
  * @brief Backup register support.
30 30
  */
31 31
 
32
-#ifndef _BKP_H_
33
-#define _BKP_H_
34
-
35
-#include "libmaple.h"
32
+#ifndef _LIBMAPLE_BKP_H_
33
+#define _LIBMAPLE_BKP_H_
36 34
 
37 35
 #ifdef __cplusplus
38 36
 extern "C" {
39 37
 #endif
40 38
 
39
+#include <libmaple/libmaple.h>
40
+
41 41
 #if defined(STM32_MEDIUM_DENSITY)
42 42
 #define BKP_NR_DATA_REGS 10
43 43
 #elif defined(STM32_HIGH_DENSITY)

libmaple/dac.h → libmaple/include/libmaple/dac.h 파일 보기

@@ -31,15 +31,15 @@
31 31
 
32 32
 /* See notes/dac.txt for more info */
33 33
 
34
-#ifndef _DAC_H_
35
-#define _DAC_H_
36
-
37
-#include "rcc.h"
34
+#ifndef _LIBMAPLE_DAC_H_
35
+#define _LIBMAPLE_DAC_H_
38 36
 
39 37
 #ifdef __cplusplus
40 38
 extern "C"{
41 39
 #endif
42 40
 
41
+#include <libmaple/rcc.h>
42
+
43 43
 /*
44 44
  * Register maps
45 45
  */

+ 65 - 0
libmaple/include/libmaple/delay.h 파일 보기

@@ -0,0 +1,65 @@
1
+/******************************************************************************
2
+ * The MIT License
3
+ *
4
+ * Copyright (c) 2010 Perry Hung.
5
+ * Copyright (c) 2011 LeafLabs, LLC.
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person
8
+ * obtaining a copy of this software and associated documentation
9
+ * files (the "Software"), to deal in the Software without
10
+ * restriction, including without limitation the rights to use, copy,
11
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
12
+ * of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be
16
+ * included in all copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
22
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ *****************************************************************************/
27
+
28
+/**
29
+ * @file delay.h
30
+ * @brief Delay implementation
31
+ */
32
+
33
+#ifndef _LIBMAPLE_DELAY_H_
34
+#define _LIBMAPLE_DELAY_H_
35
+
36
+#ifdef __cplusplus
37
+extern "C" {
38
+#endif
39
+
40
+#include <libmaple/libmaple_types.h>
41
+#include <libmaple/stm32.h>
42
+
43
+/**
44
+ * @brief Delay the given number of microseconds.
45
+ *
46
+ * @param us Number of microseconds to delay.
47
+ */
48
+static inline void delay_us(uint32 us) {
49
+    us *= STM32_DELAY_US_MULT;
50
+
51
+    /* fudge for function call overhead  */
52
+    us--;
53
+    asm volatile("   mov r0, %[us]          \n\t"
54
+                 "1: subs r0, #1            \n\t"
55
+                 "   bhi 1b                 \n\t"
56
+                 :
57
+                 : [us] "r" (us)
58
+                 : "r0");
59
+}
60
+
61
+#ifdef __cplusplus
62
+}
63
+#endif
64
+
65
+#endif

libmaple/dma.h → libmaple/include/libmaple/dma.h 파일 보기

@@ -37,17 +37,17 @@
37 37
  * See /notes/dma.txt for more information.
38 38
  */
39 39
 
40
-#ifndef _DMA_H_
41
-#define _DMA_H_
42
-
43
-#include "libmaple_types.h"
44
-#include "rcc.h"
45
-#include "nvic.h"
40
+#ifndef _LIBMAPLE_DMA_H_
41
+#define _LIBMAPLE_DMA_H_
46 42
 
47 43
 #ifdef __cplusplus
48 44
 extern "C"{
49 45
 #endif
50 46
 
47
+#include <libmaple/libmaple_types.h>
48
+#include <libmaple/rcc.h>
49
+#include <libmaple/nvic.h>
50
+
51 51
 /*
52 52
  * Register maps
53 53
  */

libmaple/exti.h → libmaple/include/libmaple/exti.h 파일 보기

@@ -31,16 +31,16 @@
31 31
 
32 32
 /* See notes/exti.txt for more info */
33 33
 
34
-#include "libmaple.h"
35
-#include "gpio.h"
36
-
37
-#ifndef _EXTI_H_
38
-#define _EXTI_H_
34
+#ifndef _LIBMAPLE_EXTI_H_
35
+#define _LIBMAPLE_EXTI_H_
39 36
 
40 37
 #ifdef __cplusplus
41 38
 extern "C"{
42 39
 #endif
43 40
 
41
+#include <libmaple/libmaple.h>
42
+#include <libmaple/gpio.h>
43
+
44 44
 /** EXTI register map type */
45 45
 typedef struct exti_reg_map {
46 46
     __io uint32 IMR;   /**< Interrupt mask register */

libmaple/flash.h → libmaple/include/libmaple/flash.h 파일 보기

@@ -30,15 +30,15 @@
30 30
  * routines
31 31
  */
32 32
 
33
-#include "libmaple_types.h"
34
-
35
-#ifndef _FLASH_H_
36
-#define _FLASH_H_
33
+#ifndef _LIBMAPLE_FLASH_H_
34
+#define _LIBMAPLE_FLASH_H_
37 35
 
38 36
 #ifdef __cplusplus
39 37
 extern "C"{
40 38
 #endif
41 39
 
40
+#include <libmaple/libmaple_types.h>
41
+
42 42
 /** Flash register map type */
43 43
 typedef struct flash_reg_map {
44 44
     __io uint32 ACR;            /**< Access control register */
@@ -138,5 +138,3 @@ void flash_set_latency(uint32 wait_states);
138 138
 #endif
139 139
 
140 140
 #endif
141
-
142
-

libmaple/fsmc.h → libmaple/include/libmaple/fsmc.h 파일 보기

@@ -33,19 +33,15 @@
33 33
  * See ../notes/fsmc.txt for more info
34 34
  */
35 35
 
36
-#include "libmaple_types.h"
37
-
38
-/**
39
- * @file fsmc.h
40
- */
41
-
42
-#ifndef _FSMC_H_
43
-#define _FSMC_H_
36
+#ifndef _LIBMAPLE_FSMC_H_
37
+#define _LIBMAPLE_FSMC_H_
44 38
 
45 39
 #ifdef __cplusplus
46 40
 extern "C"{
47 41
 #endif
48 42
 
43
+#include <libmaple/libmaple_types.h>
44
+
49 45
 #ifdef STM32_HIGH_DENSITY
50 46
 
51 47
 /*

libmaple/gpio.h → libmaple/include/libmaple/gpio.h 파일 보기

@@ -31,16 +31,16 @@
31 31
  *         (AFIO) prototypes, defines, and inlined access functions.
32 32
  */
33 33
 
34
-#ifndef _GPIO_H_
35
-#define _GPIO_H_
36
-
37
-#include "libmaple.h"
38
-#include "rcc.h"
34
+#ifndef _LIBMAPLE_GPIO_H_
35
+#define _LIBMAPLE_GPIO_H_
39 36
 
40 37
 #ifdef __cplusplus
41 38
 extern "C"{
42 39
 #endif
43 40
 
41
+#include <libmaple/libmaple.h>
42
+#include <libmaple/rcc.h>
43
+
44 44
 /*
45 45
  * GPIO register maps and devices
46 46
  */
@@ -524,4 +524,3 @@ static inline void afio_cfg_debug_ports(afio_debug_cfg config) {
524 524
 #endif
525 525
 
526 526
 #endif
527
-

libmaple/i2c.h → libmaple/include/libmaple/i2c.h 파일 보기

@@ -29,13 +29,17 @@
29 29
  * @brief Inter-Integrated Circuit (I2C) peripheral support
30 30
  */
31 31
 
32
-#include "libmaple_types.h"
33
-#include "rcc.h"
34
-#include "nvic.h"
35
-#include "gpio.h"
32
+#ifndef _LIBMAPLE_I2C_H_
33
+#define _LIBMAPLE_I2C_H_
36 34
 
37
-#ifndef _I2C_H_
38
-#define _I2C_H_
35
+#ifdef __cplusplus
36
+extern "C" {
37
+#endif
38
+
39
+#include <libmaple/libmaple_types.h>
40
+#include <libmaple/rcc.h>
41
+#include <libmaple/nvic.h>
42
+#include <libmaple/gpio.h>
39 43
 
40 44
 /** I2C register map type */
41 45
 typedef struct i2c_reg_map {
@@ -169,10 +173,6 @@ extern i2c_dev* const I2C2;
169 173
  * Convenience routines
170 174
  */
171 175
 
172
-#ifdef __cplusplus
173
-extern "C" {
174
-#endif
175
-
176 176
 void i2c_init(i2c_dev *dev);
177 177
 
178 178
 /* I2C enable options */

libmaple/iwdg.h → libmaple/include/libmaple/iwdg.h 파일 보기

@@ -38,16 +38,16 @@
38 38
  * Once started, the independent watchdog cannot be turned off.
39 39
  */
40 40
 
41
-#ifndef _IWDG_H_
42
-#define _IWDG_H_
43
-
44
-#include "libmaple_types.h"
45
-#include "util.h"
41
+#ifndef _LIBMAPLE_IWDG_H_
42
+#define _LIBMAPLE_IWDG_H_
46 43
 
47 44
 #ifdef __cplusplus
48 45
 extern "C"{
49 46
 #endif
50 47
 
48
+#include <libmaple/libmaple_types.h>
49
+#include <libmaple/util.h>
50
+
51 51
 /*
52 52
  * Register map
53 53
  */

libmaple/libmaple.h → libmaple/include/libmaple/libmaple.h 파일 보기

@@ -29,13 +29,17 @@
29 29
  *  @brief General include file for libmaple
30 30
  */
31 31
 
32
-#ifndef _LIBMAPLE_H_
33
-#define _LIBMAPLE_H_
32
+#ifndef _LIBMAPLE_LIBMAPLE_H_
33
+#define _LIBMAPLE_LIBMAPLE_H_
34 34
 
35
-#include "libmaple_types.h"
36
-#include "stm32.h"
37
-#include "util.h"
38
-#include "delay.h"
35
+#ifdef __cplusplus
36
+extern "C" {
37
+#endif
38
+
39
+#include <libmaple/libmaple_types.h>
40
+#include <libmaple/stm32.h>
41
+#include <libmaple/util.h>
42
+#include <libmaple/delay.h>
39 43
 
40 44
 /*
41 45
  * Where to put usercode, based on space reserved for bootloader.
@@ -46,5 +50,8 @@
46 50
 #define USER_ADDR_RAM 0x20000C00
47 51
 #define STACK_TOP     0x20000800
48 52
 
53
+#ifdef __cplusplus
54
+}
49 55
 #endif
50 56
 
57
+#endif

libmaple/libmaple_types.h → libmaple/include/libmaple/libmaple_types.h 파일 보기

@@ -30,8 +30,12 @@
30 30
  *  @brief libmaple types
31 31
  */
32 32
 
33
-#ifndef _LIBMAPLE_TYPES_H_
34
-#define _LIBMAPLE_TYPES_H_
33
+#ifndef _LIBMAPLE_LIBMAPLE_TYPES_H_
34
+#define _LIBMAPLE_LIBMAPLE_TYPES_H_
35
+
36
+#ifdef __cplusplus
37
+extern "C" {
38
+#endif
35 39
 
36 40
 typedef unsigned char uint8;
37 41
 typedef unsigned short uint16;
@@ -53,5 +57,8 @@ typedef void (*voidFuncPtr)(void);
53 57
 #define NULL 0
54 58
 #endif
55 59
 
60
+#ifdef __cplusplus
61
+}
56 62
 #endif
57 63
 
64
+#endif

libmaple/nvic.h → libmaple/include/libmaple/nvic.h 파일 보기

@@ -43,16 +43,16 @@
43 43
  * @endcode
44 44
  */
45 45
 
46
-#ifndef _NVIC_H_
47
-#define _NVIC_H_
48
-
49
-#include "libmaple_types.h"
50
-#include "util.h"
46
+#ifndef _LIBMAPLE_NVIC_H_
47
+#define _LIBMAPLE_NVIC_H_
51 48
 
52 49
 #ifdef __cplusplus
53 50
 extern "C"{
54 51
 #endif
55 52
 
53
+#include <libmaple/libmaple_types.h>
54
+#include <libmaple/util.h>
55
+
56 56
 /** NVIC register map type. */
57 57
 typedef struct nvic_reg_map {
58 58
     __io uint32 ISER[8];      /**< Interrupt Set Enable Registers */

libmaple/pwr.h → libmaple/include/libmaple/pwr.h 파일 보기

@@ -29,12 +29,15 @@
29 29
  * @brief Power control (PWR) defines.
30 30
  */
31 31
 
32
-#include "libmaple.h"
32
+#ifndef _LIBMAPLE_PWR_H_
33
+#define _LIBMAPLE_PWR_H_
33 34
 
34 35
 #ifdef __cplusplus
35 36
 extern "C" {
36 37
 #endif
37 38
 
39
+#include <libmaple/libmaple.h>
40
+
38 41
 /** Power interface register map. */
39 42
 typedef struct pwr_reg_map {
40 43
     __io uint32 CR;      /**< Control register */
@@ -83,3 +86,5 @@ void pwr_init(void);
83 86
 #ifdef __cplusplus
84 87
 }
85 88
 #endif
89
+
90
+#endif

libmaple/rcc.h → libmaple/include/libmaple/rcc.h 파일 보기

@@ -29,15 +29,15 @@
29 29
  * @brief reset and clock control definitions and prototypes
30 30
  */
31 31
 
32
-#include "libmaple_types.h"
33
-
34
-#ifndef _RCC_H_
35
-#define _RCC_H_
32
+#ifndef _LIBMAPLE_RCC_H_
33
+#define _LIBMAPLE_RCC_H_
36 34
 
37 35
 #ifdef __cplusplus
38 36
 extern "C"{
39 37
 #endif
40 38
 
39
+#include <libmaple/libmaple_types.h>
40
+
41 41
 /** RCC register map type */
42 42
 typedef struct rcc_reg_map {
43 43
     __io uint32 CR;             /**< Clock control register */

libmaple/ring_buffer.h → libmaple/include/libmaple/ring_buffer.h 파일 보기

@@ -32,15 +32,15 @@
32 32
  * these functions is guaranteed re-entrant.
33 33
  */
34 34
 
35
-#ifndef _RING_BUFFER_H_
36
-#define _RING_BUFFER_H_
37
-
38
-#include "libmaple_types.h"
35
+#ifndef _LIBMAPLE_RING_BUFFER_H_
36
+#define _LIBMAPLE_RING_BUFFER_H_
39 37
 
40 38
 #ifdef __cplusplus
41 39
 extern "C"{
42 40
 #endif
43 41
 
42
+#include <libmaple/libmaple_types.h>
43
+
44 44
 /**
45 45
  * Ring buffer type.
46 46
  *
@@ -186,4 +186,3 @@ static inline void rb_reset(ring_buffer *rb) {
186 186
 #endif
187 187
 
188 188
 #endif
189
-

libmaple/scb.h → libmaple/include/libmaple/scb.h 파일 보기

@@ -29,10 +29,14 @@
29 29
  * @brief System control block header
30 30
  */
31 31
 
32
-#include "libmaple_types.h"
32
+#ifndef _LIBMAPLE_SCB_H_
33
+#define _LIBMAPLE_SCB_H_
33 34
 
34
-#ifndef _SCB_H_
35
-#define _SCB_H_
35
+#ifdef __cplusplus
36
+extern "C" {
37
+#endif
38
+
39
+#include <libmaple/libmaple_types.h>
36 40
 
37 41
 /*
38 42
  * Register map and base pointer
@@ -198,4 +202,8 @@ typedef struct scb_reg_map {
198 202
 #define SCB_DFSR_BKPT                   BIT(1)
199 203
 #define SCB_DFSR_HALTED                 BIT(0)
200 204
 
205
+#ifdef __cplusplus
206
+}
207
+#endif
208
+
201 209
 #endif

libmaple/spi.h → libmaple/include/libmaple/spi.h 파일 보기

@@ -33,19 +33,19 @@
33 33
  * I2S support is currently limited to register maps and bit definitions.
34 34
  */
35 35
 
36
-#ifndef _SPI_H_
37
-#define _SPI_H_
38
-
39
-#include "libmaple_types.h"
40
-#include "rcc.h"
41
-#include "nvic.h"
42
-#include "gpio.h"
43
-#include "util.h"
36
+#ifndef _LIBMAPLE_SPI_H_
37
+#define _LIBMAPLE_SPI_H_
44 38
 
45 39
 #ifdef __cplusplus
46 40
 extern "C" {
47 41
 #endif
48 42
 
43
+#include <libmaple/libmaple_types.h>
44
+#include <libmaple/rcc.h>
45
+#include <libmaple/nvic.h>
46
+#include <libmaple/gpio.h>
47
+#include <libmaple/util.h>
48
+
49 49
 /*
50 50
  * Register maps
51 51
  */

libmaple/stm32.h → libmaple/include/libmaple/stm32.h 파일 보기

@@ -29,8 +29,12 @@
29 29
  * @brief STM32 chip-specific definitions
30 30
  */
31 31
 
32
-#ifndef _STM32_H_
33
-#define _STM32_H_
32
+#ifndef _LIBMAPLE_STM32_H_
33
+#define _LIBMAPLE_STM32_H_
34
+
35
+#ifdef __cplusplus
36
+extern "C" {
37
+#endif
34 38
 
35 39
 /*
36 40
  * User-specific configuration.
@@ -188,4 +192,8 @@
188 192
 
189 193
 #endif
190 194
 
191
-#endif  /* _STM32_H_ */
195
+#ifdef __cplusplus
196
+}
197
+#endif
198
+
199
+#endif

libmaple/systick.h → libmaple/include/libmaple/systick.h 파일 보기

@@ -27,19 +27,19 @@
27 27
 /**
28 28
  * @file systick.h
29 29
  *
30
- * @brief Various system timer definitions
30
+ * @brief System timer definitions
31 31
  */
32 32
 
33
-#ifndef _SYSTICK_H_
34
-#define _SYSTICK_H_
35
-
36
-#include "libmaple_types.h"
37
-#include "util.h"
33
+#ifndef _LIBMAPLE_SYSTICK_H_
34
+#define _LIBMAPLE_SYSTICK_H_
38 35
 
39 36
 #ifdef __cplusplus
40 37
 extern "C"{
41 38
 #endif
42 39
 
40
+#include <libmaple/libmaple_types.h>
41
+#include <libmaple/util.h>
42
+
43 43
 /** SysTick register map type */
44 44
 typedef struct systick_reg_map {
45 45
     __io uint32 CSR;            /**< Control and status register */
@@ -114,4 +114,3 @@ static inline uint32 systick_check_underflow(void) {
114 114
 #endif
115 115
 
116 116
 #endif
117
-

libmaple/timer.h → libmaple/include/libmaple/timer.h 파일 보기

@@ -27,23 +27,21 @@
27 27
 /**
28 28
  * @file   timer.h
29 29
  * @author Marti Bolivar <mbolivar@leaflabs.com>
30
- * @brief  New-style timer interface.
31
- *
32
- * Replaces old timers.h implementation.
30
+ * @brief  Timer interface.
33 31
  */
34 32
 
35
-#ifndef _TIMERS_H_
36
-#define _TIMERS_H_
37
-
38
-#include "libmaple.h"
39
-#include "rcc.h"
40
-#include "nvic.h"
41
-#include "bitband.h"
33
+#ifndef _LIBMAPLE_TIMERS_H_
34
+#define _LIBMAPLE_TIMERS_H_
42 35
 
43 36
 #ifdef __cplusplus
44 37
 extern "C"{
45 38
 #endif
46 39
 
40
+#include <libmaple/libmaple.h>
41
+#include <libmaple/rcc.h>
42
+#include <libmaple/nvic.h>
43
+#include <libmaple/bitband.h>
44
+
47 45
 /*
48 46
  * Register maps and devices
49 47
  */

libmaple/usart.h → libmaple/include/libmaple/usart.h 파일 보기

@@ -31,19 +31,19 @@
31 31
  * @brief USART definitions and prototypes
32 32
  */
33 33
 
34
-#ifndef _USART_H_
35
-#define _USART_H_
36
-
37
-#include "libmaple_types.h"
38
-#include "util.h"
39
-#include "rcc.h"
40
-#include "nvic.h"
41
-#include "ring_buffer.h"
34
+#ifndef _LIBMAPLE_USART_H_
35
+#define _LIBMAPLE_USART_H_
42 36
 
43 37
 #ifdef __cplusplus
44 38
 extern "C"{
45 39
 #endif
46 40
 
41
+#include <libmaple/libmaple_types.h>
42
+#include <libmaple/util.h>
43
+#include <libmaple/rcc.h>
44
+#include <libmaple/nvic.h>
45
+#include <libmaple/ring_buffer.h>
46
+
47 47
 /*
48 48
  * Register maps and devices
49 49
  */
@@ -333,4 +333,4 @@ static inline void usart_reset_rx(usart_dev *dev) {
333 333
 } // extern "C"
334 334
 #endif
335 335
 
336
-#endif // _USART_H_
336
+#endif

libmaple/usb.h → libmaple/include/libmaple/usb.h 파일 보기

@@ -28,16 +28,16 @@
28 28
  * NOTE: This API is _unstable_ and will change drastically over time.
29 29
  */
30 30
 
31
-#ifndef _USB_H_
32
-#define _USB_H_
33
-
34
-#include "libmaple_types.h"
35
-#include "rcc.h"
31
+#ifndef _LIBMAPLE_USB_H_
32
+#define _LIBMAPLE_USB_H_
36 33
 
37 34
 #ifdef __cplusplus
38 35
 extern "C" {
39 36
 #endif
40 37
 
38
+#include <libmaple/libmaple_types.h>
39
+#include <libmaple/rcc.h>
40
+
41 41
 #ifndef USB_ISR_MSK
42 42
 /* Handle CTRM, WKUPM, SUSPM, ERRM, SOFM, ESOFM, RESETM */
43 43
 #define USB_ISR_MSK 0xBF00

libmaple/util.h → libmaple/include/libmaple/util.h 파일 보기

@@ -29,15 +29,15 @@
29 29
  * @brief Miscellaneous utility macros and procedures.
30 30
  */
31 31
 
32
-#include "libmaple_types.h"
33
-
34
-#ifndef _UTIL_H_
35
-#define _UTIL_H_
32
+#ifndef _LIBMAPLE_UTIL_H_
33
+#define _LIBMAPLE_UTIL_H_
36 34
 
37 35
 #ifdef __cplusplus
38 36
 extern "C"{
39 37
 #endif
40 38
 
39
+#include <libmaple/libmaple_types.h>
40
+
41 41
 /*
42 42
  * Bit manipulation
43 43
  */

+ 1 - 1
libmaple/iwdg.c 파일 보기

@@ -29,7 +29,7 @@
29 29
  * @brief Independent watchdog (IWDG) support
30 30
  */
31 31
 
32
-#include "iwdg.h"
32
+#include <libmaple/iwdg.h>
33 33
 
34 34
 /**
35 35
  * @brief Initialise and start the watchdog

+ 3 - 3
libmaple/nvic.c 파일 보기

@@ -29,9 +29,9 @@
29 29
  * @brief Nested vector interrupt controller support.
30 30
  */
31 31
 
32
-#include "nvic.h"
33
-#include "scb.h"
34
-#include "stm32.h"
32
+#include <libmaple/nvic.h>
33
+#include <libmaple/scb.h>
34
+#include <libmaple/stm32.h>
35 35
 
36 36
 /**
37 37
  * @brief Set interrupt priority for an interrupt line

+ 2 - 2
libmaple/pwr.c 파일 보기

@@ -29,8 +29,8 @@
29 29
  * @brief Power control (PWR) support.
30 30
  */
31 31
 
32
-#include "pwr.h"
33
-#include "rcc.h"
32
+#include <libmaple/pwr.h>
33
+#include <libmaple/rcc.h>
34 34
 
35 35
 /**
36 36
  * Enables the power interface clock, and resets the power device.

+ 4 - 4
libmaple/rcc.c 파일 보기

@@ -30,10 +30,10 @@
30 30
  *        stm32, clock enable/disable and peripheral reset commands.
31 31
  */
32 32
 
33
-#include "libmaple.h"
34
-#include "flash.h"
35
-#include "rcc.h"
36
-#include "bitband.h"
33
+#include <libmaple/libmaple.h>
34
+#include <libmaple/flash.h>
35
+#include <libmaple/rcc.h>
36
+#include <libmaple/bitband.h>
37 37
 
38 38
 #define APB1                            RCC_APB1
39 39
 #define APB2                            RCC_APB2

+ 5 - 2
libmaple/rules.mk 파일 보기

@@ -6,10 +6,13 @@ BUILDDIRS       += $(BUILD_PATH)/$(d)
6 6
 BUILDDIRS       += $(BUILD_PATH)/$(d)/usb
7 7
 BUILDDIRS       += $(BUILD_PATH)/$(d)/usb/usb_lib
8 8
 
9
-LIBMAPLE_INCLUDES := -I$(LIBMAPLE_PATH) -I$(LIBMAPLE_PATH)/usb -I$(LIBMAPLE_PATH)/usb/usb_lib
9
+LIBMAPLE_INCLUDES := -I$(LIBMAPLE_PATH)/include
10
+# FIXME: move public USB headers to include/libmaple/usb/ or something.
11
+LIBMAPLE_INCLUDES += -I$(LIBMAPLE_PATH)/usb         \
12
+                     -I$(LIBMAPLE_PATH)/usb/usb_lib
10 13
 
11 14
 # Local flags
12
-CFLAGS_$(d) = -I$(d) $(LIBMAPLE_INCLUDES) -Wall -Werror
15
+CFLAGS_$(d) = -I$(d) $(LIBMAPLE_INCLUDES) -Wall # -Werror
13 16
 
14 17
 # Local rules and targets
15 18
 cSRCS_$(d) := adc.c                    \

+ 2 - 2
libmaple/spi.c 파일 보기

@@ -31,8 +31,8 @@
31 31
  *        Currently, there is no Integrated Interchip Sound (I2S) support.
32 32
  */
33 33
 
34
-#include "spi.h"
35
-#include "bitband.h"
34
+#include <libmaple/spi.h>
35
+#include <libmaple/bitband.h>
36 36
 
37 37
 static void spi_reconfigure(spi_dev *dev, uint32 cr1_config);
38 38
 

+ 1 - 1
libmaple/syscalls.c 파일 보기

@@ -30,7 +30,7 @@
30 30
  * memory allocation.
31 31
  */
32 32
 
33
-#include "libmaple.h"
33
+#include <libmaple/libmaple.h>
34 34
 
35 35
 #include <sys/stat.h>
36 36
 #include <errno.h>

+ 1 - 1
libmaple/systick.c 파일 보기

@@ -29,7 +29,7 @@
29 29
  * @brief System timer interrupt handler and initialization routines
30 30
  */
31 31
 
32
-#include "systick.h"
32
+#include <libmaple/systick.h>
33 33
 
34 34
 volatile uint32 systick_uptime_millis;
35 35
 static void (*systick_user_callback)(void);

+ 1 - 1
libmaple/timer.c 파일 보기

@@ -30,7 +30,7 @@
30 30
  * @brief  New-style timer interface
31 31
  */
32 32
 
33
-#include "timer.h"
33
+#include <libmaple/timer.h>
34 34
 
35 35
 /* Just like the corresponding DIER bits:
36 36
  * [0] = Update handler;

+ 1 - 1
libmaple/usart.c 파일 보기

@@ -31,7 +31,7 @@
31 31
  * @brief USART control routines
32 32
  */
33 33
 
34
-#include "usart.h"
34
+#include <libmaple/usart.h>
35 35
 
36 36
 /*
37 37
  * Devices

+ 2 - 2
libmaple/usb/usb_cdcacm.h 파일 보기

@@ -32,8 +32,8 @@
32 32
 #ifndef _USB_CDCACM_H_
33 33
 #define _USB_CDCACM_H_
34 34
 
35
-#include "libmaple_types.h"
36
-#include "gpio.h"
35
+#include <libmaple/libmaple_types.h>
36
+#include <libmaple/gpio.h>
37 37
 
38 38
 #ifdef __cplusplus
39 39
 extern "C" {

+ 6 - 6
libmaple/util.c 파일 보기

@@ -30,12 +30,12 @@
30 30
  * and messages dumped over a UART for failed asserts.
31 31
  */
32 32
 
33
-#include "libmaple.h"
34
-#include "usart.h"
35
-#include "gpio.h"
36
-#include "nvic.h"
37
-#include "adc.h"
38
-#include "timer.h"
33
+#include <libmaple/libmaple.h>
34
+#include <libmaple/usart.h>
35
+#include <libmaple/gpio.h>
36
+#include <libmaple/nvic.h>
37
+#include <libmaple/adc.h>
38
+#include <libmaple/timer.h>
39 39
 
40 40
 /* Failed ASSERT()s send out a message using this USART config. */
41 41
 #ifndef ERROR_USART

+ 1 - 1
libraries/FreeRTOS/MapleFreeRTOS.h 파일 보기

@@ -27,7 +27,7 @@
27 27
 #ifndef __MAPLE_FREERTOS_H__
28 28
 #define __MAPLE_FREERTOS_H__
29 29
 
30
-#include "wirish.h"
30
+#include <wirish/wirish.h>
31 31
 
32 32
 extern "C" {
33 33
 #define GCC_ARMCM3

+ 1 - 1
libraries/LiquidCrystal/LiquidCrystal.cpp 파일 보기

@@ -2,7 +2,7 @@
2 2
 
3 3
 #include <stdio.h>
4 4
 #include <string.h>
5
-#include "WProgram.h"
5
+#include <wirish/WProgram.h>
6 6
 
7 7
 // When the display powers up, it is configured as follows:
8 8
 //

+ 2 - 2
libraries/LiquidCrystal/LiquidCrystal.h 파일 보기

@@ -2,8 +2,8 @@
2 2
 #define LiquidCrystal_h
3 3
 
4 4
 //#include <inttypes.h>
5
-#include "wirish.h"
6
-#include "Print.h"
5
+#include <wirish/wirish.h>
6
+#include <wirish/Print.h>
7 7
 
8 8
 // commands
9 9
 #define LCD_CLEARDISPLAY 0x01

+ 4 - 4
libraries/Servo/Servo.cpp 파일 보기

@@ -26,10 +26,10 @@
26 26
 
27 27
 #include "Servo.h"
28 28
 
29
-#include "boards.h"
30
-#include "io.h"
31
-#include "pwm.h"
32
-#include "wirish_math.h"
29
+#include <wirish/boards.h>
30
+#include <wirish/io.h>
31
+#include <wirish/pwm.h>
32
+#include <wirish/wirish_math.h>
33 33
 
34 34
 // 20 millisecond period config.  For a 1-based prescaler,
35 35
 //

+ 3 - 7
libraries/Servo/Servo.h 파일 보기

@@ -27,14 +27,10 @@
27 27
 #ifndef _SERVO_H_
28 28
 #define _SERVO_H_
29 29
 
30
-#include "libmaple_types.h"
31
-#include "timer.h"
30
+#include <libmaple/libmaple_types.h>
31
+#include <libmaple/timer.h>
32 32
 
33
-#include "wirish_types.h"
34
-
35
-#ifdef MAPLE_IDE
36
-#include "wirish.h"             /* hack for IDE compile */
37
-#endif
33
+#include <wirish/wirish_types.h>
38 34
 
39 35
 /*
40 36
  * Note on Arduino compatibility:

+ 0 - 1
libraries/Wire/Wire.cpp 파일 보기

@@ -30,7 +30,6 @@
30 30
  */
31 31
 
32 32
 #include "Wire.h"
33
-#include "wirish.h"
34 33
 
35 34
 /* low level conventions:
36 35
  * - SDA/SCL idle high (expected high)

+ 2 - 2
libraries/Wire/Wire.h 파일 보기

@@ -29,11 +29,11 @@
29 29
  *  interface to I2C (two-wire) communication.
30 30
  */
31 31
 
32
-#include "wirish.h"
33
-
34 32
 #ifndef _WIRE_H_
35 33
 #define _WIRE_H_
36 34
 
35
+#include <wirish/wirish.h>
36
+
37 37
 typedef struct {
38 38
   uint8 scl;
39 39
   uint8 sda;

+ 1 - 1
main.cpp.example 파일 보기

@@ -1,7 +1,7 @@
1 1
 // Sample main.cpp file. Blinks the built-in LED, sends a message out
2 2
 // USART2, and turns on PWM on pin 2.
3 3
 
4
-#include "wirish.h"
4
+#include <wirish/wirish.h>
5 5
 
6 6
 #define PWM_PIN  2
7 7
 

+ 3 - 3
wirish/HardwareTimer.cpp 파일 보기

@@ -24,9 +24,9 @@
24 24
  * SOFTWARE.
25 25
  *****************************************************************************/
26 26
 
27
-#include "HardwareTimer.h"
28
-#include "boards.h"             // for CYCLES_PER_MICROSECOND
29
-#include "wirish_math.h"
27
+#include <wirish/HardwareTimer.h>
28
+#include <wirish/boards.h>             // for CYCLES_PER_MICROSECOND
29
+#include <wirish/wirish_math.h>
30 30
 
31 31
 // TODO [0.1.0] Remove deprecated pieces
32 32
 

+ 2 - 3
wirish/Print.cpp 파일 보기

@@ -21,8 +21,9 @@
21 21
  * Modified 12 April 2011 by Marti Bolivar <mbolivar@leaflabs.com>
22 22
  */
23 23
 
24
-#include "Print.h"
24
+#include <wirish/Print.h>
25 25
 
26
+#include <wirish/wirish_math.h>
26 27
 #include <limits.h>
27 28
 
28 29
 #ifndef LLONG_MAX
@@ -40,8 +41,6 @@
40 41
 #define LLONG_MAX 9223372036854775807LL
41 42
 #endif
42 43
 
43
-#include "wirish_math.h"
44
-
45 44
 /*
46 45
  * Public methods
47 46
  */

+ 9 - 9
wirish/boards.cpp 파일 보기

@@ -32,15 +32,15 @@
32 32
  * at 72MHz.  APB1 is clocked at 36MHz.
33 33
  */
34 34
 
35
-#include "boards.h"
36
-
37
-#include "flash.h"
38
-#include "rcc.h"
39
-#include "nvic.h"
40
-#include "systick.h"
41
-#include "gpio.h"
42
-#include "adc.h"
43
-#include "timer.h"
35
+#include <wirish/boards.h>
36
+
37
+#include <libmaple/flash.h>
38
+#include <libmaple/rcc.h>
39
+#include <libmaple/nvic.h>
40
+#include <libmaple/systick.h>
41
+#include <libmaple/gpio.h>
42
+#include <libmaple/adc.h>
43
+#include <libmaple/timer.h>
44 44
 #include "usb_cdcacm.h"
45 45
 
46 46
 static void setupFlash(void);

wirish/boards/maple.cpp → wirish/boards/maple/board.cpp 파일 보기

@@ -25,18 +25,16 @@
25 25
  *****************************************************************************/
26 26
 
27 27
 /**
28
- * @file   maple.cpp
28
+ * @file   wirish/boards/maple/board.cpp
29 29
  * @author Marti Bolivar <mbolivar@leaflabs.com>
30
- * @brief  Maple PIN_MAP and boardInit().
30
+ * @brief  Maple board file.
31 31
  */
32 32
 
33
-#ifdef BOARD_maple
33
+#include <board/board.h>
34 34
 
35
-#include "maple.h"
36
-
37
-#include "gpio.h"
38
-#include "timer.h"
39
-#include "wirish_types.h"
35
+#include <libmaple/gpio.h>
36
+#include <libmaple/timer.h>
37
+#include <wirish/wirish_types.h>
40 38
 
41 39
 void boardInit(void) {
42 40
 }
@@ -112,5 +110,3 @@ extern const uint8 boardUsedPins[] __FLASH__ = {
112 110
     BOARD_LED_PIN, BOARD_BUTTON_PIN, BOARD_JTMS_SWDIO_PIN,
113 111
     BOARD_JTCK_SWCLK_PIN, BOARD_JTDI_PIN, BOARD_JTDO_PIN, BOARD_NJTRST_PIN
114 112
 };
115
-
116
-#endif

wirish/boards/maple.h → wirish/boards/maple/include/board/board.h 파일 보기

@@ -25,9 +25,9 @@
25 25
  *****************************************************************************/
26 26
 
27 27
 /**
28
- * @file   maple.h
28
+ * @file   wirish/boards/maple/include/board/board.h
29 29
  * @author Marti Bolivar <mbolivar@leaflabs.com>
30
- * @brief  Private include file for Maple in boards.h
30
+ * @brief  Maple board header.
31 31
  */
32 32
 
33 33
 #ifndef _BOARD_MAPLE_H_

wirish/boards/maple_RET6.cpp → wirish/boards/maple_RET6/board.cpp 파일 보기

@@ -25,18 +25,17 @@
25 25
  *****************************************************************************/
26 26
 
27 27
 /**
28
- * @file   maple_RET6.cpp
28
+ * @file   wirish/boards/maple_RET6/board.cpp
29 29
  * @author Marti Bolivar <mbolivar@leaflabs.com>
30 30
  * @brief  Maple RET6 Edition board file
31 31
  */
32 32
 
33
-#ifdef BOARD_maple_RET6
33
+#include <board/board.h>
34 34
 
35
-#include "maple_RET6.h"
35
+#include <libmaple/gpio.h>
36
+#include <libmaple/timer.h>
36 37
 
37
-#include "gpio.h"
38
-#include "timer.h"
39
-#include "wirish_types.h"
38
+#include <wirish/wirish_types.h>
40 39
 
41 40
 void boardInit(void) {
42 41
 }
@@ -114,5 +113,3 @@ extern const uint8 boardUsedPins[BOARD_NR_USED_PINS] __FLASH__ = {
114 113
     BOARD_LED_PIN, BOARD_BUTTON_PIN, BOARD_JTMS_SWDIO_PIN,
115 114
     BOARD_JTCK_SWCLK_PIN, BOARD_JTDI_PIN, BOARD_JTDO_PIN, BOARD_NJTRST_PIN
116 115
 };
117
-
118
-#endif

wirish/boards/maple_RET6.h → wirish/boards/maple_RET6/include/board/board.h 파일 보기

@@ -25,11 +25,12 @@
25 25
  *****************************************************************************/
26 26
 
27 27
 /**
28
- * @file   maple_RET6.h
28
+ * @file   wirish/boards/maple_RET6/include/board/board.h
29 29
  * @author Marti Bolivar <mbolivar@leaflabs.com>
30
- * @brief  Private include file for Maple RET6 Edition in boards.h
30
+ * @brief  Maple RET6 Edition board header.
31 31
  *
32
- * See maple.h for more information on these definitions.
32
+ * See wirish/boards/maple/include/board/board.h for more information
33
+ * on these definitions.
33 34
  */
34 35
 
35 36
 #ifndef _BOARDS_MAPLE_RET6_H_

wirish/boards/maple_mini.cpp → wirish/boards/maple_mini/board.cpp 파일 보기

@@ -25,19 +25,18 @@
25 25
  *****************************************************************************/
26 26
 
27 27
 /**
28
- * @file   maple_mini.cpp
28
+ * @file   wirish/boards/maple_mini/board.cpp
29 29
  * @author Marti Bolivar <mbolivar@leaflabs.com>
30 30
  * @brief  Maple Mini board file.
31 31
  */
32 32
 
33
-#ifdef BOARD_maple_mini
33
+#include <board/board.h>
34 34
 
35
-#include "maple_mini.h"
35
+#include <libmaple/gpio.h>
36
+#include <libmaple/timer.h>
36 37
 
37
-#include "gpio.h"
38
-#include "timer.h"
39
-#include "wirish_debug.h"
40
-#include "wirish_types.h"
38
+#include <wirish/wirish_debug.h>
39
+#include <wirish/wirish_types.h>
41 40
 
42 41
 /* Since we want the Serial Wire/JTAG pins as GPIOs, disable both SW
43 42
  * and JTAG debug support */
@@ -102,5 +101,3 @@ extern const uint8 boardADCPins[BOARD_NR_ADC_PINS] __FLASH__ = {
102 101
 extern const uint8 boardUsedPins[BOARD_NR_USED_PINS] __FLASH__ = {
103 102
     BOARD_LED_PIN, BOARD_BUTTON_PIN, USB_DP, USB_DM
104 103
 };
105
-
106
-#endif

wirish/boards/maple_mini.h → wirish/boards/maple_mini/include/board/board.h 파일 보기

@@ -25,11 +25,12 @@
25 25
  *****************************************************************************/
26 26
 
27 27
 /**
28
- * @file   maple_mini.h
28
+ * @file   wirish/boards/maple_mini/include/board/board.h
29 29
  * @author Marti Bolivar <mbolivar@leaflabs.com>
30
- * @brief  Private include file for Maple Mini in boards.h
30
+ * @brief  Maple Mini board header.
31 31
  *
32
- * See maple.h for more information on these definitions.
32
+ * See wirish/boards/maple/include/board/board.h for more information
33
+ * on these definitions.
33 34
  */
34 35
 
35 36
 #ifndef _BOARD_MAPLE_MINI_H_

wirish/boards/maple_native.cpp → wirish/boards/maple_native/board.cpp 파일 보기

@@ -25,21 +25,19 @@
25 25
  *****************************************************************************/
26 26
 
27 27
 /**
28
- * @file   maple_native.cpp
28
+ * @file   wirish/boards/maple_native/board.cpp
29 29
  * @author Marti Bolivar <mbolivar@leaflabs.com>
30 30
  * @brief  Maple Native board file.
31 31
  */
32 32
 
33
-#ifdef BOARD_maple_native
33
+#include <board/board.h>
34 34
 
35
-#include "maple_native.h"
35
+#include <libmaple/fsmc.h>
36
+#include <libmaple/gpio.h>
37
+#include <libmaple/rcc.h>
38
+#include <libmaple/timer.h>
36 39
 
37
-#include "fsmc.h"
38
-#include "gpio.h"
39
-#include "rcc.h"
40
-#include "timer.h"
41
-
42
-#include "wirish_types.h"
40
+#include <wirish/wirish_types.h>
43 41
 
44 42
 static void initSRAMChip(void);
45 43
 
@@ -197,5 +195,3 @@ static void initSRAMChip(void) {
197 195
     fsmc_nor_psram_set_addset(regs, 0);
198 196
     fsmc_nor_psram_set_datast(regs, 3);
199 197
 }
200
-
201
-#endif

wirish/boards/maple_native.h → wirish/boards/maple_native/include/board/board.h 파일 보기

@@ -25,11 +25,12 @@
25 25
  *****************************************************************************/
26 26
 
27 27
 /**
28
- * @file   maple_native.h
28
+ * @file   wirish/boards/maple_native/include/board/board.h.
29 29
  * @author Marti Bolivar <mbolivar@leaflabs.com>
30
- * @brief  Private include file for Maple Native in boards.h
30
+ * @brief  Maple Native board header file.
31 31
  *
32
- * See maple.h for more information on these definitions.
32
+ * See wirish/boards/maple/include/board/board.h for more information
33
+ * on these definitions.
33 34
  */
34 35
 
35 36
 #ifndef _BOARD_MAPLE_NATIVE_H_

wirish/boards/olimex_stm32_h103.cpp → wirish/boards/olimex_stm32_h103/board.cpp 파일 보기

@@ -26,18 +26,17 @@
26 26
  *****************************************************************************/
27 27
 
28 28
 /**
29
- * @file   olimex_stm32_h103.cpp
29
+ * @file   wirish/boards/olimex_stm32_h103/board.cpp
30 30
  * @author David Kiliani <mail@davidkiliani.de>
31
- * @brief  Olimex STM32_H103 PIN_MAP and boardInit().
31
+ * @brief  Olimex STM32_H103 board file.
32 32
  */
33 33
 
34
-#ifdef BOARD_olimex_stm32_h103
34
+#include <board/board.h>
35 35
 
36
-#include "olimex_stm32_h103.h"
36
+#include <libmaple/gpio.h>
37
+#include <libmaple/timer.h>
37 38
 
38
-#include "gpio.h"
39
-#include "timer.h"
40
-#include "wirish_types.h"
39
+#include <wirish/wirish_types.h>
41 40
 
42 41
 void boardInit(void) {
43 42
 }
@@ -118,5 +117,3 @@ extern const uint8 boardUsedPins[] __FLASH__ = {
118 117
     BOARD_LED_PIN, BOARD_BUTTON_PIN, BOARD_JTMS_SWDIO_PIN,
119 118
     BOARD_JTCK_SWCLK_PIN, BOARD_JTDI_PIN, BOARD_JTDO_PIN, BOARD_NJTRST_PIN
120 119
 };
121
-
122
-#endif

wirish/boards/olimex_stm32_h103.h → wirish/boards/olimex_stm32_h103/include/board/board.h 파일 보기

@@ -26,9 +26,9 @@
26 26
  *****************************************************************************/
27 27
 
28 28
 /**
29
- * @file   olimex_stm32_h103.h
29
+ * @file   wirish/boards/olimex_stm32_h103/include/board/board.h
30 30
  * @author David Kiliani <mail@davidkiliani.de>
31
- * @brief  Private include file for Olimex STM32_H103 in boards.h
31
+ * @brief  Olimex STM32_H103 board header.
32 32
  */
33 33
 
34 34
 #ifndef _BOARD_OLIMEX_STM32_H103_H_

+ 6 - 6
wirish/comm/HardwareSPI.cpp 파일 보기

@@ -29,14 +29,14 @@
29 29
  * @brief Wirish SPI implementation.
30 30
  */
31 31
 
32
-#include "HardwareSPI.h"
32
+#include <wirish/HardwareSPI.h>
33 33
 
34
-#include "timer.h"
35
-#include "util.h"
36
-#include "rcc.h"
34
+#include <libmaple/timer.h>
35
+#include <libmaple/util.h>
36
+#include <libmaple/rcc.h>
37 37
 
38
-#include "wirish.h"
39
-#include "boards.h"
38
+#include <wirish/wirish.h>
39
+#include <wirish/boards.h>
40 40
 
41 41
 struct spi_pins {
42 42
     uint8 nss;

+ 6 - 5
wirish/comm/HardwareSerial.cpp 파일 보기

@@ -29,12 +29,13 @@
29 29
  * @brief Wirish serial port implementation.
30 30
  */
31 31
 
32
-#include "libmaple.h"
33
-#include "gpio.h"
34
-#include "timer.h"
32
+#include <wirish/HardwareSerial.h>
35 33
 
36
-#include "HardwareSerial.h"
37
-#include "boards.h"
34
+#include <libmaple/libmaple.h>
35
+#include <libmaple/gpio.h>
36
+#include <libmaple/timer.h>
37
+
38
+#include <wirish/boards.h>
38 39
 
39 40
 #define TX1 BOARD_USART1_TX_PIN
40 41
 #define RX1 BOARD_USART1_RX_PIN

+ 4 - 4
wirish/ext_interrupts.cpp 파일 보기

@@ -30,12 +30,12 @@
30 30
  *  @brief Wiring-like interface for external interrupts
31 31
  */
32 32
 
33
-#include "ext_interrupts.h"
33
+#include <wirish/ext_interrupts.h>
34 34
 
35
-#include "gpio.h"
36
-#include "exti.h"
35
+#include <libmaple/gpio.h>
36
+#include <libmaple/exti.h>
37 37
 
38
-#include "boards.h"
38
+#include <wirish/boards.h>
39 39
 
40 40
 static inline exti_trigger_mode exti_out_mode(ExtIntTriggerMode mode);
41 41
 

wirish/comm/HardwareSPI.h → wirish/include/wirish/HardwareSPI.h 파일 보기

@@ -33,13 +33,13 @@
33 33
 
34 34
 /* TODO [0.1.0] Remove deprecated methods. */
35 35
 
36
-#include "libmaple_types.h"
37
-#include "spi.h"
36
+#include <libmaple/libmaple_types.h>
37
+#include <libmaple/spi.h>
38 38
 
39
-#include "boards.h"
39
+#include <wirish/boards.h>
40 40
 
41
-#ifndef _HARDWARESPI_H_
42
-#define _HARDWARESPI_H_
41
+#ifndef _WIRISH_HARDWARESPI_H_
42
+#define _WIRISH_HARDWARESPI_H_
43 43
 
44 44
 /**
45 45
  * @brief Defines the possible SPI communication speeds.
@@ -220,4 +220,3 @@ private:
220 220
 };
221 221
 
222 222
 #endif
223
-

wirish/comm/HardwareSerial.h → wirish/include/wirish/HardwareSerial.h 파일 보기

@@ -29,13 +29,13 @@
29 29
  * @brief Wirish serial port interface.
30 30
  */
31 31
 
32
-#ifndef _HARDWARESERIAL_H_
33
-#define _HARDWARESERIAL_H_
32
+#ifndef _WIRISH_HARDWARESERIAL_H_
33
+#define _WIRISH_HARDWARESERIAL_H_
34 34
 
35
-#include "libmaple_types.h"
36
-#include "usart.h"
35
+#include <libmaple/libmaple_types.h>
36
+#include <libmaple/usart.h>
37 37
 
38
-#include "Print.h"
38
+#include <wirish/Print.h>
39 39
 
40 40
 /*
41 41
  * IMPORTANT:

wirish/HardwareTimer.h → wirish/include/wirish/HardwareTimer.h 파일 보기

@@ -28,12 +28,12 @@
28 28
  *  @brief Wirish timer class.
29 29
  */
30 30
 
31
-#ifndef _HARDWARETIMER_H_
32
-#define _HARDWARETIMER_H_
31
+#ifndef _WIRISH_HARDWARETIMER_H_
32
+#define _WIRISH_HARDWARETIMER_H_
33 33
 
34 34
 // TODO [0.1.0] Remove deprecated pieces, pick a better API
35 35
 
36
-#include "timer.h"
36
+#include <libmaple/timer.h>
37 37
 
38 38
 /** Timer mode. */
39 39
 typedef timer_mode TimerMode;

wirish/Print.h → wirish/include/wirish/Print.h 파일 보기

@@ -20,10 +20,10 @@
20 20
  * Modified 12 April 2011 by Marti Bolivar <mbolivar@leaflabs.com>
21 21
  */
22 22
 
23
-#ifndef _PRINT_H_
24
-#define _PRINT_H_
23
+#ifndef _WIRISH_PRINT_H_
24
+#define _WIRISH_PRINT_H_
25 25
 
26
-#include "libmaple_types.h"
26
+#include <libmaple/libmaple_types.h>
27 27
 
28 28
 enum {
29 29
     BYTE = 0,

wirish/WProgram.h → wirish/include/wirish/WProgram.h 파일 보기


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.