mirror of
https://github.com/andreili/klipper.git
synced 2025-08-24 03:44:06 +02:00
Most of the peripherals on the sam4e8e are similar to the ones on the sam3x8e mcu. Merge the code together and use just one code directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
21 lines
486 B
C
21 lines
486 B
C
#ifndef __SAM3_INTERNAL_H
|
|
#define __SAM3_INTERNAL_H
|
|
// Local definitions for sam3/sam4 code
|
|
|
|
#include <stdint.h> // uint32_t
|
|
#include "autoconf.h" // CONFIG_MACH_SAM3X8E
|
|
|
|
#if CONFIG_MACH_SAM3X8E
|
|
#include "sam3x8e.h"
|
|
#elif CONFIG_MACH_SAM4E8E
|
|
#include "sam4e.h"
|
|
#endif
|
|
|
|
#define GPIO(PORT, NUM) (((PORT)-'A') * 32 + (NUM))
|
|
#define GPIO2PORT(PIN) ((PIN) / 32)
|
|
#define GPIO2BIT(PIN) (1<<((PIN) % 32))
|
|
|
|
void gpio_peripheral(uint32_t gpio, char ptype, int32_t pull_up);
|
|
|
|
#endif // internal.h
|