diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2018-08-16 14:21:44 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2018-08-16 17:41:38 -0700 |
| commit | 76e0373576529aa41fc90e142f8b071b6c732c2f (patch) | |
| tree | f324024a9479c5dea77a6f03f84c4253f2dd81b6 /ports/nrf/common-hal/pulseio/PWMOut.c | |
| parent | 2cd166b57370ab4877ec2d9666225faeac6127ce (diff) | |
Fix nrf and unix
Diffstat (limited to 'ports/nrf/common-hal/pulseio/PWMOut.c')
| -rw-r--r-- | ports/nrf/common-hal/pulseio/PWMOut.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/nrf/common-hal/pulseio/PWMOut.c b/ports/nrf/common-hal/pulseio/PWMOut.c index d23662948..c85b77fcd 100644 --- a/ports/nrf/common-hal/pulseio/PWMOut.c +++ b/ports/nrf/common-hal/pulseio/PWMOut.c @@ -32,6 +32,7 @@ #include "common-hal/pulseio/PWMOut.h" #include "nrf_gpio.h" #include "shared-bindings/pulseio/PWMOut.h" +#include "supervisor/shared/translate.h" #define PWM_MAX_MODULE 3 #define PWM_MAX_CHANNEL 4 @@ -223,7 +224,7 @@ uint16_t common_hal_pulseio_pwmout_get_duty_cycle(pulseio_pwmout_obj_t* self) { void common_hal_pulseio_pwmout_set_frequency(pulseio_pwmout_obj_t* self, uint32_t frequency) { if (frequency == 0 || frequency > 16000000) { - mp_raise_ValueError("Invalid PWM frequency"); + mp_raise_ValueError(translate("Invalid PWM frequency")); } self->freq = frequency; @@ -238,4 +239,3 @@ uint32_t common_hal_pulseio_pwmout_get_frequency(pulseio_pwmout_obj_t* self) { bool common_hal_pulseio_pwmout_get_variable_frequency(pulseio_pwmout_obj_t* self) { return self->variable_freq; } - |
