File tree Expand file tree Collapse file tree 4 files changed +6
-16
lines changed
common-hal/microcontroller Expand file tree Collapse file tree 4 files changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,3 @@ void claim_pin(const mcu_pin_obj_t *pin) {
119
119
void common_hal_mcu_pin_reset_number (uint8_t pin_no ) {
120
120
common_hal_reset_pin ((mcu_pin_obj_t * )(mcu_pin_globals .map .table [pin_no ].value ));
121
121
}
122
-
123
- // The 'data' pointers may be to gc objects, they must be kept alive.
124
- void pin_gc_collect () {
125
- gc_collect_root ((void * * )& pcid , sizeof (pcid ) / sizeof (void * ));
126
- }
Original file line number Diff line number Diff line change 1
1
#include "peripherals/mimxrt10xx/pins.h"
2
2
3
+ typedef struct {
4
+ gpio_change_interrupt_t * func ;
5
+ void * data ;
6
+ } pin_change_interrupt_data ;
7
+
3
8
/* Array of GPIO peripheral base address. */
4
9
static GPIO_Type * const s_gpioBases [] = GPIO_BASE_PTRS ;
5
10
static uint32_t GPIO_GetInstance (GPIO_Type * base ) {
@@ -23,7 +28,7 @@ static uint32_t GPIO_GetInstance(GPIO_Type *base) {
23
28
static const IRQn_Type low_irqs [] = GPIO_COMBINED_LOW_IRQS ;
24
29
static const IRQn_Type high_irqs [] = GPIO_COMBINED_HIGH_IRQS ;
25
30
26
- volatile pin_change_interrupt_data pcid [MP_ARRAY_SIZE (s_gpioBases )][32 ];
31
+ static volatile pin_change_interrupt_data pcid [MP_ARRAY_SIZE (s_gpioBases )][32 ];
27
32
28
33
void enable_pin_change_interrupt (const mcu_pin_obj_t * pin , gpio_change_interrupt_t func , void * data ) {
29
34
int instance = GPIO_GetInstance (pin -> gpio );
Original file line number Diff line number Diff line change @@ -73,12 +73,6 @@ typedef struct {
73
73
}
74
74
75
75
typedef void (gpio_change_interrupt_t )(void * data );
76
- typedef struct {
77
- gpio_change_interrupt_t * func ;
78
- void * data ;
79
- } pin_change_interrupt_data ;
80
- extern volatile pin_change_interrupt_data pcid [MP_ARRAY_SIZE ((GPIO_Type * const [])GPIO_BASE_PTRS )][32 ];
81
-
82
76
void disable_pin_change_interrupt (const mcu_pin_obj_t * pin );
83
77
void enable_pin_change_interrupt (const mcu_pin_obj_t * pin , gpio_change_interrupt_t func , void * data );
84
78
Original file line number Diff line number Diff line change @@ -555,10 +555,6 @@ void port_idle_until_interrupt(void) {
555
555
common_hal_mcu_enable_interrupts ();
556
556
}
557
557
558
- void port_gc_collect (void ) {
559
- pin_gc_collect ();
560
- }
561
-
562
558
// Catch faults where the memory access violates MPU settings.
563
559
void MemManage_Handler (void );
564
560
__attribute__((used )) void PLACE_IN_ITCM (MemManage_Handler )(void ) {
You can’t perform that action at this time.
0 commit comments