瀏覽代碼

Fixed compiler warning for Sanguino compile

Daid 13 年之前
父節點
當前提交
286d5003fa

+ 12
- 12
Marlin/Sanguino/cores/arduino/pins_arduino.c 查看文件

67
 const uint8_t PROGMEM port_to_mode_PGM[] =
67
 const uint8_t PROGMEM port_to_mode_PGM[] =
68
 {
68
 {
69
 	NOT_A_PORT,
69
 	NOT_A_PORT,
70
-	(uint8_t) &DDRA,
71
-	(uint8_t) &DDRB,
72
-	(uint8_t) &DDRC,
73
-	(uint8_t) &DDRD,
70
+	(uint8_t) (uint16_t) &DDRA,
71
+	(uint8_t) (uint16_t) &DDRB,
72
+	(uint8_t) (uint16_t) &DDRC,
73
+	(uint8_t) (uint16_t) &DDRD,
74
 };
74
 };
75
 
75
 
76
 const uint8_t PROGMEM port_to_output_PGM[] =
76
 const uint8_t PROGMEM port_to_output_PGM[] =
77
 {
77
 {
78
 	NOT_A_PORT,
78
 	NOT_A_PORT,
79
-	(uint8_t) &PORTA,
80
-	(uint8_t) &PORTB,
81
-	(uint8_t) &PORTC,
82
-	(uint8_t) &PORTD,
79
+	(uint8_t) (uint16_t) &PORTA,
80
+	(uint8_t) (uint16_t) &PORTB,
81
+	(uint8_t) (uint16_t) &PORTC,
82
+	(uint8_t) (uint16_t) &PORTD,
83
 };
83
 };
84
 
84
 
85
 const uint8_t PROGMEM port_to_input_PGM[] =
85
 const uint8_t PROGMEM port_to_input_PGM[] =
86
 {
86
 {
87
 	NOT_A_PORT,
87
 	NOT_A_PORT,
88
-	(uint8_t) &PINA,
89
-	(uint8_t) &PINB,
90
-	(uint8_t) &PINC,
91
-	(uint8_t) &PIND,
88
+	(uint8_t) (uint16_t) &PINA,
89
+	(uint8_t) (uint16_t) &PINB,
90
+	(uint8_t) (uint16_t) &PINC,
91
+	(uint8_t) (uint16_t) &PIND,
92
 };
92
 };
93
 
93
 
94
 const uint8_t PROGMEM digital_pin_to_port_PGM[] =
94
 const uint8_t PROGMEM digital_pin_to_port_PGM[] =

+ 3
- 3
Marlin/Sanguino/cores/arduino/pins_arduino.h 查看文件

58
 #define digitalPinToBitMask(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM + (P) ) )
58
 #define digitalPinToBitMask(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM + (P) ) )
59
 #define digitalPinToTimer(P) ( pgm_read_byte( digital_pin_to_timer_PGM + (P) ) )
59
 #define digitalPinToTimer(P) ( pgm_read_byte( digital_pin_to_timer_PGM + (P) ) )
60
 #define analogInPinToBit(P) (P)
60
 #define analogInPinToBit(P) (P)
61
-#define portOutputRegister(P) ( (volatile uint8_t *)( pgm_read_byte( port_to_output_PGM + (P))) )
62
-#define portInputRegister(P) ( (volatile uint8_t *)( pgm_read_byte( port_to_input_PGM + (P))) )
63
-#define portModeRegister(P) ( (volatile uint8_t *)( pgm_read_byte( port_to_mode_PGM + (P))) )
61
+#define portOutputRegister(P) ( (volatile uint8_t *)( (uint16_t) pgm_read_byte( port_to_output_PGM + (P))) )
62
+#define portInputRegister(P) ( (volatile uint8_t *)( (uint16_t) pgm_read_byte( port_to_input_PGM + (P))) )
63
+#define portModeRegister(P) ( (volatile uint8_t *)( (uint16_t) pgm_read_byte( port_to_mode_PGM + (P))) )
64
 
64
 
65
 #endif
65
 #endif

+ 1
- 1
Marlin/Sanguino/cores/arduino/wiring_private.h 查看文件

27
 #include <math.h>
27
 #include <math.h>
28
 #include <avr/io.h>
28
 #include <avr/io.h>
29
 #include <avr/interrupt.h>
29
 #include <avr/interrupt.h>
30
-#include <avr/delay.h>
30
+#include <util/delay.h>
31
 #include <stdio.h>
31
 #include <stdio.h>
32
 #include <stdarg.h>
32
 #include <stdarg.h>
33
 
33
 

+ 1
- 0
Marlin/pins.h 查看文件

539
 *
539
 *
540
 ****************************************************************************************/
540
 ****************************************************************************************/
541
 #if MOTHERBOARD == 62
541
 #if MOTHERBOARD == 62
542
+#undef MOTHERBOARD
542
 #define MOTHERBOARD 6
543
 #define MOTHERBOARD 6
543
 #define SANGUINOLOLU_V_1_2 
544
 #define SANGUINOLOLU_V_1_2 
544
 #endif
545
 #endif

Loading…
取消
儲存