atsam: Add MACH_SAM3X, MACH_SAM4, MACH_SAM4E, MACH_SAM4S definitions
Add additional Kconfig definitions to make it easier to select the correct code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -32,7 +32,7 @@ gpio_peripheral(uint32_t gpio, char ptype, int32_t pull_up)
|
||||
uint32_t bank = GPIO2PORT(gpio), bit = GPIO2BIT(gpio), pt = ptype - 'A';
|
||||
Pio *regs = digital_regs[bank];
|
||||
|
||||
#if CONFIG_MACH_SAM3X8E
|
||||
#if CONFIG_MACH_SAM3X
|
||||
regs->PIO_ABSR = (regs->PIO_ABSR & ~bit) | (pt & 0x01 ? bit : 0);
|
||||
#else
|
||||
regs->PIO_ABCDSR[0] = (regs->PIO_ABCDSR[0] & ~bit) | (pt & 0x01 ? bit : 0);
|
||||
|
||||
Reference in New Issue
Block a user