File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
atmel-samd/common-hal/nativeio Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ void common_hal_nativeio_analogin_construct(nativeio_analogin_obj_t* self,
46
46
const mcu_pin_obj_t * pin ) {
47
47
if (!pin -> has_adc ) {
48
48
// No ADC function on that pin
49
- nlr_raise (mp_obj_new_exception_msg_varg (& mp_type_ValueError , "pin %q does not have ADC capabilities" , pin -> name ));
49
+ nlr_raise (mp_obj_new_exception_msg (& mp_type_ValueError , "Pin does not have ADC capabilities" ));
50
50
}
51
51
52
52
self -> pin = pin ;
Original file line number Diff line number Diff line change @@ -80,12 +80,12 @@ void common_hal_nativeio_pwmout_construct(nativeio_pwmout_obj_t* self,
80
80
81
81
if (pin -> primary_timer .tc == 0 && pin -> secondary_timer .tc == 0 ) {
82
82
nlr_raise (mp_obj_new_exception_msg_varg (& mp_type_ValueError ,
83
- "Invalid pin. " ));
83
+ "Invalid pin" ));
84
84
}
85
85
86
86
if (frequency == 0 || frequency > 6000000 ) {
87
87
nlr_raise (mp_obj_new_exception_msg_varg (& mp_type_ValueError ,
88
- "Invalid PWM frequency. " ));
88
+ "Invalid PWM frequency" ));
89
89
}
90
90
91
91
uint16_t primary_timer_index = 0xff ;
@@ -136,7 +136,7 @@ void common_hal_nativeio_pwmout_construct(nativeio_pwmout_obj_t* self,
136
136
index = primary_timer_index ;
137
137
}
138
138
if (t == NULL ) {
139
- nlr_raise (mp_obj_new_exception_msg (& mp_type_OSError , "All timers in use. " ));
139
+ nlr_raise (mp_obj_new_exception_msg (& mp_type_OSError , "All timers in use" ));
140
140
return ;
141
141
}
142
142
uint8_t resolution = 0 ;
@@ -266,7 +266,7 @@ void common_hal_nativeio_pwmout_set_frequency(nativeio_pwmout_obj_t* self,
266
266
uint32_t frequency ) {
267
267
if (frequency == 0 || frequency > 6000000 ) {
268
268
nlr_raise (mp_obj_new_exception_msg_varg (& mp_type_ValueError ,
269
- "Invalid PWM frequency. " ));
269
+ "Invalid PWM frequency" ));
270
270
}
271
271
const pin_timer_t * t = self -> timer ;
272
272
uint8_t resolution ;
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ void common_hal_nativeio_spi_construct(nativeio_spi_obj_t *self,
92
92
}
93
93
}
94
94
if (sercom == NULL ) {
95
- nlr_raise (mp_obj_new_exception_msg (& mp_type_ValueError , "Invalid pins. " ));
95
+ nlr_raise (mp_obj_new_exception_msg (& mp_type_ValueError , "Invalid pins" ));
96
96
}
97
97
98
98
// Depends on where MOSI and CLK are.
@@ -111,7 +111,7 @@ void common_hal_nativeio_spi_construct(nativeio_spi_obj_t *self,
111
111
}
112
112
}
113
113
if (dopo == 8 ) {
114
- nlr_raise (mp_obj_new_exception_msg (& mp_type_OSError , "SPI MOSI and clock pins incompatible. " ));
114
+ nlr_raise (mp_obj_new_exception_msg (& mp_type_OSError , "SPI MOSI and clock pins incompatible" ));
115
115
}
116
116
117
117
config_spi_master .mux_setting = (dopo << SERCOM_SPI_CTRLA_DOPO_Pos ) |
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ void common_hal_nativeio_uart_construct(nativeio_uart_obj_t *self,
162
162
}
163
163
}
164
164
if (sercom == NULL ) {
165
- nlr_raise (mp_obj_new_exception_msg (& mp_type_ValueError , "Invalid pins. " ));
165
+ nlr_raise (mp_obj_new_exception_msg (& mp_type_ValueError , "Invalid pins" ));
166
166
}
167
167
if (tx == NULL ) {
168
168
tx_pad = 0 ;
You can’t perform that action at this time.
0 commit comments