Browse Source

Fixed compiler warning for Sanguino compile

Daid 13 years ago
parent
commit
286d5003fa

+ 12
- 12
Marlin/Sanguino/cores/arduino/pins_arduino.c View File

@@ -67,28 +67,28 @@
67 67
 const uint8_t PROGMEM port_to_mode_PGM[] =
68 68
 {
69 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 76
 const uint8_t PROGMEM port_to_output_PGM[] =
77 77
 {
78 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 85
 const uint8_t PROGMEM port_to_input_PGM[] =
86 86
 {
87 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 94
 const uint8_t PROGMEM digital_pin_to_port_PGM[] =

+ 3
- 3
Marlin/Sanguino/cores/arduino/pins_arduino.h View File

@@ -58,8 +58,8 @@ extern const uint8_t PROGMEM digital_pin_to_timer_PGM[];
58 58
 #define digitalPinToBitMask(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM + (P) ) )
59 59
 #define digitalPinToTimer(P) ( pgm_read_byte( digital_pin_to_timer_PGM + (P) ) )
60 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 65
 #endif

+ 1
- 1
Marlin/Sanguino/cores/arduino/wiring_private.h View File

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

+ 1
- 0
Marlin/pins.h View File

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

Loading…
Cancel
Save