File tree Expand file tree Collapse file tree 3 files changed +44
-44
lines changed
hardware/arduino/cores/arduino Expand file tree Collapse file tree 3 files changed +44
-44
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ void Print::write(const uint8_t *buffer, size_t size)
45
45
46
46
void Print::print (const String &s)
47
47
{
48
- for (int i = 0 ; i < s.length (); i++) {
48
+ for (unsigned int i = 0 ; i < s.length (); i++) {
49
49
write (s[i]);
50
50
}
51
51
}
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ class String
67
67
int lastIndexOf ( char ch, unsigned int fromIndex ) const ;
68
68
int lastIndexOf ( const String &str ) const ;
69
69
int lastIndexOf ( const String &str, unsigned int fromIndex ) const ;
70
- const unsigned int length ( ) const { return _length; }
70
+ unsigned int length ( ) const { return _length; }
71
71
void setCharAt (unsigned int index, const char ch);
72
72
unsigned char startsWith ( const String &prefix ) const ;
73
73
unsigned char startsWith ( const String &prefix, unsigned int toffset ) const ;
Original file line number Diff line number Diff line change 81
81
#if defined(__AVR_ATmega1280__ ) || defined(__AVR_ATmega2560__ )
82
82
const uint16_t PROGMEM port_to_mode_PGM [] = {
83
83
NOT_A_PORT ,
84
- & DDRA ,
85
- & DDRB ,
86
- & DDRC ,
87
- & DDRD ,
88
- & DDRE ,
89
- & DDRF ,
90
- & DDRG ,
91
- & DDRH ,
84
+ ( uint16_t ) & DDRA ,
85
+ ( uint16_t ) & DDRB ,
86
+ ( uint16_t ) & DDRC ,
87
+ ( uint16_t ) & DDRD ,
88
+ ( uint16_t ) & DDRE ,
89
+ ( uint16_t ) & DDRF ,
90
+ ( uint16_t ) & DDRG ,
91
+ ( uint16_t ) & DDRH ,
92
92
NOT_A_PORT ,
93
- & DDRJ ,
94
- & DDRK ,
95
- & DDRL ,
93
+ ( uint16_t ) & DDRJ ,
94
+ ( uint16_t ) & DDRK ,
95
+ ( uint16_t ) & DDRL ,
96
96
};
97
97
98
98
const uint16_t PROGMEM port_to_output_PGM [] = {
99
99
NOT_A_PORT ,
100
- & PORTA ,
101
- & PORTB ,
102
- & PORTC ,
103
- & PORTD ,
104
- & PORTE ,
105
- & PORTF ,
106
- & PORTG ,
107
- & PORTH ,
100
+ ( uint16_t ) & PORTA ,
101
+ ( uint16_t ) & PORTB ,
102
+ ( uint16_t ) & PORTC ,
103
+ ( uint16_t ) & PORTD ,
104
+ ( uint16_t ) & PORTE ,
105
+ ( uint16_t ) & PORTF ,
106
+ ( uint16_t ) & PORTG ,
107
+ ( uint16_t ) & PORTH ,
108
108
NOT_A_PORT ,
109
- & PORTJ ,
110
- & PORTK ,
111
- & PORTL ,
109
+ ( uint16_t ) & PORTJ ,
110
+ ( uint16_t ) & PORTK ,
111
+ ( uint16_t ) & PORTL ,
112
112
};
113
113
114
114
const uint16_t PROGMEM port_to_input_PGM [] = {
115
115
NOT_A_PIN ,
116
- & PINA ,
117
- & PINB ,
118
- & PINC ,
119
- & PIND ,
120
- & PINE ,
121
- & PINF ,
122
- & PING ,
123
- & PINH ,
116
+ ( uint16_t ) & PINA ,
117
+ ( uint16_t ) & PINB ,
118
+ ( uint16_t ) & PINC ,
119
+ ( uint16_t ) & PIND ,
120
+ ( uint16_t ) & PINE ,
121
+ ( uint16_t ) & PINF ,
122
+ ( uint16_t ) & PING ,
123
+ ( uint16_t ) & PINH ,
124
124
NOT_A_PIN ,
125
- & PINJ ,
126
- & PINK ,
127
- & PINL ,
125
+ ( uint16_t ) & PINJ ,
126
+ ( uint16_t ) & PINK ,
127
+ ( uint16_t ) & PINL ,
128
128
};
129
129
130
130
const uint8_t PROGMEM digital_pin_to_port_PGM [] = {
@@ -358,25 +358,25 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
358
358
const uint16_t PROGMEM port_to_mode_PGM [] = {
359
359
NOT_A_PORT ,
360
360
NOT_A_PORT ,
361
- & DDRB ,
362
- & DDRC ,
363
- & DDRD ,
361
+ ( uint16_t ) & DDRB ,
362
+ ( uint16_t ) & DDRC ,
363
+ ( uint16_t ) & DDRD ,
364
364
};
365
365
366
366
const uint16_t PROGMEM port_to_output_PGM [] = {
367
367
NOT_A_PORT ,
368
368
NOT_A_PORT ,
369
- & PORTB ,
370
- & PORTC ,
371
- & PORTD ,
369
+ ( uint16_t ) & PORTB ,
370
+ ( uint16_t ) & PORTC ,
371
+ ( uint16_t ) & PORTD ,
372
372
};
373
373
374
374
const uint16_t PROGMEM port_to_input_PGM [] = {
375
375
NOT_A_PORT ,
376
376
NOT_A_PORT ,
377
- & PINB ,
378
- & PINC ,
379
- & PIND ,
377
+ ( uint16_t ) & PINB ,
378
+ ( uint16_t ) & PINC ,
379
+ ( uint16_t ) & PIND ,
380
380
};
381
381
382
382
const uint8_t PROGMEM digital_pin_to_port_PGM [] = {
You can’t perform that action at this time.
0 commit comments