From 89b2788d119c811327b366e061481fbcc96cbc65 Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Fri, 1 Mar 2019 16:05:15 +0100 Subject: [PATCH] Apply review fixes: * fix formatting * fix copyrights * fix CIRCUITPYTHON_GAMEPAD guards * add CIRCUITPYTHON_PEW guards to reset * fix module list order --- ports/atmel-samd/boards/pewpew10/board.c | 3 +-- ports/atmel-samd/supervisor/port.c | 6 ++++-- py/circuitpy_mpconfig.h | 2 +- shared-bindings/_pew/PewPew.c | 2 +- shared-bindings/_pew/PewPew.h | 2 +- shared-bindings/_pew/__init__.c | 2 +- shared-module/_pew/PewPew.c | 2 +- shared-module/_pew/PewPew.h | 2 +- shared-module/_pew/__init__.c | 2 +- shared-module/_pew/__init__.h | 2 +- 10 files changed, 13 insertions(+), 12 deletions(-) diff --git a/ports/atmel-samd/boards/pewpew10/board.c b/ports/atmel-samd/boards/pewpew10/board.c index c8e20206a1..d7e856d611 100644 --- a/ports/atmel-samd/boards/pewpew10/board.c +++ b/ports/atmel-samd/boards/pewpew10/board.c @@ -26,8 +26,7 @@ #include "boards/board.h" -void board_init(void) -{ +void board_init(void) { } bool board_requests_safe_mode(void) { diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 4aa07a6dbc..b3f4a2e89a 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -68,7 +68,7 @@ #include "tusb.h" -#ifdef CIRCUITPY_GAMEPAD_TICKS +#if CIRCUITPY_GAMEPAD #include "shared-module/gamepad/__init__.h" #endif #include "shared-module/_pew/PewPew.h" @@ -223,10 +223,12 @@ void reset_port(void) { reset_gclks(); -#ifdef CIRCUITPY_GAMEPAD_TICKS +#if CIRCUITPY_GAMEPAD gamepad_reset(); #endif +#ifdef CIRCUITPY_PEW pew_reset(); +#endif reset_event_system(); diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 25aabc292a..520f7c6125 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -528,6 +528,7 @@ extern const struct _mp_obj_module_t pew_module; NETWORK_MODULE \ SOCKET_MODULE \ WIZNET_MODULE \ + PEW_MODULE \ PIXELBUF_MODULE \ PULSEIO_MODULE \ RANDOM_MODULE \ @@ -543,7 +544,6 @@ extern const struct _mp_obj_module_t pew_module; USB_HID_MODULE \ USB_MIDI_MODULE \ USTACK_MODULE \ - PEW_MODULE \ // If weak links are enabled, just include strong links in the main list of modules, // and also include the underscore alternate names. diff --git a/shared-bindings/_pew/PewPew.c b/shared-bindings/_pew/PewPew.c index 19eb00736c..d0803e0a9d 100644 --- a/shared-bindings/_pew/PewPew.c +++ b/shared-bindings/_pew/PewPew.c @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2016 Radomir Dopieralski for Adafruit Industries + * Copyright (c) 2019 Radomir Dopieralski * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/shared-bindings/_pew/PewPew.h b/shared-bindings/_pew/PewPew.h index 13633ef934..f763847577 100644 --- a/shared-bindings/_pew/PewPew.h +++ b/shared-bindings/_pew/PewPew.h @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2016 Radomir Dopieralski for Adafruit Industries + * Copyright (c) 2019 Radomir Dopieralski * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/shared-bindings/_pew/__init__.c b/shared-bindings/_pew/__init__.c index 652d95f1b5..6c5520ac58 100644 --- a/shared-bindings/_pew/__init__.c +++ b/shared-bindings/_pew/__init__.c @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2016 Radomir Dopieralski for Adafruit Industries + * Copyright (c) 2019 Radomir Dopieralski * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/shared-module/_pew/PewPew.c b/shared-module/_pew/PewPew.c index 2900f2ac7a..3fea689a39 100644 --- a/shared-module/_pew/PewPew.c +++ b/shared-module/_pew/PewPew.c @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2016 Radomir Dopieralski for Adafruit Industries + * Copyright (c) 2019 Radomir Dopieralski * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/shared-module/_pew/PewPew.h b/shared-module/_pew/PewPew.h index 57b25c3a0c..da1cae0a2c 100644 --- a/shared-module/_pew/PewPew.h +++ b/shared-module/_pew/PewPew.h @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2016 Radomir Dopieralski for Adafruit Industries + * Copyright (c) 2019 Radomir Dopieralski * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/shared-module/_pew/__init__.c b/shared-module/_pew/__init__.c index e44a4c0e39..90fba39900 100644 --- a/shared-module/_pew/__init__.c +++ b/shared-module/_pew/__init__.c @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2016 Radomir Dopieralski for Adafruit Industries + * Copyright (c) 2019 Radomir Dopieralski * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/shared-module/_pew/__init__.h b/shared-module/_pew/__init__.h index f85dec7491..4f953c6106 100644 --- a/shared-module/_pew/__init__.h +++ b/shared-module/_pew/__init__.h @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2016 Scott Shawcroft for Adafruit Industries + * Copyright (c) 2019 Radomir Dopieralski * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal