mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #6734 from codeauroraforum/Fix_LPC54XXX_GPIO
LPC54XXX: Set the pin function to Digital modepull/6762/head
commit
4e1c04feba
|
@ -29,6 +29,9 @@ void pin_function(PinName pin, int function)
|
|||
CLOCK_EnableClock(gpio_clocks[port_number]);
|
||||
CLOCK_EnableClock(kCLOCK_Iocon);
|
||||
|
||||
/* Set the DIGIMODE bit */
|
||||
IOCON->PIO[port_number][pin_number] |= IOCON_PIO_DIGIMODE_MASK;
|
||||
|
||||
reg = IOCON->PIO[port_number][pin_number];
|
||||
reg = (reg & ~0x7) | (function & 0x7);
|
||||
IOCON->PIO[port_number][pin_number] = reg;
|
||||
|
|
Loading…
Reference in New Issue