| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Enumerations | Functions
CHIP: LPC8xx State Configurable Timer (SCT) driver
LPC8xx chip specific drivers

## Detailed Description

This driver provides State Configurable Timer (SCT) support for the device. The driver requires the following IP drivers:
IP: SCT register block and driver

## Enumerations
enum | CHIP_SCT_MATCH_REG_T { SCT_MATCH_0 = 0, SCT_MATCH_1 = 1, SCT_MATCH_2 = 2, SCT_MATCH_3 = 3, SCT_MATCH_4 = 4 }
enum | CHIP_SCT_EVENT_T { SCT_EVT_0 = (1 << 0), SCT_EVT_1 = (1 << 1), SCT_EVT_2 = (1 << 2), SCT_EVT_3 = (1 << 3), SCT_EVT_4 = (1 << 4) }

## Functions
STATIC INLINE void | Chip_SCT_Config (LPC_SCT_T *pSCT, uint32_t value)
| Configures the State Configurable Timer.
STATIC INLINE void | Chip_SCT_SetCount (LPC_SCT_T *pSCT, uint32_t count)
| Set unified count value in State Configurable Timer.
STATIC INLINE void | Chip_SCT_SetCountL (LPC_SCT_T *pSCT, uint16_t count)
| Set lower count value in State Configurable Timer.
STATIC INLINE void | Chip_SCT_SetCountH (LPC_SCT_T *pSCT, uint16_t count)
| Set higher count value in State Configurable Timer.
STATIC INLINE void | Chip_SCT_SetMatchCount (LPC_SCT_T *pSCT, CHIP_SCT_MATCH_REG_T n, uint32_t value)
| Set unified match count value in State Configurable Timer.
STATIC INLINE void | Chip_SCT_SetMatchReload (LPC_SCT_T *pSCT, CHIP_SCT_MATCH_REG_T n, uint32_t value)
| Set unified match reload count value in State Configurable Timer.
STATIC INLINE void | Chip_SCT_EventIntEnable (LPC_SCT_T *pSCT, CHIP_SCT_EVENT_T evt)
| Enable the interrupt for the specified event in State Configurable Timer.
STATIC INLINE void | Chip_SCT_EventIntDisable (LPC_SCT_T *pSCT, CHIP_SCT_EVENT_T evt)
| Disable the interrupt for the specified event in State Configurable Timer.
STATIC INLINE void | Chip_SCT_ClearEventFlag (LPC_SCT_T *pSCT, CHIP_SCT_EVENT_T evt)
| Clear the specified event flag in State Configurable Timer.
void | Chip_SCT_Init (LPC_SCT_T *pSCT)
| Initializes the State Configurable Timer.
void | Chip_SCT_DeInit (LPC_SCT_T *pSCT)
| Deinitializes the State Configurable Timer.

## Enumeration Type Documentation

enum CHIP_SCT_EVENT_T

SCT Event values enum

Enumerator:

  SCT_EVT_0 | Event 0
  SCT_EVT_1 | Event 1
  SCT_EVT_2 | Event 2
  SCT_EVT_3 | Event 3
  SCT_EVT_4 | Event 4

Definition at line 61 of file sct_8xx.h.

enum CHIP_SCT_MATCH_REG_T

SCT Match register values enum

Enumerator:

  SCT_MATCH_0 | SCT Match register 0
  SCT_MATCH_1 | SCT Match register 1
  SCT_MATCH_2 | SCT Match register 2
  SCT_MATCH_3 | SCT Match register 3
  SCT_MATCH_4 | SCT Match register 4

Definition at line 50 of file sct_8xx.h.

## Function Documentation

STATIC INLINE void Chip_SCT_ClearEventFlag | ( | LPC_SCT_T * | pSCT,
|  | CHIP_SCT_EVENT_T | evt
| ) |  |

Clear the specified event flag in State Configurable Timer.

Parameters

  pSCT | : The base of SCT peripheral on the chip
  evt | : Event value

Returns
  Nothing

Definition at line 165 of file sct_8xx.h.

