🐛 Fix LPC176x M43 Pins Debugging (#22611)
This commit is contained in:
		
				
					committed by
					
						
						Scott Lahteine
					
				
			
			
				
	
			
			
			
						parent
						
							73ef26a106
						
					
				
				
					commit
					d8ef23eda7
				
			@@ -33,7 +33,8 @@
 | 
			
		||||
#define PRINT_PORT(p)
 | 
			
		||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
 | 
			
		||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
 | 
			
		||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%d.%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0)
 | 
			
		||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("P%d_%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0)
 | 
			
		||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR("_A%d     "), LPC176x::pin_get_adc_channel(pin)); SERIAL_ECHO(buffer); }while(0)
 | 
			
		||||
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
 | 
			
		||||
 | 
			
		||||
// pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities
 | 
			
		||||
@@ -48,6 +49,4 @@ bool GET_PINMODE(const pin_t pin) {
 | 
			
		||||
  return LPC176x::gpio_direction(pin);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool GET_ARRAY_IS_DIGITAL(const pin_t pin) {
 | 
			
		||||
  return (!LPC176x::pin_has_adc(pin) || !LPC176x::pin_adc_enabled(pin));
 | 
			
		||||
}
 | 
			
		||||
#define GET_ARRAY_IS_DIGITAL(x) ((bool) pin_array[x].is_digital)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user