blob: fec265c47c52b09b9bd7ef18e7443318d8232fe4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#ifndef __ATSAM_INTERNAL_H
#define __ATSAM_INTERNAL_H
// Local definitions for sam3/sam4 code
#include <stdint.h> // uint32_t
#include "autoconf.h" // CONFIG_MACH_SAM3X
#if CONFIG_MACH_SAM3X
#include "sam3xa.h"
#elif CONFIG_MACH_SAM4S
#include "sam4s.h"
#elif CONFIG_MACH_SAM4E
#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);
int is_enabled_pclock(uint32_t id);
void enable_pclock(uint32_t id);
#endif // internal.h
|