Program which demonstrates the usage of the IOCONFIG & GPIO peripherals. Program only blinks the LED based on the push of the button embedded on the LPC4088 QSB. Blinking is done using the primitive delay function which only makes microprocessor busy for some time. Source code is split - we keep register definitions in header files away from the main source file.

Dependencies:   mbed

LPC4088-ioconfig.h

Committer:
71GA
Date:
2015-05-02
Revision:
1:6eac03db3e22
Parent:
0:f527456a69f2

File content as of revision 1:6eac03db3e22:

//Definicije registrov za periferijo IOCONFIG

//Port 0
#define IOCON_P0_0           (*((volatile unsigned int *) 0x4002C000))      //D (IOCON type)
#define IOCON_P0_1           (*((volatile unsigned int *) 0x4002C004))      //D
#define IOCON_P0_2           (*((volatile unsigned int *) 0x4002C008))      //D
#define IOCON_P0_3           (*((volatile unsigned int *) 0x4002C00C))      //D
#define IOCON_P0_4           (*((volatile unsigned int *) 0x4002C010))      //D
#define IOCON_P0_5           (*((volatile unsigned int *) 0x4002C014))      //D
#define IOCON_P0_6           (*((volatile unsigned int *) 0x4002C018))      //D
#define IOCON_P0_7           (*((volatile unsigned int *) 0x4002C01C))      //W
#define IOCON_P0_8           (*((volatile unsigned int *) 0x4002C020))      //W
#define IOCON_P0_9           (*((volatile unsigned int *) 0x4002C024))      //W
#define IOCON_P0_10          (*((volatile unsigned int *) 0x4002C028))      //D
#define IOCON_P0_11          (*((volatile unsigned int *) 0x4002C02C))      //D
#define IOCON_P0_12          (*((volatile unsigned int *) 0x4002C030))      //A
#define IOCON_P0_13          (*((volatile unsigned int *) 0x4002C034))      //A
#define IOCON_P0_14          (*((volatile unsigned int *) 0x4002C038))      //D
#define IOCON_P0_15          (*((volatile unsigned int *) 0x4002C03C))      //D
#define IOCON_P0_16          (*((volatile unsigned int *) 0x4002C040))      //D
#define IOCON_P0_17          (*((volatile unsigned int *) 0x4002C044))      //D
#define IOCON_P0_18          (*((volatile unsigned int *) 0x4002C048))      //D
#define IOCON_P0_19          (*((volatile unsigned int *) 0x4002C04C))      //D
#define IOCON_P0_20          (*((volatile unsigned int *) 0x4002C050))      //D
#define IOCON_P0_21          (*((volatile unsigned int *) 0x4002C054))      //D
#define IOCON_P0_22          (*((volatile unsigned int *) 0x4002C058))      //D
#define IOCON_P0_23          (*((volatile unsigned int *) 0x4002C05C))      //A
#define IOCON_P0_24          (*((volatile unsigned int *) 0x4002C060))      //A
#define IOCON_P0_25          (*((volatile unsigned int *) 0x4002C064))      //A
#define IOCON_P0_26          (*((volatile unsigned int *) 0x4002C068))      //A
#define IOCON_P0_27          (*((volatile unsigned int *) 0x4002C06C))      //I
#define IOCON_P0_28          (*((volatile unsigned int *) 0x4002C070))      //I
#define IOCON_P0_29          (*((volatile unsigned int *) 0x4002C074))      //U
#define IOCON_P0_30          (*((volatile unsigned int *) 0x4002C078))      //U
#define IOCON_P0_31          (*((volatile unsigned int *) 0x4002C07C))      //U

