uint8_t pinsel = 0 ; uint8_t pin = 0 ; // P2.0 LPC_PINCON->PINSEL4 &= ~(3 << pinsel) ; LPC_GPIO2->FIODIR0 |= (1 << pin) ; LPC_GPIO2->FIOSET0 |= (1 << pin) ; delay(25) ; LPC_GPIO2->FIOCLR0 |= (1 << pin) ; // P2.1 pinsel += 2 ; pin++ ; LPC_PINCON->PINSEL4 &= ~(3 << pinsel) ; LPC_GPIO2->FIODIR0 |= (1 << pin) ; LPC_GPIO2->FIOSET0 |= (1 << pin) ; delay(25) ; LPC_GPIO2->FIOCLR0 |= (1 << pin) ; // P2.2 pinsel += 2 ; pin++ ; LPC_PINCON->PINSEL4 &= ~(3 << pinsel) ; LPC_GPIO2->FIODIR0 |= (1 << pin) ; LPC_GPIO2->FIOSET0 |= (1 << pin) ; delay(25) ; LPC_GPIO2->FIOCLR0 |= (1 << pin) ; // P2.3 pinsel += 2 ; pin++ ; LPC_PINCON->PINSEL4 &= ~(3 << pinsel) ; LPC_GPIO2->FIODIR0 |= (1 << pin) ; LPC_GPIO2->FIOSET0 |= (1 << pin) ; delay(25) ; LPC_GPIO2->FIOCLR0 |= (1 << pin) ; // P2.4 pinsel += 2 ; pin++ ; LPC_PINCON->PINSEL4 &= ~(3 << pinsel) ; LPC_GPIO2->FIODIR0 |= (1 << pin) ; LPC_GPIO2->FIOSET0 |= (1 << pin) ; delay(25) ; LPC_GPIO2->FIOCLR0 |= (1 << pin) ; |