STATIC INLINE void Chip_SCT_Config | ( | LPC_SCT_T * | pSCT,
|  | uint32_t | value
| ) |  |

Configures the State Configurable Timer.

Parameters

  pSCT | : The base of SCT peripheral on the chip
  value | : The 32-bit CONFIG register value

Returns
  Nothing

Definition at line 75 of file sct_8xx.h.

void Chip_SCT_DeInit | ( | LPC_SCT_T * | pSCT | ) |

Deinitializes the State Configurable Timer.

Parameters

  pSCT | : The base of SCT peripheral on the chip

Returns
  Nothing

Deinitializes the State Configurable Timer.

Parameters

  pSCT | : Pointer to SCT register block

Returns
  Nothing

Definition at line 56 of file sct_18xx_43xx.c.

STATIC INLINE void Chip_SCT_EventIntDisable | ( | LPC_SCT_T * | pSCT,
|  | CHIP_SCT_EVENT_T | evt
| ) |  |

Disable the interrupt for the specified event in State Configurable Timer.

Parameters

  pSCT | : The base of SCT peripheral on the chip
  evt | : Event value

Returns
  Nothing

Definition at line 154 of file sct_8xx.h.

STATIC INLINE void Chip_SCT_EventIntEnable | ( | LPC_SCT_T * | pSCT,
|  | CHIP_SCT_EVENT_T | evt
| ) |  |

Enable the interrupt for the specified event in State Configurable Timer.

Parameters

  pSCT | : The base of SCT peripheral on the chip
  evt | : Event value

Returns
  Nothing

Definition at line 143 of file sct_8xx.h.

void Chip_SCT_Init | ( | LPC_SCT_T * | pSCT | ) |

Initializes the State Configurable Timer.

Parameters

  pSCT | : The base of SCT peripheral on the chip

Returns
  Nothing

Initializes the State Configurable Timer.

Parameters

  pSCT | : Pointer to SCT register block

Returns
  Nothing

Definition at line 50 of file sct_18xx_43xx.c.

STATIC INLINE void Chip_SCT_SetCount | ( | LPC_SCT_T * | pSCT,
|  | uint32_t | count
| ) |  |

Set unified count value in State Configurable Timer.

Parameters

  pSCT | : The base of SCT peripheral on the chip
  count | : The 32-bit count value

Returns
  Nothing

Definition at line 86 of file sct_8xx.h.

STATIC INLINE void Chip_SCT_SetCountH | ( | LPC_SCT_T * | pSCT,
|  | uint16_t | count
| ) |  |

Set higher count value in State Configurable Timer.

Parameters

  pSCT | : The base of SCT peripheral on the chip
  count | : The 16-bit count value

Returns
  Nothing

Definition at line 108 of file sct_8xx.h.

STATIC INLINE void Chip_SCT_SetCountL | ( | LPC_SCT_T * | pSCT,
|  | uint16_t | count
| ) |  |

Set lower count value in State Configurable Timer.

Parameters

  pSCT | : The base of SCT peripheral on the chip
  count | : The 16-bit count value

Returns
  Nothing

Definition at line 97 of file sct_8xx.h.

STATIC INLINE void Chip_SCT_SetMatchCount | ( | LPC_SCT_T * | pSCT,
|  | CHIP_SCT_MATCH_REG_T | n,
|  | uint32_t | value
| ) |  |

Set unified match count value in State Configurable Timer.

Parameters

  pSCT | : The base of SCT peripheral on the chip
  n | : Match register value
  value | : The 32-bit match count value

Returns
  Nothing

Definition at line 120 of file sct_8xx.h.

STATIC INLINE void Chip_SCT_SetMatchReload | ( | LPC_SCT_T * | pSCT,
|  | CHIP_SCT_MATCH_REG_T | n,
|  | uint32_t | value
| ) |  |

Set unified match reload count value in State Configurable Timer.

Parameters

  pSCT | : The base of SCT peripheral on the chip
  n | : Match register value
  value | : The 32-bit match count reload value

Returns
  Nothing

Definition at line 132 of file sct_8xx.h.