-
Notifications
You must be signed in to change notification settings - Fork 0
/
Port_Regs.h
40 lines (34 loc) · 1.43 KB
/
Port_Regs.h
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
/******************************************************************************
*
* Module: Port
*
* File Name: Port_Regs.h
*
* Description: Header file for TM4C123GH6PM Microcontroller - Port Driver Registers
*
* Author: Ahmed Badra
******************************************************************************/
#ifndef PORT_REGS_H
#define PORT_REGS_H
#include "Std_Types.h"
/* GPIO Registers base addresses */
#define GPIO_PORTA_BASE_ADDRESS 0x40004000
#define GPIO_PORTB_BASE_ADDRESS 0x40005000
#define GPIO_PORTC_BASE_ADDRESS 0x40006000
#define GPIO_PORTD_BASE_ADDRESS 0x40007000
#define GPIO_PORTE_BASE_ADDRESS 0x40024000
#define GPIO_PORTF_BASE_ADDRESS 0x40025000
/* GPIO Registers offset addresses */
#define PORT_DATA_REG_OFFSET 0x3FC
#define PORT_DIR_REG_OFFSET 0x400
#define PORT_ALT_FUNC_REG_OFFSET 0x420
#define PORT_PULL_UP_REG_OFFSET 0x510
#define PORT_PULL_DOWN_REG_OFFSET 0x514
#define PORT_DIGITAL_ENABLE_REG_OFFSET 0x51C
#define PORT_LOCK_REG_OFFSET 0x520
#define PORT_COMMIT_REG_OFFSET 0x524
#define PORT_ANALOG_MODE_SEL_REG_OFFSET 0x528
#define PORT_CTL_REG_OFFSET 0x52C
/* RCC register which responsible of enabling GPIO port Clock */
#define SYSCTL_REGCGC2_REG (*((volatile uint32 *)0x400FE108))
#endif /* PORT_REGS_H */