Skip to content

Commit 8c497e4

Browse files
authored
Merge pull request #9263 from dhalbert/STATIC-to-static
CircuitPython files: replace STATIC with static
2 parents 4c39995 + 3f4d931 commit 8c497e4

File tree

957 files changed

+3880
-3880
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

957 files changed

+3880
-3880
lines changed

devices/ble_hci/common-hal/_bleio/Adapter.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
bleio_connection_internal_t bleio_connections[BLEIO_TOTAL_CONNECTION_COUNT];
5959

60-
STATIC void add_generic_services(bleio_adapter_obj_t *adapter) {
60+
static void add_generic_services(bleio_adapter_obj_t *adapter) {
6161
// Create Generic Access UUID, Service, and Characteristics.
6262

6363
// Generic Access Service setup.
@@ -158,13 +158,13 @@ STATIC void add_generic_services(bleio_adapter_obj_t *adapter) {
158158
}
159159

160160

161-
STATIC void check_enabled(bleio_adapter_obj_t *adapter) {
161+
static void check_enabled(bleio_adapter_obj_t *adapter) {
162162
if (!common_hal_bleio_adapter_get_enabled(adapter)) {
163163
mp_raise_bleio_BluetoothError(MP_ERROR_TEXT("Adapter not enabled"));
164164
}
165165
}
166166

167-
// STATIC bool adapter_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
167+
// static bool adapter_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
168168
// bleio_adapter_obj_t *self = (bleio_adapter_obj_t*)self_in;
169169

170170
// // For debugging.
@@ -258,7 +258,7 @@ static void _adapter_set_name(bleio_adapter_obj_t *self, mp_obj_str_t *name_obj)
258258

259259
// Get various values and limits set by the adapter.
260260
// Set event mask.
261-
STATIC void bleio_adapter_hci_init(bleio_adapter_obj_t *self) {
261+
static void bleio_adapter_hci_init(bleio_adapter_obj_t *self) {
262262
mp_int_t name_len = 0;
263263

264264
#if CIRCUITPY_OS_GETENV
@@ -418,7 +418,7 @@ void common_hal_bleio_adapter_set_name(bleio_adapter_obj_t *self, const char *na
418418
}
419419

420420

421-
// STATIC bool scan_on_ble_evt(ble_evt_t *ble_evt, void *scan_results_in) {
421+
// static bool scan_on_ble_evt(ble_evt_t *ble_evt, void *scan_results_in) {
422422
// bleio_scanresults_obj_t *scan_results = (bleio_scanresults_obj_t*)scan_results_in;
423423

424424
// if (ble_evt->header.evt_id == BLE_GAP_EVT_TIMEOUT &&
@@ -516,7 +516,7 @@ void common_hal_bleio_adapter_stop_scan(bleio_adapter_obj_t *self) {
516516
// volatile bool done;
517517
// } connect_info_t;
518518

519-
// STATIC bool connect_on_ble_evt(ble_evt_t *ble_evt, void *info_in) {
519+
// static bool connect_on_ble_evt(ble_evt_t *ble_evt, void *info_in) {
520520
// connect_info_t *info = (connect_info_t*)info_in;
521521

522522
// switch (ble_evt->header.evt_id) {
@@ -613,13 +613,13 @@ mp_obj_t common_hal_bleio_adapter_connect(bleio_adapter_obj_t *self, bleio_addre
613613
return mp_const_none;
614614
}
615615

616-
STATIC void check_data_fit(size_t data_len, bool connectable) {
616+
static void check_data_fit(size_t data_len, bool connectable) {
617617
if (data_len > MAX_ADVERTISEMENT_SIZE) {
618618
mp_raise_ValueError(MP_ERROR_TEXT("Data too large for advertisement packet"));
619619
}
620620
}
621621

622-
// STATIC bool advertising_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
622+
// static bool advertising_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
623623
// bleio_adapter_obj_t *self = (bleio_adapter_obj_t*)self_in;
624624

625625
// switch (ble_evt->header.evt_id) {

devices/ble_hci/common-hal/_bleio/CharacteristicBuffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "common-hal/_bleio/CharacteristicBuffer.h"
1919

2020
// Push all the data onto the ring buffer. When the buffer is full, new bytes will be dropped.
21-
STATIC void write_to_ringbuf(bleio_characteristic_buffer_obj_t *self, uint8_t *data, uint16_t len) {
21+
static void write_to_ringbuf(bleio_characteristic_buffer_obj_t *self, uint8_t *data, uint16_t len) {
2222
ringbuf_put_n(&self->ringbuf, data, len);
2323
}
2424

devices/ble_hci/common-hal/_bleio/Connection.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ void common_hal_bleio_connection_set_connection_interval(bleio_connection_intern
368368
}
369369

370370
// service_uuid may be NULL, to discover all services.
371-
// STATIC bool discover_next_services(bleio_connection_internal_t* connection, uint16_t start_handle, ble_uuid_t *service_uuid) {
371+
// static bool discover_next_services(bleio_connection_internal_t* connection, uint16_t start_handle, ble_uuid_t *service_uuid) {
372372
// m_discovery_successful = false;
373373
// m_discovery_in_process = true;
374374

@@ -385,7 +385,7 @@ void common_hal_bleio_connection_set_connection_interval(bleio_connection_intern
385385
// return m_discovery_successful;
386386
// }
387387

388-
// STATIC bool discover_next_characteristics(bleio_connection_internal_t* connection, bleio_service_obj_t *service, uint16_t start_handle) {
388+
// static bool discover_next_characteristics(bleio_connection_internal_t* connection, bleio_service_obj_t *service, uint16_t start_handle) {
389389
// m_char_discovery_service = service;
390390

391391
// ble_gattc_handle_range_t handle_range;
@@ -407,7 +407,7 @@ void common_hal_bleio_connection_set_connection_interval(bleio_connection_intern
407407
// return m_discovery_successful;
408408
// }
409409

410-
// STATIC bool discover_next_descriptors(bleio_connection_internal_t* connection, bleio_characteristic_obj_t *characteristic, uint16_t start_handle, uint16_t end_handle) {
410+
// static bool discover_next_descriptors(bleio_connection_internal_t* connection, bleio_characteristic_obj_t *characteristic, uint16_t start_handle, uint16_t end_handle) {
411411
// m_desc_discovery_characteristic = characteristic;
412412

413413
// ble_gattc_handle_range_t handle_range;
@@ -429,7 +429,7 @@ void common_hal_bleio_connection_set_connection_interval(bleio_connection_intern
429429
// return m_discovery_successful;
430430
// }
431431

432-
// STATIC void on_primary_srv_discovery_rsp(ble_gattc_evt_prim_srvc_disc_rsp_t *response, bleio_connection_internal_t* connection) {
432+
// static void on_primary_srv_discovery_rsp(ble_gattc_evt_prim_srvc_disc_rsp_t *response, bleio_connection_internal_t* connection) {
433433
// for (size_t i = 0; i < response->count; ++i) {
434434
// ble_gattc_service_t *gattc_service = &response->services[i];
435435

@@ -465,7 +465,7 @@ void common_hal_bleio_connection_set_connection_interval(bleio_connection_intern
465465
// m_discovery_in_process = false;
466466
// }
467467

468-
// STATIC void on_char_discovery_rsp(ble_gattc_evt_char_disc_rsp_t *response, bleio_connection_internal_t* connection) {
468+
// static void on_char_discovery_rsp(ble_gattc_evt_char_disc_rsp_t *response, bleio_connection_internal_t* connection) {
469469
// for (size_t i = 0; i < response->count; ++i) {
470470
// ble_gattc_char_t *gattc_char = &response->chars[i];
471471

@@ -509,7 +509,7 @@ void common_hal_bleio_connection_set_connection_interval(bleio_connection_intern
509509
// m_discovery_in_process = false;
510510
// }
511511

512-
// STATIC void on_desc_discovery_rsp(ble_gattc_evt_desc_disc_rsp_t *response, bleio_connection_internal_t* connection) {
512+
// static void on_desc_discovery_rsp(ble_gattc_evt_desc_disc_rsp_t *response, bleio_connection_internal_t* connection) {
513513
// for (size_t i = 0; i < response->count; ++i) {
514514
// ble_gattc_desc_t *gattc_desc = &response->descs[i];
515515

@@ -564,7 +564,7 @@ void common_hal_bleio_connection_set_connection_interval(bleio_connection_intern
564564
// m_discovery_in_process = false;
565565
// }
566566

567-
// STATIC bool discovery_on_ble_evt(ble_evt_t *ble_evt, mp_obj_t payload) {
567+
// static bool discovery_on_ble_evt(ble_evt_t *ble_evt, mp_obj_t payload) {
568568
// bleio_connection_internal_t* connection = MP_OBJ_TO_PTR(payload);
569569
// switch (ble_evt->header.evt_id) {
570570
// case BLE_GAP_EVT_DISCONNECTED:
@@ -592,7 +592,7 @@ void common_hal_bleio_connection_set_connection_interval(bleio_connection_intern
592592
// return true;
593593
// }
594594

595-
// STATIC void discover_remote_services(bleio_connection_internal_t *self, mp_obj_t service_uuids_whitelist) {
595+
// static void discover_remote_services(bleio_connection_internal_t *self, mp_obj_t service_uuids_whitelist) {
596596
// ble_drv_add_event_handler(discovery_on_ble_evt, self);
597597

598598
// // Start over with an empty list.

devices/ble_hci/common-hal/_bleio/PacketBuffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "shared-bindings/_bleio/PacketBuffer.h"
1717
#include "supervisor/shared/tick.h"
1818

19-
STATIC void write_to_ringbuf(bleio_packet_buffer_obj_t *self, uint8_t *data, uint16_t len) {
19+
static void write_to_ringbuf(bleio_packet_buffer_obj_t *self, uint8_t *data, uint16_t len) {
2020
if (len + sizeof(uint16_t) > ringbuf_size(&self->ringbuf)) {
2121
// This shouldn't happen.
2222
return;
@@ -35,7 +35,7 @@ STATIC void write_to_ringbuf(bleio_packet_buffer_obj_t *self, uint8_t *data, uin
3535
ringbuf_put_n(&self->ringbuf, data, len);
3636
}
3737

38-
STATIC uint32_t queue_next_write(bleio_packet_buffer_obj_t *self) {
38+
static uint32_t queue_next_write(bleio_packet_buffer_obj_t *self) {
3939
// Queue up the next outgoing buffer. We use two, one that has been passed to the SD for
4040
// transmission (when packet_queued is true) and the other is `pending` and can still be
4141
// modified. By primarily appending to the `pending` buffer we can reduce the protocol overhead

0 commit comments

Comments
 (0)
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