//Port 1
#define IOCON_P1_0           (*((volatile unsigned int *) 0x4002C080))      //D (IOCON type)
#define IOCON_P1_1           (*((volatile unsigned int *) 0x4002C084))      //D
#define IOCON_P1_2           (*((volatile unsigned int *) 0x4002C088))      //D
#define IOCON_P1_3           (*((volatile unsigned int *) 0x4002C08C))      //D
#define IOCON_P1_4           (*((volatile unsigned int *) 0x4002C090))      //D
#define IOCON_P1_5           (*((volatile unsigned int *) 0x4002C094))      //W
#define IOCON_P1_6           (*((volatile unsigned int *) 0x4002C098))      //W
#define IOCON_P1_7           (*((volatile unsigned int *) 0x4002C09C))      //W
#define IOCON_P1_8           (*((volatile unsigned int *) 0x4002C0A0))      //D
#define IOCON_P1_9           (*((volatile unsigned int *) 0x4002C0A4))      //D
#define IOCON_P1_10          (*((volatile unsigned int *) 0x4002C0A8))      //D
#define IOCON_P1_11          (*((volatile unsigned int *) 0x4002C0AC))      //D
#define IOCON_P1_12          (*((volatile unsigned int *) 0x4002C0B0))      //D
#define IOCON_P1_13          (*((volatile unsigned int *) 0x4002C0B4))      //D
#define IOCON_P1_14          (*((volatile unsigned int *) 0x4002C0B8))      //W
#define IOCON_P1_15          (*((volatile unsigned int *) 0x4002C0BC))      //D
#define IOCON_P1_16          (*((volatile unsigned int *) 0x4002C0C0))      //W
#define IOCON_P1_17          (*((volatile unsigned int *) 0x4002C0C4))      //W
#define IOCON_P1_18          (*((volatile unsigned int *) 0x4002C0C8))      //D
#define IOCON_P1_19          (*((volatile unsigned int *) 0x4002C0CC))      //D
#define IOCON_P1_20          (*((volatile unsigned int *) 0x4002C0D0))      //D
#define IOCON_P1_21          (*((volatile unsigned int *) 0x4002C0D4))      //D
#define IOCON_P1_22          (*((volatile unsigned int *) 0x4002C0D8))      //D
#define IOCON_P1_23          (*((volatile unsigned int *) 0x4002C0DC))      //D
#define IOCON_P1_24          (*((volatile unsigned int *) 0x4002C0E0))      //D
#define IOCON_P1_25          (*((volatile unsigned int *) 0x4002C0E4))      //D
#define IOCON_P1_26          (*((volatile unsigned int *) 0x4002C0E8))      //D
#define IOCON_P1_27          (*((volatile unsigned int *) 0x4002C0EC))      //D
#define IOCON_P1_28          (*((volatile unsigned int *) 0x4002C0F0))      //D
#define IOCON_P1_29          (*((volatile unsigned int *) 0x4002C0F4))      //D
#define IOCON_P1_30          (*((volatile unsigned int *) 0x4002C0F8))      //A
#define IOCON_P1_31          (*((volatile unsigned int *) 0x4002C0FC))      //A

