forked from OpenEIT/EIT_Firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PinMux.c
41 lines (33 loc) · 1.12 KB
/
PinMux.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 November 26, 2014 at 13:02:50.
**
** Copyright (C) 2014 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)
**
** GPIO (unavailable)
** ------------------
** P0_06, P0_07
*/
#include "device.h"
#define UART0_TX_PORTP0_MUX ((uint16_t) ((uint16_t) 2<<12))
#define UART0_RX_PORTP0_MUX ((uint16_t) ((uint16_t) 2<<14))
#define SYS_CLK_OUT_CLOCK_OUT_PORTP1_MUX ((uint16_t) ((uint16_t) 3<<14))
int32_t adi_initpinmux(void);
/*
* Initialize the Port Control MUX Registers
*/
int32_t adi_initpinmux(void) {
/* Port Control MUX registers */
*((volatile uint32_t *)REG_GPIO0_GPCON) = UART0_TX_PORTP0_MUX | UART0_RX_PORTP0_MUX;
//*((volatile uint32_t *)REG_GPIO1_GPCON) = SYS_CLK_OUT_CLOCK_OUT_PORTP1_MUX;
return 0;
}