Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 1 | /** |
| 2 | * \file |
| 3 | * |
| 4 | * \brief Init related functionality declaration. |
| 5 | * |
| 6 | * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries. |
| 7 | * |
| 8 | * \asf_license_start |
| 9 | * |
| 10 | * \page License |
| 11 | * |
| 12 | * Subject to your compliance with these terms, you may use Microchip |
| 13 | * software and any derivatives exclusively with Microchip products. |
| 14 | * It is your responsibility to comply with third party license terms applicable |
| 15 | * to your use of third party software (including open source software) that |
| 16 | * may accompany Microchip software. |
| 17 | * |
| 18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, |
| 19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, |
| 20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, |
| 21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE |
| 22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL |
| 23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE |
| 24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE |
| 25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT |
| 26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY |
| 27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, |
| 28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. |
| 29 | * |
| 30 | * \asf_license_stop |
| 31 | * |
| 32 | */ |
| 33 | |
| 34 | #ifndef _HPL_INIT_H_INCLUDED |
| 35 | #define _HPL_INIT_H_INCLUDED |
| 36 | |
| 37 | /** |
| 38 | * \addtogroup HPL Init |
| 39 | * |
| 40 | * \section hpl_init_rev Revision History |
| 41 | * - v1.0.0 Initial Release |
| 42 | * |
| 43 | *@{ |
| 44 | */ |
| 45 | |
| 46 | #include <compiler.h> |
| 47 | |
| 48 | #ifdef __cplusplus |
| 49 | extern "C" { |
| 50 | #endif |
| 51 | |
| 52 | /** |
| 53 | * \name HPL functions |
| 54 | */ |
| 55 | //@{ |
| 56 | /** |
| 57 | * \brief Initializes clock sources |
| 58 | */ |
| 59 | void _sysctrl_init_sources(void); |
| 60 | |
| 61 | /** |
| 62 | * \brief Initializes Power Manager |
| 63 | */ |
| 64 | void _pm_init(void); |
| 65 | |
| 66 | /** |
| 67 | * \brief Initialize generators |
| 68 | */ |
| 69 | void _gclk_init_generators(void); |
| 70 | |
| 71 | /** |
| 72 | * \brief Initialize 32 kHz clock sources |
| 73 | */ |
| 74 | void _osc32kctrl_init_sources(void); |
| 75 | |
| 76 | /** |
| 77 | * \brief Initialize clock sources |
| 78 | */ |
| 79 | void _oscctrl_init_sources(void); |
| 80 | |
| 81 | /** |
| 82 | * \brief Initialize clock sources that need input reference clocks |
| 83 | */ |
| 84 | void _sysctrl_init_referenced_generators(void); |
| 85 | |
| 86 | /** |
| 87 | * \brief Initialize clock sources that need input reference clocks |
| 88 | */ |
| 89 | void _oscctrl_init_referenced_generators(void); |
| 90 | |
| 91 | /** |
| 92 | * \brief Initialize master clock generator |
| 93 | */ |
| 94 | void _mclk_init(void); |
| 95 | |
| 96 | /** |
| 97 | * \brief Initialize clock generator |
| 98 | */ |
| 99 | void _lpmcu_misc_regs_init(void); |
| 100 | |
| 101 | /** |
| 102 | * \brief Initialize clock generator |
| 103 | */ |
| 104 | void _pmc_init(void); |
| 105 | |
| 106 | /** |
| 107 | * \brief Set performance level |
| 108 | * |
| 109 | * \param[in] level The performance level to set |
| 110 | */ |
| 111 | void _set_performance_level(const uint8_t level); |
| 112 | |
| 113 | /** |
| 114 | * \brief Initialize the chip |
| 115 | */ |
| 116 | void _init_chip(void); |
| 117 | |
| 118 | //@} |
| 119 | |
| 120 | #ifdef __cplusplus |
| 121 | } |
| 122 | #endif |
| 123 | /**@}*/ |
| 124 | #endif /* _HPL_INIT_H_INCLUDED */ |