//Port 2
#define IOCON_P2_0           (*((volatile unsigned int *) 0x4002C100))      //D (IOCON type)
#define IOCON_P2_1           (*((volatile unsigned int *) 0x4002C104))      //D
#define IOCON_P2_2           (*((volatile unsigned int *) 0x4002C108))      //D
#define IOCON_P2_3           (*((volatile unsigned int *) 0x4002C10C))      //D
#define IOCON_P2_4           (*((volatile unsigned int *) 0x4002C110))      //D
#define IOCON_P2_5           (*((volatile unsigned int *) 0x4002C114))      //D
#define IOCON_P2_6           (*((volatile unsigned int *) 0x4002C118))      //D
#define IOCON_P2_7           (*((volatile unsigned int *) 0x4002C11C))      //D
#define IOCON_P2_8           (*((volatile unsigned int *) 0x4002C120))      //D
#define IOCON_P2_9           (*((volatile unsigned int *) 0x4002C124))      //D
#define IOCON_P2_10          (*((volatile unsigned int *) 0x4002C128))      //D
#define IOCON_P2_11          (*((volatile unsigned int *) 0x4002C12C))      //D
#define IOCON_P2_12          (*((volatile unsigned int *) 0x4002C130))      //D
#define IOCON_P2_13          (*((volatile unsigned int *) 0x4002C134))      //D
#define IOCON_P2_14          (*((volatile unsigned int *) 0x4002C138))      //D
#define IOCON_P2_15          (*((volatile unsigned int *) 0x4002C13C))      //D
#define IOCON_P2_16          (*((volatile unsigned int *) 0x4002C140))      //D
#define IOCON_P2_17          (*((volatile unsigned int *) 0x4002C144))      //D
#define IOCON_P2_18          (*((volatile unsigned int *) 0x4002C148))      //D
#define IOCON_P2_19          (*((volatile unsigned int *) 0x4002C14C))      //D
#define IOCON_P2_20          (*((volatile unsigned int *) 0x4002C150))      //D
#define IOCON_P2_21          (*((volatile unsigned int *) 0x4002C154))      //D
#define IOCON_P2_22          (*((volatile unsigned int *) 0x4002C158))      //D
#define IOCON_P2_23          (*((volatile unsigned int *) 0x4002C15C))      //D
#define IOCON_P2_24          (*((volatile unsigned int *) 0x4002C160))      //D
#define IOCON_P2_25          (*((volatile unsigned int *) 0x4002C164))      //D
#define IOCON_P2_26          (*((volatile unsigned int *) 0x4002C168))      //D
#define IOCON_P2_27          (*((volatile unsigned int *) 0x4002C16C))      //D
#define IOCON_P2_28          (*((volatile unsigned int *) 0x4002C170))      //D
#define IOCON_P2_29          (*((volatile unsigned int *) 0x4002C174))      //D
#define IOCON_P2_30          (*((volatile unsigned int *) 0x4002C178))      //D
#define IOCON_P2_31          (*((volatile unsigned int *) 0x4002C17C))      //D

//Port 3
#define IOCON_P3_0           (*((volatile unsigned int *) 0x4002C180))      //D (IOCON type)
#define IOCON_P3_1           (*((volatile unsigned int *) 0x4002C184))      //D
#define IOCON_P3_2           (*((volatile unsigned int *) 0x4002C188))      //D
#define IOCON_P3_3           (*((volatile unsigned int *) 0x4002C18C))      //D
#define IOCON_P3_4           (*((volatile unsigned int *) 0x4002C190))      //D
#define IOCON_P3_5           (*((volatile unsigned int *) 0x4002C194))      //D
#define IOCON_P3_6           (*((volatile unsigned int *) 0x4002C198))      //D
#define IOCON_P3_7           (*((volatile unsigned int *) 0x4002C19C))      //D
#define IOCON_P3_8           (*((volatile unsigned int *) 0x4002C1A0))      //D
#define IOCON_P3_9           (*((volatile unsigned int *) 0x4002C1A4))      //D
#define IOCON_P3_10          (*((volatile unsigned int *) 0x4002C1A8))      //D
#define IOCON_P3_11          (*((volatile unsigned int *) 0x4002C1AC))      //D
#define IOCON_P3_12          (*((volatile unsigned int *) 0x4002C1B0))      //D
#define IOCON_P3_13          (*((volatile unsigned int *) 0x4002C1B4))      //D
#define IOCON_P3_14          (*((volatile unsigned int *) 0x4002C1B8))      //D
#define IOCON_P3_15          (*((volatile unsigned int *) 0x4002C1BC))      //D
#define IOCON_P3_16          (*((volatile unsigned int *) 0x4002C1C0))      //D
#define IOCON_P3_17          (*((volatile unsigned int *) 0x4002C1C4))      //D
#define IOCON_P3_18          (*((volatile unsigned int *) 0x4002C1C8))      //D
#define IOCON_P3_19          (*((volatile unsigned int *) 0x4002C1CC))      //D
#define IOCON_P3_20          (*((volatile unsigned int *) 0x4002C1D0))      //D
#define IOCON_P3_21          (*((volatile unsigned int *) 0x4002C1D4))      //D
#define IOCON_P3_22          (*((volatile unsigned int *) 0x4002C1D8))      //D
#define IOCON_P3_23          (*((volatile unsigned int *) 0x4002C1DC))      //D
#define IOCON_P3_24          (*((volatile unsigned int *) 0x4002C1E0))      //D
#define IOCON_P3_25          (*((volatile unsigned int *) 0x4002C1E4))      //D
#define IOCON_P3_26          (*((volatile unsigned int *) 0x4002C1E8))      //D
#define IOCON_P3_27          (*((volatile unsigned int *) 0x4002C1EC))      //D
#define IOCON_P3_28          (*((volatile unsigned int *) 0x4002C1F0))      //D
#define IOCON_P3_29          (*((volatile unsigned int *) 0x4002C1F4))      //D
#define IOCON_P3_30          (*((volatile unsigned int *) 0x4002C1F8))      //D
#define IOCON_P3_31          (*((volatile unsigned int *) 0x4002C1FC))      //D

