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

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

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Typedefs | Functions | Variables
cpu_core.h File Reference
`#include <cpu.h>`
`#include <lib_def.h>`
`#include <cpu_cfg.h>`
`#include <lib_mem.h>`
`#include <lib_str.h>`

Go to the source code of this file.

## Macros
#define | CPU_CORE_VERSION 12800u /* See Note #1. */
#define | CPU_CORE_EXT extern
#define | CPU_CFG_TS_EN DEF_ENABLED
#define | CPU_CFG_TS_TMR_EN DEF_ENABLED
#define | CPU_TIME_MEAS_NBR_MIN 1
#define | CPU_TIME_MEAS_NBR_MAX 128
#define | CPU_ERR_NONE 0u
#define | CPU_ERR_NULL_PTR 10u
#define | CPU_ERR_NAME_SIZE 1000u
#define | CPU_ERR_TS_FREQ_INVALID 2000u
#define | CPU_SW_EXCEPTION(err_rtn_val)
#define | CPU_TYPE_CREATE(char_1, char_2, char_3, char_4)

## Typedefs
typedef CPU_INT16U | CPU_ERR
typedef CPU_INT32U | CPU_TS32
typedef CPU_INT64U | CPU_TS64
typedef CPU_TS32 | CPU_TS
typedef CPU_INT08U | CPU_TS_TMR
typedef CPU_INT32U | CPU_TS_TMR_FREQ

## Functions
void | CPU_Init (void)
void | CPU_SW_Exception (void)
void | CPU_NameClr (void)
void | CPU_NameGet (CPU_CHAR *p_name, CPU_ERR *p_err)
void | CPU_NameSet (const CPU_CHAR *p_name, CPU_ERR *p_err)
CPU_TS32 | CPU_TS_Get32 (void)
CPU_TS64 | CPU_TS_Get64 (void)
void | CPU_TS_Update (void)
CPU_TS_TMR_FREQ | CPU_TS_TmrFreqGet (CPU_ERR *p_err)
void | CPU_TS_TmrFreqSet (CPU_TS_TMR_FREQ freq_hz)
CPU_DATA | CPU_CntLeadZeros (CPU_DATA val)
void | CPU_TS_TmrInit (void)
CPU_TS_TMR | CPU_TS_TmrRd (void)
CPU_INT64U | CPU_TS32_to_uSec (CPU_TS32 ts_cnts)
CPU_INT64U | CPU_TS64_to_uSec (CPU_TS64 ts_cnts)

## Variables
CPU_CORE_EXT CPU_CHAR | CPU_Name [CPU_CFG_NAME_SIZE]
CPU_CORE_EXT CPU_TS_TMR_FREQ | CPU_TS_TmrFreq_Hz

## Macro Definition Documentation

#define CPU_CFG_TS_EN DEF_ENABLED

Definition at line 158 of file cpu_core.h.

#define CPU_CFG_TS_TMR_EN DEF_ENABLED

Definition at line 165 of file cpu_core.h.

#define CPU_CORE_EXT extern

Definition at line 85 of file cpu_core.h.

#define CPU_CORE_VERSION 12800u /* See Note #1. */

Definition at line 73 of file cpu_core.h.

#define CPU_ERR_NAME_SIZE 1000u

Definition at line 190 of file cpu_core.h.

#define CPU_ERR_NONE 0u

Definition at line 187 of file cpu_core.h.

#define CPU_ERR_NULL_PTR 10u

Definition at line 188 of file cpu_core.h.

#define CPU_ERR_TS_FREQ_INVALID 2000u

Definition at line 192 of file cpu_core.h.

#define CPU_SW_EXCEPTION | ( |  | err_rtn_val | ) |

Value:
do { \
CPU_SW_Exception(); \
} while (0)

Definition at line 406 of file cpu_core.h.

#define CPU_TIME_MEAS_NBR_MAX 128

Definition at line 178 of file cpu_core.h.

#define CPU_TIME_MEAS_NBR_MIN 1

Definition at line 177 of file cpu_core.h.

#define CPU_TYPE_CREATE | ( |  | char_1,
|  |  | char_2,
|  |  | char_3,
|  |  | char_4
| ) |  |

Value:
(((CPU_INT32U)((CPU_INT08U)(char_1)) << (3u * DEF_OCTET_NBR_BITS)) | \
((CPU_INT32U)((CPU_INT08U)(char_2)) << (2u * DEF_OCTET_NBR_BITS)) | \
((CPU_INT32U)((CPU_INT08U)(char_3)) << (1u * DEF_OCTET_NBR_BITS)) | \
((CPU_INT32U)((CPU_INT08U)(char_4)) << (0u * DEF_OCTET_NBR_BITS)))

Definition at line 454 of file cpu_core.h.

## Typedef Documentation

typedef CPU_INT16U CPU_ERR

Definition at line 208 of file cpu_core.h.

typedef CPU_TS32 CPU_TS

Definition at line 223 of file cpu_core.h.

typedef CPU_INT32U CPU_TS32

Definition at line 220 of file cpu_core.h.

typedef CPU_INT64U CPU_TS64

Definition at line 221 of file cpu_core.h.

typedef CPU_INT08U CPU_TS_TMR

Definition at line 228 of file cpu_core.h.

typedef CPU_INT32U CPU_TS_TMR_FREQ

Definition at line 245 of file cpu_core.h.

## Function Documentation

CPU_DATA CPU_CntLeadZeros | ( | CPU_DATA | val | ) |

Definition at line 349 of file os_cpu_c_m0.c.

void CPU_Init | ( | void |  | ) |

Definition at line 191 of file cpu_core.c.

void CPU_NameClr | ( | void |  | ) |

Definition at line 261 of file cpu_core.c.

void CPU_NameGet | ( | CPU_CHAR * | p_name,
|  | CPU_ERR * | p_err
| ) |  |

Definition at line 306 of file cpu_core.c.

void CPU_NameSet | ( | const CPU_CHAR * | p_name,
|  | CPU_ERR * | p_err
| ) |  |

Definition at line 360 of file cpu_core.c.

void CPU_SW_Exception | ( | void |  | ) |

Definition at line 231 of file cpu_core.c.

CPU_INT64U CPU_TS32_to_uSec | ( | CPU_TS32 | ts_cnts | ) |

CPU_INT64U CPU_TS64_to_uSec | ( | CPU_TS64 | ts_cnts | ) |

CPU_TS32 CPU_TS_Get32 | ( | void |  | ) |

Definition at line 447 of file cpu_core.c.

CPU_TS64 CPU_TS_Get64 | ( | void |  | ) |

Definition at line 529 of file cpu_core.c.

CPU_TS_TMR_FREQ CPU_TS_TmrFreqGet | ( | CPU_ERR * | p_err | ) |

Definition at line 627 of file cpu_core.c.

void CPU_TS_TmrFreqSet | ( | CPU_TS_TMR_FREQ | freq_hz | ) |

Definition at line 679 of file cpu_core.c.

void CPU_TS_TmrInit | ( | void |  | ) |

Definition at line 161 of file cpu_bsp.c.

CPU_TS_TMR CPU_TS_TmrRd | ( | void |  | ) |

Definition at line 270 of file cpu_bsp.c.

void CPU_TS_Update | ( | void |  | ) |

Definition at line 584 of file cpu_core.c.

## Variable Documentation

CPU_CORE_EXT CPU_CHAR CPU_Name[CPU_CFG_NAME_SIZE]

Definition at line 255 of file cpu_core.h.

CPU_CORE_EXT CPU_TS_TMR_FREQ CPU_TS_TmrFreq_Hz

Definition at line 272 of file cpu_core.h.