LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CHIP: LPC8xx Switch Matrix Driver

Detailed Description

Data Structures

struct  LPC_SWM_T
 LPC8XX Switch Matrix register block structure. More...
 

Enumerations

enum  CHIP_SWM_PIN_MOVABLE_T {
  SWM_U0_TXD_O = 0x00, SWM_U0_RXD_I = 0x01, SWM_U0_RTS_O = 0x02, SWM_U0_CTS_I = 0x03,
  SWM_U0_SCLK_IO = 0x10, SWM_U1_TXD_O = 0x11, SWM_U1_RXD_I = 0x12, SWM_U1_RTS_O = 0x13,
  SWM_U1_CTS_I = 0x20, SWM_U1_SCLK_IO = 0x21, SWM_U2_TXD_O = 0x22, SWM_U2_RXD_I = 0x23,
  SWM_U2_RTS_O = 0x30, SWM_U2_CTS_I = 0x31, SWM_U2_SCLK_IO = 0x32, SWM_SPI0_SCK_IO = 0x33,
  SWM_SPI0_MOSI_IO = 0x40, SWM_SPI0_MISO_IO = 0x41, SWM_SPI0_SSEL_IO = 0x42, SWM_SPI1_SCK_IO = 0x43,
  SWM_SPI1_MOSI_IO = 0x50, SWM_SPI1_MISO_IO = 0x51, SWM_SPI1_SSEL_IO = 0x52, SWM_CTIN_0_I = 0x53,
  SWM_CTIN_1_I = 0x60, SWM_CTIN_2_I = 0x61, SWM_CTIN_3_I = 0x62, SWM_CTOUT_0_O = 0x63,
  SWM_CTOUT_1_O = 0x70, SWM_CTOUT_2_O = 0x71, SWM_CTOUT_3_O = 0x72, SWM_I2C_SDA_IO = 0x73,
  SWM_I2C_SCL_IO = 0x80, SWM_ACMP_O_O = 0x81, SWM_CLKOUT_O = 0x82, SWM_GPIO_INT_BMAT_O = 0x83
}
 LPC8XX Switch Matrix Movable pins. More...
 
enum  CHIP_SWM_PIN_FIXED_T {
  ACMP_I1 = 0, ACMP_I2 = 1, SWCLK = 2, SWDIO = 3,
  XTALIN = 4, XTALOUT = 5, RST = 6, CLKIN = 7,
  VDDCMP = 8
}
 LPC8XX Switch Matrix Fixed pins. More...
 

Functions

STATIC INLINE void Chip_SWM_Init (void)
 Initialise the SWM module.
 
STATIC INLINE void Chip_SWM_Deinit (void)
 Deinitialise the SWM module.
 
void Chip_SWM_MovablePinAssign (CHIP_SWM_PIN_MOVABLE_T movable, CHIP_PINx_T assign)
 Assign movable pin function to physical pin in Switch Matrix.
 
void Chip_SWM_FixedPinEnable (CHIP_SWM_PIN_FIXED_T pin, bool enable)
 Enables or Disable Fixed Function Pin in the Switch Matrix.
 
bool Chip_SWM_IsEnabled (CHIP_SWM_PIN_FIXED_T pin)
 Tests whether a pin is enabled or disabled in the Switch Matrix.
 

Enumeration Type Documentation

LPC8XX Switch Matrix Fixed pins.

Enumerator:
ACMP_I1 

ACMP I1

ACMP_I2 

ACMP I2

SWCLK 

SWCLK

SWDIO 

SWDIO

XTALIN 

XTALIN

XTALOUT 

XTALOUT

RST 

Reset

CLKIN 

Clock Input

VDDCMP 

VDD

Definition at line 98 of file swm_8xx.h.

LPC8XX Switch Matrix Movable pins.

Enumerator:
SWM_U0_TXD_O 

PINASSIGN0 - UART0 TXD Output

SWM_U0_RXD_I 

PINASSIGN0 - UART0 RXD Input

SWM_U0_RTS_O 

PINASSIGN0 - UART0 RTS Output

SWM_U0_CTS_I 

PINASSIGN0 - UART0 CTS Input

SWM_U0_SCLK_IO 

PINASSIGN1 - UART0 SCLK I/O

SWM_U1_TXD_O 

