Skip to content

Commit

Permalink
stmhal: Remove some unnecessary declarations, purely for cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgeorge committed Mar 20, 2015
1 parent 69922c6 commit 7674da8
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 43 deletions.
4 changes: 0 additions & 4 deletions stmhal/ffconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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] == '/') {
Expand Down
2 changes: 0 additions & 2 deletions stmhal/gccollect.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
1 change: 0 additions & 1 deletion stmhal/lexerfatfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
27 changes: 0 additions & 27 deletions stmhal/lexerfatfs.h

This file was deleted.

1 change: 0 additions & 1 deletion stmhal/modnetwork.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
4 changes: 0 additions & 4 deletions stmhal/pendsv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion stmhal/pendsv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
1 change: 0 additions & 1 deletion stmhal/sdcard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion stmhal/stm32f4xx_it.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
#include "stm32f4xx_hal.h"

#include "py/obj.h"
#include "pendsv.h"
#include "extint.h"
#include "timer.h"
#include "uart.h"
Expand Down Expand Up @@ -162,7 +163,6 @@ void DebugMon_Handler(void) {
* @retval None
*/
void PendSV_Handler(void) {
extern void pendsv_isr_handler(void);
pendsv_isr_handler();
}

Expand Down
1 change: 1 addition & 0 deletions stmhal/usbd_cdc_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "pendsv.h"

#include "py/obj.h"
#include "timer.h"
#include "usb.h"

// CDC control commands
Expand Down
1 change: 0 additions & 1 deletion stmhal/usbd_cdc_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
******************************************************************************
*/

extern TIM_HandleTypeDef TIM3_Handle;
extern const USBD_CDC_ItfTypeDef USBD_CDC_fops;

void USBD_CDC_HAL_TIM_PeriodElapsedCallback(void);
Expand Down

0 comments on commit 7674da8

Please sign in to comment.