-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpinmux_config.c
42 lines (36 loc) · 1.07 KB
/
pinmux_config.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
**
** Source file generated on June 22, 2020 at 16:04:17.
**
** Copyright (C) 2011-2020 Analog Devices Inc., All Rights Reserved.
**
** This file is generated automatically based upon the options selected in
** the Pin Multiplexing configuration editor. Changes to the Pin Multiplexing
** configuration should be made by changing the appropriate options rather
** than editing this file.
**
** Selected Peripherals
** --------------------
** UART0 (Tx, Rx, UART_SOUT_EN)
**
** GPIO (unavailable)
** ------------------
** P0_10, P0_11, P0_12
*/
#include <sys/platform.h>
#include <stdint.h>
#define UART0_TX_PORTP0_MUX ((uint32_t) ((uint32_t) 1<<20))
#define UART0_RX_PORTP0_MUX ((uint32_t) ((uint32_t) 1<<22))
#define UART0_UART_SOUT_EN_PORTP0_MUX ((uint32_t) ((uint32_t) 3<<24))
int32_t adi_initpinmux(void);
/*
* Initialize the Port Control MUX Registers
*/
int32_t adi_initpinmux(void)
{
/* PORTx_MUX registers */
*((volatile uint32_t *)REG_GPIO0_CFG) = UART0_TX_PORTP0_MUX |
UART0_RX_PORTP0_MUX
| UART0_UART_SOUT_EN_PORTP0_MUX;
return 0;
}