PINASSIGN1 - UART1 TXD Output

SWM_U1_RXD_I 

PINASSIGN1 - UART1 RXD Input

SWM_U1_RTS_O 

PINASSIGN1 - UART1 RTS Output

SWM_U1_CTS_I 

PINASSIGN2 - UART1 CTS Input

SWM_U1_SCLK_IO 

PINASSIGN2 - UART1 SCLK I/O

SWM_U2_TXD_O 

PINASSIGN2 - UART2 TXD Output

SWM_U2_RXD_I 

PINASSIGN2 - UART2 RXD Input

SWM_U2_RTS_O 

PINASSIGN3 - UART2 RTS Output

SWM_U2_CTS_I 

PINASSIGN3 - UART2 CTS Input

SWM_U2_SCLK_IO 

PINASSIGN3 - UART2 SCLK I/O

SWM_SPI0_SCK_IO 

PINASSIGN3 - SPI0 SCK I/O

SWM_SPI0_MOSI_IO 

PINASSIGN4 - SPI0 MOSI I/O

SWM_SPI0_MISO_IO 

PINASSIGN4 - SPI0 MISO I/O

SWM_SPI0_SSEL_IO 

PINASSIGN4 - SPI0 SSEL I/O

SWM_SPI1_SCK_IO 

PINASSIGN4 - SPI1 SCK I/O

SWM_SPI1_MOSI_IO 

PINASSIGN5 - SPI1 MOSI I/O

SWM_SPI1_MISO_IO 

PINASSIGN5 - SPI1 MISO I/O

SWM_SPI1_SSEL_IO 

PINASSIGN5 - SPI1 SSEL I/O

SWM_CTIN_0_I 

PINASSIGN5 - CTIN0 Input

SWM_CTIN_1_I 

PINASSIGN6 - CTIN1 Input

SWM_CTIN_2_I 

PINASSIGN6 - CTIN2 Input

SWM_CTIN_3_I 

PINASSIGN6 - CTIN3 Input

SWM_CTOUT_0_O 

PINASSIGN6 - CTOUT0 Output

SWM_CTOUT_1_O 

PINASSIGN7 - CTOUT1 Output

SWM_CTOUT_2_O 

PINASSIGN7 - CTOUT2 Output

SWM_CTOUT_3_O 

PINASSIGN7 - CTOUT3 Output

SWM_I2C_SDA_IO 

PINASSIGN7 - I2C SDA I/O

SWM_I2C_SCL_IO 

PINASSIGN8 - I2C SCL I/O

SWM_ACMP_O_O 

PINASSIGN8 - I2C ACMP Output

SWM_CLKOUT_O 

PINASSIGN8 - I2C CLKOUT Output

SWM_GPIO_INT_BMAT_O 

PINASSIGN8 - I2C GPIO INT BMAT Output

Definition at line 56 of file swm_8xx.h.

Function Documentation

STATIC INLINE void Chip_SWM_Deinit ( void  )

Deinitialise the SWM module.

Returns
Nothing

Definition at line 123 of file swm_8xx.h.

void Chip_SWM_FixedPinEnable ( CHIP_SWM_PIN_FIXED_T  pin,
bool  enable 
)

Enables or Disable Fixed Function Pin in the Switch Matrix.

Parameters
pin: Pin to be enabled or disabled
enable: True to enable the pin, False to disable the pin
Returns
Nothing

Definition at line 62 of file swm_8xx.c.

STATIC INLINE void Chip_SWM_Init ( void  )

Initialise the SWM module.

Returns
Nothing

Definition at line 114 of file swm_8xx.h.

bool Chip_SWM_IsEnabled ( CHIP_SWM_PIN_FIXED_T  pin)

Tests whether a pin is enabled or disabled in the Switch Matrix.

Parameters
pin: The pin to test whether it is enabled or disabled
Returns
True if the pin is enabled, False if disabled

Definition at line 73 of file swm_8xx.c.

void Chip_SWM_MovablePinAssign ( CHIP_SWM_PIN_MOVABLE_T  movable,
CHIP_PINx_T  assign 
)

Assign movable pin function to physical pin in Switch Matrix.

Parameters
movable: Movable pin function
assign: Physical pin to be assigned
Returns
Nothing

Definition at line 54 of file swm_8xx.c.