Skip to content

Convert #include guards to #pragma once; add missing #pragma once #9260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 1 addition & 4 deletions devices/ble_hci/common-hal/_bleio/Adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
//
// SPDX-License-Identifier: MIT

#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_ADAPTER_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_ADAPTER_H
#pragma once

#include "py/obj.h"
#include "py/objtuple.h"
Expand Down Expand Up @@ -75,5 +74,3 @@ uint16_t bleio_adapter_max_attribute_handle(bleio_adapter_obj_t *adapter);
void bleio_adapter_background(bleio_adapter_obj_t *adapter);
void bleio_adapter_gc_collect(bleio_adapter_obj_t *adapter);
void bleio_adapter_reset(bleio_adapter_obj_t *adapter);

#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_ADAPTER_H
5 changes: 1 addition & 4 deletions devices/ble_hci/common-hal/_bleio/Attribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
//
// SPDX-License-Identifier: MIT

#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_ATTRIBUTE_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_ATTRIBUTE_H
#pragma once

#include "shared-module/_bleio/Attribute.h"
#include "shared-bindings/_bleio/UUID.h"

bleio_uuid_obj_t *bleio_attribute_get_uuid(mp_obj_t *attribute);

#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_ATTRIBUTE_H
5 changes: 1 addition & 4 deletions devices/ble_hci/common-hal/_bleio/Characteristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
//
// SPDX-License-Identifier: MIT

#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CHARACTERISTIC_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CHARACTERISTIC_H
#pragma once

