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:
Kevin O'Connor
2019-01-18 09:47:06 -05:00
parent 275df53b2e
commit d4790356da
8 changed files with 64 additions and 46 deletions

View File

@@ -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);