diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-12-26 15:41:37 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-01-07 19:33:26 -0500 |
commit | 70bbdf93347c814ae39b1cd04d04fd66706a8b7e (patch) | |
tree | 4b5139f17c15256c8be843e50602590575a0cde7 /src/sam3/internal.h | |
parent | e70b70fb75bb9b6017df3f5ff2d900b897ad3a8c (diff) | |
download | kutter-70bbdf93347c814ae39b1cd04d04fd66706a8b7e.tar.gz kutter-70bbdf93347c814ae39b1cd04d04fd66706a8b7e.tar.xz kutter-70bbdf93347c814ae39b1cd04d04fd66706a8b7e.zip |
sam3: Rename src/sam3x8e to src/sam3
This is in preparation for merging sam3 and sam4 code into one
directory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/sam3/internal.h')
-rw-r--r-- | src/sam3/internal.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/sam3/internal.h b/src/sam3/internal.h new file mode 100644 index 00000000..8246d7a4 --- /dev/null +++ b/src/sam3/internal.h @@ -0,0 +1,13 @@ +#ifndef __SAM3_INTERNAL_H +#define __SAM3_INTERNAL_H +// Local definitions for sam3 code + +#include <stdint.h> // uint32_t + +#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 |