39 if (pin >= NUM_DIGITAL_PINS) {
45 uint8_t
offset = ((uint32_t)portOutputRegister(pin) - (uint32_t)&GPIO6_DR) >> 14;
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"};
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"};
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"};
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"};
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"};
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"};
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"};
82 return {
true,
PinIssueType::LED_PIN,
"WARNING: Pin 13 is the onboard LED - may cause unexpected visual feedback"};
fl::UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f)