Skip to content

Commit 7674da8

Browse files
committed
stmhal: Remove some unnecessary declarations, purely for cleanup.
1 parent 69922c6 commit 7674da8

11 files changed

Lines changed: 6 additions & 43 deletions

stmhal/ffconf.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131
#include "ffconf.h"
3232
#include "fsusermount.h"
3333

34-
#if _FS_RPATH
35-
extern BYTE ff_CurrVol;
36-
#endif
37-
3834
STATIC bool check_path(const TCHAR **path, const char *mount_point_str, mp_uint_t mount_point_len) {
3935
if (strncmp(*path, mount_point_str, mount_point_len) == 0) {
4036
if ((*path)[mount_point_len] == '/') {

stmhal/gccollect.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,3 @@ extern uint32_t _heap_start;
3737
extern uint32_t _heap_end;
3838
extern uint32_t _estack;
3939
extern uint32_t _ram_end;
40-
41-
void gc_collect(void);

stmhal/lexerfatfs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929
#include "py/lexer.h"
3030
#include "lib/fatfs/ff.h"
31-
#include "lexerfatfs.h"
3231

3332
typedef struct _mp_lexer_file_buf_t {
3433
FIL fp;

stmhal/lexerfatfs.h

Lines changed: 0 additions & 27 deletions
This file was deleted.

stmhal/modnetwork.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,4 @@ void mod_network_convert_ipv4_endianness(uint8_t *ip);
8282
void mod_network_parse_ipv4_addr(mp_obj_t addr_in, uint8_t *out_ip);
8383
mp_uint_t mod_network_parse_inet_addr(mp_obj_t addr_in, uint8_t *out_ip);
8484
mp_obj_t mod_network_format_ipv4_addr(uint8_t *ip);
85-
mp_obj_t mod_network_format_ipv4_addr(uint8_t *ip);
8685
mp_obj_t mod_network_format_inet_addr(uint8_t *ip, mp_uint_t port);

stmhal/pendsv.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ void pendsv_nlr_jump(void *o) {
5959
}
6060
}
6161

62-
// since we play tricks with the stack, the compiler must not generate a
63-
// prelude for this function
64-
void pendsv_isr_handler(void) __attribute__((naked));
65-
6662
void pendsv_isr_handler(void) {
6763
// re-jig the stack so that when we return from this interrupt handler
6864
// it returns instead to nlr_jump with argument pendsv_object

stmhal/pendsv.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@
2626

2727
void pendsv_init(void);
2828
void pendsv_nlr_jump(void *val);
29-
void pendsv_isr_handler(void);
29+
30+
// since we play tricks with the stack, the compiler must not generate a
31+
// prelude for this function
32+
void pendsv_isr_handler(void) __attribute__((naked));

stmhal/sdcard.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ STATIC mp_obj_t sd_power(mp_obj_t self, mp_obj_t state) {
261261
STATIC MP_DEFINE_CONST_FUN_OBJ_2(sd_power_obj, sd_power);
262262

263263
STATIC mp_obj_t sd_info(mp_obj_t self) {
264-
HAL_SD_ErrorTypedef HAL_SD_Init(SD_HandleTypeDef *hsd, HAL_SD_CardInfoTypedef *SDCardInfo);
265264
if (sd_handle.Instance == NULL) {
266265
return mp_const_none;
267266
}

stmhal/stm32f4xx_it.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
#include "stm32f4xx_hal.h"
7272

7373
#include "py/obj.h"
74+
#include "pendsv.h"
7475
#include "extint.h"
7576
#include "timer.h"
7677
#include "uart.h"
@@ -162,7 +163,6 @@ void DebugMon_Handler(void) {
162163
* @retval None
163164
*/
164165
void PendSV_Handler(void) {
165-
extern void pendsv_isr_handler(void);
166166
pendsv_isr_handler();
167167
}
168168

stmhal/usbd_cdc_interface.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include "pendsv.h"
4343

4444
#include "py/obj.h"
45+
#include "timer.h"
4546
#include "usb.h"
4647

4748
// CDC control commands

0 commit comments

Comments
 (0)