8000 Additional externs · adafruit/circuitpython@443a241 · GitHub
[go: up one dir, main page]

Skip to content

Commit 443a241

Browse files
committed
Additional externs
1 parent 81fed46 commit 443a241

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

ports/cxd56/common-hal/microcontroller/Processor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ typedef struct {
3535
mp_obj_base_t base;
3636
} mcu_processor_obj_t;
3737

38-
const mp_obj_type_t mcu_processor_type;
38+
extern const mp_obj_type_t mcu_processor_type;
3939

4040
#endif // MICROPY_INCLUDED_CXD56_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H

ports/stm/supervisor/internal_flash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,13 @@ void port_internal_flash_flush(void) {
177177
EraseInitStruct.VoltageRange = 10000 VOLTAGE_RANGE_3; // voltage range needs to be 2.7V to 3.6V
178178
// get the sector information
179179
uint32_t sector_size;
180-
uint32_t sector_start_addr;
180+
uint32_t sector_start_addr = 0xffffffff;
181181
#if defined(STM32H7)
182182
EraseInitStruct.Banks = get_bank(_cache_flash_addr);
183183
#endif
184184
EraseInitStruct.Sector = flash_get_sector_info(_cache_flash_addr, &sector_start_addr, &sector_size);
185185
EraseInitStruct.NbSectors = 1;
186-
if (sector_size > sizeof(_flash_cache)) {
186+
if (sector_size > sizeof(_flash_cache) || sector_start_addr == 0xffffffff) {
187187
reset_into_safe_mode(FLASH_WRITE_FAIL);
188188
}
189189

shared-bindings/gnss/PositionFix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ typedef enum {
1313
POSITIONFIX_3D,
1414
} gnss_positionfix_t;
1515

16-
const mp_obj_type_t gnss_positionfix_type;
16+
extern const mp_obj_type_t gnss_positionfix_type;
1717

1818
gnss_positionfix_t gnss_positionfix_obj_to_type(mp_obj_t obj);
1919
mp_obj_t gnss_positionfix_type_to_obj(gnss_positionfix_t mode);

shared-bindings/gnss/SatelliteSystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ typedef enum {
1616
SATELLITESYSTEM_QZSS_L1S = (1U << 4),
1717
} gnss_satellitesystem_t;
1818

19-
const mp_obj_type_t gnss_satellitesystem_type;
19+
extern const mp_obj_type_t gnss_satellitesystem_type;
2020

2121
gnss_satellitesystem_t gnss_satellitesystem_obj_to_type(mp_obj_t obj);
2222
mp_obj_t gnss_satellitesystem_type_to_obj(gnss_satellitesystem_t mode);

0 commit comments

Comments
 (0)
0