Mouse code for the MacroRat
mbed-dev/targets/TARGET_NUVOTON/TARGET_NUC472/device/system_NUC472_442.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 | * @file system_NUC472_442.h |
sahilmgandhi | 18:6a4db94011d3 | 3 | * @version V1.00 |
sahilmgandhi | 18:6a4db94011d3 | 4 | * $Revision: 5 $ |
sahilmgandhi | 18:6a4db94011d3 | 5 | * $Date: 14/05/29 1:13p $ |
sahilmgandhi | 18:6a4db94011d3 | 6 | * @brief NUC472/NUC442 system clock definition file |
sahilmgandhi | 18:6a4db94011d3 | 7 | * |
sahilmgandhi | 18:6a4db94011d3 | 8 | * @note |
sahilmgandhi | 18:6a4db94011d3 | 9 | * Copyright (C) 2013 Nuvoton Technology Corp. All rights reserved. |
sahilmgandhi | 18:6a4db94011d3 | 10 | *****************************************************************************/ |
sahilmgandhi | 18:6a4db94011d3 | 11 | #ifndef __SYSTEM_NUC472_442_H__ |
sahilmgandhi | 18:6a4db94011d3 | 12 | #define __SYSTEM_NUC472_442_H__ |
sahilmgandhi | 18:6a4db94011d3 | 13 | |
sahilmgandhi | 18:6a4db94011d3 | 14 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 15 | extern "C" { |
sahilmgandhi | 18:6a4db94011d3 | 16 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 17 | |
sahilmgandhi | 18:6a4db94011d3 | 18 | #include <stdint.h> |
sahilmgandhi | 18:6a4db94011d3 | 19 | |
sahilmgandhi | 18:6a4db94011d3 | 20 | |
sahilmgandhi | 18:6a4db94011d3 | 21 | /*---------------------------------------------------------------------------- |
sahilmgandhi | 18:6a4db94011d3 | 22 | Define clocks |
sahilmgandhi | 18:6a4db94011d3 | 23 | *----------------------------------------------------------------------------*/ |
sahilmgandhi | 18:6a4db94011d3 | 24 | #define __HXT (12000000UL) /*!< High Speed External Crystal Clock Frequency 12MHz */ |
sahilmgandhi | 18:6a4db94011d3 | 25 | #define __LXT (32768UL) /*!< Low Speed External Crystal Clock Frequency 32.768kHz */ |
sahilmgandhi | 18:6a4db94011d3 | 26 | #define __HIRC (22118400UL) /*!< High Speed Internal 22MHz RC Oscillator Frequency */ |
sahilmgandhi | 18:6a4db94011d3 | 27 | #define __LIRC (10000UL) /*!< Low Speed Internal 10kHz RC Oscillator Frequency */ |
sahilmgandhi | 18:6a4db94011d3 | 28 | #define __HSI (__HIRC) /* Factory Default is internal 12MHz */ |
sahilmgandhi | 18:6a4db94011d3 | 29 | |
sahilmgandhi | 18:6a4db94011d3 | 30 | |
sahilmgandhi | 18:6a4db94011d3 | 31 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ |
sahilmgandhi | 18:6a4db94011d3 | 32 | extern uint32_t CyclesPerUs; /*!< Cycles per micro second */ |
sahilmgandhi | 18:6a4db94011d3 | 33 | extern uint32_t PllClock; /*!< PLL Output Clock Frequency */ |
sahilmgandhi | 18:6a4db94011d3 | 34 | |
sahilmgandhi | 18:6a4db94011d3 | 35 | |
sahilmgandhi | 18:6a4db94011d3 | 36 | /** |
sahilmgandhi | 18:6a4db94011d3 | 37 | * Initialize the system |
sahilmgandhi | 18:6a4db94011d3 | 38 | * |
sahilmgandhi | 18:6a4db94011d3 | 39 | * @return none |
sahilmgandhi | 18:6a4db94011d3 | 40 | * |
sahilmgandhi | 18:6a4db94011d3 | 41 | * @brief Setup the microcontroller system. |
sahilmgandhi | 18:6a4db94011d3 | 42 | */ |
sahilmgandhi | 18:6a4db94011d3 | 43 | extern void SystemInit (void); |
sahilmgandhi | 18:6a4db94011d3 | 44 | |
sahilmgandhi | 18:6a4db94011d3 | 45 | /** |
sahilmgandhi | 18:6a4db94011d3 | 46 | * Update SystemCoreClock variable |
sahilmgandhi | 18:6a4db94011d3 | 47 | * |
sahilmgandhi | 18:6a4db94011d3 | 48 | * @return none |
sahilmgandhi | 18:6a4db94011d3 | 49 | * |
sahilmgandhi | 18:6a4db94011d3 | 50 | * @brief Updates the SystemCoreClock with current core Clock |
sahilmgandhi | 18:6a4db94011d3 | 51 | * retrieved from CPU registers. |
sahilmgandhi | 18:6a4db94011d3 | 52 | */ |
sahilmgandhi | 18:6a4db94011d3 | 53 | extern void SystemCoreClockUpdate (void); |
sahilmgandhi | 18:6a4db94011d3 | 54 | |
sahilmgandhi | 18:6a4db94011d3 | 55 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 56 | } |
sahilmgandhi | 18:6a4db94011d3 | 57 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 58 | |
sahilmgandhi | 18:6a4db94011d3 | 59 | #endif /* __SYSTEM_NUC472_442_H__ */ |
sahilmgandhi | 18:6a4db94011d3 | 60 | /*** (C) COPYRIGHT 2013 Nuvoton Technology Corp. ***/ |