#include "shared-bindings/_bleio/Attribute.h"
#include "common-hal/_bleio/Descriptor.h"
Expand Down Expand Up @@ -39,5 +38,3 @@ bool bleio_characteristic_set_local_value(bleio_characteristic_obj_t *self, mp_b

void bleio_characteristic_set_observer(bleio_characteristic_obj_t *self, mp_obj_t observer);
void bleio_characteristic_clear_observer(bleio_characteristic_obj_t *self);

#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CHARACTERISTIC_H
5 changes: 1 addition & 4 deletions devices/ble_hci/common-hal/_bleio/CharacteristicBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
//
// SPDX-License-Identifier: MIT

#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CHARACTERISTICBUFFER_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CHARACTERISTICBUFFER_H
#pragma once

#include "py/ringbuf.h"
#include "shared-bindings/_bleio/Characteristic.h"
Expand All @@ -19,5 +18,3 @@ typedef struct {
} bleio_characteristic_buffer_obj_t;

void bleio_characteristic_buffer_update(bleio_characteristic_buffer_obj_t *self, mp_buffer_info_t *bufinfo);

#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CHARACTERISTICBUFFER_H
5 changes: 1 addition & 4 deletions devices/ble_hci/common-hal/_bleio/Connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
//
// SPDX-License-Identifier: MIT

#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CONNECTION_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CONNECTION_H
#pragma once

#include <stdbool.h>

Expand Down Expand Up @@ -66,5 +65,3 @@ uint16_t bleio_connection_get_conn_handle(bleio_connection_obj_t *self);
mp_obj_t bleio_connection_new_from_internal(bleio_connection_internal_t *connection);
bleio_connection_internal_t *bleio_conn_handle_to_connection(uint16_t conn_handle);
void bleio_connection_clear(bleio_connection_internal_t *self);

#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_CONNECTION_H
5 changes: 1 addition & 4 deletions devices/ble_hci/common-hal/_bleio/Descriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
//
// SPDX-License-Identifier: MIT

#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_DESCRIPTOR_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_DESCRIPTOR_H
#pragma once

#include "py/obj.h"

Expand All @@ -29,5 +28,3 @@ typedef struct _bleio_descriptor_obj {
bleio_attribute_security_mode_t write_perm;
struct _bleio_descriptor_obj *next;
} bleio_descriptor_obj_t;

#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_DESCRIPTOR_H
5 changes: 1 addition & 4 deletions devices/ble_hci/common-hal/_bleio/PacketBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
//
// SPDX-License-Identifier: MIT

#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_PACKETBUFFER_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_PACKETBUFFER_H
#pragma once

#include "py/ringbuf.h"
#include "shared-bindings/_bleio/Characteristic.h"
Expand All @@ -30,5 +29,3 @@ typedef struct {
} bleio_packet_buffer_obj_t;

void bleio_packet_buffer_update(bleio_packet_buffer_obj_t *self, mp_buffer_info_t *bufinfo);

#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_PACKETBUFFER_H
5 changes: 1 addition & 4 deletions devices/ble_hci/common-hal/_bleio/Service.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
//
// SPDX-License-Identifier: MIT

#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_SERVICE_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_SERVICE_H
#pragma once

#include "py/objlist.h"
#include "common-hal/_bleio/UUID.h"
Expand All @@ -30,5 +29,3 @@ typedef struct bleio_service_obj {
} bleio_service_obj_t;

void bleio_service_from_connection(bleio_service_obj_t *self, mp_obj_t connection);

#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_SERVICE_H
5 changes: 1 addition & 4 deletions devices/ble_hci/common-hal/_bleio/UUID.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
//
// SPDX-License-Identifier: MIT

#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_UUID_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_UUID_H
#pragma once

#include "py/obj.h"

Expand All @@ -34,5 +33,3 @@ typedef struct {
} bleio_uuid_obj_t;

uint16_t bleio_uuid_get_uuid16_or_unknown(bleio_uuid_obj_t *uuid);

#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_UUID_H
5 changes: 1 addition & 4 deletions devices/ble_hci/common-hal/_bleio/__init__.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
//
// SPDX-License-Identifier: MIT

#ifndef MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_INIT_H
#define MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_INIT_H
#pragma once

#include <stdbool.h>

Expand Down Expand Up @@ -37,5 +36,3 @@ extern bool vm_used_ble;

// UUID shared by all CCCD's.
extern bleio_uuid_obj_t cccd_uuid;

#endif // MICROPY_INCLUDED_BLE_HCI_COMMON_HAL_INIT_H
5 changes: 1 addition & 4 deletions devices/ble_hci/common-hal/_bleio/att.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef MICROPY_INCLUDED_DEVICES_BLE_HCI_COMMON_HAL_BLEIO_ATT_H
#define MICROPY_INCLUDED_DEVICES_BLE_HCI_COMMON_HAL_BLEIO_ATT_H
#pragma once

#include <stdbool.h>
#include <stdint.h>
Expand Down Expand Up @@ -59,5 +58,3 @@ void att_remove_connection(uint16_t conn_handle, uint8_t reason);
void att_set_max_mtu(uint16_t max_mtu);
void att_set_timeout(unsigned long timeout);
void att_write_cmd(uint16_t conn_handle, uint16_t handle, const uint8_t *data, uint8_t data_len);

#endif // MICROPY_INCLUDED_DEVICES_BLE_HCI_COMMON_HAL_BLEIO_ATT_H
5 changes: 1 addition & 4 deletions devices/ble_hci/common-hal/_bleio/hci.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef MICROPY_INCLUDED_DEVICES_BLE_HCI_COMMON_HAL_BLEIO_HCI_H
#define MICROPY_INCLUDED_DEVICES_BLE_HCI_COMMON_HAL_BLEIO_HCI_H
#pragma once

#include <stdint.h>

Expand Down Expand Up @@ -86,5 +85,3 @@ hci_result_t hci_reset(void);

hci_result_t hci_send_acl_pkt(uint16_t handle, uint8_t cid, uint16_t data_len, uint8_t *data);
hci_result_t hci_set_event_mask(uint64_t event_mask);

#endif // MICROPY_INCLUDED_DEVICES_BLE_HCI_COMMON_HAL_BLEIO_HCI_H
5 changes: 1 addition & 4 deletions devices/ble_hci/common-hal/_bleio/hci_include/addr.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_BLUETOOTH_ADDR_H_
#define ZEPHYR_INCLUDE_BLUETOOTH_ADDR_H_
#pragma once

#include <stdbool.h>
#include <string.h>
Expand Down Expand Up @@ -93,5 +92,3 @@ static inline bool bt_addr_le_is_identity(const bt_addr_le_t *addr) {
/**
* @}
*/

#endif /* ZEPHYR_INCLUDE_BLUETOOTH_ADDR_H_ */
5 changes: 1 addition & 4 deletions devices/ble_hci/common-hal/_bleio/hci_include/att.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_BLUETOOTH_ATT_H_
#define ZEPHYR_INCLUDE_BLUETOOTH_ATT_H_
#pragma once

/* Error codes for Error response PDU */
#define BT_ATT_ERR_INVALID_HANDLE 0x01
Expand Down Expand Up @@ -39,5 +38,3 @@
#define BT_ATT_ERR_CCC_IMPROPER_CONF 0xfd
#define BT_ATT_ERR_PROCEDURE_IN_PROGRESS 0xfe
#define BT_ATT_ERR_OUT_OF_RANGE 0xff

#endif /* ZEPHYR_INCLUDE_BLUETOOTH_ATT_H_ */
5 changes: 1 addition & 4 deletions devices/ble_hci/common-hal/_bleio/hci_include/hci.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_BLUETOOTH_HCI_H_
#define ZEPHYR_INCLUDE_BLUETOOTH_HCI_H_
#pragma once

#include <stdbool.h>
// for __packed
Expand Down Expand Up @@ -1769,5 +1768,3 @@ struct bt_hci_evt_le_chan_sel_algo {
#define BT_EVT_MASK_LE_CHAN_SEL_ALGO BT_EVT_BIT(19)

//

#endif /* ZEPHYR_INCLUDE_BLUETOOTH_HCI_H_ */
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

#pragma once

#include <stdbool.h>
// for __packed
#include <string.h>
Expand Down
5 changes: 1 addition & 4 deletions devices/ble_hci/supervisor/bluetooth.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
//
// SPDX-License-Identifier: MIT

#ifndef MICROPY_INCLUDED_DEVICE_BLE_HCI_SUPERVISOR_BLUETOOTH_H
#define MICROPY_INCLUDED_DEVICE_BLE_HCI_SUPERVISOR_BLUETOOTH_H
#pragma once

void supervisor_start_bluetooth(void);
bool supervisor_bluetooth_hook(ble_evt_t *ble_evt);
void supervisor_bluetooth_background(void);

#endif // MICROPY_INCLUDED_DEVICE_BLE_HCI_SUPERVISOR_BLUETOOTH_H
5 changes: 1 addition & 4 deletions ports/atmel-samd/asf4_conf/samd21/hpl_adc_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// SPDX-License-Identifier: MIT

/* Auto-generated config file hpl_adc_config.h */
#ifndef HPL_ADC_CONFIG_H
#define HPL_ADC_CONFIG_H
#pragma once

// <<< Use Configuration Wizard in Context Menu >>>

Expand Down Expand Up @@ -298,5 +297,3 @@
// </e>

// <<< end of configuration section >>>

#endif // HPL_ADC_CONFIG_H
5 changes: 1 addition & 4 deletions ports/atmel-samd/asf4_conf/samd21/hpl_dac_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// SPDX-License-Identifier: MIT

/* Auto-generated config file hpl_dac_config.h */
#ifndef HPL_DAC_CONFIG_H
#define HPL_DAC_CONFIG_H
#pragma once

// <<< Use Configuration Wizard in Context Menu >>>

Expand Down Expand Up @@ -88,5 +87,3 @@
// </h>

// <<< end of configuration section >>>

#endif // HPL_DAC_CONFIG_H
5 changes: 1 addition & 4 deletions ports/atmel-samd/asf4_conf/samd21/hpl_dmac_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// SPDX-License-Identifier: MIT

/* Auto-generated config file hpl_dmac_config.h */
#ifndef HPL_DMAC_CONFIG_H
#define HPL_DMAC_CONFIG_H
#pragma once

// <<< Use Configuration Wizard in Context Menu >>>

Expand Down Expand Up @@ -3059,5 +3058,3 @@
// </e>

// <<< end of configuration section >>>

#endif // HPL_DMAC_CONFIG_H
5 changes: 1 addition & 4 deletions ports/atmel-samd/asf4_conf/samd21/hpl_gclk_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@


/* Auto-generated config file hpl_gclk_config.h */
#ifndef HPL_GCLK_CONFIG_H
#define HPL_GCLK_CONFIG_H
#pragma once

// <<< Use Configuration Wizard in Context Menu >>>

Expand Down Expand Up @@ -711,5 +710,3 @@
// </e>

// <<< end of configuration section >>>

#endif // HPL_GCLK_CONFIG_H
5 changes: 1 addition & 4 deletions ports/atmel-samd/asf4_conf/samd21/hpl_nvmctrl_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// SPDX-License-Identifier: MIT

/* Auto-generated config file hpl_nvmctrl_config.h */
#ifndef HPL_NVMCTRL_CONFIG_H
#define HPL_NVMCTRL_CONFIG_H
#pragma once

// <<< Use Configuration Wizard in Context Menu >>>

Expand Down Expand Up @@ -40,5 +39,3 @@
// </h>

// <<< end of configuration section >>>

#endif // HPL_NVMCTRL_CONFIG_H
5 changes: 1 addition & 4 deletions ports/atmel-samd/asf4_conf/samd21/hpl_pm_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// SPDX-License-Identifier: MIT

/* Auto-generated config file hpl_pm_config.h */
#ifndef HPL_PM_CONFIG_H
#define HPL_PM_CONFIG_H
#pragma once

// <<< Use Configuration Wizard in Context Menu >>>

Expand Down Expand Up @@ -136,5 +135,3 @@
// </e>

// <<< end of configuration section >>>

#endif // HPL_PM_CONFIG_H
5 changes: 1 addition & 4 deletions ports/atmel-samd/asf4_conf/samd21/hpl_rtc_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// SPDX-License-Identifier: MIT

/* Auto-generated config file hpl_rtc_config.h */
#ifndef HPL_RTC_CONFIG_H
#define HPL_RTC_CONFIG_H
#pragma once

// <<< Use Configuration Wizard in Context Menu >>>

Expand Down Expand Up @@ -127,5 +126,3 @@
// </h>

// <<< end of configuration section >>>

#endif // HPL_RTC_CONFIG_H
5 changes: 1 addition & 4 deletions ports/atmel-samd/asf4_conf/samd21/hpl_sercom_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
#define PROTOTYPE_SERCOM_USART_ASYNC_CLOCK_FREQUENCY CONF_GCLK_SERCOM2_CORE_FREQUENCY

/* Auto-generated config file hpl_sercom_config.h */
#ifndef HPL_SERCOM_CONFIG_H
#define HPL_SERCOM_CONFIG_H
#pragma once

// <<< Use Configuration Wizard in Context Menu >>>

Expand Down Expand Up @@ -734,5 +733,3 @@
#endif

// <<< end of configuration section >>>

#endif // HPL_SERCOM_CONFIG_H
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy