Skip to content

Commit b57ac66

Browse files
Cleanup legacy includes (#1452)
1 parent a851a92 commit b57ac66

File tree

11 files changed

+37
-47
lines changed

11 files changed

+37
-47
lines changed

cores/rp2040/Arduino.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "api/ArduinoAPI.h"
2929
#include "api/itoa.h" // ARM toolchain doesn't provide itoa etc, provide them
3030
#include <pins_arduino.h>
31-
#include "hardware/gpio.h" // Required for the port*Register macros
31+
#include <hardware/gpio.h> // Required for the port*Register macros
3232
#include "debug_internal.h"
3333
#include <RP2040.h> // CMSIS
3434

cores/rp2040/Bootsel.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
SPDX-License-Identifier: BSD-3-Clause
55
*/
66
#include <Arduino.h>
7-
#include "pico/stdlib.h"
8-
#include "hardware/gpio.h"
9-
#include "hardware/sync.h"
10-
#include "hardware/structs/ioqspi.h"
11-
#include "hardware/structs/sio.h"
7+
#include <pico/stdlib.h>
8+
#include <hardware/gpio.h>
9+
#include <hardware/sync.h>
10+
#include <hardware/structs/ioqspi.h>
11+
#include <hardware/structs/sio.h>
1212

1313
// This example blinks the Pico LED when the BOOTSEL button is pressed.
1414
//

cores/rp2040/CoreMutex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#pragma once
2525

26-
#include "pico/mutex.h"
26+
#include <pico/mutex.h>
2727
#include "_freertos.h"
2828

2929
enum {

cores/rp2040/RP2040USB.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,16 @@
2525
#include "CoreMutex.h"
2626
#include "RP2040USB.h"
2727

28-
#include "tusb.h"
29-
#include "class/hid/hid_device.h"
30-
#include "class/audio/audio.h"
31-
#include "class/midi/midi.h"
32-
#include "pico/time.h"
33-
#include "hardware/irq.h"
34-
#include "pico/mutex.h"
35-
#include "pico/unique_id.h"
36-
#include "pico/usb_reset_interface.h"
37-
#include "hardware/watchdog.h"
38-
#include "pico/bootrom.h"
28+
#include <tusb.h>
29+
#include <class/hid/hid_device.h>
30+
#include <class/audio/audio.h>
31+
#include <pico/time.h>
32+
#include <hardware/irq.h>
33+
#include <pico/mutex.h>
34+
#include <pico/unique_id.h>
35+
#include <pico/usb_reset_interface.h>
36+
#include <hardware/watchdog.h>
37+
#include <pico/bootrom.h>
3938
#include "sdkoverride/tusb_absmouse.h"
4039
#include <device/usbd_pvt.h>
4140

cores/rp2040/RP2040USB.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2020
*/
2121

22-
#include "pico/mutex.h"
22+
#include <pico/mutex.h>
2323

2424
// Weak function definitions for each type of endpoint
2525
extern void __USBInstallSerial() __attribute__((weak));

cores/rp2040/SerialUSB.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
#include <Arduino.h>
2626
#include "CoreMutex.h"
2727

28-
#include "tusb.h"
29-
#include "pico/time.h"
30-
#include "pico/binary_info.h"
31-
#include "pico/bootrom.h"
32-
#include "hardware/irq.h"
33-
#include "pico/mutex.h"
34-
#include "hardware/watchdog.h"
35-
#include "pico/unique_id.h"
36-
#include "hardware/resets.h"
28+
#include <tusb.h>
29+
#include <pico/time.h>
30+
#include <pico/binary_info.h>
31+
#include <pico/bootrom.h>
32+
#include <hardware/irq.h>
33+
#include <pico/mutex.h>
34+
#include <hardware/watchdog.h>
35+
#include <pico/unique_id.h>
36+
#include <hardware/resets.h>
3737

3838
#ifndef DISABLE_USB_SERIAL
3939
// Ensure we are installed in the USB chain
@@ -179,7 +179,7 @@ static bool _rebooting = false;
179179
static void CheckSerialReset() {
180180
if (!_rebooting && (_bps == 1200) && (!_dtr)) {
181181
if (__isFreeRTOS) {
182-
vTaskPreemptionDisable(nullptr);
182+
__freertos_idle_other_core();
183183
}
184184
_rebooting = true;
185185
// Disable NVIC IRQ, so that we don't get bothered anymore

cores/rp2040/WMath.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1717
*/
1818

19-
#include "stdlib.h"
20-
#include "stdint.h"
19+
#include <stdlib.h>
20+
#include <stdint.h>
2121

2222
void randomSeed(uint32_t dwSeed) {
2323
if (dwSeed != 0) {

cores/rp2040/_freertos.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020

2121
#include "_freertos.h"
22-
#include "pico/mutex.h"
22+
#include <pico/mutex.h>
2323
#include <stdlib.h>
2424
#include "Arduino.h"
2525

cores/rp2040/_freertos.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020

2121
#pragma once
22-
#include "pico/mutex.h"
22+
#include <pico/mutex.h>
2323

2424
// Cannot include refs to FreeRTOS's actual semaphore calls because they
2525
// are implemented as macros, so we have a wrapper in our variant hook
@@ -50,15 +50,6 @@ extern "C" {
5050
extern int __freertos_recursive_mutex_try_take(SemaphoreHandle_t mtx) __attribute__((weak));
5151
extern void __freertos_recursive_mutex_give(SemaphoreHandle_t mtx) __attribute__((weak));
5252

53-
#ifndef INC_FREERTOS_H
54-
extern void vTaskSuspendAll() __attribute__((weak));
55-
extern int32_t xTaskResumeAll() __attribute__((weak));
56-
57-
typedef struct tskTaskControlBlock * TaskHandle_t;
58-
extern void vTaskPreemptionDisable(TaskHandle_t p) __attribute__((weak));
59-
extern void vTaskPreemptionEnable(TaskHandle_t p) __attribute__((weak));
60-
#endif
61-
6253
extern void __freertos_idle_other_core() __attribute__((weak));
6354
extern void __freertos_resume_other_core() __attribute__((weak));
6455
}

cores/rp2040/cyw43_wrappers.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919

2020
#if defined(ARDUINO_RASPBERRY_PI_PICO_W)
2121

22-
#include "lwip/netif.h"
22+
#include <lwip/netif.h>
2323
extern "C" {
24-
#include "cyw43.h"
25-
#include "cyw43_stats.h"
24+
#include <cyw43.h>
25+
#include <cyw43_stats.h>
2626
}
27-
#include "pico/cyw43_arch.h"
27+
#include <pico/cyw43_arch.h>
2828
#include <Arduino.h>
2929

3030
// From cyw43_ctrl.c

cores/rp2040/lwip_wrap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
LWIP wrappers to protect against timer-based re-entrancy
33
4-
Copyright (c) 202s Earle F. Philhower, III <[email protected]>
4+
Copyright (c) 2023 Earle F. Philhower, III <[email protected]>
55
66
This library is free software; you can redistribute it and/or
77
modify it under the terms of the GNU Lesser General Public

0 commit comments

Comments
 (0)