![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Color Oled(SSD1331) connect to STMicroelectronics Nucleo-F466
mbed-os/targets/TARGET_Atmel/TARGET_SAM_CortexM4/drivers/rtt/rtt.c@0:8fdf9a60065b, 2018-10-10 (annotated)
- Committer:
- kadonotakashi
- Date:
- Wed Oct 10 00:33:53 2018 +0000
- Revision:
- 0:8fdf9a60065b
how to make mbed librry
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kadonotakashi | 0:8fdf9a60065b | 1 | /** |
kadonotakashi | 0:8fdf9a60065b | 2 | * \file |
kadonotakashi | 0:8fdf9a60065b | 3 | * |
kadonotakashi | 0:8fdf9a60065b | 4 | * \brief Real-time Timer (RTT) driver for SAM. |
kadonotakashi | 0:8fdf9a60065b | 5 | * |
kadonotakashi | 0:8fdf9a60065b | 6 | * Copyright (c) 2011-2015 Atmel Corporation. All rights reserved. |
kadonotakashi | 0:8fdf9a60065b | 7 | * |
kadonotakashi | 0:8fdf9a60065b | 8 | * \asf_license_start |
kadonotakashi | 0:8fdf9a60065b | 9 | * |
kadonotakashi | 0:8fdf9a60065b | 10 | * \page License |
kadonotakashi | 0:8fdf9a60065b | 11 | * |
kadonotakashi | 0:8fdf9a60065b | 12 | * Redistribution and use in source and binary forms, with or without |
kadonotakashi | 0:8fdf9a60065b | 13 | * modification, are permitted provided that the following conditions are met: |
kadonotakashi | 0:8fdf9a60065b | 14 | * |
kadonotakashi | 0:8fdf9a60065b | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
kadonotakashi | 0:8fdf9a60065b | 16 | * this list of conditions and the following disclaimer. |
kadonotakashi | 0:8fdf9a60065b | 17 | * |
kadonotakashi | 0:8fdf9a60065b | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
kadonotakashi | 0:8fdf9a60065b | 19 | * this list of conditions and the following disclaimer in the documentation |
kadonotakashi | 0:8fdf9a60065b | 20 | * and/or other materials provided with the distribution. |
kadonotakashi | 0:8fdf9a60065b | 21 | * |
kadonotakashi | 0:8fdf9a60065b | 22 | * 3. The name of Atmel may not be used to endorse or promote products derived |
kadonotakashi | 0:8fdf9a60065b | 23 | * from this software without specific prior written permission. |
kadonotakashi | 0:8fdf9a60065b | 24 | * |
kadonotakashi | 0:8fdf9a60065b | 25 | * 4. This software may only be redistributed and used in connection with an |
kadonotakashi | 0:8fdf9a60065b | 26 | * Atmel microcontroller product. |
kadonotakashi | 0:8fdf9a60065b | 27 | * |
kadonotakashi | 0:8fdf9a60065b | 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED |
kadonotakashi | 0:8fdf9a60065b | 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
kadonotakashi | 0:8fdf9a60065b | 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE |
kadonotakashi | 0:8fdf9a60065b | 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR |
kadonotakashi | 0:8fdf9a60065b | 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
kadonotakashi | 0:8fdf9a60065b | 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
kadonotakashi | 0:8fdf9a60065b | 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
kadonotakashi | 0:8fdf9a60065b | 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
kadonotakashi | 0:8fdf9a60065b | 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
kadonotakashi | 0:8fdf9a60065b | 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
kadonotakashi | 0:8fdf9a60065b | 38 | * POSSIBILITY OF SUCH DAMAGE. |
kadonotakashi | 0:8fdf9a60065b | 39 | * |
kadonotakashi | 0:8fdf9a60065b | 40 | * \asf_license_stop |
kadonotakashi | 0:8fdf9a60065b | 41 | * |
kadonotakashi | 0:8fdf9a60065b | 42 | */ |
kadonotakashi | 0:8fdf9a60065b | 43 | /* |
kadonotakashi | 0:8fdf9a60065b | 44 | * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> |
kadonotakashi | 0:8fdf9a60065b | 45 | */ |
kadonotakashi | 0:8fdf9a60065b | 46 | |
kadonotakashi | 0:8fdf9a60065b | 47 | #include "rtt.h" |
kadonotakashi | 0:8fdf9a60065b | 48 | |
kadonotakashi | 0:8fdf9a60065b | 49 | /// @cond 0 |
kadonotakashi | 0:8fdf9a60065b | 50 | /**INDENT-OFF**/ |
kadonotakashi | 0:8fdf9a60065b | 51 | #ifdef __cplusplus |
kadonotakashi | 0:8fdf9a60065b | 52 | extern "C" { |
kadonotakashi | 0:8fdf9a60065b | 53 | #endif |
kadonotakashi | 0:8fdf9a60065b | 54 | /**INDENT-ON**/ |
kadonotakashi | 0:8fdf9a60065b | 55 | /// @endcond |
kadonotakashi | 0:8fdf9a60065b | 56 | |
kadonotakashi | 0:8fdf9a60065b | 57 | /** |
kadonotakashi | 0:8fdf9a60065b | 58 | * \defgroup sam_drivers_rtt_group Real-time Timer (RTT) |
kadonotakashi | 0:8fdf9a60065b | 59 | * |
kadonotakashi | 0:8fdf9a60065b | 60 | * The Real-time Timer is built around a 32-bit counter used to count |
kadonotakashi | 0:8fdf9a60065b | 61 | * roll-over events of the programmable 16-bit prescaler, which enables |
kadonotakashi | 0:8fdf9a60065b | 62 | * counting elapsed seconds from a 32 kHz slow clock source. |
kadonotakashi | 0:8fdf9a60065b | 63 | * This is a driver for configuration and use of the RTT peripheral. |
kadonotakashi | 0:8fdf9a60065b | 64 | * |
kadonotakashi | 0:8fdf9a60065b | 65 | * @{ |
kadonotakashi | 0:8fdf9a60065b | 66 | */ |
kadonotakashi | 0:8fdf9a60065b | 67 | |
kadonotakashi | 0:8fdf9a60065b | 68 | /* |
kadonotakashi | 0:8fdf9a60065b | 69 | * In follow series chip, the bit RTC1HZ and RTTDIS in RTT_MR are write only. |
kadonotakashi | 0:8fdf9a60065b | 70 | * So we use a variable to record status of these bits. |
kadonotakashi | 0:8fdf9a60065b | 71 | */ |
kadonotakashi | 0:8fdf9a60065b | 72 | #if (SAM4N || SAM4S || SAM4E || SAM4C || SAMG51 || SAM4CP || SAM4CM || SAMV71 || SAMV70 || SAME70 || SAMS70) |
kadonotakashi | 0:8fdf9a60065b | 73 | static uint32_t g_wobits_in_rtt_mr = 0; |
kadonotakashi | 0:8fdf9a60065b | 74 | #endif |
kadonotakashi | 0:8fdf9a60065b | 75 | |
kadonotakashi | 0:8fdf9a60065b | 76 | /** |
kadonotakashi | 0:8fdf9a60065b | 77 | * \brief Initialize the given RTT. |
kadonotakashi | 0:8fdf9a60065b | 78 | * |
kadonotakashi | 0:8fdf9a60065b | 79 | * \note This function restarts the real-time timer. If w_prescaler is equal to zero, |
kadonotakashi | 0:8fdf9a60065b | 80 | * the prescaler period is equal to 2^16 * SCLK period. If not, the prescaler period |
kadonotakashi | 0:8fdf9a60065b | 81 | * is equal to us_prescaler * SCLK period. |
kadonotakashi | 0:8fdf9a60065b | 82 | * |
kadonotakashi | 0:8fdf9a60065b | 83 | * \param p_rtt Pointer to an RTT instance. |
kadonotakashi | 0:8fdf9a60065b | 84 | * \param us_prescaler Prescaler value for the RTT. |
kadonotakashi | 0:8fdf9a60065b | 85 | * |
kadonotakashi | 0:8fdf9a60065b | 86 | * \return 0 if successful. |
kadonotakashi | 0:8fdf9a60065b | 87 | */ |
kadonotakashi | 0:8fdf9a60065b | 88 | uint32_t rtt_init(Rtt *p_rtt, uint16_t us_prescaler) |
kadonotakashi | 0:8fdf9a60065b | 89 | { |
kadonotakashi | 0:8fdf9a60065b | 90 | #if (SAM4N || SAM4S || SAM4E || SAM4C || SAMG51 || SAM4CP || SAM4CM || SAMV71 || SAMV70 || SAME70 || SAMS70) |
kadonotakashi | 0:8fdf9a60065b | 91 | p_rtt->RTT_MR = (us_prescaler | RTT_MR_RTTRST | g_wobits_in_rtt_mr); |
kadonotakashi | 0:8fdf9a60065b | 92 | #else |
kadonotakashi | 0:8fdf9a60065b | 93 | p_rtt->RTT_MR = (us_prescaler | RTT_MR_RTTRST); |
kadonotakashi | 0:8fdf9a60065b | 94 | #endif |
kadonotakashi | 0:8fdf9a60065b | 95 | return 0; |
kadonotakashi | 0:8fdf9a60065b | 96 | } |
kadonotakashi | 0:8fdf9a60065b | 97 | |
kadonotakashi | 0:8fdf9a60065b | 98 | #if (SAM4N || SAM4S || SAM4E || SAM4C || SAMG51 || SAM4CP || SAM4CM || SAMV71 || SAMV70 || SAME70 || SAMS70) |
kadonotakashi | 0:8fdf9a60065b | 99 | /** |
kadonotakashi | 0:8fdf9a60065b | 100 | * \brief Select RTT counter source. |
kadonotakashi | 0:8fdf9a60065b | 101 | * |
kadonotakashi | 0:8fdf9a60065b | 102 | * \param p_rtt Pointer to an RTT instance. |
kadonotakashi | 0:8fdf9a60065b | 103 | * \param is_rtc_sel RTC 1Hz Clock Selection. |
kadonotakashi | 0:8fdf9a60065b | 104 | */ |
kadonotakashi | 0:8fdf9a60065b | 105 | void rtt_sel_source(Rtt *p_rtt, bool is_rtc_sel) |
kadonotakashi | 0:8fdf9a60065b | 106 | { |
kadonotakashi | 0:8fdf9a60065b | 107 | if(is_rtc_sel) { |
kadonotakashi | 0:8fdf9a60065b | 108 | g_wobits_in_rtt_mr |= RTT_MR_RTC1HZ; |
kadonotakashi | 0:8fdf9a60065b | 109 | p_rtt->RTT_MR |= g_wobits_in_rtt_mr; |
kadonotakashi | 0:8fdf9a60065b | 110 | } else { |
kadonotakashi | 0:8fdf9a60065b | 111 | g_wobits_in_rtt_mr &= ~RTT_MR_RTC1HZ; |
kadonotakashi | 0:8fdf9a60065b | 112 | p_rtt->RTT_MR |= g_wobits_in_rtt_mr; |
kadonotakashi | 0:8fdf9a60065b | 113 | } |
kadonotakashi | 0:8fdf9a60065b | 114 | } |
kadonotakashi | 0:8fdf9a60065b | 115 | |
kadonotakashi | 0:8fdf9a60065b | 116 | /** |
kadonotakashi | 0:8fdf9a60065b | 117 | * \brief Enable RTT. |
kadonotakashi | 0:8fdf9a60065b | 118 | * |
kadonotakashi | 0:8fdf9a60065b | 119 | * \param p_rtt Pointer to an RTT instance. |
kadonotakashi | 0:8fdf9a60065b | 120 | */ |
kadonotakashi | 0:8fdf9a60065b | 121 | void rtt_enable(Rtt *p_rtt) |
kadonotakashi | 0:8fdf9a60065b | 122 | { |
kadonotakashi | 0:8fdf9a60065b | 123 | g_wobits_in_rtt_mr &= ~RTT_MR_RTTDIS; |
kadonotakashi | 0:8fdf9a60065b | 124 | p_rtt->RTT_MR |= g_wobits_in_rtt_mr; |
kadonotakashi | 0:8fdf9a60065b | 125 | } |
kadonotakashi | 0:8fdf9a60065b | 126 | /** |
kadonotakashi | 0:8fdf9a60065b | 127 | * \brief Disable RTT. |
kadonotakashi | 0:8fdf9a60065b | 128 | * |
kadonotakashi | 0:8fdf9a60065b | 129 | * \param p_rtt Pointer to an RTT instance. |
kadonotakashi | 0:8fdf9a60065b | 130 | */ |
kadonotakashi | 0:8fdf9a60065b | 131 | void rtt_disable(Rtt *p_rtt) |
kadonotakashi | 0:8fdf9a60065b | 132 | { |
kadonotakashi | 0:8fdf9a60065b | 133 | g_wobits_in_rtt_mr |= RTT_MR_RTTDIS; |
kadonotakashi | 0:8fdf9a60065b | 134 | p_rtt->RTT_MR |= g_wobits_in_rtt_mr; |
kadonotakashi | 0:8fdf9a60065b | 135 | } |
kadonotakashi | 0:8fdf9a60065b | 136 | #elif (SAMG53 || SAMG54 || SAMG55) |
kadonotakashi | 0:8fdf9a60065b | 137 | void rtt_sel_source(Rtt *p_rtt, bool is_rtc_sel) |
kadonotakashi | 0:8fdf9a60065b | 138 | { |
kadonotakashi | 0:8fdf9a60065b | 139 | if(is_rtc_sel) { |
kadonotakashi | 0:8fdf9a60065b | 140 | p_rtt->RTT_MR |= RTT_MR_RTC1HZ; |
kadonotakashi | 0:8fdf9a60065b | 141 | } else { |
kadonotakashi | 0:8fdf9a60065b | 142 | p_rtt->RTT_MR &= ~RTT_MR_RTC1HZ; |
kadonotakashi | 0:8fdf9a60065b | 143 | } |
kadonotakashi | 0:8fdf9a60065b | 144 | } |
kadonotakashi | 0:8fdf9a60065b | 145 | |
kadonotakashi | 0:8fdf9a60065b | 146 | void rtt_enable(Rtt *p_rtt) |
kadonotakashi | 0:8fdf9a60065b | 147 | { |
kadonotakashi | 0:8fdf9a60065b | 148 | p_rtt->RTT_MR &= ~RTT_MR_RTTDIS; |
kadonotakashi | 0:8fdf9a60065b | 149 | } |
kadonotakashi | 0:8fdf9a60065b | 150 | /** |
kadonotakashi | 0:8fdf9a60065b | 151 | * \brief Disable RTT. |
kadonotakashi | 0:8fdf9a60065b | 152 | * |
kadonotakashi | 0:8fdf9a60065b | 153 | * \param p_rtt Pointer to an RTT instance. |
kadonotakashi | 0:8fdf9a60065b | 154 | */ |
kadonotakashi | 0:8fdf9a60065b | 155 | void rtt_disable(Rtt *p_rtt) |
kadonotakashi | 0:8fdf9a60065b | 156 | { |
kadonotakashi | 0:8fdf9a60065b | 157 | p_rtt->RTT_MR |= RTT_MR_RTTDIS; |
kadonotakashi | 0:8fdf9a60065b | 158 | } |
kadonotakashi | 0:8fdf9a60065b | 159 | #endif |
kadonotakashi | 0:8fdf9a60065b | 160 | |
kadonotakashi | 0:8fdf9a60065b | 161 | /** |
kadonotakashi | 0:8fdf9a60065b | 162 | * \brief Enable RTT interrupts. |
kadonotakashi | 0:8fdf9a60065b | 163 | * |
kadonotakashi | 0:8fdf9a60065b | 164 | * \param p_rtt Pointer to an RTT instance. |
kadonotakashi | 0:8fdf9a60065b | 165 | * \param ul_sources Interrupts to be enabled. |
kadonotakashi | 0:8fdf9a60065b | 166 | */ |
kadonotakashi | 0:8fdf9a60065b | 167 | void rtt_enable_interrupt(Rtt *p_rtt, uint32_t ul_sources) |
kadonotakashi | 0:8fdf9a60065b | 168 | { |
kadonotakashi | 0:8fdf9a60065b | 169 | uint32_t temp; |
kadonotakashi | 0:8fdf9a60065b | 170 | |
kadonotakashi | 0:8fdf9a60065b | 171 | temp = p_rtt->RTT_MR; |
kadonotakashi | 0:8fdf9a60065b | 172 | temp |= ul_sources; |
kadonotakashi | 0:8fdf9a60065b | 173 | #if (SAM4N || SAM4S || SAM4E || SAM4C || SAMG51 || SAM4CP || SAM4CM || SAMV71 || SAMV70 || SAME70 || SAMS70) |
kadonotakashi | 0:8fdf9a60065b | 174 | temp |= g_wobits_in_rtt_mr; |
kadonotakashi | 0:8fdf9a60065b | 175 | #endif |
kadonotakashi | 0:8fdf9a60065b | 176 | p_rtt->RTT_MR = temp; |
kadonotakashi | 0:8fdf9a60065b | 177 | } |
kadonotakashi | 0:8fdf9a60065b | 178 | |
kadonotakashi | 0:8fdf9a60065b | 179 | /** |
kadonotakashi | 0:8fdf9a60065b | 180 | * \brief Disable RTT interrupts. |
kadonotakashi | 0:8fdf9a60065b | 181 | * |
kadonotakashi | 0:8fdf9a60065b | 182 | * \param p_rtt Pointer to an RTT instance. |
kadonotakashi | 0:8fdf9a60065b | 183 | * \param ul_sources Interrupts to be disabled. |
kadonotakashi | 0:8fdf9a60065b | 184 | */ |
kadonotakashi | 0:8fdf9a60065b | 185 | void rtt_disable_interrupt(Rtt *p_rtt, uint32_t ul_sources) |
kadonotakashi | 0:8fdf9a60065b | 186 | { |
kadonotakashi | 0:8fdf9a60065b | 187 | uint32_t temp = 0; |
kadonotakashi | 0:8fdf9a60065b | 188 | |
kadonotakashi | 0:8fdf9a60065b | 189 | temp = p_rtt->RTT_MR; |
kadonotakashi | 0:8fdf9a60065b | 190 | temp &= (~ul_sources); |
kadonotakashi | 0:8fdf9a60065b | 191 | #if (SAM4N || SAM4S || SAM4E || SAM4C || SAMG51 || SAM4CP || SAM4CM || SAMV71 || SAMV70 || SAME70 || SAMS70) |
kadonotakashi | 0:8fdf9a60065b | 192 | temp |= g_wobits_in_rtt_mr; |
kadonotakashi | 0:8fdf9a60065b | 193 | #endif |
kadonotakashi | 0:8fdf9a60065b | 194 | p_rtt->RTT_MR = temp; |
kadonotakashi | 0:8fdf9a60065b | 195 | } |
kadonotakashi | 0:8fdf9a60065b | 196 | |
kadonotakashi | 0:8fdf9a60065b | 197 | /** |
kadonotakashi | 0:8fdf9a60065b | 198 | * \brief Read the current value of the RTT timer value. |
kadonotakashi | 0:8fdf9a60065b | 199 | * |
kadonotakashi | 0:8fdf9a60065b | 200 | * \param p_rtt Pointer to an RTT instance. |
kadonotakashi | 0:8fdf9a60065b | 201 | * |
kadonotakashi | 0:8fdf9a60065b | 202 | * \return The current Real-time Timer value. |
kadonotakashi | 0:8fdf9a60065b | 203 | */ |
kadonotakashi | 0:8fdf9a60065b | 204 | uint32_t rtt_read_timer_value(Rtt *p_rtt) |
kadonotakashi | 0:8fdf9a60065b | 205 | { |
kadonotakashi | 0:8fdf9a60065b | 206 | return p_rtt->RTT_VR; |
kadonotakashi | 0:8fdf9a60065b | 207 | } |
kadonotakashi | 0:8fdf9a60065b | 208 | |
kadonotakashi | 0:8fdf9a60065b | 209 | /** |
kadonotakashi | 0:8fdf9a60065b | 210 | * \brief Get the status register value of the given RTT. |
kadonotakashi | 0:8fdf9a60065b | 211 | * |
kadonotakashi | 0:8fdf9a60065b | 212 | * \param p_rtt Pointer to an RTT instance. |
kadonotakashi | 0:8fdf9a60065b | 213 | * |
kadonotakashi | 0:8fdf9a60065b | 214 | * \return The Real-time Timer status. |
kadonotakashi | 0:8fdf9a60065b | 215 | */ |
kadonotakashi | 0:8fdf9a60065b | 216 | uint32_t rtt_get_status(Rtt *p_rtt) |
kadonotakashi | 0:8fdf9a60065b | 217 | { |
kadonotakashi | 0:8fdf9a60065b | 218 | return p_rtt->RTT_SR; |
kadonotakashi | 0:8fdf9a60065b | 219 | } |
kadonotakashi | 0:8fdf9a60065b | 220 | |
kadonotakashi | 0:8fdf9a60065b | 221 | /** |
kadonotakashi | 0:8fdf9a60065b | 222 | * \brief Configure the RTT to generate an alarm at the given time. |
kadonotakashi | 0:8fdf9a60065b | 223 | * |
kadonotakashi | 0:8fdf9a60065b | 224 | * \param p_rtt Pointer to an RTT instance. |
kadonotakashi | 0:8fdf9a60065b | 225 | * \param ul_alarm_time Alarm time. |
kadonotakashi | 0:8fdf9a60065b | 226 | * |
kadonotakashi | 0:8fdf9a60065b | 227 | * \retval 0 Configuration is done. |
kadonotakashi | 0:8fdf9a60065b | 228 | * \retval 1 Parameter error. |
kadonotakashi | 0:8fdf9a60065b | 229 | */ |
kadonotakashi | 0:8fdf9a60065b | 230 | uint32_t rtt_write_alarm_time(Rtt *p_rtt, uint32_t ul_alarm_time) |
kadonotakashi | 0:8fdf9a60065b | 231 | { |
kadonotakashi | 0:8fdf9a60065b | 232 | uint32_t flag; |
kadonotakashi | 0:8fdf9a60065b | 233 | |
kadonotakashi | 0:8fdf9a60065b | 234 | if (ul_alarm_time == 0) { |
kadonotakashi | 0:8fdf9a60065b | 235 | return 1; |
kadonotakashi | 0:8fdf9a60065b | 236 | } |
kadonotakashi | 0:8fdf9a60065b | 237 | |
kadonotakashi | 0:8fdf9a60065b | 238 | flag = p_rtt->RTT_MR & RTT_MR_ALMIEN; |
kadonotakashi | 0:8fdf9a60065b | 239 | |
kadonotakashi | 0:8fdf9a60065b | 240 | rtt_disable_interrupt(RTT, RTT_MR_ALMIEN); |
kadonotakashi | 0:8fdf9a60065b | 241 | |
kadonotakashi | 0:8fdf9a60065b | 242 | /* Alarm time = ALMV + 1 */ |
kadonotakashi | 0:8fdf9a60065b | 243 | p_rtt->RTT_AR = ul_alarm_time - 1; |
kadonotakashi | 0:8fdf9a60065b | 244 | |
kadonotakashi | 0:8fdf9a60065b | 245 | if (flag) { |
kadonotakashi | 0:8fdf9a60065b | 246 | rtt_enable_interrupt(RTT, RTT_MR_ALMIEN); |
kadonotakashi | 0:8fdf9a60065b | 247 | } |
kadonotakashi | 0:8fdf9a60065b | 248 | |
kadonotakashi | 0:8fdf9a60065b | 249 | return 0; |
kadonotakashi | 0:8fdf9a60065b | 250 | } |
kadonotakashi | 0:8fdf9a60065b | 251 | |
kadonotakashi | 0:8fdf9a60065b | 252 | //@} |
kadonotakashi | 0:8fdf9a60065b | 253 | |
kadonotakashi | 0:8fdf9a60065b | 254 | /// @cond 0 |
kadonotakashi | 0:8fdf9a60065b | 255 | /**INDENT-OFF**/ |
kadonotakashi | 0:8fdf9a60065b | 256 | #ifdef __cplusplus |
kadonotakashi | 0:8fdf9a60065b | 257 | } |
kadonotakashi | 0:8fdf9a60065b | 258 | #endif |
kadonotakashi | 0:8fdf9a60065b | 259 | /**INDENT-ON**/ |
kadonotakashi | 0:8fdf9a60065b | 260 | /// @endcond |