From ccbb5e84f980e252f7380d96fcc5c417a8a64523 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 3 Nov 2016 15:50:59 -0700 Subject: This introduces an alternative hardware API called nativeio structured around different functions that are typically accelerated by native hardware. Its not meant to reflect the structure of the hardware. Docs are here: http://tannewt-micropython.readthedocs.io/en/microcontroller/ It differs from upstream's machine in the following ways: * Python API is identical across ports due to code structure. (Lives in shared-bindings) * Focuses on abstracting common functionality (AnalogIn) and not representing structure (ADC). * Documentation lives with code making it easy to ensure they match. * Pin is split into references (board.D13 and microcontroller.pin.PA17) and functionality (DigitalInOut). * All nativeio classes claim underlying hardware resources when inited on construction, support Context Managers (aka with statements) and have deinit methods which release the claimed hardware. * All constructors take pin references rather than peripheral ids. Its up to the implementation to find hardware or throw and exception. --- py/objcomplex.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'py/objcomplex.c') diff --git a/py/objcomplex.c b/py/objcomplex.c index 96be25255..b302b1d56 100644 --- a/py/objcomplex.c +++ b/py/objcomplex.c @@ -39,6 +39,9 @@ #include #include "py/formatfloat.h" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" + typedef struct _mp_obj_complex_t { mp_obj_base_t base; mp_float_t real; @@ -248,4 +251,6 @@ mp_obj_t mp_obj_complex_binary_op(mp_uint_t op, mp_float_t lhs_real, mp_float_t return mp_obj_new_complex(lhs_real, lhs_imag); } +#pragma GCC diagnostic pop + #endif -- cgit v1.2.3