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,
4646 const mcu_pin_obj_t * pin ) {
4747 if (!pin -> has_adc ) {
4848 // 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" ));
5050 }
5151
5252 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,
8080
8181 if (pin -> primary_timer .tc == 0 && pin -> secondary_timer .tc == 0 ) {
8282 nlr_raise (mp_obj_new_exception_msg_varg (& mp_type_ValueError ,
83- "Invalid pin. " ));
83+ "Invalid pin" ));
8484 }
8585
8686 if (frequency == 0 || frequency > 6000000 ) {
8787 nlr_raise (mp_obj_new_exception_msg_varg (& mp_type_ValueError ,
88- "Invalid PWM frequency. " ));
88+ "Invalid PWM frequency" ));
8989 }
9090
9191 uint16_t primary_timer_index = 0xff ;
@@ -136,7 +136,7 @@ void common_hal_nativeio_pwmout_construct(nativeio_pwmout_obj_t* self,
136136 index = primary_timer_index ;
137137 }
138138 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" ));
140140 return ;
141141 }
142142 uint8_t resolution = 0 ;
@@ -266,7 +266,7 @@ void common_hal_nativeio_pwmout_set_frequency(nativeio_pwmout_obj_t* self,
266266 uint32_t frequency ) {
267267 if (frequency == 0 || frequency > 6000000 ) {
268268 nlr_raise (mp_obj_new_exception_msg_varg (& mp_type_ValueError ,
269- "Invalid PWM frequency. " ));
269+ "Invalid PWM frequency" ));
270270 }
271271 const pin_timer_t * t = self -> timer ;
272272 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,
9292 }
9393 }
9494 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" ));
9696 }
9797
9898 // Depends on where MOSI and CLK are.
@@ -111,7 +111,7 @@ void common_hal_nativeio_spi_construct(nativeio_spi_obj_t *self,
111111 }
112112 }
113113 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" ));
115115 }
116116
117117 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,
162162 }
163163 }
164164 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" ));
166166 }
167167 if (tx == NULL ) {
168168 tx_pad = 0 ;
You can’t perform that action at this time.
0 commit comments