Definition at line 30 of file ObjectFLEDPinValidation.h.
30 {
31
32
33
34
35
36
37
38
39 if (pin >= NUM_DIGITAL_PINS) {
41 }
42
43
44
47 return {
false,
PinIssueType::INVALID_GPIO,
"Pin does not map to a valid GPIO port (GPIO6-9) - may be a ground/power/read-only pin"};
48 }
49
50
51
52
53
54 if (pin == 0 || pin == 1) {
55 return {
true,
PinIssueType::UART_PIN,
"WARNING: Pin is Serial1 UART (0=RX1, 1=TX1) - may cause noise/signal issues and affect serial debugging"};
56 }
57
58 if (pin == 7 || pin == 8) {
59 return {
true,
PinIssueType::UART_PIN,
"WARNING: Pin is Serial2 UART (7=RX2, 8=TX2) - may cause noise/signal issues"};
60 }
61
62
63 if (pin == 11 || pin == 12 || pin == 13) {
64 return {
true,
PinIssueType::SPI_PIN,
"WARNING: Pin is SPI bus (11=MOSI, 12=MISO, 13=SCK) - may cause noise and conflict with flash/SD peripherals"};
65 }
66
67 if (pin == 26 || pin == 27) {
68 return {
true,
PinIssueType::SPI_PIN,
"WARNING: Pin is SPI1 bus (26=MOSI1, 27=SCK1) - may cause noise and conflict with peripherals"};
69 }
70
71
72 if (pin == 18 || pin == 19) {
73 return {
true,
PinIssueType::I2C_PIN,
"WARNING: Pin is I2C bus (18=SDA0, 19=SCL0) - may cause noise and conflict with I2C devices"};
74 }
75
76 if (pin == 16 || pin == 17) {
77 return {
true,
PinIssueType::I2C_PIN,
"WARNING: Pin is I2C bus (16=SCL1, 17=SDA1) - may cause noise and conflict with I2C devices"};
78 }
79
80
81 if (pin == 13) {
82 return {
true,
PinIssueType::LED_PIN,
"WARNING: Pin 13 is the onboard LED - may cause unexpected visual feedback"};
83 }
84
85
87}
fl::UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f)
References I2C_PIN, INVALID_GPIO, LED_PIN, NONE, offset(), OUT_OF_RANGE, SPI_PIN, and UART_PIN.
Referenced by is_valid_teensy4_pin().