diff options
author | root <root@lab.panaceas.james.local> | 2019-02-19 13:46:18 +0000 |
---|---|---|
committer | root <root@lab.panaceas.james.local> | 2019-02-19 13:46:18 +0000 |
commit | b3c6320899d6b27899ab3c67c745e8d3b29af3a2 (patch) | |
tree | 41dc7fc5d71a841a416d0d53923de5d1d44277e3 /app/pins.h | |
parent | c84e85e0e9641b006a376fab456ac2efcfdb14e2 (diff) | |
download | clock-b3c6320899d6b27899ab3c67c745e8d3b29af3a2.tar.gz clock-b3c6320899d6b27899ab3c67c745e8d3b29af3a2.tar.bz2 clock-b3c6320899d6b27899ab3c67c745e8d3b29af3a2.zip |
working ethernet
Diffstat (limited to 'app/pins.h')
-rw-r--r-- | app/pins.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1,4 +1,9 @@ +#define MAP_AF_100(a, af) do { \ + gpio_mode_setup( a ## _PORT, GPIO_MODE_AF, GPIO_PUPD_NONE, a ); \ + gpio_set_output_options( a ## _PORT, GPIO_OTYPE_PP, GPIO_OSPEED_100MHZ, a); \ + gpio_set_af( a ## _PORT, af, a); \ + } while (0) #define MAP_AF(a, af) do { \ gpio_mode_setup( a ## _PORT, GPIO_MODE_AF, GPIO_PUPD_NONE, a ); \ @@ -24,10 +29,14 @@ gpio_set_output_options( a ## _PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, a); \ } while (0) +#define MAP_OUTPUT_PP_PU(a) do { \ + gpio_mode_setup( a ## _PORT, GPIO_MODE_OUTPUT, GPIO_PUPD_PULLUP, a ); \ + gpio_set_output_options( a ## _PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, a); \ + } while (0) #define MAP_OUTPUT_OD(a) do { \ gpio_mode_setup( a ## _PORT, GPIO_MODE_OUTPUT, GPIO_PUPD_PULLUP, a ); \ - gpio_set_output_options( a ## _PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, a); \ + gpio_set_output_options( a ## _PORT, GPIO_OTYPE_OD, GPIO_OSPEED_50MHZ, a); \ } while (0) |