diff options
| author | Scott Shawcroft <scott@adafruit.com> | 2020-11-23 15:04:26 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-23 15:04:26 -0800 |
| commit | 491e3147994cfc92105b0b77b601d7a26734805b (patch) | |
| tree | 9bcf1af7cf0eca697aaf92b6e214568517a46e37 /ports | |
| parent | c67f5892ffec4f279ccb4e10bc82ca4ca8679fab (diff) | |
| parent | 982bce7259a9bbf7493f86258fc3395f31081648 (diff) | |
Merge pull request #3718 from jepler/epd-rotation
EPaperDisplay: add rotation property
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/atmel-samd/common-hal/audiobusio/PDMIn.c | 8 | ||||
| -rw-r--r-- | ports/unix/modjni.c | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/ports/atmel-samd/common-hal/audiobusio/PDMIn.c b/ports/atmel-samd/common-hal/audiobusio/PDMIn.c index 3c9ec05c2..8911aef2f 100644 --- a/ports/atmel-samd/common-hal/audiobusio/PDMIn.c +++ b/ports/atmel-samd/common-hal/audiobusio/PDMIn.c @@ -337,7 +337,11 @@ const uint16_t sinc_filter [OVERSAMPLING] = { 94, 63, 39, 21, 9, 2, 0, 0 }; -#define REPEAT_16_TIMES(X) X X X X X X X X X X X X X X X X +#ifdef SAMD21 +#define REPEAT_16_TIMES(X) do { for(uint8_t j=0; j<4; j++) { X X X X } } while (0) +#else +#define REPEAT_16_TIMES(X) do { X X X X X X X X X X X X X X X X } while(0) +#endif static uint16_t filter_sample(uint32_t pdm_samples[4]) { uint16_t running_sum = 0; @@ -354,7 +358,7 @@ static uint16_t filter_sample(uint32_t pdm_samples[4]) { filter_ptr++; pdm_sample <<= 1; } - ) + ); } return running_sum; } diff --git a/ports/unix/modjni.c b/ports/unix/modjni.c index 8ec5ae54d..82d1ccd55 100644 --- a/ports/unix/modjni.c +++ b/ports/unix/modjni.c @@ -102,9 +102,9 @@ STATIC void check_exception(void) { mp_obj_t py_e = new_jobject(exc); JJ1(ExceptionClear); if (JJ(IsInstanceOf, exc, IndexException_class)) { - nlr_raise(mp_obj_new_exception_arg1(&mp_type_IndexError, py_e)); + mp_raise_arg1(&mp_type_IndexError, py_e); } - nlr_raise(mp_obj_new_exception_arg1(&mp_type_Exception, py_e)); + mp_raise_arg1(&mp_type_Exception, py_e); } } |
