diff --git a/stmhal/ffconf.c b/stmhal/ffconf.c index b8dada3cc..4a51d193c 100644 --- a/stmhal/ffconf.c +++ b/stmhal/ffconf.c @@ -31,10 +31,6 @@ #include "ffconf.h" #include "fsusermount.h" -#if _FS_RPATH -extern BYTE ff_CurrVol; -#endif - STATIC bool check_path(const TCHAR **path, const char *mount_point_str, mp_uint_t mount_point_len) { if (strncmp(*path, mount_point_str, mount_point_len) == 0) { if ((*path)[mount_point_len] == '/') { diff --git a/stmhal/gccollect.h b/stmhal/gccollect.h index c2955b929..07797be7e 100644 --- a/stmhal/gccollect.h +++ b/stmhal/gccollect.h @@ -37,5 +37,3 @@ extern uint32_t _heap_start; extern uint32_t _heap_end; extern uint32_t _estack; extern uint32_t _ram_end; - -void gc_collect(void); diff --git a/stmhal/lexerfatfs.c b/stmhal/lexerfatfs.c index ddab89a5c..39b8fefa9 100644 --- a/stmhal/lexerfatfs.c +++ b/stmhal/lexerfatfs.c @@ -28,7 +28,6 @@ #include "py/lexer.h" #include "lib/fatfs/ff.h" -#include "lexerfatfs.h" typedef struct _mp_lexer_file_buf_t { FIL fp; diff --git a/stmhal/lexerfatfs.h b/stmhal/lexerfatfs.h deleted file mode 100644 index 3c8ebacb1..000000000 --- a/stmhal/lexerfatfs.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This file is part of the Micro Python project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2013, 2014 Damien P. George - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -mp_lexer_t *mp_lexer_new_from_file(const char *filename); diff --git a/stmhal/modnetwork.h b/stmhal/modnetwork.h index 9bde29f73..f306f877a 100644 --- a/stmhal/modnetwork.h +++ b/stmhal/modnetwork.h @@ -82,5 +82,4 @@ void mod_network_convert_ipv4_endianness(uint8_t *ip); void mod_network_parse_ipv4_addr(mp_obj_t addr_in, uint8_t *out_ip); mp_uint_t mod_network_parse_inet_addr(mp_obj_t addr_in, uint8_t *out_ip); mp_obj_t mod_network_format_ipv4_addr(uint8_t *ip); -mp_obj_t mod_network_format_ipv4_addr(uint8_t *ip); mp_obj_t mod_network_format_inet_addr(uint8_t *ip, mp_uint_t port); diff --git a/stmhal/pendsv.c b/stmhal/pendsv.c index 68455b275..48fb79e20 100644 --- a/stmhal/pendsv.c +++ b/stmhal/pendsv.c @@ -59,10 +59,6 @@ void pendsv_nlr_jump(void *o) { } } -// since we play tricks with the stack, the compiler must not generate a -// prelude for this function -void pendsv_isr_handler(void) __attribute__((naked)); - void pendsv_isr_handler(void) { // re-jig the stack so that when we return from this interrupt handler // it returns instead to nlr_jump with argument pendsv_object diff --git a/stmhal/pendsv.h b/stmhal/pendsv.h index f91a7c1d7..7886d9f98 100644 --- a/stmhal/pendsv.h +++ b/stmhal/pendsv.h @@ -26,4 +26,7 @@ void pendsv_init(void); void pendsv_nlr_jump(void *val); -void pendsv_isr_handler(void); + +// since we play tricks with the stack, the compiler must not generate a +// prelude for this function +void pendsv_isr_handler(void) __attribute__((naked)); diff --git a/stmhal/sdcard.c b/stmhal/sdcard.c index 5686f949a..0eac1615c 100644 --- a/stmhal/sdcard.c +++ b/stmhal/sdcard.c @@ -261,7 +261,6 @@ STATIC mp_obj_t sd_power(mp_obj_t self, mp_obj_t state) { STATIC MP_DEFINE_CONST_FUN_OBJ_2(sd_power_obj, sd_power); STATIC mp_obj_t sd_info(mp_obj_t self) { - HAL_SD_ErrorTypedef HAL_SD_Init(SD_HandleTypeDef *hsd, HAL_SD_CardInfoTypedef *SDCardInfo); if (sd_handle.Instance == NULL) { return mp_const_none; } diff --git a/stmhal/stm32f4xx_it.c b/stmhal/stm32f4xx_it.c index 9be180a05..3db2019cb 100644 --- a/stmhal/stm32f4xx_it.c +++ b/stmhal/stm32f4xx_it.c @@ -71,6 +71,7 @@ #include "stm32f4xx_hal.h" #include "py/obj.h" +#include "pendsv.h" #include "extint.h" #include "timer.h" #include "uart.h" @@ -162,7 +163,6 @@ void DebugMon_Handler(void) { * @retval None */ void PendSV_Handler(void) { - extern void pendsv_isr_handler(void); pendsv_isr_handler(); } diff --git a/stmhal/usbd_cdc_interface.c b/stmhal/usbd_cdc_interface.c index 66bfe1a22..8b088660f 100644 --- a/stmhal/usbd_cdc_interface.c +++ b/stmhal/usbd_cdc_interface.c @@ -42,6 +42,7 @@ #include "pendsv.h" #include "py/obj.h" +#include "timer.h" #include "usb.h" // CDC control commands diff --git a/stmhal/usbd_cdc_interface.h b/stmhal/usbd_cdc_interface.h index 5a5d4cf00..0585d06c8 100644 --- a/stmhal/usbd_cdc_interface.h +++ b/stmhal/usbd_cdc_interface.h @@ -29,7 +29,6 @@ ****************************************************************************** */ -extern TIM_HandleTypeDef TIM3_Handle; extern const USBD_CDC_ItfTypeDef USBD_CDC_fops; void USBD_CDC_HAL_TIM_PeriodElapsedCallback(void);