uint32_t GPIOGetValue( uint32_t portNum, uint32_t bitPosi ) { return !! LPC_GPIO[portNum]->MASKED_ACCESS[(1<<bitPosi)]; } |
uint32_t temp; GPIOInit(); GPIOSetDir( 0 , 0 , 0 ); temp = GPIOGetValue( 0, 0 ); |
LPC_IOCON->RESET_PIO0_0 &= ~0x07; /* P0_0 I/O config */ LPC_IOCON->RESET_PIO0_0 |= 0x01; /* NOT RESET */ |
LPC_IOCON->RESET_PIO0_0 &= ~0x1F; /* P0_0 I/O config */ LPC_IOCON->RESET_PIO0_0 |= 0x01<<3 | 0x01; /* PULLDOWN resistor, NOT RESET */ |
LPC_IOCON->RESET_PIO0_0[COLOR=Red] |=[/COLOR] 1<<3 | 0x01; /* PULLDOWN resistor,NOT RESET */ |
LPC_IOCON->RESET_PIO0_0 |= 1<<3 | 0x01; /* PULLDOWN resistor,NOT RESET */ |