Mouse code for the MacroRat
mbed-dev/targets/TARGET_ONSEMI/TARGET_NCS36510/device/system_NCS36510.c@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 | * @file system_NCS36510.c |
sahilmgandhi | 18:6a4db94011d3 | 3 | * @brief CMSIS Cortex-M3 Device System Source File |
sahilmgandhi | 18:6a4db94011d3 | 4 | * for CM3 Device Series |
sahilmgandhi | 18:6a4db94011d3 | 5 | * @version V1.05 |
sahilmgandhi | 18:6a4db94011d3 | 6 | * @date 26. July 2011 |
sahilmgandhi | 18:6a4db94011d3 | 7 | * |
sahilmgandhi | 18:6a4db94011d3 | 8 | * @note |
sahilmgandhi | 18:6a4db94011d3 | 9 | * Copyright (C) 2010-2011 ARM Limited. All rights reserved. |
sahilmgandhi | 18:6a4db94011d3 | 10 | * |
sahilmgandhi | 18:6a4db94011d3 | 11 | * @par |
sahilmgandhi | 18:6a4db94011d3 | 12 | * ARM Limited (ARM) is supplying this software for use with Cortex-M |
sahilmgandhi | 18:6a4db94011d3 | 13 | * processor based microcontrollers. This file can be freely distributed |
sahilmgandhi | 18:6a4db94011d3 | 14 | * within development tools that are supporting such ARM based processors. |
sahilmgandhi | 18:6a4db94011d3 | 15 | * |
sahilmgandhi | 18:6a4db94011d3 | 16 | * @par |
sahilmgandhi | 18:6a4db94011d3 | 17 | * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED |
sahilmgandhi | 18:6a4db94011d3 | 18 | * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF |
sahilmgandhi | 18:6a4db94011d3 | 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. |
sahilmgandhi | 18:6a4db94011d3 | 20 | * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR |
sahilmgandhi | 18:6a4db94011d3 | 21 | * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
sahilmgandhi | 18:6a4db94011d3 | 22 | * |
sahilmgandhi | 18:6a4db94011d3 | 23 | ******************************************************************************/ |
sahilmgandhi | 18:6a4db94011d3 | 24 | |
sahilmgandhi | 18:6a4db94011d3 | 25 | #include <NCS36510.h> |
sahilmgandhi | 18:6a4db94011d3 | 26 | #include "ncs36510Init.h" |
sahilmgandhi | 18:6a4db94011d3 | 27 | /*---------------------------------------------------------------------------- |
sahilmgandhi | 18:6a4db94011d3 | 28 | Define clocks |
sahilmgandhi | 18:6a4db94011d3 | 29 | *----------------------------------------------------------------------------*/ |
sahilmgandhi | 18:6a4db94011d3 | 30 | #define __HSI ( 8000000UL) |
sahilmgandhi | 18:6a4db94011d3 | 31 | #define __XTAL (32769000UL) /* Oscillator frequency */ |
sahilmgandhi | 18:6a4db94011d3 | 32 | |
sahilmgandhi | 18:6a4db94011d3 | 33 | /** Value initialized here*/ |
sahilmgandhi | 18:6a4db94011d3 | 34 | #define __SYSTEM_CLOCK (32000000) |
sahilmgandhi | 18:6a4db94011d3 | 35 | |
sahilmgandhi | 18:6a4db94011d3 | 36 | |
sahilmgandhi | 18:6a4db94011d3 | 37 | /*---------------------------------------------------------------------------- |
sahilmgandhi | 18:6a4db94011d3 | 38 | Clock Variable definitions |
sahilmgandhi | 18:6a4db94011d3 | 39 | *----------------------------------------------------------------------------*/ |
sahilmgandhi | 18:6a4db94011d3 | 40 | uint32_t SystemCoreClock = __SYSTEM_CLOCK;/*!< System Clock Frequency (Core Clock)*/ |
sahilmgandhi | 18:6a4db94011d3 | 41 | |
sahilmgandhi | 18:6a4db94011d3 | 42 | |
sahilmgandhi | 18:6a4db94011d3 | 43 | /*---------------------------------------------------------------------------- |
sahilmgandhi | 18:6a4db94011d3 | 44 | Clock functions |
sahilmgandhi | 18:6a4db94011d3 | 45 | *----------------------------------------------------------------------------*/ |
sahilmgandhi | 18:6a4db94011d3 | 46 | void SystemCoreClockUpdate (void) /* Get Core Clock Frequency */ |
sahilmgandhi | 18:6a4db94011d3 | 47 | { |
sahilmgandhi | 18:6a4db94011d3 | 48 | /*Function not implimented */ |
sahilmgandhi | 18:6a4db94011d3 | 49 | SystemCoreClock = __SYSTEM_CLOCK; |
sahilmgandhi | 18:6a4db94011d3 | 50 | } |
sahilmgandhi | 18:6a4db94011d3 | 51 | |
sahilmgandhi | 18:6a4db94011d3 | 52 | /** |
sahilmgandhi | 18:6a4db94011d3 | 53 | * Initialize the system |
sahilmgandhi | 18:6a4db94011d3 | 54 | * |
sahilmgandhi | 18:6a4db94011d3 | 55 | * @param none |
sahilmgandhi | 18:6a4db94011d3 | 56 | * @return none |
sahilmgandhi | 18:6a4db94011d3 | 57 | * |
sahilmgandhi | 18:6a4db94011d3 | 58 | * @brief Setup the microcontroller system. |
sahilmgandhi | 18:6a4db94011d3 | 59 | * Initialize the System. |
sahilmgandhi | 18:6a4db94011d3 | 60 | */ |
sahilmgandhi | 18:6a4db94011d3 | 61 | void SystemInit (void) |
sahilmgandhi | 18:6a4db94011d3 | 62 | { |
sahilmgandhi | 18:6a4db94011d3 | 63 | |
sahilmgandhi | 18:6a4db94011d3 | 64 | SystemCoreClock = __SYSTEM_CLOCK; |
sahilmgandhi | 18:6a4db94011d3 | 65 | |
sahilmgandhi | 18:6a4db94011d3 | 66 | fNcs36510Init(); |
sahilmgandhi | 18:6a4db94011d3 | 67 | } |