File tree Expand file tree Collapse file tree
common-hal/microcontroller Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,8 +119,3 @@ void claim_pin(const mcu_pin_obj_t *pin) {
119119void common_hal_mcu_pin_reset_number (uint8_t pin_no ) {
120120 common_hal_reset_pin ((mcu_pin_obj_t * )(mcu_pin_globals .map .table [pin_no ].value ));
121121}
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 11#include "peripherals/mimxrt10xx/pins.h"
22
3+ typedef struct {
4+ gpio_change_interrupt_t * func ;
5+ void * data ;
6+ } pin_change_interrupt_data ;
7+
38/* Array of GPIO peripheral base address. */
49static GPIO_Type * const s_gpioBases [] = GPIO_BASE_PTRS ;
510static uint32_t GPIO_GetInstance (GPIO_Type * base ) {
@@ -23,7 +28,7 @@ static uint32_t GPIO_GetInstance(GPIO_Type *base) {
2328static const IRQn_Type low_irqs [] = GPIO_COMBINED_LOW_IRQS ;
2429static const IRQn_Type high_irqs [] = GPIO_COMBINED_HIGH_IRQS ;
2530
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 ];
2732
2833void enable_pin_change_interrupt (const mcu_pin_obj_t * pin , gpio_change_interrupt_t func , void * data ) {
2934 int instance = GPIO_GetInstance (pin -> gpio );
Original file line number Diff line number Diff line change @@ -73,12 +73,6 @@ typedef struct {
7373 }
7474
7575typedef 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-
8276void disable_pin_change_interrupt (const mcu_pin_obj_t * pin );
8377void enable_pin_change_interrupt (const mcu_pin_obj_t * pin , gpio_change_interrupt_t func , void * data );
8478
Original file line number Diff line number Diff line change @@ -555,10 +555,6 @@ void port_idle_until_interrupt(void) {
555555 common_hal_mcu_enable_interrupts ();
556556}
557557
558- void port_gc_collect (void ) {
559- pin_gc_collect ();
560- }
561-
562558// Catch faults where the memory access violates MPU settings.
563559void MemManage_Handler (void );
564560__attribute__((used )) void PLACE_IN_ITCM (MemManage_Handler )(void ) {
You can’t perform that action at this time.
0 commit comments