Mouse code for the MacroRat
mbed-dev/targets/TARGET_NXP/TARGET_LPC408X/device/system_LPC407x_8x_177x_8x.h@46:b156ef445742, 2017-06-03 (annotated)
- Committer:
- sahilmgandhi
- Date:
- Sat Jun 03 00:22:44 2017 +0000
- Revision:
- 46:b156ef445742
- Parent:
- 18:6a4db94011d3
Final code for internal battlebot competition.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sahilmgandhi | 18:6a4db94011d3 | 1 | /********************************************************************** |
sahilmgandhi | 18:6a4db94011d3 | 2 | * $Id$ system_LPC407x_8x_177x_8x.h 2011-06-02 |
sahilmgandhi | 18:6a4db94011d3 | 3 | *//** |
sahilmgandhi | 18:6a4db94011d3 | 4 | * @file system_LPC407x_8x_177x_8x.h |
sahilmgandhi | 18:6a4db94011d3 | 5 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer Source File |
sahilmgandhi | 18:6a4db94011d3 | 6 | * for the NXP LPC Device Series |
sahilmgandhi | 18:6a4db94011d3 | 7 | * @version 1.0 |
sahilmgandhi | 18:6a4db94011d3 | 8 | * @date 02. June. 2011 |
sahilmgandhi | 18:6a4db94011d3 | 9 | * @author NXP MCU SW Application Team |
sahilmgandhi | 18:6a4db94011d3 | 10 | * |
sahilmgandhi | 18:6a4db94011d3 | 11 | * Copyright(C) 2011, NXP Semiconductor |
sahilmgandhi | 18:6a4db94011d3 | 12 | * All rights reserved. |
sahilmgandhi | 18:6a4db94011d3 | 13 | * |
sahilmgandhi | 18:6a4db94011d3 | 14 | *********************************************************************** |
sahilmgandhi | 18:6a4db94011d3 | 15 | * Software that is described herein is for illustrative purposes only |
sahilmgandhi | 18:6a4db94011d3 | 16 | * which provides customers with programming information regarding the |
sahilmgandhi | 18:6a4db94011d3 | 17 | * products. This software is supplied "AS IS" without any warranties. |
sahilmgandhi | 18:6a4db94011d3 | 18 | * NXP Semiconductors assumes no responsibility or liability for the |
sahilmgandhi | 18:6a4db94011d3 | 19 | * use of the software, conveys no license or title under any patent, |
sahilmgandhi | 18:6a4db94011d3 | 20 | * copyright, or mask work right to the product. NXP Semiconductors |
sahilmgandhi | 18:6a4db94011d3 | 21 | * reserves the right to make changes in the software without |
sahilmgandhi | 18:6a4db94011d3 | 22 | * notification. NXP Semiconductors also make no representation or |
sahilmgandhi | 18:6a4db94011d3 | 23 | * warranty that such application will be suitable for the specified |
sahilmgandhi | 18:6a4db94011d3 | 24 | * use without further testing or modification. |
sahilmgandhi | 18:6a4db94011d3 | 25 | * Permission to use, copy, modify, and distribute this software and its |
sahilmgandhi | 18:6a4db94011d3 | 26 | * documentation is hereby granted, under NXP Semiconductors' |
sahilmgandhi | 18:6a4db94011d3 | 27 | * relevant copyright in the software, without fee, provided that it |
sahilmgandhi | 18:6a4db94011d3 | 28 | * is used in conjunction with NXP Semiconductors microcontrollers. This |
sahilmgandhi | 18:6a4db94011d3 | 29 | * copyright, permission, and disclaimer notice must appear in all copies of |
sahilmgandhi | 18:6a4db94011d3 | 30 | * this code. |
sahilmgandhi | 18:6a4db94011d3 | 31 | **********************************************************************/ |
sahilmgandhi | 18:6a4db94011d3 | 32 | |
sahilmgandhi | 18:6a4db94011d3 | 33 | #ifndef __SYSTEM_LPC407x_8x_177x_8x_H |
sahilmgandhi | 18:6a4db94011d3 | 34 | #define __SYSTEM_LPC407x_8x_177x_8x_H |
sahilmgandhi | 18:6a4db94011d3 | 35 | |
sahilmgandhi | 18:6a4db94011d3 | 36 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 37 | extern "C" { |
sahilmgandhi | 18:6a4db94011d3 | 38 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 39 | |
sahilmgandhi | 18:6a4db94011d3 | 40 | #include <stdint.h> |
sahilmgandhi | 18:6a4db94011d3 | 41 | |
sahilmgandhi | 18:6a4db94011d3 | 42 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ |
sahilmgandhi | 18:6a4db94011d3 | 43 | extern uint32_t PeripheralClock; /*!< Peripheral Clock Frequency (Pclk) */ |
sahilmgandhi | 18:6a4db94011d3 | 44 | extern uint32_t EMCClock; /*!< EMC Clock */ |
sahilmgandhi | 18:6a4db94011d3 | 45 | extern uint32_t USBClock; /*!< USB Frequency */ |
sahilmgandhi | 18:6a4db94011d3 | 46 | |
sahilmgandhi | 18:6a4db94011d3 | 47 | |
sahilmgandhi | 18:6a4db94011d3 | 48 | /** |
sahilmgandhi | 18:6a4db94011d3 | 49 | * Initialize the system |
sahilmgandhi | 18:6a4db94011d3 | 50 | * |
sahilmgandhi | 18:6a4db94011d3 | 51 | * @param none |
sahilmgandhi | 18:6a4db94011d3 | 52 | * @return none |
sahilmgandhi | 18:6a4db94011d3 | 53 | * |
sahilmgandhi | 18:6a4db94011d3 | 54 | * @brief Setup the microcontroller system. |
sahilmgandhi | 18:6a4db94011d3 | 55 | * Initialize the System and update the SystemCoreClock variable. |
sahilmgandhi | 18:6a4db94011d3 | 56 | */ |
sahilmgandhi | 18:6a4db94011d3 | 57 | extern void SystemInit (void); |
sahilmgandhi | 18:6a4db94011d3 | 58 | |
sahilmgandhi | 18:6a4db94011d3 | 59 | /** |
sahilmgandhi | 18:6a4db94011d3 | 60 | * Update SystemCoreClock variable |
sahilmgandhi | 18:6a4db94011d3 | 61 | * |
sahilmgandhi | 18:6a4db94011d3 | 62 | * @param none |
sahilmgandhi | 18:6a4db94011d3 | 63 | * @return none |
sahilmgandhi | 18:6a4db94011d3 | 64 | * |
sahilmgandhi | 18:6a4db94011d3 | 65 | * @brief Updates the SystemCoreClock with current core Clock |
sahilmgandhi | 18:6a4db94011d3 | 66 | * retrieved from cpu registers. |
sahilmgandhi | 18:6a4db94011d3 | 67 | */ |
sahilmgandhi | 18:6a4db94011d3 | 68 | extern void SystemCoreClockUpdate (void); |
sahilmgandhi | 18:6a4db94011d3 | 69 | |
sahilmgandhi | 18:6a4db94011d3 | 70 | /*---------------------------------------------------------------------------- |
sahilmgandhi | 18:6a4db94011d3 | 71 | Define clocks |
sahilmgandhi | 18:6a4db94011d3 | 72 | *----------------------------------------------------------------------------*/ |
sahilmgandhi | 18:6a4db94011d3 | 73 | #define XTAL (12000000UL) /* Oscillator frequency */ |
sahilmgandhi | 18:6a4db94011d3 | 74 | #define OSC_CLK ( XTAL) /* Main oscillator frequency */ |
sahilmgandhi | 18:6a4db94011d3 | 75 | #define RTC_CLK ( 32768UL) /* RTC oscillator frequency */ |
sahilmgandhi | 18:6a4db94011d3 | 76 | #define IRC_OSC (12000000UL) /* Internal RC oscillator frequency */ |
sahilmgandhi | 18:6a4db94011d3 | 77 | #define WDT_OSC ( 500000UL) /* Internal WDT oscillator frequency */ |
sahilmgandhi | 18:6a4db94011d3 | 78 | |
sahilmgandhi | 18:6a4db94011d3 | 79 | |
sahilmgandhi | 18:6a4db94011d3 | 80 | |
sahilmgandhi | 18:6a4db94011d3 | 81 | /* |
sahilmgandhi | 18:6a4db94011d3 | 82 | //-------- <<< end of configuration section >>> ------------------------------ |
sahilmgandhi | 18:6a4db94011d3 | 83 | */ |
sahilmgandhi | 18:6a4db94011d3 | 84 | |
sahilmgandhi | 18:6a4db94011d3 | 85 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 86 | } |
sahilmgandhi | 18:6a4db94011d3 | 87 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 88 | |
sahilmgandhi | 18:6a4db94011d3 | 89 | #endif /* __SYSTEM_LPC407x_8x_177x_8x_H */ |