//Port 4
#define IOCON_P4_0           (*((volatile unsigned int *) 0x4002C200))      //D (IOCON type)
#define IOCON_P4_1           (*((volatile unsigned int *) 0x4002C204))      //D
#define IOCON_P4_2           (*((volatile unsigned int *) 0x4002C208))      //D
#define IOCON_P4_3           (*((volatile unsigned int *) 0x4002C20C))      //D
#define IOCON_P4_4           (*((volatile unsigned int *) 0x4002C210))      //D
#define IOCON_P4_5           (*((volatile unsigned int *) 0x4002C214))      //D
#define IOCON_P4_6           (*((volatile unsigned int *) 0x4002C218))      //D
#define IOCON_P4_7           (*((volatile unsigned int *) 0x4002C21C))      //D
#define IOCON_P4_8           (*((volatile unsigned int *) 0x4002C220))      //D
#define IOCON_P4_9           (*((volatile unsigned int *) 0x4002C224))      //D
#define IOCON_P4_10          (*((volatile unsigned int *) 0x4002C228))      //D
#define IOCON_P4_11          (*((volatile unsigned int *) 0x4002C22C))      //D
#define IOCON_P4_12          (*((volatile unsigned int *) 0x4002C230))      //D
#define IOCON_P4_13          (*((volatile unsigned int *) 0x4002C234))      //D
#define IOCON_P4_14          (*((volatile unsigned int *) 0x4002C238))      //D
#define IOCON_P4_15          (*((volatile unsigned int *) 0x4002C23C))      //D
#define IOCON_P4_16          (*((volatile unsigned int *) 0x4002C240))      //D
#define IOCON_P4_17          (*((volatile unsigned int *) 0x4002C244))      //D
#define IOCON_P4_18          (*((volatile unsigned int *) 0x4002C248))      //D
#define IOCON_P4_19          (*((volatile unsigned int *) 0x4002C24C))      //D
#define IOCON_P4_20          (*((volatile unsigned int *) 0x4002C250))      //D
#define IOCON_P4_21          (*((volatile unsigned int *) 0x4002C254))      //D
#define IOCON_P4_22          (*((volatile unsigned int *) 0x4002C258))      //D
#define IOCON_P4_23          (*((volatile unsigned int *) 0x4002C25C))      //D
#define IOCON_P4_24          (*((volatile unsigned int *) 0x4002C260))      //D
#define IOCON_P4_25          (*((volatile unsigned int *) 0x4002C264))      //D
#define IOCON_P4_26          (*((volatile unsigned int *) 0x4002C268))      //D
#define IOCON_P4_27          (*((volatile unsigned int *) 0x4002C26C))      //D
#define IOCON_P4_28          (*((volatile unsigned int *) 0x4002C270))      //D
#define IOCON_P4_29          (*((volatile unsigned int *) 0x4002C274))      //D
#define IOCON_P4_30          (*((volatile unsigned int *) 0x4002C278))      //D
#define IOCON_P4_31          (*((volatile unsigned int *) 0x4002C27C))      //D

//Port 5
#define IOCON_P5_0           (*((volatile unsigned int *) 0x4002C280))      //D (IOCON type)
#define IOCON_P5_1           (*((volatile unsigned int *) 0x4002C284))      //D
#define IOCON_P5_2           (*((volatile unsigned int *) 0x4002C288))      //I
#define IOCON_P5_3           (*((volatile unsigned int *) 0x4002C28C))      //I
#define IOCON_P5_4           (*((volatile unsigned int *) 0x4002C290))      //D